shydra 0.1.2 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 871e3c438afb57a845f0bb523f2a9fe36a1c2b55
4
+ data.tar.gz: d9418bc7716bfc751779bfb8e3a2ace917a8b6eb
5
+ SHA512:
6
+ metadata.gz: 0c87908779f59560f7028ba9d995a67187726b96e5ecec9b1547de51793fc5a11fd8953d2f6583d0bf60de8b550293a113165ec7555c5a260c320490ec204df3
7
+ data.tar.gz: ce66922068485fe750854a3367e36771804964a3ccdd648ca3c5e912915fd56449aa413a41c28160f4d57a5eb80ff4956a79fba31a28bb33369029b1f3ce951b
@@ -0,0 +1,5 @@
1
+ # Handling Limit :none
2
+ * only handle in hydra
3
+ * add request#data, delegate to response(s)
4
+ * investigate for which resources "count" works
5
+ *
@@ -1,3 +1,3 @@
1
1
  module Shydra
2
- VERSION = "0.1.2"
2
+ VERSION = "0.4.2"
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
 
21
- spec.add_runtime_dependency "activeresource", '=3.2.13'
21
+ spec.add_runtime_dependency "activeresource"
22
22
  spec.add_runtime_dependency "typhoeus", ">= 0.6.3"
23
23
  spec.add_runtime_dependency "shopify_api", ">= 3.0.3"
24
24
  spec.add_runtime_dependency "oj"
@@ -28,14 +28,14 @@ describe Shydra::Batch do
28
28
  r1 = request_and_response_mock("request 1", 'response 1')
29
29
  r2 = request_and_response_mock("request 2", 'response 2')
30
30
  subject << r1; subject << r2
31
- expect(subject.finished?).to be_true
31
+ expect(subject.finished?).to be_truthy
32
32
  end
33
33
 
34
34
  it "returns false when not all the requests have a response" do
35
35
  r1 = request_and_response_mock("request 1", 'response 1')
36
36
  r2 = request_and_response_mock("request 2", nil)
37
37
  subject << r1; subject << r2
38
- expect(subject.finished?).to be_false
38
+ expect(subject.finished?).to be_falsey
39
39
  end
40
40
  end
41
41
 
@@ -47,7 +47,7 @@ describe Shydra::Batch do
47
47
  r2 = request_and_response_mock("request 2", 'response 2', code: 500)
48
48
  subject << r1; subject << r2
49
49
  subject << r1; subject << r2
50
- expect(subject.over_limit?).to be_false
50
+ expect(subject.over_limit?).to be_falsey
51
51
  end
52
52
 
53
53
  it "returns true when any request has response code 429" do
@@ -55,7 +55,7 @@ describe Shydra::Batch do
55
55
  r2 = request_and_response_mock("request 2", 'response 2', code: 429)
56
56
  r3 = request_and_response_mock("request 3") # over_limit will return true after finding the first 429
57
57
  subject << r1; subject << r2; subject << r3
58
- expect(subject.over_limit?).to be_true
58
+ expect(subject.over_limit?).to be_truthy
59
59
  end
60
60
  end
61
61
 
@@ -8,7 +8,7 @@ describe Shydra::Resources::Product do
8
8
  let(:store_uri){ URI("https://xxxx:yyyy@cronin.myshopify.com/admin/")}
9
9
 
10
10
  it "creates a product request" do
11
- expect(Shydra::Resources::Product.new(:product, id: 12345).url).to eq(
11
+ expect(Shydra::Resources::Product.new(id: 12345).url).to eq(
12
12
  store_uri.to_s + "products/12345.json?limit=250")
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,130 +1,115 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shydra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
5
- prerelease:
4
+ version: 0.4.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Michael Johnston
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-03 00:00:00.000000000 Z
11
+ date: 2015-04-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activeresource
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - '='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
- version: 3.2.13
19
+ version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - '='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: 3.2.13
26
+ version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: typhoeus
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: 0.6.3
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: 0.6.3
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: shopify_api
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: 3.0.3
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: 3.0.3
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: oj
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: bundler
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '1.3'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '1.3'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rake
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: rspec
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - ">="
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
- description: ! 'A fast, parallel shopify api client using typhoeus/hydra. Attempts
127
- to balance being a good citizen about api limits and fetching multiple apai records
111
+ description: 'A fast, parallel shopify api client using typhoeus/hydra. Attempts to
112
+ balance being a good citizen about api limits and fetching multiple apai records
128
113
  in parallel. '
129
114
  email:
130
115
  - lastobelus@mac.com
@@ -132,11 +117,12 @@ executables: []
132
117
  extensions: []
133
118
  extra_rdoc_files: []
134
119
  files:
135
- - .gitignore
136
- - .rspec
120
+ - ".gitignore"
121
+ - ".rspec"
137
122
  - Gemfile
138
123
  - Guardfile
139
124
  - LICENSE.txt
125
+ - NEXTSTEPS.markdown
140
126
  - README.md
141
127
  - Rakefile
142
128
  - lib/shydra.rb
@@ -163,33 +149,26 @@ files:
163
149
  homepage: ''
164
150
  licenses:
165
151
  - MIT
152
+ metadata: {}
166
153
  post_install_message:
167
154
  rdoc_options: []
168
155
  require_paths:
169
156
  - lib
170
157
  required_ruby_version: !ruby/object:Gem::Requirement
171
- none: false
172
158
  requirements:
173
- - - ! '>='
159
+ - - ">="
174
160
  - !ruby/object:Gem::Version
175
161
  version: '0'
176
- segments:
177
- - 0
178
- hash: 3602153099845959824
179
162
  required_rubygems_version: !ruby/object:Gem::Requirement
180
- none: false
181
163
  requirements:
182
- - - ! '>='
164
+ - - ">="
183
165
  - !ruby/object:Gem::Version
184
166
  version: '0'
185
- segments:
186
- - 0
187
- hash: 3602153099845959824
188
167
  requirements: []
189
168
  rubyforge_project:
190
- rubygems_version: 1.8.25
169
+ rubygems_version: 2.4.3
191
170
  signing_key:
192
- specification_version: 3
171
+ specification_version: 4
193
172
  summary: A fast, parallel shopify api client using typhoeus/hydraa
194
173
  test_files:
195
174
  - spec/shydra/batch_spec.rb