Skip to content

Commit

Permalink
build (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgrammer committed Jan 28, 2024
1 parent 1e0185c commit 2108798
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/pkg/
/spec/reports/
/tmp/
*.gem
20 changes: 5 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,40 +1,30 @@
PATH
remote: .
specs:
mtn_open_api (3.0.0)
mtn_open_api (0.0.1)
json
json-schema
yaml

GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3)
base64
bigdecimal
activesupport (6.1.7.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.2.0)
bigdecimal (3.1.6)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
diff-lcs (1.5.0)
drb (2.2.0)
ruby2_keywords
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.7.1)
json-schema (4.1.1)
addressable (>= 2.8)
minitest (5.21.2)
mutex_m (0.2.0)
public_suffix (5.0.4)
rake (13.1.0)
rspec (3.12.0)
Expand All @@ -50,17 +40,17 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
ruby2_keywords (0.0.5)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
yaml (0.3.0)
zeitwerk (2.6.12)

PLATFORMS
arm64-darwin-22
ruby

DEPENDENCIES
activesupport (>= 6.0.0)
activesupport (~> 6.0)
mtn_open_api!
rake (~> 13.0)
rspec (~> 3.2)
Expand Down
5 changes: 3 additions & 2 deletions lib/mtn_open_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ def self.schemas
end

def self.load_schema(filename)
YAML.load(File.read("schemas/#{filename}.yaml"))
rescue
gem_root = Gem::Specification.find_by_name(NAME).gem_dir
yaml_path = File.expand_path("schemas/#{filename}.yaml", gem_root)
YAML.load(File.read(yaml_path))
end

# Dynamically define classes based on schemas
Expand Down
3 changes: 2 additions & 1 deletion lib/mtn_open_api/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true

module MtnOpenApi
VERSION = "3.0.0"
VERSION = "0.0.1"
NAME = 'mtn_open_api'
end
13 changes: 7 additions & 6 deletions mtn_open_api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
require_relative "lib/mtn_open_api/version"

Gem::Specification.new do |spec|
spec.name = "mtn_open_api"
spec.name = MtnOpenApi::NAME
spec.version = MtnOpenApi::VERSION
spec.authors = ["Paul Jeremiah Mugaya"]
spec.email = ["paulmugaya@live.com"]
spec.email = ["paulgrammer@koodeyo.com"]

spec.summary = 'MTN Open API Ruby Gem'
spec.description = 'A Ruby gem for interacting with MTN Open API.'
Expand All @@ -26,16 +26,17 @@ Gem::Specification.new do |spec|
f.start_with?(*%w[bin/ test/ spec/ features/ .git appveyor Gemfile])
end
end

spec.bindir = "exe"
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "yaml"
spec.add_dependency "json"
spec.add_dependency 'json-schema'
spec.add_dependency "yaml", "~> 0.3.0"
spec.add_dependency "json", "~> 2.7.1"
spec.add_dependency 'json-schema', "~> 4.1.1"

spec.add_development_dependency "rspec", "~> 3.2"
spec.add_development_dependency 'activesupport', '>= 6.0.0'
spec.add_development_dependency 'activesupport', '~> 6.0'
end


0 comments on commit 2108798

Please sign in to comment.