govkit-ca 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +4 -0
- data/README.md +2 -1
- data/govkit-ca.gemspec +3 -3
- data/lib/gov_kit-ca/postal_code/strategy/liberal_ca.rb +1 -2
- data/lib/gov_kit-ca/postal_code/strategy/parl_gc_ca.rb +2 -2
- data/lib/gov_kit-ca/postal_code.rb +2 -4
- data/lib/gov_kit-ca/version.rb +1 -1
- data/lib/gov_kit-ca.rb +2 -2
- data/spec/cbc_ca_spec.rb +1 -0
- data/spec/{conservative_ca_spec.ca → conservative_ca_spec.rb} +1 -1
- data/spec/elections_ca_spec.rb +2 -2
- data/spec/fixtures/cbc_ca/A1A1A1.response +11 -0
- data/spec/fixtures/cbc_ca/G0C2Y0.response +11 -0
- data/spec/fixtures/cbc_ca/H0H0H0.response +11 -0
- data/spec/fixtures/cbc_ca/K0A1K0.response +11 -0
- data/spec/fixtures/cbc_ca/T5S2B9.response +11 -0
- data/spec/fixtures/cbc_ca/X1B1B1.response +11 -0
- data/spec/fixtures/conservative_ca/A1A1A1.response +452 -0
- data/spec/fixtures/conservative_ca/G0C2Y0.response +452 -0
- data/spec/fixtures/conservative_ca/H0H0H0.response +452 -0
- data/spec/fixtures/conservative_ca/K0A1K0.response +455 -0
- data/spec/fixtures/conservative_ca/T5S2B9.response +453 -0
- data/spec/fixtures/conservative_ca/X1B1B1.response +452 -0
- data/spec/fixtures/digital-copyright_ca/A1A1A1.response +227 -0
- data/spec/fixtures/digital-copyright_ca/G0C2Y0.response +229 -0
- data/spec/fixtures/digital-copyright_ca/H0H0H0.response +243 -0
- data/spec/fixtures/digital-copyright_ca/K0A1K0.response +230 -0
- data/spec/fixtures/digital-copyright_ca/T5S2B9.response +233 -0
- data/spec/fixtures/digital-copyright_ca/X1B1B1.response +243 -0
- data/spec/fixtures/elections_ca/A1A1A1.response +10 -0
- data/spec/fixtures/elections_ca/G0C2Y0.response +11 -0
- data/spec/fixtures/elections_ca/H0H0H0.response +10 -0
- data/spec/fixtures/elections_ca/K0A1K0.response +10 -0
- data/spec/fixtures/elections_ca/T5S2B9.response +10 -0
- data/spec/fixtures/elections_ca/X1B1B1.response +10 -0
- data/spec/fixtures/greenparty_ca/A1A1A1.response +13 -0
- data/spec/fixtures/greenparty_ca/G0C2Y0.response +13 -0
- data/spec/fixtures/greenparty_ca/H0H0H0.response +13 -0
- data/spec/fixtures/greenparty_ca/K0A1K0.response +13 -0
- data/spec/fixtures/greenparty_ca/T5S2B9.response +13 -0
- data/spec/fixtures/greenparty_ca/X1B1B1.response +13 -0
- data/spec/fixtures/liberal_ca/A1A1A1.response +702 -0
- data/spec/fixtures/liberal_ca/G0C2Y0.response +570 -0
- data/spec/fixtures/liberal_ca/H0H0H0.response +649 -0
- data/spec/fixtures/liberal_ca/K0A1K0.response +650 -0
- data/spec/fixtures/liberal_ca/T5S2B9.response +570 -0
- data/spec/fixtures/liberal_ca/X1B1B1.response +649 -0
- data/spec/fixtures/ndp_ca/A1A1A1.response +610 -0
- data/spec/fixtures/ndp_ca/G0C2Y0.response +610 -0
- data/spec/fixtures/ndp_ca/H0H0H0.response +593 -0
- data/spec/fixtures/ndp_ca/K0A1K0.response +641 -0
- data/spec/fixtures/ndp_ca/T5S2B9.response +605 -0
- data/spec/fixtures/ndp_ca/X1B1B1.response +593 -0
- data/spec/liberal_ca_spec.rb +1 -4
- data/spec/ndp_ca_spec.rb +1 -1
- data/spec/spec_helper.rb +4 -0
- data/spec/strategy_set_spec.rb +5 -0
- data/tasks/tasks.rb +4 -5
- metadata +114 -8
data/tasks/tasks.rb
CHANGED
@@ -45,10 +45,7 @@ end
|
|
45
45
|
|
46
46
|
desc "Generate RSpec fixtures"
|
47
47
|
task :generate_rspec_fixtures do |t,args|
|
48
|
-
require '
|
49
|
-
require 'gov_kit-ca/postal_code/strategy/digital-copyright_ca'
|
50
|
-
require 'gov_kit-ca/postal_code/strategy/liberal_ca'
|
51
|
-
require 'gov_kit-ca/postal_code/strategy/parl_gc_ca'
|
48
|
+
require 'fileutils'
|
52
49
|
|
53
50
|
{ 'CBCCa' => 'cbc_ca',
|
54
51
|
'ConservativeCa' => 'conservative_ca',
|
@@ -57,8 +54,10 @@ task :generate_rspec_fixtures do |t,args|
|
|
57
54
|
'GreenPartyCa' => 'greenparty_ca',
|
58
55
|
'LiberalCa' => 'liberal_ca',
|
59
56
|
'NDPCa' => 'ndp_ca',
|
60
|
-
'ParlGcCa' => 'parl_gc_ca',
|
61
57
|
}.each do |const,path|
|
58
|
+
require "gov_kit-ca/postal_code/strategy/#{path}"
|
59
|
+
FileUtils.mkdir_p File.expand_path("../../spec/fixtures/#{path}", __FILE__)
|
60
|
+
|
62
61
|
%w(A1A1A1 G0C2Y0 T5S2B9 K0A1K0 H0H0H0 X1B1B1).each do |postal_code|
|
63
62
|
File.open(File.expand_path("../../spec/fixtures/#{path}/#{postal_code}.response", __FILE__), 'w') do |f|
|
64
63
|
response = GovKit::CA::PostalCode::Strategy.const_get(const).new(postal_code).send(:response)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govkit-ca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-04-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.10.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.10.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: nokogiri
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,6 +107,22 @@ dependencies:
|
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: coveralls
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
110
126
|
description: GovKit-CA lets you quickly get encapsulated Ruby objects for Canadian
|
111
127
|
civic data.
|
112
128
|
email:
|
@@ -117,6 +133,7 @@ extra_rdoc_files: []
|
|
117
133
|
files:
|
118
134
|
- .gitignore
|
119
135
|
- .travis.yml
|
136
|
+
- .yardopts
|
120
137
|
- Gemfile
|
121
138
|
- LICENSE
|
122
139
|
- README.md
|
@@ -139,9 +156,51 @@ files:
|
|
139
156
|
- lib/gov_kit-ca/version.rb
|
140
157
|
- lib/govkit-ca.rb
|
141
158
|
- spec/cbc_ca_spec.rb
|
142
|
-
- spec/conservative_ca_spec.
|
159
|
+
- spec/conservative_ca_spec.rb
|
143
160
|
- spec/digital-copyright_ca_spec.rb
|
144
161
|
- spec/elections_ca_spec.rb
|
162
|
+
- spec/fixtures/cbc_ca/A1A1A1.response
|
163
|
+
- spec/fixtures/cbc_ca/G0C2Y0.response
|
164
|
+
- spec/fixtures/cbc_ca/H0H0H0.response
|
165
|
+
- spec/fixtures/cbc_ca/K0A1K0.response
|
166
|
+
- spec/fixtures/cbc_ca/T5S2B9.response
|
167
|
+
- spec/fixtures/cbc_ca/X1B1B1.response
|
168
|
+
- spec/fixtures/conservative_ca/A1A1A1.response
|
169
|
+
- spec/fixtures/conservative_ca/G0C2Y0.response
|
170
|
+
- spec/fixtures/conservative_ca/H0H0H0.response
|
171
|
+
- spec/fixtures/conservative_ca/K0A1K0.response
|
172
|
+
- spec/fixtures/conservative_ca/T5S2B9.response
|
173
|
+
- spec/fixtures/conservative_ca/X1B1B1.response
|
174
|
+
- spec/fixtures/digital-copyright_ca/A1A1A1.response
|
175
|
+
- spec/fixtures/digital-copyright_ca/G0C2Y0.response
|
176
|
+
- spec/fixtures/digital-copyright_ca/H0H0H0.response
|
177
|
+
- spec/fixtures/digital-copyright_ca/K0A1K0.response
|
178
|
+
- spec/fixtures/digital-copyright_ca/T5S2B9.response
|
179
|
+
- spec/fixtures/digital-copyright_ca/X1B1B1.response
|
180
|
+
- spec/fixtures/elections_ca/A1A1A1.response
|
181
|
+
- spec/fixtures/elections_ca/G0C2Y0.response
|
182
|
+
- spec/fixtures/elections_ca/H0H0H0.response
|
183
|
+
- spec/fixtures/elections_ca/K0A1K0.response
|
184
|
+
- spec/fixtures/elections_ca/T5S2B9.response
|
185
|
+
- spec/fixtures/elections_ca/X1B1B1.response
|
186
|
+
- spec/fixtures/greenparty_ca/A1A1A1.response
|
187
|
+
- spec/fixtures/greenparty_ca/G0C2Y0.response
|
188
|
+
- spec/fixtures/greenparty_ca/H0H0H0.response
|
189
|
+
- spec/fixtures/greenparty_ca/K0A1K0.response
|
190
|
+
- spec/fixtures/greenparty_ca/T5S2B9.response
|
191
|
+
- spec/fixtures/greenparty_ca/X1B1B1.response
|
192
|
+
- spec/fixtures/liberal_ca/A1A1A1.response
|
193
|
+
- spec/fixtures/liberal_ca/G0C2Y0.response
|
194
|
+
- spec/fixtures/liberal_ca/H0H0H0.response
|
195
|
+
- spec/fixtures/liberal_ca/K0A1K0.response
|
196
|
+
- spec/fixtures/liberal_ca/T5S2B9.response
|
197
|
+
- spec/fixtures/liberal_ca/X1B1B1.response
|
198
|
+
- spec/fixtures/ndp_ca/A1A1A1.response
|
199
|
+
- spec/fixtures/ndp_ca/G0C2Y0.response
|
200
|
+
- spec/fixtures/ndp_ca/H0H0H0.response
|
201
|
+
- spec/fixtures/ndp_ca/K0A1K0.response
|
202
|
+
- spec/fixtures/ndp_ca/T5S2B9.response
|
203
|
+
- spec/fixtures/ndp_ca/X1B1B1.response
|
145
204
|
- spec/greenparty_ca_spec.rb
|
146
205
|
- spec/liberal_ca_spec.rb
|
147
206
|
- spec/ndp_ca_spec.rb
|
@@ -163,23 +222,71 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
163
222
|
- - ! '>='
|
164
223
|
- !ruby/object:Gem::Version
|
165
224
|
version: '0'
|
225
|
+
segments:
|
226
|
+
- 0
|
227
|
+
hash: -4066199974398879801
|
166
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
229
|
none: false
|
168
230
|
requirements:
|
169
231
|
- - ! '>='
|
170
232
|
- !ruby/object:Gem::Version
|
171
233
|
version: '0'
|
234
|
+
segments:
|
235
|
+
- 0
|
236
|
+
hash: -4066199974398879801
|
172
237
|
requirements: []
|
173
238
|
rubyforge_project: govkit-ca
|
174
|
-
rubygems_version: 1.8.
|
239
|
+
rubygems_version: 1.8.25
|
175
240
|
signing_key:
|
176
241
|
specification_version: 3
|
177
242
|
summary: Easy access to Canadian civic data around the web
|
178
243
|
test_files:
|
179
244
|
- spec/cbc_ca_spec.rb
|
180
|
-
- spec/conservative_ca_spec.
|
245
|
+
- spec/conservative_ca_spec.rb
|
181
246
|
- spec/digital-copyright_ca_spec.rb
|
182
247
|
- spec/elections_ca_spec.rb
|
248
|
+
- spec/fixtures/cbc_ca/A1A1A1.response
|
249
|
+
- spec/fixtures/cbc_ca/G0C2Y0.response
|
250
|
+
- spec/fixtures/cbc_ca/H0H0H0.response
|
251
|
+
- spec/fixtures/cbc_ca/K0A1K0.response
|
252
|
+
- spec/fixtures/cbc_ca/T5S2B9.response
|
253
|
+
- spec/fixtures/cbc_ca/X1B1B1.response
|
254
|
+
- spec/fixtures/conservative_ca/A1A1A1.response
|
255
|
+
- spec/fixtures/conservative_ca/G0C2Y0.response
|
256
|
+
- spec/fixtures/conservative_ca/H0H0H0.response
|
257
|
+
- spec/fixtures/conservative_ca/K0A1K0.response
|
258
|
+
- spec/fixtures/conservative_ca/T5S2B9.response
|
259
|
+
- spec/fixtures/conservative_ca/X1B1B1.response
|
260
|
+
- spec/fixtures/digital-copyright_ca/A1A1A1.response
|
261
|
+
- spec/fixtures/digital-copyright_ca/G0C2Y0.response
|
262
|
+
- spec/fixtures/digital-copyright_ca/H0H0H0.response
|
263
|
+
- spec/fixtures/digital-copyright_ca/K0A1K0.response
|
264
|
+
- spec/fixtures/digital-copyright_ca/T5S2B9.response
|
265
|
+
- spec/fixtures/digital-copyright_ca/X1B1B1.response
|
266
|
+
- spec/fixtures/elections_ca/A1A1A1.response
|
267
|
+
- spec/fixtures/elections_ca/G0C2Y0.response
|
268
|
+
- spec/fixtures/elections_ca/H0H0H0.response
|
269
|
+
- spec/fixtures/elections_ca/K0A1K0.response
|
270
|
+
- spec/fixtures/elections_ca/T5S2B9.response
|
271
|
+
- spec/fixtures/elections_ca/X1B1B1.response
|
272
|
+
- spec/fixtures/greenparty_ca/A1A1A1.response
|
273
|
+
- spec/fixtures/greenparty_ca/G0C2Y0.response
|
274
|
+
- spec/fixtures/greenparty_ca/H0H0H0.response
|
275
|
+
- spec/fixtures/greenparty_ca/K0A1K0.response
|
276
|
+
- spec/fixtures/greenparty_ca/T5S2B9.response
|
277
|
+
- spec/fixtures/greenparty_ca/X1B1B1.response
|
278
|
+
- spec/fixtures/liberal_ca/A1A1A1.response
|
279
|
+
- spec/fixtures/liberal_ca/G0C2Y0.response
|
280
|
+
- spec/fixtures/liberal_ca/H0H0H0.response
|
281
|
+
- spec/fixtures/liberal_ca/K0A1K0.response
|
282
|
+
- spec/fixtures/liberal_ca/T5S2B9.response
|
283
|
+
- spec/fixtures/liberal_ca/X1B1B1.response
|
284
|
+
- spec/fixtures/ndp_ca/A1A1A1.response
|
285
|
+
- spec/fixtures/ndp_ca/G0C2Y0.response
|
286
|
+
- spec/fixtures/ndp_ca/H0H0H0.response
|
287
|
+
- spec/fixtures/ndp_ca/K0A1K0.response
|
288
|
+
- spec/fixtures/ndp_ca/T5S2B9.response
|
289
|
+
- spec/fixtures/ndp_ca/X1B1B1.response
|
183
290
|
- spec/greenparty_ca_spec.rb
|
184
291
|
- spec/liberal_ca_spec.rb
|
185
292
|
- spec/ndp_ca_spec.rb
|
@@ -187,4 +294,3 @@ test_files:
|
|
187
294
|
- spec/spec.opts
|
188
295
|
- spec/spec_helper.rb
|
189
296
|
- spec/strategy_set_spec.rb
|
190
|
-
has_rdoc:
|