maremma 3.5.11 → 3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +14 -14
- data/lib/maremma.rb +5 -0
- data/lib/maremma/version.rb +1 -1
- data/spec/maremma_spec.rb +14 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64c7b8e828375f7fab850b6701b489c9a173ebc3
|
4
|
+
data.tar.gz: f3e6c5bf75e6ed1c27eae86a428aa1f44cf2f5f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4453d002050d51af43304e691f4132d14397565960c6b740ed691607666273aa0e3abb6ae1cdb61bd863ef3f0e69f9ec607107b320dd4e970d2bf1a505fb1ef
|
7
|
+
data.tar.gz: dacd09e525ea2cbdbee7a351b60f841fd54340f3bde663d653af062699244457939e1ad5ad91587ba1623a519bb72daf42ab0ca8f47d5fcf9b0d7be367fa1ba6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## v.3.6 (October 14, 2017)
|
2
|
+
|
3
|
+
[maremma 3.6](https://github.com/datacite/maremma/releases/tag/v.3.6) was released on October 14, 2017:
|
4
|
+
|
5
|
+
* added support for `patch` verb
|
6
|
+
|
1
7
|
## v.3.5 (February 14, 2017)
|
2
8
|
|
3
9
|
[maremma 3.5](https://github.com/datacite/maremma/releases/tag/v.3.5) was released on February 14, 2017:
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
maremma (3.
|
4
|
+
maremma (3.6)
|
5
5
|
activesupport (>= 4.2.5, < 6)
|
6
6
|
addressable (>= 2.3.6)
|
7
7
|
builder (~> 3.2, >= 3.2.2)
|
@@ -16,13 +16,13 @@ PATH
|
|
16
16
|
GEM
|
17
17
|
remote: https://rubygems.org/
|
18
18
|
specs:
|
19
|
-
activesupport (5.1.
|
19
|
+
activesupport (5.1.4)
|
20
20
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
21
21
|
i18n (~> 0.7)
|
22
22
|
minitest (~> 5.1)
|
23
23
|
tzinfo (~> 1.1)
|
24
|
-
addressable (2.5.
|
25
|
-
public_suffix (
|
24
|
+
addressable (2.5.2)
|
25
|
+
public_suffix (>= 2.0.2, < 4.0)
|
26
26
|
builder (3.2.3)
|
27
27
|
codeclimate-test-reporter (1.0.8)
|
28
28
|
simplecov (<= 0.13)
|
@@ -38,21 +38,21 @@ GEM
|
|
38
38
|
faraday
|
39
39
|
faraday_middleware (0.10.1)
|
40
40
|
faraday (>= 0.7.4, < 1.0)
|
41
|
-
hashdiff (0.3.
|
41
|
+
hashdiff (0.3.7)
|
42
42
|
i18n (0.8.6)
|
43
43
|
json (2.1.0)
|
44
|
-
mini_portile2 (2.
|
44
|
+
mini_portile2 (2.3.0)
|
45
45
|
minitest (5.10.3)
|
46
|
-
multi_json (1.12.
|
46
|
+
multi_json (1.12.2)
|
47
47
|
multipart-post (2.0.0)
|
48
|
-
nokogiri (1.8.
|
49
|
-
mini_portile2 (~> 2.
|
50
|
-
oj (3.3.
|
51
|
-
public_suffix (
|
48
|
+
nokogiri (1.8.1)
|
49
|
+
mini_portile2 (~> 2.3.0)
|
50
|
+
oj (3.3.8)
|
51
|
+
public_suffix (3.0.0)
|
52
52
|
rack (2.0.3)
|
53
53
|
rack-test (0.7.0)
|
54
54
|
rack (>= 1.0, < 3)
|
55
|
-
rake (12.
|
55
|
+
rake (12.1.0)
|
56
56
|
rspec (3.6.0)
|
57
57
|
rspec-core (~> 3.6.0)
|
58
58
|
rspec-expectations (~> 3.6.0)
|
@@ -71,12 +71,12 @@ GEM
|
|
71
71
|
docile (~> 1.1.0)
|
72
72
|
json (>= 1.8, < 3)
|
73
73
|
simplecov-html (~> 0.10.0)
|
74
|
-
simplecov-html (0.10.
|
74
|
+
simplecov-html (0.10.2)
|
75
75
|
thread_safe (0.3.6)
|
76
76
|
tzinfo (1.2.3)
|
77
77
|
thread_safe (~> 0.1)
|
78
78
|
vcr (3.0.3)
|
79
|
-
webmock (3.0
|
79
|
+
webmock (3.1.0)
|
80
80
|
addressable (>= 2.3.6)
|
81
81
|
crack (>= 0.3.2)
|
82
82
|
hashdiff
|
data/lib/maremma.rb
CHANGED
@@ -29,6 +29,10 @@ module Maremma
|
|
29
29
|
self.method(url, options.merge(method: "put"))
|
30
30
|
end
|
31
31
|
|
32
|
+
def self.patch(url, options={})
|
33
|
+
self.method(url, options.merge(method: "patch"))
|
34
|
+
end
|
35
|
+
|
32
36
|
def self.delete(url, options={})
|
33
37
|
self.method(url, options.merge(method: "delete"))
|
34
38
|
end
|
@@ -55,6 +59,7 @@ module Maremma
|
|
55
59
|
when "get" then conn.get url, {}, options[:headers]
|
56
60
|
when "post" then conn.post url, {}, options[:headers] { |request| request.body = options[:data] }
|
57
61
|
when "put" then conn.put url, {}, options[:headers] { |request| request.body = options[:data] }
|
62
|
+
when "patch" then conn.patch url, {}, options[:headers] { |request| request.body = options[:data] }
|
58
63
|
when "delete" then conn.delete url, {}, options[:headers]
|
59
64
|
when "head" then conn.head url, {}, options[:headers]
|
60
65
|
end
|
data/lib/maremma/version.rb
CHANGED
data/spec/maremma_spec.rb
CHANGED
@@ -106,6 +106,20 @@ describe Maremma do
|
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
109
|
+
context "patch" do
|
110
|
+
it "patch json" do
|
111
|
+
stub = stub_request(:patch, url).with(:body => post_data.to_json).to_return(:body => data.to_json, :status => 200, :headers => { "Content-Type" => "application/json" })
|
112
|
+
subject.patch(url, content_type: 'json', data: post_data.to_json) { |response| expect(JSON.parse(response.body.to_s)).to eq(data) }
|
113
|
+
expect(stub).to have_been_requested
|
114
|
+
end
|
115
|
+
|
116
|
+
it "patch xml" do
|
117
|
+
stub = stub_request(:patch, url).with(:body => post_data.to_xml).to_return(:body => data.to_xml, :status => 200, :headers => { "Content-Type" => "text/html" })
|
118
|
+
subject.patch(url, content_type: 'xml', data: post_data.to_xml) { |response| expect(Hash.from_xml(response.body.to_s)["hash"]).to eq(data) }
|
119
|
+
expect(stub).to have_been_requested
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
109
123
|
context "empty response" do
|
110
124
|
it "get json" do
|
111
125
|
stub = stub_request(:get, url).to_return(:body => nil, :status => 200, :headers => { "Content-Type" => "application/json" })
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maremma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: '3.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -342,7 +342,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
342
342
|
version: '0'
|
343
343
|
requirements: []
|
344
344
|
rubyforge_project:
|
345
|
-
rubygems_version: 2.
|
345
|
+
rubygems_version: 2.6.14
|
346
346
|
signing_key:
|
347
347
|
specification_version: 4
|
348
348
|
summary: Simplified network calls
|