vertebrae 0.8.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03be6678c9ce04755fe5c66703664b7faaeab9a8a17f80ee656c7e3d462e9c08
4
- data.tar.gz: 729b2386d9e34cdc5876be23f0057afdc0fe77966332d0ca5b3eeba49712cd1c
3
+ metadata.gz: 62eabfcd0080454194f02c772758fcac1dee7998c264813b715f729c01f6deec
4
+ data.tar.gz: 563e98c3ad61dc9040cc26134d795eb884d535197963d736f7a76e121f66d29f
5
5
  SHA512:
6
- metadata.gz: 846315913ccbd3e2ce3a844649e6d05fc778ed4d42c4e7a1820bb272cd692c3dda82394eb8728bcab49d7c462075c4c97c22c4e878bf54518a6fa3dd2c141808
7
- data.tar.gz: 41b1c00b5b8ef6958897ec86fdfc4b3464984d06a053050e9d182a500e11aef84a08b24e6b1052d064c9cf7090fa64ba6c84dfc24d26bfd6f3f2091bbff34a94
6
+ metadata.gz: 703b18a9b5ffa5b538a43ef6c68caa99d22c34411a75fca19bce78e020183811d3e9f4bb5b1708d365928f8b7fec8402325affea87491807b955ab5f38572355
7
+ data.tar.gz: 59266d8c1051b15946274669008e702eafb08896a089a3f08eb6498d35b65d6a5ace24c3a72177d499a91a5fcac3be727b4a7a75d446020913537b2663eea7e4
@@ -6,9 +6,9 @@ jobs:
6
6
  runs-on: ubuntu-latest
7
7
  steps:
8
8
  - uses: actions/checkout@v2
9
- - uses: ruby/setup-ruby@v1
9
+ - uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
10
10
  with:
11
- ruby-version: 3.2
11
+ ruby-version: 2.7
12
12
  bundler-cache: true
13
13
  - run: bundle install
14
14
  - run: bundle exec rspec
@@ -16,9 +16,9 @@ jobs:
16
16
  runs-on: ubuntu-latest
17
17
  steps:
18
18
  - uses: actions/checkout@v2
19
- - uses: ruby/setup-ruby@v1
19
+ - uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
20
20
  with:
21
- ruby-version: 3.2
21
+ ruby-version: 2.7
22
22
  bundler-cache: true
23
23
  - run: bundle install
24
24
  - run: bundle exec rubocop
data/Gemfile CHANGED
@@ -1,15 +1,14 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gem 'activesupport', '>= 5.1.4'
4
- gem 'faraday', '~> 1'
5
- gem 'faraday_middleware', '> 0.12.2'
6
- gem 'hashie', '> 3.5.7'
4
+ gem 'faraday', '> 2.0'
5
+ gem 'faraday-mashify'
6
+ gem 'faraday-multipart'
7
7
 
8
8
  # Add dependencies to develop your gem here.
9
9
  # Include everything needed to run rake, tests, features, etc.
10
10
  group :development do
11
11
  gem "rspec"
12
- gem "rake"
13
12
  gem "bundler"
14
13
  gem "webmock"
15
14
  gem "rspec-its"
data/Rakefile CHANGED
@@ -4,6 +4,7 @@ require 'rubygems'
4
4
  require 'bundler'
5
5
  require 'bundler/gem_tasks'
6
6
 
7
+
7
8
  begin
8
9
  Bundler.setup(:default, :development)
9
10
  rescue Bundler::BundlerError => e
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0
@@ -1,9 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'faraday'
4
- require 'faraday_middleware'
5
- require 'vertebrae/response/raise_error'
6
- require 'vertebrae/authorization'
4
+ require 'faraday/multipart'
5
+ require 'faraday/mashify'
6
+ require 'response/raise_error'
7
+ require 'authorization'
7
8
 
8
9
  module Vertebrae
9
10
  class Connection
@@ -37,17 +38,17 @@ module Vertebrae
37
38
  #
38
39
  def default_middleware
39
40
  Proc.new do |builder|
40
- builder.use Faraday::Request::Multipart
41
+ builder.use Faraday::Multipart::Middleware
41
42
  builder.use Faraday::Request::UrlEncoded
42
43
  if configuration.authenticated?
43
- builder.use Faraday::Request::BasicAuthentication, configuration.username, configuration.password
44
+ builder.use Faraday::Request::Authorization, :basic, configuration.username, configuration.password
44
45
  end
