earth 0.0.31 → 0.0.32

Sign up to get free protection for your applications and to get access to all the features.
data/lib/earth/base.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Earth
2
- class Base < ActiveRecord::Base
3
- def self.define_schema(data_miner)
2
+ module Base
3
+ def define_schema(data_miner)
4
4
  data_miner.schema Earth.database_options, &self.schema_definition
5
5
  end
6
6
  end
@@ -1,4 +1,5 @@
1
- class IndustriesProductLines < Earth::Base
1
+ class IndustriesProductLines < ActiveRecord::Base
2
+ extend Earth::Base
2
3
  set_primary_key :row_hash
3
4
 
4
5
  belongs_to :industry, :foreign_key => 'naics_code'
@@ -1,4 +1,5 @@
1
- class IndustriesSectors < Earth::Base
1
+ class IndustriesSectors < ActiveRecord::Base
2
+ extend Earth::Base
2
3
  belongs_to :industry, :foreign_key => 'naics_code'
3
4
  belongs_to :sector, :foreign_key => 'io_code'
4
5
 
@@ -1,4 +1,5 @@
1
- class Merchant < Earth::Base
1
+ class Merchant < ActiveRecord::Base
2
+ extend Earth::Base
2
3
  set_primary_key :id
3
4
 
4
5
  belongs_to :merchant_category, :foreign_key => 'mcc'
@@ -1,5 +1,5 @@
1
- class MerchantCategoriesIndustries < Earth::Base
2
- set_primary_key :row_hash
1
+ class MerchantCategoriesIndustries < ActiveRecord::Base
2
+ extend Earth::Base
3
3
 
4
4
  belongs_to :merchant_category, :foreign_key => 'mcc'
5
5
  belongs_to :industry, :foreign_key => 'naics_code'
@@ -1,4 +1,5 @@
1
- class ProductLinesSectors < Earth::Base
1
+ class ProductLinesSectors < ActiveRecord::Base
2
+ extend Earth::Base
2
3
  belongs_to :product_line, :foreign_key => 'ps_code'
3
4
  belongs_to :sector, :foreign_key => 'io_code'
4
5
 
@@ -1,4 +1,5 @@
1
- class Sector < Earth::Base
1
+ class Sector < ActiveRecord::Base
2
+ extend Earth::Base
2
3
  set_primary_key :io_code
3
4
 
4
5
  has_many :product_lines_sectors, :class_name => 'ProductLinesSectors', :foreign_key => 'io_code'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: earth
3
3
  version: !ruby/object:Gem::Version
4
- hash: 33
4
+ hash: 95
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 31
10
- version: 0.0.31
9
+ - 32
10
+ version: 0.0.32
11
11
  platform: ruby
12
12
  authors:
13
13
  - Seamus Abshere