data_miner 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -31,15 +31,15 @@ Now you can run:
31
31
 
32
32
  == Creating tables from scratch (changed in 1.2)
33
33
 
34
- We recommend using the <tt>create_table</tt> gem (https://github.com/seamusabshere/create_table)
34
+ We recommend using the <tt>force_schema</tt> gem (https://github.com/seamusabshere/force_schema)
35
35
 
36
36
  This replaces the <tt>schema</tt> method that was available before. It didn't make sense for <tt>data_miner</tt> to provide this natively.
37
37
 
38
38
  class Car < ActiveRecord::Base
39
39
 
40
- # THE NEW WAY - depends on create_table gem, which is not required by default
41
- # see the process step in the data_miner block where we actually call create_table!
42
- create_table do
40
+ # THE NEW WAY - depends on force_schema gem, which is not required by default
41
+ # see the process step in the data_miner block where we actually call force_schema!
42
+ force_schema do
43
43
  string :make
44
44
  string :model
45
45
  end
@@ -52,7 +52,7 @@ class Car < ActiveRecord::Base
52
52
  # end
53
53
 
54
54
  process "create the table, adding and removing columns as necessary" do
55
- create_table!
55
+ force_schema!
56
56
  end
57
57
 
58
58
  # [... other data mining steps]
@@ -69,11 +69,11 @@ This is how we linked together (http://data.brighterplanet.com/aircraft) the FAA
69
69
  # table without breaking associations.
70
70
  set_primary_key :icao_code
71
71
 
72
- # Use the create_table gem to define the database schema in-line.
72
+ # Use the force_schema gem to define the database schema in-line.
73
73
  # It will destructively and automatically add/remove columns.
74
74
  # This is "OK" because you can always just re-run the import script to get the data back.
75
75
  # PS. If you're using DataMapper, you don't need this
76
- create_table do
76
+ force_schema do
77
77
  string 'icao_code'
78
78
  string 'manufacturer_name'
79
79
  string 'name'
data/data_miner.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
27
27
  s.add_dependency 'blockenspiel', '>=0.3.2'
28
28
  s.add_dependency 'taps', '>=0.3.11'
29
29
  s.add_dependency 'errata', '>=1.0.1'
30
- s.add_development_dependency 'create_table', '>=0.0.2'
30
+ s.add_development_dependency 'force_schema', '>=0.0.2'
31
31
  s.add_development_dependency 'loose_tight_dictionary', ">=0.0.5"
32
32
  s.add_development_dependency 'test-unit'
33
33
  s.add_development_dependency 'shoulda'
@@ -1,3 +1,3 @@
1
1
  class DataMiner
2
- VERSION = '1.2.1'
2
+ VERSION = '1.2.2'
3
3
  end
data/test/helper.rb CHANGED
@@ -3,7 +3,7 @@ require 'bundler'
3
3
  Bundler.setup
4
4
  require 'test/unit'
5
5
  require 'shoulda'
6
- require 'create_table'
6
+ require 'force_schema'
7
7
  # require 'ruby-debug'
8
8
  $LOAD_PATH.unshift(File.dirname(__FILE__))
9
9
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
@@ -567,7 +567,7 @@ end
567
567
  class AutomobileMakeFleetYear < ActiveRecord::Base
568
568
  set_primary_key :name
569
569
 
570
- create_table do
570
+ force_schema do
571
571
  string "name"
572
572
  string "make_name"
573
573
  string "fleet"
@@ -582,7 +582,7 @@ class AutomobileMakeFleetYear < ActiveRecord::Base
582
582
 
583
583
  data_miner do
584
584
  process "create table" do
585
- create_table!
585
+ force_schema!
586
586
  end
587
587
 
588
588
  process "finish if i tell you to" do
@@ -610,7 +610,7 @@ end
610
610
  class CensusDivisionTrois < ActiveRecord::Base
611
611
  set_primary_key :number_code
612
612
 
613
- create_table do
613
+ force_schema do
614
614
  string 'number_code'
615
615
  string 'name'
616
616
  string 'census_region_name'
@@ -621,13 +621,13 @@ class CensusDivisionTrois < ActiveRecord::Base
621
621
 
622
622
  data_miner do
623
623
  process "create table" do
624
- create_table!
624
+ force_schema!
625
625
  end
626
626
  end
627
627
  end
628
628
 
629
629
  class CensusDivisionFour < ActiveRecord::Base
630
- create_table do
630
+ force_schema do
631
631
  string 'number_code'
632
632
  string 'name'
633
633
  string 'census_region_name'
@@ -637,7 +637,7 @@ class CensusDivisionFour < ActiveRecord::Base
637
637
 
638
638
  data_miner do
639
639
  process "create table" do
640
- create_table!
640
+ force_schema!
641
641
  end
642
642
  end
643
643
  end
@@ -661,7 +661,7 @@ class TestOldSyntax < Test::Unit::TestCase
661
661
  if AutomobileMakeFleetYear.table_exists?
662
662
  ActiveRecord::Base.connection.execute 'DROP TABLE automobile_make_fleet_years;'
663
663
  end
664
- AutomobileMakeFleetYear.create_table!
664
+ AutomobileMakeFleetYear.force_schema!
665
665
  assert AutomobileMakeFleetYear.table_exists?
666
666
  end
667
667
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_miner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2011-06-16 00:00:00.000000000Z
14
+ date: 2011-07-20 00:00:00.000000000Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: remote_table
18
- requirement: &2156849640 !ruby/object:Gem::Requirement
18
+ requirement: &2155063100 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 1.2.2
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *2156849640
26
+ version_requirements: *2155063100
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: escape
29
- requirement: &2156849020 !ruby/object:Gem::Requirement
29
+ requirement: &2155062600 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: 0.0.4
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *2156849020
37
+ version_requirements: *2155062600
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: activerecord
40
- requirement: &2156848340 !ruby/object:Gem::Requirement
40
+ requirement: &2160123760 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: 2.3.4
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *2156848340
48
+ version_requirements: *2160123760
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: activesupport
51
- requirement: &2156847760 !ruby/object:Gem::Requirement
51
+ requirement: &2160123300 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: 2.3.4
57
57
  type: :runtime
58
58
  prerelease: false
59
- version_requirements: *2156847760
59
+ version_requirements: *2160123300
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: conversions
62
- requirement: &2156846840 !ruby/object:Gem::Requirement
62
+ requirement: &2160122840 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: 1.4.4
68
68
  type: :runtime
69
69
  prerelease: false
70
- version_requirements: *2156846840
70
+ version_requirements: *2160122840
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: blockenspiel
73
- requirement: &2156846280 !ruby/object:Gem::Requirement
73
+ requirement: &2160122380 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: 0.3.2
79
79
  type: :runtime
80
80
  prerelease: false
81
- version_requirements: *2156846280
81
+ version_requirements: *2160122380
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: taps
84
- requirement: &2156845760 !ruby/object:Gem::Requirement
84
+ requirement: &2160121920 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ! '>='
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: 0.3.11
90
90
  type: :runtime
91
91
  prerelease: false
92
- version_requirements: *2156845760
92
+ version_requirements: *2160121920
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: errata
95
- requirement: &2156844720 !ruby/object:Gem::Requirement
95
+ requirement: &2160121460 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ! '>='
@@ -100,10 +100,10 @@ dependencies:
100
100
  version: 1.0.1
101
101
  type: :runtime
102
102
  prerelease: false
103
- version_requirements: *2156844720
103
+ version_requirements: *2160121460
104
104
  - !ruby/object:Gem::Dependency
105
- name: create_table
106
- requirement: &2156843920 !ruby/object:Gem::Requirement
105
+ name: force_schema
106
+ requirement: &2160121000 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
109
  - - ! '>='
@@ -111,10 +111,10 @@ dependencies:
111
111
  version: 0.0.2
112
112
  type: :development
113
113
  prerelease: false
114
- version_requirements: *2156843920
114
+ version_requirements: *2160121000
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: loose_tight_dictionary
117
- requirement: &2156842900 !ruby/object:Gem::Requirement
117
+ requirement: &2160120540 !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
120
120
  - - ! '>='
@@ -122,10 +122,10 @@ dependencies:
122
122
  version: 0.0.5
123
123
  type: :development
124
124
  prerelease: false
125
- version_requirements: *2156842900
125
+ version_requirements: *2160120540
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: test-unit
128
- requirement: &2156842520 !ruby/object:Gem::Requirement
128
+ requirement: &2160120160 !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
131
  - - ! '>='
@@ -133,10 +133,10 @@ dependencies:
133
133
  version: '0'
134
134
  type: :development
135
135
  prerelease: false
136
- version_requirements: *2156842520
136
+ version_requirements: *2160120160
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: shoulda
139
- requirement: &2156841880 !ruby/object:Gem::Requirement
139
+ requirement: &2160119700 !ruby/object:Gem::Requirement
140
140
  none: false
141
141
  requirements:
142
142
  - - ! '>='
@@ -144,10 +144,10 @@ dependencies:
144
144
  version: '0'
145
145
  type: :development
146
146
  prerelease: false
147
- version_requirements: *2156841880
147
+ version_requirements: *2160119700
148
148
  - !ruby/object:Gem::Dependency
149
149
  name: mysql
150
- requirement: &2156841300 !ruby/object:Gem::Requirement
150
+ requirement: &2160119280 !ruby/object:Gem::Requirement
151
151
  none: false
152
152
  requirements:
153
153
  - - ! '>='
@@ -155,10 +155,10 @@ dependencies:
155
155
  version: '0'
156
156
  type: :development
157
157
  prerelease: false
158
- version_requirements: *2156841300
158
+ version_requirements: *2160119280
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: rake
161
- requirement: &2156840680 !ruby/object:Gem::Requirement
161
+ requirement: &2160118860 !ruby/object:Gem::Requirement
162
162
  none: false
163
163
  requirements:
164
164
  - - ! '>='
@@ -166,7 +166,7 @@ dependencies:
166
166
  version: '0'
167
167
  type: :development
168
168
  prerelease: false
169
- version_requirements: *2156840680
169
+ version_requirements: *2160118860
170
170
  description: Mine remote data into your ActiveRecord models. You can also convert
171
171
  units.
172
172
  email: