emmy-extends 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a3710c71f753f825f9b64bec852bc517d174f26
4
- data.tar.gz: d849f5f3e4753900dd30a76647b7161729bd4373
3
+ metadata.gz: d68faef36d091d24be9db8330045089ca9b55f54
4
+ data.tar.gz: f1ea4b0d2cf2f847f712ea6371c53aa76d6702a0
5
5
  SHA512:
6
- metadata.gz: 8dec14fbc285fe82e87924c1d26ca38d501e48e8cb7f40763b21ac18b65e7adba5b9a8595b9bbeb76bdd4a1647724e2f637900707771aba3134e34967e583c74
7
- data.tar.gz: b41d0223c7801402509c2dd42258cb30f1d972f55e9909baeb47415922e55760d10a14df966b9f95a80996e484a1fe709c103e6d788cc765de7c39f0d91d64cc
6
+ metadata.gz: d21d8cd5808698e91801aa7335b2f75104deeb1fd6cff65aa6a7baad375de223e6825d0090b59e5004f54c21015ab5eafa632003445c559d2728f95492a0c890
7
+ data.tar.gz: 6370b48e3e8f2c5363948988248528641d439e0f3312f02bafe31e1b4077d203928eb80f4f1fac1e82d63e240d27158767a312d10f7d0dbfc23d3fea9403be22
data/Gemfile CHANGED
@@ -6,4 +6,4 @@ gemspec
6
6
  gem 'em-http-request'
7
7
  gem 'mysql2'
8
8
  gem 'httpi'
9
- gem 'savon', github: 'chelovekov/savon', branch: 'version2'
9
+ gem 'savon', github: 'inre/savon', branch: 'version2'
data/README.md CHANGED
@@ -8,7 +8,7 @@ Add this line to your application's Gemfile:
8
8
  gem 'em-http-request' # if em-http-request required
9
9
  gem 'httpi' # if httpi required
10
10
  gem 'mysql2' # if mysql2 required
11
- gem 'savon', github: 'chelovekov/savon' # if savon required
11
+ gem 'savon', github: 'inre/savon' # if savon required
12
12
  gem 'emmy-extends'
13
13
  ```
14
14
 
@@ -109,11 +109,3 @@ EmmyMachine.run_block do
109
109
  }
110
110
  end
111
111
  ```
112
-
113
- ## Contributing
114
-
115
- 1. Fork it ( https://github.com/chelovekov/emmy-extends/fork )
116
- 2. Create your feature branch (`git checkout -b my-new-feature`)
117
- 3. Commit your changes (`git commit -am 'Add some feature'`)
118
- 4. Push to the branch (`git push origin my-new-feature`)
119
- 5. Create a new Pull Request
data/emmy-extends.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  #spec.add_dependency "eventmachine", "~> 1.0.3"
22
22
  spec.add_dependency "emmy-machine", "~> 0.1.6"
23
- spec.add_dependency "emmy-http", "~> 0.1.4"
23
+ spec.add_dependency "emmy-http", "~> 0.1.11"
24
24
 
25
25
  spec.add_development_dependency "rspec", "~> 3"
26
26
  spec.add_development_dependency "bundler", "~> 1.7"
@@ -10,17 +10,19 @@ module EmmyExtends
10
10
  attr_reader :connection
11
11
  attr_reader :operation
12
12
  attr_reader :response
13
+ attr_reader :url
13
14
 
14
15
  # required for adapter
15
16
 
16
17
  def delegate=(operation)
17
18
  @operation = operation
19
+ @url = operation.request.real_url
18
20
  setup_http_request
19
21
  setup_http_client
20
22
  end
21
23
 
22
24
  def to_a
23
- ["tcp://#{operation.request.url.host}:#{operation.request.url.port}", EmmyMachine::Connection, method(:initialize_connection), self]
25
+ ["tcp://#{url.host}:#{url.port || url.default_port}", EmmyMachine::Connection, method(:initialize_connection), self]
24
26
  end
25
27
 
26
28
  def initialize_connection(conn)
@@ -60,7 +62,7 @@ module EmmyExtends
60
62
  {
61
63
  connect_timeout: operation.request.timeouts.connect,
62
64
  inactivity_timeout: operation.request.timeouts.inactivity,
63
- ssl: (operation.request.ssl?) ? {
65
+ ssl: (operation.request.ssl) ? {
64
66
  cert_chain_file: operation.request.ssl.cert_chain_file,
65
67
  verify_peer: (operation.request.ssl.verify_peer == :peer),
66
68
  ssl_version: operation.request.ssl.ssl_version
@@ -72,8 +74,8 @@ module EmmyExtends
72
74
  {
73
75
  redirects: 5,
74
76
  keepalive: false,
75
- path: operation.request.url.path,
76
- query: operation.request.url.query,
77
+ path: url.path,
78
+ query: url.query,
77
79
  body: encode_body(operation.request.body),
78
80
  head: operation.request.headers
79
81
  }
@@ -94,7 +96,7 @@ module EmmyExtends
94
96
  def setup_http_client
95
97
  @http_client = begin
96
98
  type = operation.request.type.to_s.upcase # http method
97
- http_client_options = HttpClientOptions.new(operation.request.url, request_options, type)
99
+ http_client_options = HttpClientOptions.new(url, request_options, type)
98
100
  EventMachine::HttpClient.new(@http_request, http_client_options).tap do |client|
99
101
  client.stream do |chunk|
100
102
  @body << chunk
@@ -124,7 +126,7 @@ module EmmyExtends
124
126
  end
125
127
 
126
128
  def setup_http_request
127
- @http_request = EventMachine::HttpRequest.new(operation.request.url, connection_options)
129
+ @http_request = EventMachine::HttpRequest.new(url, connection_options)
128
130
  end
129
131
 
130
132
  def status
@@ -1,3 +1,3 @@
1
1
  module EmmyExtends
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emmy-extends
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - inre
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-06 00:00:00.000000000 Z
11
+ date: 2015-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: emmy-machine
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.4
33
+ version: 0.1.11
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.1.4
40
+ version: 0.1.11
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement