data_miner 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,8 +32,7 @@ class DataMiner
32
32
  }
33
33
 
34
34
  def initialize(step, name, options = {})
35
- @options = options.dup
36
- @options.stringify_keys!
35
+ @options = ::DataMiner.recursively_stringify_keys options
37
36
 
38
37
  @step = step
39
38
  @name = name
@@ -1,3 +1,3 @@
1
1
  class DataMiner
2
- VERSION = '1.1.3'
2
+ VERSION = '1.1.4'
3
3
  end
data/lib/data_miner.rb CHANGED
@@ -53,6 +53,22 @@ Output:
53
53
  end
54
54
  end
55
55
 
56
+ # http://avdi.org/devblog/2009/07/14/recursively-symbolize-keys/
57
+ def self.recursively_stringify_keys(hash)
58
+ hash.inject(::Hash.new) do |result, (key, value)|
59
+ new_key = case key
60
+ when ::Symbol then key.to_s
61
+ else key
62
+ end
63
+ new_value = case value
64
+ when ::Hash then ::DataMiner.recursively_stringify_keys(value)
65
+ else value
66
+ end
67
+ result[new_key] = new_value
68
+ result
69
+ end
70
+ end
71
+
56
72
  attr_accessor :logger
57
73
 
58
74
  def resource_names
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_miner
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 27
4
5
  prerelease: false
5
6
  segments:
6
7
  - 1
7
8
  - 1
8
- - 3
9
- version: 1.1.3
9
+ - 4
10
+ version: 1.1.4
10
11
  platform: ruby
11
12
  authors:
12
13
  - Seamus Abshere
@@ -16,7 +17,7 @@ autorequire:
16
17
  bindir: bin
17
18
  cert_chain: []
18
19
 
19
- date: 2011-01-28 00:00:00 -05:00
20
+ date: 2011-02-01 00:00:00 -06:00
20
21
  default_executable:
21
22
  dependencies:
22
23
  - !ruby/object:Gem::Dependency
@@ -27,6 +28,7 @@ dependencies:
27
28
  requirements:
28
29
  - - ">="
29
30
  - !ruby/object:Gem::Version
31
+ hash: 19
30
32
  segments:
31
33
  - 1
32
34
  - 1
@@ -42,6 +44,7 @@ dependencies:
42
44
  requirements:
43
45
  - - ">="
44
46
  - !ruby/object:Gem::Version
47
+ hash: 23
45
48
  segments:
46
49
  - 0
47
50
  - 0
@@ -57,6 +60,7 @@ dependencies:
57
60
  requirements:
58
61
  - - ">="
59
62
  - !ruby/object:Gem::Version
63
+ hash: 11
60
64
  segments:
61
65
  - 2
62
66
  - 3
@@ -72,6 +76,7 @@ dependencies:
72
76
  requirements:
73
77
  - - ">="
74
78
  - !ruby/object:Gem::Version
79
+ hash: 11
75
80
  segments:
76
81
  - 2
77
82
  - 3
@@ -87,6 +92,7 @@ dependencies:
87
92
  requirements:
88
93
  - - ">="
89
94
  - !ruby/object:Gem::Version
95
+ hash: 15
90
96
  segments:
91
97
  - 1
92
98
  - 4
@@ -102,6 +108,7 @@ dependencies:
102
108
  requirements:
103
109
  - - ">="
104
110
  - !ruby/object:Gem::Version
111
+ hash: 23
105
112
  segments:
106
113
  - 0
107
114
  - 3
@@ -117,6 +124,7 @@ dependencies:
117
124
  requirements:
118
125
  - - ">="
119
126
  - !ruby/object:Gem::Version
127
+ hash: 5
120
128
  segments:
121
129
  - 0
122
130
  - 3
@@ -132,6 +140,7 @@ dependencies:
132
140
  requirements:
133
141
  - - ">="
134
142
  - !ruby/object:Gem::Version
143
+ hash: 21
135
144
  segments:
136
145
  - 1
137
146
  - 0
@@ -147,6 +156,7 @@ dependencies:
147
156
  requirements:
148
157
  - - ">="
149
158
  - !ruby/object:Gem::Version
159
+ hash: 21
150
160
  segments:
151
161
  - 0
152
162
  - 0
@@ -162,6 +172,7 @@ dependencies:
162
172
  requirements:
163
173
  - - ">="
164
174
  - !ruby/object:Gem::Version
175
+ hash: 3
165
176
  segments:
166
177
  - 0
167
178
  version: "0"
@@ -175,6 +186,7 @@ dependencies:
175
186
  requirements:
176
187
  - - ">="
177
188
  - !ruby/object:Gem::Version
189
+ hash: 3
178
190
  segments:
179
191
  - 0
180
192
  version: "0"
@@ -188,19 +200,21 @@ dependencies:
188
200
  requirements:
189
201
  - - ">="
190
202
  - !ruby/object:Gem::Version
203
+ hash: 3
191
204
  segments:
192
205
  - 0
193
206
  version: "0"
194
207
  type: :development
195
208
  version_requirements: *id012
196
209
  - !ruby/object:Gem::Dependency
197
- name: ruby-debug19
210
+ name: ruby-debug
198
211
  prerelease: false
199
212
  requirement: &id013 !ruby/object:Gem::Requirement
200
213
  none: false
201
214
  requirements:
202
215
  - - ">="
203
216
  - !ruby/object:Gem::Version
217
+ hash: 3
204
218
  segments:
205
219
  - 0
206
220
  version: "0"
@@ -261,6 +275,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
261
275
  requirements:
262
276
  - - ">="
263
277
  - !ruby/object:Gem::Version
278
+ hash: 3
264
279
  segments:
265
280
  - 0
266
281
  version: "0"
@@ -269,6 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
284
  requirements:
270
285
  - - ">="
271
286
  - !ruby/object:Gem::Version
287
+ hash: 3
272
288
  segments:
273
289
  - 0
274
290
  version: "0"
@@ -279,5 +295,15 @@ rubygems_version: 1.3.7
279
295
  signing_key:
280
296
  specification_version: 3
281
297
  summary: Mine remote data into your ActiveRecord models.
282
- test_files: []
283
-
298
+ test_files:
299
+ - test/helper.rb
300
+ - test/support/aircraft.rb
301
+ - test/support/airport.rb
302
+ - test/support/automobile_fuel_type.rb
303
+ - test/support/automobile_variant.rb
304
+ - test/support/country.rb
305
+ - test/support/test_database.rb
306
+ - test/test_data_miner_attribute.rb
307
+ - test/test_data_miner_process.rb
308
+ - test/test_data_miner_verify.rb
309
+ - test/test_old_syntax.rb