apipie-bindings 0.0.13 → 0.0.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e406c65a2e7c642745b62120655b24b3877383a4
4
- data.tar.gz: ce5b76ee3599b53c5434baf1e4b160ca1d38304c
3
+ metadata.gz: a1ad2eec72ce942fa348bd32f2a4481bbaa1aaa3
4
+ data.tar.gz: a10963fb54de01a37f59ab521a5610eb4c6b754a
5
5
  SHA512:
6
- metadata.gz: 01d3a63b169f4c8ffcd0e205f141695e46a1582d7fb9d993539012b9f45126db549f08df61d9a6d82e91ea772da994794f351ab8326b0992b7d83f51d2179fc0
7
- data.tar.gz: c04f40471e23fd22c16215d0d0a91f90df2e621627bbd8b2fd1854758838f500bf566391727f54df481af4da7692385eb4683ae4e5fa7b96f2ada55cc5427ebf
6
+ metadata.gz: 9e43c66348f712fc334984dd7496b396ce54f0af59881b2134ea7f490b7d8543ff2a1cf478f5f6a41d493457a248a918ed7827a3750816848f22f883dbacc290
7
+ data.tar.gz: 7661d1ecf0801381f92efe89c74d1fa7913fcf81d4a10be821d80e280c4cae0dcfe6ec0aeaf5dad60a20db29519bcf2a68c6eceafcb799bf8a34ca4e47830f60
data/doc/release_notes.md CHANGED
@@ -1,8 +1,11 @@
1
1
  Release notes
2
2
  =============
3
3
 
4
+ ### 0.0.14 (2015-08-25)
5
+ * support rest-client 1.8.0 ([#27](https://github.com/Apipie/apipie-bindings/issues/27))
6
+
4
7
  ### 0.0.13 (2015-04-23)
5
- * Limited rest-client versionto < 1.8.0
8
+ * Limited rest-client version to < 1.8.0
6
9
  * Added option to turn off param validation (per call)
7
10
  * Validation of optional parameters containing required attributes ([#24](https://github.com/Apipie/apipie-bindings/issues/24), [#25](https://github.com/Apipie/apipie-bindings/issues/25))
8
11
 
@@ -91,7 +91,8 @@ module ApipieBindings
91
91
 
92
92
  @resource_config = {
93
93
  :timeout => config[:timeout],
94
- :headers => headers
94
+ :headers => headers,
95
+ :verify_ssl => false # keep rest_client >= 1.8.0 setup comaptible
95
96
  }.merge(options)
96
97
 
97
98
  @config = config
@@ -202,7 +203,12 @@ module ApipieBindings
202
203
  empty_response = ApipieBindings::Example.new('', '', '', 200, '')
203
204
  ex = options[:fake_response ] || empty_response
204
205
  net_http_resp = Net::HTTPResponse.new(1.0, ex.status, "")
205
- response = RestClient::Response.create(ex.response, net_http_resp, args)
206
+ if RestClient::Response.method(:create).arity == 4 # RestClient > 1.8.0
207
+ response = RestClient::Response.create(ex.response, net_http_resp, args,
208
+ RestClient::Request.new(:method=>http_method, :url=>path))
209
+ else
210
+ response = RestClient::Response.create(ex.response, net_http_resp, args)
211
+ end
206
212
  else
207
213
  begin
208
214
  apidoc_without_auth = (path =~ /\/apidoc\//) && !@apidoc_authenticated
@@ -1,5 +1,5 @@
1
1
  module ApipieBindings
2
2
  def self.version
3
- @version ||= Gem::Version.new '0.0.13'
3
+ @version ||= Gem::Version.new '0.0.14'
4
4
  end
5
5
  end
@@ -159,7 +159,12 @@ describe ApipieBindings::API do
159
159
  let(:fake_empty_response) {
160
160
  data = ApipieBindings::Example.new('', '', '', 200, '[]')
161
161
  net_http_resp = Net::HTTPResponse.new(1.0, data.status, "")
162
- RestClient::Response.create(data.response, net_http_resp, {})
162
+ if RestClient::Response.method(:create).arity == 4 # RestClient >= 1.8.0
163
+ RestClient::Response.create(data.response, net_http_resp, {},
164
+ RestClient::Request.new(:method=>'GET', :url=>'http://example.com'))
165
+ else
166
+ RestClient::Response.create(data.response, net_http_resp, {})
167
+ end
163
168
  }
164
169
 
165
170
  it "should call credentials to_param when :credentials are set and doing authenticated call" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apipie-bindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Bačovský
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-23 00:00:00.000000000 Z
11
+ date: 2015-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -31,9 +31,6 @@ dependencies:
31
31
  - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.6.5
34
- - - <
35
- - !ruby/object:Gem::Version
36
- version: 1.8.0
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
@@ -41,9 +38,6 @@ dependencies:
41
38
  - - '>='
42
39
  - !ruby/object:Gem::Version
43
40
  version: 1.6.5
44
- - - <
45
- - !ruby/object:Gem::Version
46
- version: 1.8.0
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: oauth
49
43
  requirement: !ruby/object:Gem::Requirement