45
46
 
46
47
  builder.use Faraday::Response::Logger if ENV['DEBUG']
47
48
 
48
49
  unless options[:raw]
49
- builder.use FaradayMiddleware::Mashify
50
- builder.use FaradayMiddleware::ParseJson
50
+ builder.use Faraday::Mashify::Middleware
51
+ builder.use Faraday::Response::Json
51
52
  end
52
53
  builder.use Vertebrae::Response::RaiseError
53
54
  builder.adapter configuration.adapter
@@ -1,8 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'faraday/response'
4
+
3
5
  module Vertebrae
4
6
  module Response
5
- class RaiseError < Faraday::Response::Middleware
7
+ class RaiseError < Faraday::Middleware
6
8
 
7
9
  def on_complete(response)
8
10
  status_code = response[:status].to_i
@@ -12,4 +14,4 @@ module Vertebrae
12
14
  end
13
15
  end
14
16
  end # Response::RaiseError
15
- end
17
+ end
data/lib/vertebrae.rb CHANGED
@@ -2,18 +2,18 @@
2
2
 
3
3
  require 'active_support/all'
4
4
 
5
- require 'vertebrae/constants'
6
- require 'vertebrae/authorization'
7
- require 'vertebrae/configuration'
8
- require 'vertebrae/connection'
9
- require 'vertebrae/request'
10
- require 'vertebrae/response_error'
11
- require 'vertebrae/api'
12
- require 'vertebrae/base'
13
- require 'vertebrae/model'
14
- require 'vertebrae/version'
5
+ require 'constants'
6
+ require 'authorization'
7
+ require 'configuration'
8
+ require 'connection'
9
+ require 'request'
10
+ require 'response_error'
11
+ require 'api'
12
+ require 'base'
13
+ require 'model'
14
+ require 'version'
15
15
 
16
- require 'vertebrae/railties' if defined? Rails
16
+ require 'railties' if defined? Rails
17
17
 
18
18
  module Vertebrae
19
19
 
