shutl_resource 2.0.0 → 2.0.1

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
  SHA1:
3
- metadata.gz: 374d4ad60025ab11efb2effad701d583b2849130
4
- data.tar.gz: 483917af82f0df4850bde5af995c60639d5d7ab9
3
+ metadata.gz: 696918244a38ca0fd9a105f824662391cb2dea3b
4
+ data.tar.gz: a25d0bcfb3c94c3fca569dc527121e56078079b1
5
5
  SHA512:
6
- metadata.gz: '0592c27d5061d24c3facb589a2c738bfa8de785e88b59c13240caaf225e7fb1d42b1225a0c7a01d17924471b997948ed0b113995436f8057edb6b4168487e305'
7
- data.tar.gz: 4630c98cf74187cb2210a0e8731102f02e319617bd97db8bcbd82a8a4841f4b6f1ec6a3134e7542644e6f26c3cedd6f957e06ecce3ef52adc932af511575c684
6
+ metadata.gz: a31540928199beddcf7b31033b531c04d60c96714bfaba5f186858f06caf5a593d1c0f937dcb1b42305bd530f5ae16e5415c7c2b953ff959bd4b6bb1e8827e80
7
+ data.tar.gz: 7a127180ddea91f26d56657d2403ef47493af7ed9275a544cf683763406c7a52dde2d73cc1479209c7c22f0a51fcb0c3866f050f388c5b1f382f5df2eeb5325a
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
 
2
+ *swp
2
3
  .rbenv-version
3
4
  .ruby-version
4
5
 
data/.travis.yml CHANGED
@@ -2,7 +2,6 @@ language: ruby
2
2
  rvm:
3
3
  - 2.2.6
4
4
  - 2.4.0
5
- - jruby-9.1.6.0
5
+ - jruby-9.1.7.0
6
6
  jdk:
7
- - openjdk7
8
- - oraclejdk7
7
+ - oraclejdk8
data/Gemfile CHANGED
@@ -1,11 +1,10 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- group :development do
3
+ group :development, :test do
4
+ gem 'rake', '~> 10.0'
5
+ gem 'rspec', '~> 2.11.0'
6
+ gem 'webmock', '~> 1.8.7'
4
7
  gem 'license_finder'
5
- end
6
-
7
- group :test do
8
8
  gem 'pry'
9
9
  end
10
- # Specify your gem's dependencies in shutl_resource.gemspec
11
10
  gemspec
data/Rakefile CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
-
4
3
  require 'rspec/core/rake_task'
4
+
5
5
  RSpec::Core::RakeTask.new(:spec) do |t|
6
6
  t.rspec_opts = "--color --format doc"
7
7
  end
8
8
 
9
9
  task :test => :spec
10
- task :default => :spec
10
+ task :default => :spec
@@ -1,4 +1,5 @@
1
1
  require 'open-uri'
2
+
2
3
  module Shutl::Resource
3
4
  module RestClassMethods
4
5
 
@@ -20,7 +21,10 @@ module Shutl::Resource
20
21
  end
21
22
 
22
23
  faraday.response :json
23
- faraday.adapter :net_http_pooled
24
+ faraday.adapter :httpclient do |client| # yields HTTPClient
25
+ client.keep_alive_timeout = 600
26
+ client.ssl_config.timeout = 600
27
+ end
24
28
  end
25
29
  end
26
30
 
@@ -1,5 +1,5 @@
1
1
  module Shutl
2
2
  module Resource
3
- VERSION = '2.0.0'
3
+ VERSION = '2.0.1'
4
4
  end
5
5
  end
@@ -3,7 +3,6 @@ end
3
3
 
4
4
  require 'faraday'
5
5
  require 'faraday_middleware'
6
- require 'faraday_connection_pool'
7
6
 
8
7
  require 'shutl_auth'
9
8
  require 'shutl/resource/version'
@@ -26,9 +26,4 @@ Gem::Specification.new do |gem|
26
26
  gem.add_dependency 'faraday_middleware'
27
27
  gem.add_dependency 'faraday-conductivity'
28
28
  gem.add_dependency 'faraday_connection_pool'
29
-
30
- gem.add_development_dependency 'rake', '~> 10.0'
31
- gem.add_development_dependency 'rspec', '~> 2.11.0'
32
-
33
- gem.add_development_dependency 'webmock', '~> 1.8.7'
34
29
  end
@@ -6,7 +6,6 @@ describe Shutl::Resource::Rest do
6
6
  headers:
7
7
  {
8
8
  'Accept' => 'application/json',
9
- 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
10
9
  'Authorization' => 'some auth',
11
10
  'Content-Type' => 'application/json+consumer',
12
11
  'User-Agent' => "Shutl Resource Gem v#{Shutl::Resource::VERSION}",
@@ -41,16 +40,16 @@ describe Shutl::Resource::Rest do
41
40
  let(:expected_headers) {
42
41
  {
43
42
  'Accept' => 'application/json',
44
- 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
45
43
  'Authorization' => 'Bearer some_auth',
46
44
  'Content-Type' => 'application/json',
47
45
  'User-Agent' => "Shutl Resource Gem v#{Shutl::Resource::VERSION}",
48
46
  'X-Request_Id' => 'ABCDE123'
49
47
  }
50
48
  }
49
+
51
50
  before do
52
51
  @request = stub_request(:get, 'http://host/test_singular_resource')
53
- .with(expected_headers)
52
+ .with({headers: expected_headers})
54
53
  .to_return(:status => 200,
55
54
  :body => '{"test_singular_resource": { "a": "a", "b": 2 }}',
56
55
  :headers => response_headers)
@@ -180,4 +179,4 @@ describe Shutl::Resource::Rest do
180
179
  @request.should have_been_requested
181
180
  end
182
181
  end
183
- end
182
+ end
@@ -341,7 +341,6 @@ describe Shutl::Resource::Rest do
341
341
  with(:headers => {
342
342
  'Authorization'=>'Bearer TOKEN',
343
343
  'Accept'=>'application/json',
344
- 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
345
344
  'Content-Type'=>'application/json',
346
345
  'User-Agent'=>"Shutl Resource Gem v#{Shutl::Resource::VERSION}"}).
347
346
  to_return(:status => 200, :body => '{"test_rests": [{ "a": "a", "b": 2 }]}', :headers => {})
@@ -2,4 +2,4 @@ class TestRest
2
2
  include Shutl::Resource::Rest
3
3
  base_uri 'http://host'
4
4
  resource_id :a
5
- end
5
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shutl_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rouchy
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2017-01-16 00:00:00.000000000 Z
16
+ date: 2017-01-24 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: shutl_auth
@@ -99,48 +99,6 @@ dependencies:
99
99
  - - ">="
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
- - !ruby/object:Gem::Dependency
103
- name: rake
104
- requirement: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - "~>"
107
- - !ruby/object:Gem::Version
108
- version: '10.0'
109
- type: :development
110
- prerelease: false
111
- version_requirements: !ruby/object:Gem::Requirement
112
- requirements:
113
- - - "~>"
114
- - !ruby/object:Gem::Version
115
- version: '10.0'
116
- - !ruby/object:Gem::Dependency
117
- name: rspec
118
- requirement: !ruby/object:Gem::Requirement
119
- requirements:
120
- - - "~>"
121
- - !ruby/object:Gem::Version
122
- version: 2.11.0
123
- type: :development
124
- prerelease: false
125
- version_requirements: !ruby/object:Gem::Requirement
126
- requirements:
127
- - - "~>"
128
- - !ruby/object:Gem::Version
129
- version: 2.11.0
130
- - !ruby/object:Gem::Dependency
131
- name: webmock
132
- requirement: !ruby/object:Gem::Requirement
133
- requirements:
134
- - - "~>"
135
- - !ruby/object:Gem::Version
136
- version: 1.8.7
137
- type: :development
138
- prerelease: false
139
- version_requirements: !ruby/object:Gem::Requirement
140
- requirements:
141
- - - "~>"
142
- - !ruby/object:Gem::Version
143
- version: 1.8.7
144
102
  description: Shutl Rest resource
145
103
  email:
146
104
  - davidr@shutl.co.uk