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 +4 -4
- data/.ruby-version +1 -1
- data/Changelog +4 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +51 -47
- data/content-gateway.gemspec +1 -1
- data/lib/content_gateway/request.rb +2 -3
- data/lib/content_gateway/version.rb +1 -1
- data/spec/integration/content_gateway/gateway_spec.rb +2 -2
- data/spec/unit/content_gateway/request_spec.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fbe5c94a8e75a4bd2d1b593393bf7e95fb00eb2
|
4
|
+
data.tar.gz: 4dea345804cdab15b2aa85df240e0b3f8d4178ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8133b6e29883e98d16a3d23cc70dd44f8020a4406456821f160639ae1722c11d80ab0087c9fa17b9d1f7fdf2e05bfd93e32b639c06651862efee7841ddca86cc
|
7
|
+
data.tar.gz: 0643f896c0087a921fc159ecac8d92d95f76759243abe5182873e9e5bcff1fdfacddd79b7960b55e2ef594dfdc5692f50ee1199894384ff07df5a69129684fe7
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.3.
|
1
|
+
ruby-2.3.8
|
data/Changelog
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,75 +1,79 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
content_gateway (0.
|
4
|
+
content_gateway (0.6.0)
|
5
5
|
activesupport (>= 3)
|
6
6
|
json (~> 1.0)
|
7
|
-
rest-client (~> 1
|
7
|
+
rest-client (~> 2.1)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (5.
|
12
|
+
activesupport (5.2.6)
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
-
i18n (
|
14
|
+
i18n (>= 0.7, < 2)
|
15
15
|
minitest (~> 5.1)
|
16
16
|
tzinfo (~> 1.1)
|
17
|
-
byebug (
|
18
|
-
|
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
|
-
|
30
|
-
|
31
|
-
domain_name (0.5.
|
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-
|
29
|
+
http-accept (1.7.0)
|
30
|
+
http-cookie (1.0.4)
|
34
31
|
domain_name (~> 0.5)
|
35
|
-
i18n (
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
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.
|
42
|
-
rest-client (1.
|
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, <
|
45
|
-
netrc (~> 0.
|
46
|
-
rspec (3.
|
47
|
-
rspec-core (~> 3.
|
48
|
-
rspec-expectations (~> 3.
|
49
|
-
rspec-mocks (~> 3.
|
50
|
-
rspec-core (3.
|
51
|
-
rspec-support (~> 3.
|
52
|
-
rspec-expectations (3.
|
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.
|
55
|
-
rspec-mocks (3.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
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 (
|
66
|
-
thread_safe (0.3.
|
67
|
-
tins (1.
|
68
|
-
|
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.
|
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.
|
90
|
+
ruby 2.3.8p459
|
87
91
|
|
88
92
|
BUNDLED WITH
|
89
|
-
|
93
|
+
2.3.6
|
data/content-gateway.gemspec
CHANGED
@@ -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
|
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
|
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
|
|
@@ -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:
|
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:
|
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:
|
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.
|
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:
|
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
|
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
|
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:
|