smooth_operator 1.30.4 → 1.30.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2E0ZTUxMTNjOGM4OWRhYzA0OGUyMjc4ZDRlZWY4YjgzNTY0MzhjYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDg3YmJjYmM2YjQwYTQ2MmFlOWI5MGI0OWY4NmY1NDQ5NmU1ZmRjMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzhhODYxMjBkY2Q0Mzc3OWY4ZWJiMmI3ZDEwODY2ODc5MDBhNTllNTY0OGY5
|
10
|
+
NTJhOTc3MTIxMmUxMmRlYmY1ZjRiYTZlNjA0Y2UwMDhlMzQ3NTdhNzljODNl
|
11
|
+
Zjk0NjcyZWNhZTE3ODZiYTc5ODQ5NTUwMGM0OWRiODA2Mjg5M2E=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmIwNDliM2YyNzk1MjUzYzYwMjZjZGRhMTQ5YzRjYmVkZDkwNTFkYzUwNjc0
|
14
|
+
YmFhZjU1MGU2NjY2N2NiNTdmOGMyNzIzYTAxNWZkYjc4OTg4NTc1YTllOTFj
|
15
|
+
NTQwZDM2ZGEyZTNjNmFhNzg5ZTFjYTdmNDNmNmYxZjY3MWE4NGQ=
|
@@ -52,10 +52,11 @@ module SmoothOperator
|
|
52
52
|
|
53
53
|
module ClassMethods
|
54
54
|
|
55
|
-
OPTIONS =
|
55
|
+
OPTIONS = { endpoint: '', endpoint_user: '', endpoint_pass: '',
|
56
|
+
timeout: '', server_name: '', connection_options: {} }
|
56
57
|
|
57
|
-
OPTIONS.each do |option|
|
58
|
-
define_method(option) { get_option option,
|
58
|
+
OPTIONS.each do |option, default|
|
59
|
+
define_method(option) { get_option option, default }
|
59
60
|
end
|
60
61
|
|
61
62
|
def headers
|
@@ -120,7 +121,7 @@ module SmoothOperator
|
|
120
121
|
def populate_options(object, options)
|
121
122
|
options ||= {}
|
122
123
|
|
123
|
-
ClassMethods::OPTIONS.each do |option|
|
124
|
+
ClassMethods::OPTIONS.each do |option, default|
|
124
125
|
options[option] ||= object.send(option)
|
125
126
|
end
|
126
127
|
|
@@ -17,11 +17,15 @@ module SmoothOperator
|
|
17
17
|
def generate_connection(adapter = nil, options = nil)
|
18
18
|
adapter ||= :net_http
|
19
19
|
|
20
|
-
|
20
|
+
# new_connection = ::Faraday.new(url: options[:endpoint]) do |builder|
|
21
|
+
new_connection = ::Faraday::Connection.new(options[:endpoint], options[:connection_options]) do |builder|
|
21
22
|
builder.options[:timeout] = options[:timeout].to_i unless Helpers.blank?(options[:timeout])
|
23
|
+
|
22
24
|
builder.request :url_encoded
|
23
25
|
builder.adapter adapter
|
24
|
-
end
|
26
|
+
end
|
27
|
+
|
28
|
+
ConnectionWrapper.new new_connection
|
25
29
|
end
|
26
30
|
|
27
31
|
def make_the_call(http_verb, resource_path, params, body, options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smooth_operator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.30.
|
4
|
+
version: 1.30.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- João Gonçalves
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|