earth 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -113,7 +113,7 @@ AutomobileTypeFuelYearAge.class_eval do
|
|
113
113
|
|
114
114
|
process "Derive type fuel year name for association with AutomobileTypeFuelYear" do
|
115
115
|
if ActiveRecord::Base.connection.adapter_name.downcase == 'sqlite'
|
116
|
-
update_all "type_fuel_year_name = type_name || ' ' || fuel_common_name || ' ' year"
|
116
|
+
update_all "type_fuel_year_name = type_name || ' ' || fuel_common_name || ' ' || year"
|
117
117
|
else
|
118
118
|
update_all "type_fuel_year_name = CONCAT(type_name, ' ', fuel_common_name, ' ', year)"
|
119
119
|
end
|
data/lib/earth/version.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'earth/automobile'
|
3
|
+
require 'earth/automobile/data_miner'
|
4
|
+
|
5
|
+
describe AutomobileTypeFuelYearAge do
|
6
|
+
describe 'import' do
|
7
|
+
it 'imports and processes data successfully' do
|
8
|
+
expect do
|
9
|
+
AutomobileTypeFuelYearAge.run_data_miner!
|
10
|
+
end.should_not raise_error
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
data/spec/spec_helper.rb
CHANGED
@@ -10,14 +10,10 @@ ActiveRecord::Base.establish_connection :adapter => 'sqlite3',
|
|
10
10
|
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
11
11
|
require 'earth' # we do require Earth to live
|
12
12
|
|
13
|
+
require 'data_miner'
|
13
14
|
require 'logger'
|
14
|
-
|
15
|
-
test_log.sync = true
|
16
|
-
DataMiner.logger = Logger.new test_log
|
15
|
+
DataMiner.logger = Logger.new(nil)
|
17
16
|
|
18
17
|
RSpec.configure do |c|
|
19
18
|
c.filter_run_excluding :slow => true
|
20
|
-
c.before(:all) do
|
21
|
-
DataMiner.logger = Logger.new(nil)
|
22
|
-
end
|
23
19
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 0.4.
|
8
|
+
- 8
|
9
|
+
version: 0.4.8
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Seamus Abshere
|
@@ -21,7 +21,6 @@ default_executable:
|
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: cohort_scope
|
24
|
-
prerelease: false
|
25
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
25
|
none: false
|
27
26
|
requirements:
|
@@ -33,10 +32,10 @@ dependencies:
|
|
33
32
|
- 5
|
34
33
|
version: 0.1.5
|
35
34
|
type: :runtime
|
35
|
+
prerelease: false
|
36
36
|
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: data_miner
|
39
|
-
prerelease: false
|
40
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
40
|
none: false
|
42
41
|
requirements:
|
@@ -48,10 +47,10 @@ dependencies:
|
|
48
47
|
- 4
|
49
48
|
version: 1.1.4
|
50
49
|
type: :runtime
|
50
|
+
prerelease: false
|
51
51
|
version_requirements: *id002
|
52
52
|
- !ruby/object:Gem::Dependency
|
53
53
|
name: falls_back_on
|
54
|
-
prerelease: false
|
55
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
55
|
none: false
|
57
56
|
requirements:
|
@@ -63,10 +62,10 @@ dependencies:
|
|
63
62
|
- 3
|
64
63
|
version: 0.1.3
|
65
64
|
type: :runtime
|
65
|
+
prerelease: false
|
66
66
|
version_requirements: *id003
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: geokit-rails
|
69
|
-
prerelease: false
|
70
69
|
requirement: &id004 !ruby/object:Gem::Requirement
|
71
70
|
none: false
|
72
71
|
requirements:
|
@@ -76,10 +75,10 @@ dependencies:
|
|
76
75
|
- 0
|
77
76
|
version: "0"
|
78
77
|
type: :runtime
|
78
|
+
prerelease: false
|
79
79
|
version_requirements: *id004
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: loose_tight_dictionary
|
82
|
-
prerelease: false
|
83
82
|
requirement: &id005 !ruby/object:Gem::Requirement
|
84
83
|
none: false
|
85
84
|
requirements:
|
@@ -91,10 +90,10 @@ dependencies:
|
|
91
90
|
- 10
|
92
91
|
version: 0.0.10
|
93
92
|
type: :runtime
|
93
|
+
prerelease: false
|
94
94
|
version_requirements: *id005
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
96
|
name: weighted_average
|
97
|
-
prerelease: false
|
98
97
|
requirement: &id006 !ruby/object:Gem::Requirement
|
99
98
|
none: false
|
100
99
|
requirements:
|
@@ -106,10 +105,10 @@ dependencies:
|
|
106
105
|
- 6
|
107
106
|
version: 0.0.6
|
108
107
|
type: :runtime
|
108
|
+
prerelease: false
|
109
109
|
version_requirements: *id006
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: bundler
|
112
|
-
prerelease: false
|
113
112
|
requirement: &id007 !ruby/object:Gem::Requirement
|
114
113
|
none: false
|
115
114
|
requirements:
|
@@ -119,10 +118,10 @@ dependencies:
|
|
119
118
|
- 0
|
120
119
|
version: "0"
|
121
120
|
type: :development
|
121
|
+
prerelease: false
|
122
122
|
version_requirements: *id007
|
123
123
|
- !ruby/object:Gem::Dependency
|
124
124
|
name: bueller
|
125
|
-
prerelease: false
|
126
125
|
requirement: &id008 !ruby/object:Gem::Requirement
|
127
126
|
none: false
|
128
127
|
requirements:
|
@@ -132,10 +131,10 @@ dependencies:
|
|
132
131
|
- 0
|
133
132
|
version: "0"
|
134
133
|
type: :development
|
134
|
+
prerelease: false
|
135
135
|
version_requirements: *id008
|
136
136
|
- !ruby/object:Gem::Dependency
|
137
137
|
name: cucumber
|
138
|
-
prerelease: false
|
139
138
|
requirement: &id009 !ruby/object:Gem::Requirement
|
140
139
|
none: false
|
141
140
|
requirements:
|
@@ -145,10 +144,10 @@ dependencies:
|
|
145
144
|
- 0
|
146
145
|
version: "0"
|
147
146
|
type: :development
|
147
|
+
prerelease: false
|
148
148
|
version_requirements: *id009
|
149
149
|
- !ruby/object:Gem::Dependency
|
150
150
|
name: rake
|
151
|
-
prerelease: false
|
152
151
|
requirement: &id010 !ruby/object:Gem::Requirement
|
153
152
|
none: false
|
154
153
|
requirements:
|
@@ -158,10 +157,10 @@ dependencies:
|
|
158
157
|
- 0
|
159
158
|
version: "0"
|
160
159
|
type: :development
|
160
|
+
prerelease: false
|
161
161
|
version_requirements: *id010
|
162
162
|
- !ruby/object:Gem::Dependency
|
163
163
|
name: rdoc
|
164
|
-
prerelease: false
|
165
164
|
requirement: &id011 !ruby/object:Gem::Requirement
|
166
165
|
none: false
|
167
166
|
requirements:
|
@@ -171,10 +170,10 @@ dependencies:
|
|
171
170
|
- 0
|
172
171
|
version: "0"
|
173
172
|
type: :development
|
173
|
+
prerelease: false
|
174
174
|
version_requirements: *id011
|
175
175
|
- !ruby/object:Gem::Dependency
|
176
176
|
name: rdoc
|
177
|
-
prerelease: false
|
178
177
|
requirement: &id012 !ruby/object:Gem::Requirement
|
179
178
|
none: false
|
180
179
|
requirements:
|
@@ -184,10 +183,10 @@ dependencies:
|
|
184
183
|
- 0
|
185
184
|
version: "0"
|
186
185
|
type: :development
|
186
|
+
prerelease: false
|
187
187
|
version_requirements: *id012
|
188
188
|
- !ruby/object:Gem::Dependency
|
189
189
|
name: rspec
|
190
|
-
prerelease: false
|
191
190
|
requirement: &id013 !ruby/object:Gem::Requirement
|
192
191
|
none: false
|
193
192
|
requirements:
|
@@ -197,10 +196,10 @@ dependencies:
|
|
197
196
|
- 0
|
198
197
|
version: "0"
|
199
198
|
type: :development
|
199
|
+
prerelease: false
|
200
200
|
version_requirements: *id013
|
201
201
|
- !ruby/object:Gem::Dependency
|
202
202
|
name: sqlite3-ruby
|
203
|
-
prerelease: false
|
204
203
|
requirement: &id014 !ruby/object:Gem::Requirement
|
205
204
|
none: false
|
206
205
|
requirements:
|
@@ -210,6 +209,7 @@ dependencies:
|
|
210
209
|
- 0
|
211
210
|
version: "0"
|
212
211
|
type: :development
|
212
|
+
prerelease: false
|
213
213
|
version_requirements: *id014
|
214
214
|
description: An earth-simulation environment with ActiveRecord models and data
|
215
215
|
email: andy@rossmeissl.net
|
@@ -499,6 +499,7 @@ files:
|
|
499
499
|
- lib/earth/version.rb
|
500
500
|
- spec/earth/air/aircraft_spec.rb
|
501
501
|
- spec/earth/automobile/automobile_fuel_spec.rb
|
502
|
+
- spec/earth/automobile/automobile_type_fuel_year_age_spec.rb
|
502
503
|
- spec/earth/bus/bus_class_spec.rb
|
503
504
|
- spec/earth/bus/bus_fuel_control_spec.rb
|
504
505
|
- spec/earth/bus/bus_fuel_year_control_spec.rb
|
@@ -561,6 +562,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
561
562
|
requirements:
|
562
563
|
- - ">="
|
563
564
|
- !ruby/object:Gem::Version
|
565
|
+
hash: -4098503984188126677
|
564
566
|
segments:
|
565
567
|
- 0
|
566
568
|
version: "0"
|
@@ -569,6 +571,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
569
571
|
requirements:
|
570
572
|
- - ">="
|
571
573
|
- !ruby/object:Gem::Version
|
574
|
+
hash: -4098503984188126677
|
572
575
|
segments:
|
573
576
|
- 0
|
574
577
|
version: "0"
|
@@ -674,6 +677,7 @@ test_files:
|
|
674
677
|
- features/support/imports/shipment_mode_good.csv
|
675
678
|
- spec/earth/air/aircraft_spec.rb
|
676
679
|
- spec/earth/automobile/automobile_fuel_spec.rb
|
680
|
+
- spec/earth/automobile/automobile_type_fuel_year_age_spec.rb
|
677
681
|
- spec/earth/bus/bus_class_spec.rb
|
678
682
|
- spec/earth/bus/bus_fuel_control_spec.rb
|
679
683
|
- spec/earth/bus/bus_fuel_year_control_spec.rb
|