data/spec/api_spec.rb ADDED
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Vertebrae::API do
6
+ subject { described_class.new(options) }
7
+
8
+ it { expect(described_class.included_modules).to include Vertebrae::Request }
9
+
10
+ describe 'initialize' do
11
+ before(:each) do
12
+ allow_any_instance_of(Vertebrae::API).to receive(:default_options).and_return({content_type: 'foo'})
13
+ end
14
+
15
+ context 'with an empty hash' do
16
+ let(:options) { {} }
17
+ specify { expect(subject.connection.options).to eq({content_type: 'foo'}) }
18
+ end
19
+
20
+ context 'with a default content-type' do
21
+ let(:options) { {content_type: 'text/csv'} }
22
+ specify { expect(subject.connection.options).to eq({content_type: 'text/csv'}) }
23
+ end
24
+ end
25
+
26
+ describe 'dummy' do
27
+ describe 'should delegate to the client class' do
28
+ specify { expect(Dummy.new).to respond_to(:api) }
29
+ specify { expect(Dummy).to respond_to(:api) }
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,128 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Vertebrae::Configuration do
6
+
7
+ subject { Vertebrae::Configuration.new({}) }
8
+
9
+ {:scheme => described_class::DEFAULT_SCHEME,
10
+ :ssl => described_class::DEFAULT_SSL,
11
+ :user_agent => described_class::DEFAULT_USER_AGENT,
12
+ :username => described_class::DEFAULT_USERNAME,
13
+ :password => described_class::DEFAULT_PASSWORD }.each do | key, value |
14
+ its(key) { should == value }
15
+ its("default_#{key}") { should == value }
16
+ end
17
+
18
+ its(:connection_options) { should be_a Hash }
19
+ its(:connection_options) { should be_empty }
20
+
21
+ describe "override" do
22
+ subject{ Vertebrae::Configuration.new({username: 'foo', password: 'bar', scheme: 'http'}) }
23
+
24
+ its(:default_scheme) { should == described_class::DEFAULT_SCHEME }
25
+ its(:default_username) { should == described_class::DEFAULT_USERNAME }
26
+ its(:default_password) { should == described_class::DEFAULT_PASSWORD }
27
+
28
+ its(:scheme) { should == 'http'}
29
+ its(:username) { should == 'foo'}
30
+ its(:password) { should == 'bar'}
31
+ end
32
+
33
+ describe "setter" do
34
+ before(:each) do
35
+ subject.username = 'foo'
36
+ end
37
+ its(:username) { should == 'foo'}
38
+ its(:default_username) { should == described_class::DEFAULT_USERNAME }
39
+ end
40
+
41
+ describe 'endpoint' do
42
+ context 'with no port specification' do
43
+ subject { Vertebrae::Configuration.new({host: 'test.com', prefix: ''}) }
44
+
45
+ specify { expect(subject.host).to eq('test.com') }
46
+ specify { expect(subject.endpoint).to eq('https://test.com')}
47
+ end
48
+
49
+ context 'with port specification' do
50
+ subject { Vertebrae::Configuration.new({host: 'test.com', prefix: '', port: 8080}) }
51
+
52
+ specify { expect(subject.port).to eq(8080) }
53
+ specify { expect(subject.endpoint).to eq('https://test.com:8080')}
54
+
55
+ context 'with prefix' do
56
+ subject { Vertebrae::Configuration.new({host: 'test.com', prefix: '/api/v1', port: 8080}) }
57
+
58
+ specify { expect(subject.prefix).to eq('/api/v1') }
59
+ specify { expect(subject.endpoint).to eq('https://test.com:8080/api/v1')}
60
+ end
61
+ end
62
+ end
63
+
64
+ describe 'adapter' do
65
+ it 'should default to :net_http' do
66
+ expect(subject.adapter).to eq(:net_http)
67
+ end
68
+ end
69
+
70
+ describe 'adapter=' do
71
+ it 'should allow setting and retrieval' do
72
+ subject.adapter = :foo
73
+ expect(subject.adapter).to eq(:foo)
74
+ end
75
+ end
76
+
77
+ describe '#faraday_options' do
78
+ subject { Vertebrae::Configuration.new(host: 'example.com') }
79
+
80
+ it 'should include headers, ssl, and url settings by default' do
81
+ opts = subject.faraday_options
82
+ expect(opts.keys).to contain_exactly(:headers, :ssl, :url)
83
+ expect(opts[:headers]).to eq({'Accept' => 'application/json;q=0.1',
84
+ 'Accept-Charset' => 'utf-8',
85
+ 'User-Agent' => 'Vertebrae REST Gem',
86
+ 'Content-Type' => 'application/json'})
87
+ expect(opts[:ssl]).to eq({})
88
+ expect(opts[:url]).to eq 'https://example.com/'
89
+ end
90
+
91
+ context 'with connection_options' do
92
+ let(:connection_options) { {ssl: {verify: false},
93
+ timeout: 5} }
94
+
95
+ subject { Vertebrae::Configuration.new(host: 'example.com', connection_options: connection_options) }
96
+
97
+ it 'should override and extend the default options' do
98
+ opts = subject.faraday_options
99
+ expect(opts.keys).to contain_exactly(:headers, :ssl, :timeout, :url)
100
+ expect(opts[:headers]).to eq({'Accept' => 'application/json;q=0.1',
101
+ 'Accept-Charset' => 'utf-8',
102
+ 'User-Agent' => 'Vertebrae REST Gem',
103
+ 'Content-Type' => 'application/json'})
104
+ expect(opts[:ssl]).to eq({verify: false})
105
+ expect(opts[:url]).to eq 'https://example.com/'
106
+ expect(opts[:timeout]).to eq 5
107
+ end
108
+ end
109
+
110
+ context 'with additional_headers' do
111
+ let(:additional_headers) { {'special-auth-token' => 'abcde12345'} }
112
+
113
+ subject { Vertebrae::Configuration.new(host: 'example.com', additional_headers: additional_headers) }
114
+
115
+ it 'should add the additional headers to the other headers' do
116
+ opts = subject.faraday_options
117
+ expect(opts.keys).to contain_exactly(:headers, :ssl, :url)
118
+ expect(opts[:headers]).to eq({'Accept' => 'application/json;q=0.1',
119
+ 'Accept-Charset' => 'utf-8',
120
+ 'User-Agent' => 'Vertebrae REST Gem',
121
+ 'Content-Type' => 'application/json',
122
+ 'special-auth-token' => 'abcde12345'})
123
+ expect(opts[:ssl]).to eq({})
124
+ expect(opts[:url]).to eq 'https://example.com/'
125
+ end
126
+ end
127
+ end
128
+ end
@@ -0,0 +1,7 @@
1
+ module Dummy
2
+ class Client < Vertebrae::API
3
+ def api(options={}, &block)
4
+ @api ||= Vertebrae::API.new(current_options.merge(options), &block)
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ module Dummy
2
+ extend Vertebrae::Base
3
+ class << self
4
+ def new(options = {}, &block)
5
+ Dummy::Client.new(options, &block)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe 'logging' do
6
+ it "should have a logger" do
7
+ expect(Dummy).to respond_to(:logger)
8
+ end
9
+
10
+ it "should be able to log debug methods" do
11
+ expect(Dummy.logger).to respond_to(:debug)
12
+ end
13
+
14
+ it "should be settable" do
15
+ expect(Dummy).to respond_to(:logger=)
16
+ log = double
17
+ Dummy.logger = log
18
+ expect(Dummy.logger).to eq(log)
19
+ end
20
+ end
@@ -0,0 +1,89 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Vertebrae::Request do
6
+ let(:vb) { Vertebrae::API.new }
7
+ let(:path) { 'actionkit.api/rest/v1/action' }
8
+ let(:params) { {} }
9
+ let(:options) { {} }
10
+
11
+ it "knows how to make get request" do
12
+ expect(vb).to receive(:request).with(:get, path, params, options)
13
+ vb.get_request path, params, options
14
+ end
15
+
16
+ it "knows how to make patch request" do
17
+ expect(vb).to receive(:request).with(:patch, path, params, options)
18
+ vb.patch_request path, params, options
19
+ end
20
+
21
+ it "knows how to make post request" do
22
+ expect(vb).to receive(:request).with(:post, path, params, options)
23
+ vb.post_request path, params, options
24
+ end
25
+
26
+ it "knows how to make put request" do
27
+ expect(vb).to receive(:request).with(:put, path, params, options)
28
+ vb.put_request path, params, options
29
+ end
30
+
31
+ it "knows how to make delete request" do
32
+ vb.should_receive(:request).with(:delete, path, params, options)
33
+ vb.delete_request path, params, options
34
+ end
35
+
36
+ describe 'it should result in an appropriately configured connection object when it comes time to run transactions' do
37
+ before(:each) do
38
+ logger = double
39
+ logger.stub(:debug).and_return(true)
40
+ allow(Vertebrae::Base).to receive(:logger).and_return(logger)
41
+ allow_any_instance_of(Vertebrae::API).to receive(:default_options).and_return({host: 'test.com'})
42
+ end
43
+
44
+ context 'with an empty hash' do
45
+ let(:options) { {} }
46
+ it 'should make the request to the default host' do
47
+ stub_request(:get, 'https://test.com/path')
48
+ vb.request(:get, '/path', {}, options)
49
+ end
50
+ end
51
+
52
+ context 'with a different host' do
53
+ let(:options) { {host: 'test2.com'} }
54
+ it 'should make the request to the default host' do
55
+ stub_request(:get, 'https://test2.com/path')
56
+ vb.request(:get, '/path', {}, options)
57
+ end
58
+ end
59
+
60
+ context 'with host specified at client initiation time' do
61
+ let(:options) { {} }
62
+
63
+ let(:vb) { Vertebrae::API.new host: 'test3.com' }
64
+
65
+ it 'should make the request to the default host' do
66
+ stub_request(:get, 'https://test3.com/path')
67
+ vb.request(:get, '/path', {}, options)
68
+ end
69
+
70
+ context 'with a different host' do
71
+ let(:options) { {host: 'test2.com'} }
72
+ it 'should make the request to the default host' do
73
+ stub_request(:get, 'https://test2.com/path')
74
+ vb.request(:get, '/path', {}, options)
75
+ end
76
+ end
77
+ end
78
+
79
+ context 'with basic auth' do
80
+ let(:options) { {} }
81
+ let(:vb) { Vertebrae::API.new username: 'user', password: 'pass' }
82
+
83
+ it 'should make requests with basic auth' do
84
+ stub_request(:get, 'https://test3.com/path').with(basic_auth: %w[user pass])
85
+ vb.request(:get, '/path', {}, {host: 'test3.com'})
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
5
+ require 'rspec'
6
+ require 'vertebrae'
7
+ require 'dummy/dummy'
8
+ require 'dummy/client'
9
+ require 'webmock/rspec'
10
+
11
+ require 'rspec/its'
12
+
13
+ # Requires supporting files with custom matchers and macros, etc,
14
+ # in ./support/ and its subdirectories.
15
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].sort.each {|f| require f}
16
+
17
+ RSpec.configure do |config|
18
+ config.mock_with :rspec do |mocks|
19
+ mocks.syntax = [:should, :expect]
20
+ end
21
+
22
+ config.expect_with :rspec do |c|
23
+ c.syntax = [:should, :expect]
24
+ end
25
+ end
26
+
27
+
28
+ def reset_authentication_for(object)
29
+ %w[username password].each do |item|
30
+ Vertebrae::Base.send("#{item}=", nil)
31
+ object.send("#{item}=", nil)
32
+ end
33
+ end
data/vertebrae.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  lib = File.expand_path('lib', __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'vertebrae/version'
5
+ require 'version'
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "vertebrae".freeze
@@ -11,19 +11,47 @@ Gem::Specification.new do |s|
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Nathan Woodhull".freeze]
14
- s.date = "2023-09-28"
14
+ s.date = "2021-07-23"
15
15
  s.description = "A set of low level infrastructure and reusable code for building API clients".freeze
16
16
  s.email = "nathan@controlshiftlabs.com".freeze
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE.txt",
19
19
  "README.md"
20
20
  ]
21
- # Specify which files should be added to the gem when it is released.
22
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
- s.files = Dir.chdir(File.expand_path(__dir__)) do
24
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
- end
26
-
21
+ s.files = [
22
+ ".document",
23
+ ".github/workflows/ci.yml",
24
+ ".rspec",
25
+ ".rubocop.yml",
26
+ ".ruby-gemset",
27
+ ".ruby-version",
28
+ "Gemfile",
29
+ "LICENSE.txt",
30
+ "README.md",
31
+ "Rakefile",
32
+ "VERSION",
33
+ "lib/api.rb",
34
+ "lib/authorization.rb",
35
+ "lib/base.rb",
36
+ "lib/configuration.rb",
37
+ "lib/connection.rb",
38
+ "lib/constants.rb",
39
+ "lib/core_ext/array.rb",
40
+ "lib/model.rb",
41
+ "lib/railties.rb",
42
+ "lib/request.rb",
43
+ "lib/response/raise_error.rb",
44
+ "lib/response_error.rb",
45
+ "lib/vertebrae.rb",
46
+ "spec/api_spec.rb",
47
+ "spec/configuration_spec.rb",
48
+ "spec/dummy/client.rb",
49
+ "spec/dummy/dummy.rb",
50
+ "spec/logger_spec.rb",
51
+ "spec/request_spec.rb",
52
+ "spec/spec_helper.rb",
53
+ "vertebrae.gemspec"
54
+ ]
27
55
  s.homepage = "http://github.com/controlshift/vertebrae".freeze
