sucker 2.0.0.pre.2 → 2.0.0.pre.3
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.
- data/README.md +1 -1
- data/lib/sucker/version.rb +1 -1
- data/spec/spec_helper.rb +4 -0
- data/spec/sucker/synchrony_spec.rb +20 -15
- metadata +3 -3
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Sucker
|
2
2
|
======
|
3
3
|
|
4
|
-
Sucker is a Nokogiri-based Ruby wrapper to the [Amazon Product Advertising API](https://affiliate-program.amazon.co.uk/gp/advertising/api/detail/main.html).
|
4
|
+
Sucker is a Nokogiri-based, optionally-evented Ruby wrapper to the [Amazon Product Advertising API](https://affiliate-program.amazon.co.uk/gp/advertising/api/detail/main.html).
|
5
5
|
|
6
6
|

|
7
7
|
|
data/lib/sucker/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,24 +1,29 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'sucker/synchrony'
|
3
2
|
|
4
3
|
module Sucker
|
5
|
-
describe
|
6
|
-
|
7
|
-
|
8
|
-
:locale => :us,
|
9
|
-
:key => 'key',
|
10
|
-
:secret => 'secret')
|
4
|
+
describe 'Synchrony driver', :synchrony do
|
5
|
+
before(:all) do
|
6
|
+
require 'sucker/synchrony'
|
11
7
|
end
|
12
8
|
|
13
|
-
|
14
|
-
request
|
15
|
-
|
9
|
+
describe Request, :synchrony do
|
10
|
+
let(:request) do
|
11
|
+
Request.new(
|
12
|
+
:locale => :us,
|
13
|
+
:key => 'key',
|
14
|
+
:secret => 'secret')
|
15
|
+
end
|
16
|
+
|
17
|
+
it "uses an evented adapter" do
|
18
|
+
request.adapter.should eql ::EM::HttpRequest
|
19
|
+
end
|
16
20
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
21
|
+
describe "#get" do
|
22
|
+
it "returns a response" do
|
23
|
+
EM.synchrony do
|
24
|
+
response = request.get
|
25
|
+
EM.stop
|
26
|
+
end
|
22
27
|
end
|
23
28
|
end
|
24
29
|
end
|
metadata
CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
|
|
7
7
|
- 0
|
8
8
|
- 0
|
9
9
|
- pre
|
10
|
-
-
|
11
|
-
version: 2.0.0.pre.
|
10
|
+
- 3
|
11
|
+
version: 2.0.0.pre.3
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Paper Cavalier
|
@@ -165,7 +165,7 @@ dependencies:
|
|
165
165
|
version: "1.6"
|
166
166
|
type: :development
|
167
167
|
version_requirements: *id010
|
168
|
-
description: A Ruby wrapper to the Amazon Product Advertising API
|
168
|
+
description: A Nokogiri-based, optionally-evented Ruby wrapper to the Amazon Product Advertising API
|
169
169
|
email:
|
170
170
|
- code@papercavalier.com
|
171
171
|
executables: []
|