content_gateway 0.5.2 → 0.6.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
  SHA1:
3
- metadata.gz: '09f4668cfce0325aa25a4deedd9230872b50866f'
4
- data.tar.gz: 99ae88d63d41897fe28e17784d04858007e78edb
3
+ metadata.gz: 0fbe5c94a8e75a4bd2d1b593393bf7e95fb00eb2
4
+ data.tar.gz: 4dea345804cdab15b2aa85df240e0b3f8d4178ea
5
5
  SHA512:
6
- metadata.gz: e4d825a0913af3a1bb450faa6dddf267d333b06dd237b8e4ee8e15e086d94fdfb1b17f38b8b9d49a0604da73a7dfcd86081312976016cd70cd06696b45f5a855
7
- data.tar.gz: 1abb95ab7ef05ae2160f42732a6214665327c513e3ed266b47d285cc9248534e954b8f99b2506ea1b2e1f1d7f8c40d89b83719443164f154d37cf8936b112969
6
+ metadata.gz: 8133b6e29883e98d16a3d23cc70dd44f8020a4406456821f160639ae1722c11d80ab0087c9fa17b9d1f7fdf2e05bfd93e32b639c06651862efee7841ddca86cc
7
+ data.tar.gz: 0643f896c0087a921fc159ecac8d92d95f76759243abe5182873e9e5bcff1fdfacddd79b7960b55e2ef594dfdc5692f50ee1199894384ff07df5a69129684fe7
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.3.3
1
+ ruby-2.3.8
data/Changelog CHANGED
@@ -1,3 +1,7 @@
1
+ 2022-02-11 [0.6.0]
2
+
3
+ * Bugfix: Updated the rest-client gem from 1.0 to 2.1 to fix memory leak issues caused by the old version
4
+
1
5
  2016-12-19 [0.5.2]
2
6
 
3
7
  * Bugfix: Now stale_on_error returns true if theres no config
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
- ruby '2.3.3'
2
+ ruby '2.3.8'
3
3
 
4
4
  gem 'coveralls', require: false
5
5
 
data/Gemfile.lock CHANGED
@@ -1,75 +1,79 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- content_gateway (0.5.2)
4
+ content_gateway (0.6.0)
5
5
  activesupport (>= 3)
6
6
  json (~> 1.0)
7
- rest-client (~> 1.0)
7
+ rest-client (~> 2.1)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (5.0.0.1)
12
+ activesupport (5.2.6)
13
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
- i18n (~> 0.7)
14
+ i18n (>= 0.7, < 2)
15
15
  minitest (~> 5.1)
16
16
  tzinfo (~> 1.1)
17
- byebug (3.5.1)
18
- columnize (~> 0.8)
19
- debugger-linecache (~> 1.2)
20
- slop (~> 3.6)
21
- columnize (0.8.9)
22
- concurrent-ruby (1.0.2)
17
+ byebug (11.0.1)
18
+ concurrent-ruby (1.1.9)
23
19
  coveralls (0.7.1)
24
20
  multi_json (~> 1.3)
25
21
  rest-client
26
22
  simplecov (>= 0.7)
27
23
  term-ansicolor
28
24
  thor
29
- debugger-linecache (1.2.0)
30
- diff-lcs (1.2.5)
31
- domain_name (0.5.20161021)
25
+ diff-lcs (1.5.0)
26
+ docile (1.3.5)
27
+ domain_name (0.5.20190701)
32
28
  unf (>= 0.0.5, < 1.0.0)
33
- http-cookie (1.0.3)
29
+ http-accept (1.7.0)
30
+ http-cookie (1.0.4)
34
31
  domain_name (~> 0.5)
35
- i18n (0.7.0)
36
- json (1.8.3)
37
- mime-types (2.99.3)
38
- minitest (5.10.1)
39
- multi_json (1.7.9)
32
+ i18n (1.9.1)
33
+ concurrent-ruby (~> 1.0)
34
+ json (1.8.6)
35
+ mime-types (3.4.1)
36
+ mime-types-data (~> 3.2015)
37
+ mime-types-data (3.2022.0105)
38
+ minitest (5.15.0)
39
+ multi_json (1.15.0)
40
40
  netrc (0.11.0)
41
- rake (0.9.6)
42
- rest-client (1.8.0)
41
+ rake (13.0.6)
42
+ rest-client (2.1.0)
43
+ http-accept (>= 1.7.0, < 2.0)
43
44
  http-cookie (>= 1.0.2, < 2.0)
44
- mime-types (>= 1.16, < 3.0)
45
- netrc (~> 0.7)
46
- rspec (3.1.0)
47
- rspec-core (~> 3.1.0)
48
- rspec-expectations (~> 3.1.0)
49
- rspec-mocks (~> 3.1.0)
50
- rspec-core (3.1.7)
51
- rspec-support (~> 3.1.0)
52
- rspec-expectations (3.1.2)
45
+ mime-types (>= 1.16, < 4.0)
46
+ netrc (~> 0.8)
47
+ rspec (3.10.0)
48
+ rspec-core (~> 3.10.0)
49
+ rspec-expectations (~> 3.10.0)
50
+ rspec-mocks (~> 3.10.0)
51
+ rspec-core (3.10.2)
52
+ rspec-support (~> 3.10.0)
53
+ rspec-expectations (3.10.2)
53
54
  diff-lcs (>= 1.2.0, < 2.0)
54
- rspec-support (~> 3.1.0)
55
- rspec-mocks (3.1.3)
56
- rspec-support (~> 3.1.0)
57
- rspec-support (3.1.2)
58
- simplecov (0.7.1)
59
- multi_json (~> 1.0)
60
- simplecov-html (~> 0.7.1)
61
- simplecov-html (0.7.1)
62
- slop (3.6.0)
63
- term-ansicolor (1.4.0)
55
+ rspec-support (~> 3.10.0)
56
+ rspec-mocks (3.10.3)
57
+ diff-lcs (>= 1.2.0, < 2.0)
58
+ rspec-support (~> 3.10.0)
59
+ rspec-support (3.10.3)
60
+ simplecov (0.17.1)
61
+ docile (~> 1.1)
62
+ json (>= 1.8, < 3)
63
+ simplecov-html (~> 0.10.0)
64
+ simplecov-html (0.10.2)
65
+ sync (0.5.0)
66
+ term-ansicolor (1.7.1)
64
67
  tins (~> 1.0)
65
- thor (0.19.4)
66
- thread_safe (0.3.5)
67
- tins (1.13.0)
68
- tzinfo (1.2.2)
68
+ thor (1.2.1)
69
+ thread_safe (0.3.6)
70
+ tins (1.31.0)
71
+ sync
72
+ tzinfo (1.2.9)
69
73
  thread_safe (~> 0.1)
70
74
  unf (0.1.4)
71
75
  unf_ext
72
- unf_ext (0.0.7.2)
76
+ unf_ext (0.0.8)
73
77
 
74
78
  PLATFORMS
75
79
  ruby
@@ -83,7 +87,7 @@ DEPENDENCIES
83
87
  simplecov (>= 0.7.1)
84
88
 
85
89
  RUBY VERSION
86
- ruby 2.3.3p222
90
+ ruby 2.3.8p459
87
91
 
88
92
  BUNDLED WITH
89
- 1.13.6
93
+ 2.3.6
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.require_paths = ["lib"]
18
18
 
19
19
  gem.add_dependency "activesupport", ">= 3"
20
- gem.add_dependency "rest-client", "~> 1.0"
20
+ gem.add_dependency "rest-client", "~> 2.1"
21
21
  gem.add_dependency "json", "~> 1.0"
22
22
 
23
23
  gem.add_development_dependency "rspec", ">= 2.3.0"
@@ -1,7 +1,7 @@
1
1
  module ContentGateway
2
2
  class Request
3
3
  def initialize(method, url, headers = {}, payload = {}, proxy = nil, params = {})
4
- data = { method: method, url: url, proxy: proxy || :none }.tap do |h|
4
+ data = { method: method, url: url, proxy: proxy }.tap do |h|
5
5
  h[:payload] = payload if payload.present?
6
6
  h[:headers] = headers if headers.present?
7
7
  h = load_ssl_params(h, params) if params.has_key?(:ssl_certificate)
@@ -11,8 +11,7 @@ module ContentGateway
11
11
  end
12
12
 
13
13
  def execute
14
- @client.execute
15
-
14
+ @client.execute.to_s
16
15
  rescue RestClient::ResourceNotFound => e1
17
16
  raise ContentGateway::ResourceNotFound.new url, e1
18
17
 
@@ -1,3 +1,3 @@
1
1
  module ContentGateway
2
- VERSION = "0.5.2"
2
+ VERSION = "0.6.0"
3
3
  end
@@ -417,7 +417,7 @@ describe ContentGateway::Gateway do
417
417
  private
418
418
 
419
419
  def stub_request(opts, payload = {}, &block)
420
- opts = { method: :get, proxy: :none }.merge(opts)
420
+ opts = { method: :get, proxy: nil }.merge(opts)
421
421
  request = RestClient::Request.new(opts)
422
422
  allow(RestClient::Request).to receive(:new).with(opts).and_return(request)
423
423
 
@@ -429,7 +429,7 @@ describe ContentGateway::Gateway do
429
429
  end
430
430
 
431
431
  def stub_request_with_error(opts, exc)
432
- opts = { method: :get, proxy: :none }.merge(opts)
432
+ opts = { method: :get, proxy: nil }.merge(opts)
433
433
 
434
434
  request = RestClient::Request.new(opts)
435
435
  allow(RestClient::Request).to receive(:new).with(opts).and_return(request)
@@ -11,7 +11,7 @@ describe ContentGateway::Request do
11
11
 
12
12
  let(:client) { double("rest client", execute: "data", url: "/url") }
13
13
 
14
- let(:request_params) { { method: :get, url: "/url", proxy: :none } }
14
+ let(:request_params) { { method: :get, url: "/url", proxy: nil } }
15
15
 
16
16
  describe "#execute" do
17
17
  context "when request is successful" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: content_gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Túlio Ornelas
@@ -11,10 +11,10 @@ authors:
11
11
  - Daniel Martins
12
12
  - Rafael Biriba
13
13
  - Célio Latorraca
14
- autorequire:
14
+ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2016-12-19 00:00:00.000000000 Z
17
+ date: 2022-02-11 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: activesupport
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '1.0'
39
+ version: '2.1'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '1.0'
46
+ version: '2.1'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: json
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -154,7 +154,7 @@ files:
154
154
  homepage: https://github.com/globocom/content-gateway-ruby
155
155
  licenses: []
156
156
  metadata: {}
157
- post_install_message:
157
+ post_install_message:
158
158
  rdoc_options: []
159
159
  require_paths:
160
160
  - lib
@@ -169,9 +169,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  - !ruby/object:Gem::Version
170
170
  version: '0'
171
171
  requirements: []
172
- rubyforge_project:
173
- rubygems_version: 2.5.2
174
- signing_key:
172
+ rubyforge_project:
173
+ rubygems_version: 2.5.2.3
174
+ signing_key:
175
175
  specification_version: 4
176
176
  summary: Content Gateway
177
177
  test_files: