haveapi-client 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/haveapi-client.gemspec +2 -2
- data/lib/haveapi/client/version.rb +1 -1
- data/lib/restclient_ext/resource.rb +5 -4
- metadata +5 -6
- data/lib/restclient_ext/request.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 937ece2024a0c24c61333ae4c65762860c0ad331
|
4
|
+
data.tar.gz: bd1aa0d98e457a57a5cd984b5c1723ebe6b6637b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9868562d53fe5d3645d9341364ec2847943b353dee7e1b7b8dd6fff8e9223aac9cf5aef30caf07bc44febc9b46b87154c60e00f46f36c3a9f12472f651bc68d
|
7
|
+
data.tar.gz: 652ea8ddb7823ca53af4049e8e62099af385bc02855d63823c15d0f620c2cd9ded37282cf182da1493a0ca00a04bf680d31e267d12b9243b3faef950a40d35e3
|
data/CHANGELOG
CHANGED
data/haveapi-client.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'haveapi/client/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'haveapi-client'
|
8
8
|
spec.version = HaveAPI::Client::VERSION
|
9
|
-
spec.date = '2017-
|
9
|
+
spec.date = '2017-11-27'
|
10
10
|
spec.authors = ['Jakub Skokan']
|
11
11
|
spec.email = ['jakub.skokan@vpsfree.cz']
|
12
12
|
spec.summary =
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.add_runtime_dependency 'activesupport', '>= 4.0'
|
26
26
|
spec.add_runtime_dependency 'require_all'
|
27
|
-
spec.add_runtime_dependency 'rest-client', '~>
|
27
|
+
spec.add_runtime_dependency 'rest-client', '~> 2.0.2'
|
28
28
|
spec.add_runtime_dependency 'json'
|
29
29
|
spec.add_runtime_dependency 'highline', '~> 1.7.8'
|
30
30
|
spec.add_runtime_dependency 'ruby-progressbar', '~> 1.7.5'
|
@@ -2,10 +2,11 @@ module RestClient
|
|
2
2
|
class Resource
|
3
3
|
def get_options(additional_headers={}, &block)
|
4
4
|
headers = (options[:headers] || {}).merge(additional_headers)
|
5
|
-
Request.
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
Request.execute(options.merge(
|
6
|
+
:method => :options,
|
7
|
+
:url => url,
|
8
|
+
:headers => headers
|
9
|
+
), &(block || @block))
|
9
10
|
end
|
10
11
|
end
|
11
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haveapi-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakub Skokan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 2.0.2
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 2.0.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: json
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,7 +176,6 @@ files:
|
|
176
176
|
- lib/haveapi/client/validators/numericality.rb
|
177
177
|
- lib/haveapi/client/validators/presence.rb
|
178
178
|
- lib/haveapi/client/version.rb
|
179
|
-
- lib/restclient_ext/request.rb
|
180
179
|
- lib/restclient_ext/resource.rb
|
181
180
|
homepage: ''
|
182
181
|
licenses:
|
@@ -198,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
197
|
version: '0'
|
199
198
|
requirements: []
|
200
199
|
rubyforge_project:
|
201
|
-
rubygems_version: 2.
|
200
|
+
rubygems_version: 2.6.14
|
202
201
|
signing_key:
|
203
202
|
specification_version: 4
|
204
203
|
summary: Ruby API and CLI for HaveAPI
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module RestClient
|
2
|
-
class Request
|
3
|
-
def self.execute_options(args, &block)
|
4
|
-
new(args).execute_options(&block)
|
5
|
-
end
|
6
|
-
|
7
|
-
def execute_options(&block)
|
8
|
-
uri = parse_url_with_auth(url)
|
9
|
-
http_request = Net::HTTPGenericRequest.new(method.to_s.upcase, false, true, uri.request_uri, processed_headers)
|
10
|
-
|
11
|
-
transmit uri, http_request, payload, & block
|
12
|
-
ensure
|
13
|
-
payload.close if payload
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|