28
56
  s.licenses = ["MIT".freeze]
29
57
  s.summary = "API Client Infrastructure".freeze
@@ -32,28 +60,16 @@ Gem::Specification.new do |s|
32
60
  s.specification_version = 4
33
61
  end
34
62
 
35
- if s.respond_to? :add_runtime_dependency then
36
- s.add_runtime_dependency(%q<activesupport>.freeze, [">= 5.1.4"])
37
- s.add_runtime_dependency(%q<faraday>.freeze, ["~> 1"])
38
- s.add_runtime_dependency(%q<faraday_middleware>.freeze, ["> 0.12.2"])
39
- s.add_runtime_dependency(%q<hashie>.freeze, ["> 3.5.7"])
40
- s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
41
- s.add_development_dependency(%q<rake>.freeze, [">= 0"])
42
- s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
43
- s.add_development_dependency(%q<webmock>.freeze, [">= 0"])
44
- s.add_development_dependency(%q<rspec-its>.freeze, [">= 0"])
45
- s.add_development_dependency(%q<rubocop>.freeze, [">= 0"])
46
- else
47
- s.add_dependency(%q<activesupport>.freeze, [">= 5.1.4"])
48
- s.add_dependency(%q<faraday>.freeze, ["~> 1"])
49
- s.add_dependency(%q<faraday_middleware>.freeze, ["> 0.12.2"])
50
- s.add_dependency(%q<hashie>.freeze, ["> 3.5.7"])
51
- s.add_dependency(%q<rspec>.freeze, [">= 0"])
52
- s.add_dependency(%q<rake>.freeze, [">= 0"])
53
- s.add_dependency(%q<bundler>.freeze, [">= 0"])
54
- s.add_dependency(%q<webmock>.freeze, [">= 0"])
55
- s.add_dependency(%q<rspec-its>.freeze, [">= 0"])
56
- s.add_dependency(%q<rubocop>.freeze, [">= 0"])
57
- end
63
+ s.add_runtime_dependency(%q<activesupport>.freeze, [">= 5.1.4"])
64
+ s.add_runtime_dependency(%q<faraday>.freeze, ["~> 2"])
65
+ s.add_runtime_dependency(%q<faraday-mashify>.freeze, [">= 0"])
66
+ s.add_runtime_dependency(%q<faraday-multipart>.freeze, [">= 0"])
67
+
68
+ s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
69
+ s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
70
+ s.add_development_dependency(%q<webmock>.freeze, [">= 0"])
71
+ s.add_development_dependency(%q<rspec-its>.freeze, [">= 0"])
72
+ s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
73
+ s.add_development_dependency(%q<rubocop>.freeze, [">= 0"])
58
74
  end
59
75
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vertebrae
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Woodhull
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-28 00:00:00.000000000 Z
11
+ date: 2021-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -30,42 +30,42 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1'
33
+ version: '2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1'
40
+ version: '2'
41
41
  - !ruby/object:Gem::Dependency
42
- name: faraday_middleware
42
+ name: faraday-mashify
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.12.2
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.12.2
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: hashie
56
+ name: faraday-multipart
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 3.5.7
61
+ version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 3.5.7
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rake
84
+ name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: bundler
98
+ name: webmock
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: webmock
112
+ name: rspec-its
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -123,7 +123,7 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rspec-its
126
+ name: juwelier
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
@@ -161,7 +161,6 @@ extra_rdoc_files:
161
161
  files:
162
162
  - ".document"
163
163
  - ".github/workflows/ci.yml"
164
- - ".gitignore"
165
164
  - ".rspec"
166
165
  - ".rubocop.yml"
167
166
  - ".ruby-gemset"
@@ -170,20 +169,27 @@ files:
170
169
  - LICENSE.txt
171
170
  - README.md
172
171
  - Rakefile
172
+ - VERSION
173
+ - lib/api.rb
174
+ - lib/authorization.rb
175
+ - lib/base.rb
176
+ - lib/configuration.rb
177
+ - lib/connection.rb
178
+ - lib/constants.rb
173
179
  - lib/core_ext/array.rb
180
+ - lib/model.rb
181
+ - lib/railties.rb
182
+ - lib/request.rb
183
+ - lib/response/raise_error.rb
184
+ - lib/response_error.rb
174
185
  - lib/vertebrae.rb
175
- - lib/vertebrae/api.rb
176
- - lib/vertebrae/authorization.rb
177
- - lib/vertebrae/base.rb
178
- - lib/vertebrae/configuration.rb
179
- - lib/vertebrae/connection.rb
180
- - lib/vertebrae/constants.rb
181
- - lib/vertebrae/model.rb
182
- - lib/vertebrae/railties.rb
183
- - lib/vertebrae/request.rb
184
- - lib/vertebrae/response/raise_error.rb
185
- - lib/vertebrae/response_error.rb
186
- - lib/vertebrae/version.rb
186
+ - spec/api_spec.rb
187
+ - spec/configuration_spec.rb
188
+ - spec/dummy/client.rb
189
+ - spec/dummy/dummy.rb
190
+ - spec/logger_spec.rb
191
+ - spec/request_spec.rb
192
+ - spec/spec_helper.rb
187
193
  - vertebrae.gemspec
188
194
  homepage: http://github.com/controlshift/vertebrae
189
195
  licenses:
@@ -204,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
210
  - !ruby/object:Gem::Version
205
211
  version: '0'
206
212
  requirements: []
207
- rubygems_version: 3.4.15
213
+ rubygems_version: 3.4.1
208
214
  signing_key:
209
215
  specification_version: 4
210
216
  summary: API Client Infrastructure
data/.gitignore DELETED
@@ -1,26 +0,0 @@
1
- # rcov generated
2
- coverage
3
- coverage.data
4
-
5
- # rdoc generated
6
- rdoc
7
-
8
- # yard generated
9
- doc
10
- .yardoc
11
-
12
- # bundler
13
- .bundle
14
- Gemfile.lock
15
-
16
- # jeweler generated
17
- pkg
18
-
19
- # For MacOS:
20
- #
21
- .DS_Store
22
- .idea
23
-
24
- # For TextMate
25
- *.tmproj
26
- tmtags
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Vertebrae
4
- VERSION = '0.8.0'
5
- end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes