Skip to content

Commit

Permalink
Move schemas out of lib
Browse files Browse the repository at this point in the history
  • Loading branch information
dickdavis committed Jun 25, 2024
1 parent f405326 commit ad30c86
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion anthropic-rb.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
(File.expand_path(f) == __FILE__) ||
f.start_with?(*%w[bin/ spec/ .git .github/ Gemfile])
end
end + Dir.glob('lib/**/*.json')
end + Dir.glob('../../schemas/**/*.json')
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']
Expand Down
8 changes: 2 additions & 6 deletions lib/anthropic/bootstrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ module Anthropic
# Provides methods for bootstrapping the Anthropic gem
module Bootstrapper
def self.load_betas
current_dir = File.dirname(__FILE__)
directory_path = File.join(current_dir, 'betas')

directory_path = File.expand_path('../../schemas/betas', __dir__)
raise "Directory not found: #{directory_path}" unless Dir.exist?(directory_path)

file_paths = Dir.glob(File.join(directory_path, '*.json'))
Expand All @@ -21,9 +19,7 @@ def self.load_betas

# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
def self.load_versions
current_dir = File.dirname(__FILE__)
directory_path = File.join(current_dir, 'versions')

directory_path = File.expand_path('../../schemas/versions', __dir__)
raise "Directory not found: #{directory_path}" unless Dir.exist?(directory_path)

versions = {}
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit ad30c86

Please sign in to comment.