smooth_operator 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,15 +29,15 @@ module SmoothOperator
29
29
  end
30
30
 
31
31
  def self.make_synchronous_request(url, options)
32
- request = ::Typhoeus::Request.new(url, options)
33
- remote_call = SmoothOperator::HttpHandlers::Typhoeus::RemoteCall.new(request)
32
+ hydra = ::Typhoeus::Hydra::hydra
33
+ remote_call = make_asynchronous_request(url, options, hydra)
34
34
 
35
- request.on_complete do |response|
35
+ remote_call.request.on_complete do |response|
36
36
  remote_call.raw_response = response
37
37
  remote_call.response = remote_call.parsed_response
38
38
  end
39
39
 
40
- request.run
40
+ hydra.run
41
41
  remote_call
42
42
  end
43
43
 
@@ -12,7 +12,8 @@ module SmoothOperator
12
12
 
13
13
  def make_the_call(http_verb, options, id, &block)
14
14
  injected_hydra = options[:hydra]
15
- options[:hydra] = injected_hydra || ::Typhoeus::Hydra.hydra
15
+ hydra = injected_hydra || ::Typhoeus::Hydra::hydra
16
+ options[:hydra] = hydra
16
17
 
17
18
  remote_call = @object_class.make_the_call(http_verb, id, options)
18
19
 
@@ -21,7 +22,7 @@ module SmoothOperator
21
22
  yield(remote_call)
22
23
  end
23
24
 
24
- options[:hydra].run if injected_hydra.blank?
25
+ hydra.run if injected_hydra.blank?
25
26
 
26
27
  remote_call
27
28
  end
@@ -1,3 +1,3 @@
1
1
  module SmoothOperator
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smooth_operator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: