lookup 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/lookup.rb +3 -4
  2. data/lib/models.rb +6 -6
  3. metadata +2 -2
@@ -1,7 +1,8 @@
1
1
  require 'rubygems'
2
2
  require 'active_record'
3
3
 
4
- class APILookup
4
+ require File.join(File.dirname(__FILE__), 'models')
5
+ module APILookup
5
6
 
6
7
  class << self
7
8
  def update
@@ -142,6 +143,4 @@ class APILookup
142
143
  end
143
144
 
144
145
  end
145
- end
146
-
147
- require File.join(File.dirname(__FILE__), 'models')
146
+ end
@@ -1,6 +1,6 @@
1
1
  require 'fileutils'
2
2
 
3
- class APILookup
3
+ module APILookup
4
4
 
5
5
  class MissingHome < StandardError
6
6
  end
@@ -18,18 +18,18 @@ class APILookup
18
18
 
19
19
  class Api < LookupBase
20
20
  set_table_name "apis"
21
- has_many :constants
21
+ has_many :constants, :class_name => "APILookup::Constant"
22
22
  end
23
23
 
24
24
  class Constant < LookupBase
25
25
  set_table_name "constants"
26
- belongs_to :api
27
- has_many :entries
26
+ belongs_to :api, :class_name => "APILookup::Api"
27
+ has_many :entries, :class_name => "APILookup::Entry"
28
28
  end
29
-
29
+
30
30
  class Entry < LookupBase
31
31
  set_table_name "entries"
32
- belongs_to :constant
32
+ belongs_to :constant, :class_name => "APILookup::Constant"
33
33
  end
34
34
 
35
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lookup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Bigg
@@ -9,7 +9,7 @@ autorequire: lookup
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-28 00:00:00 +10:00
12
+ date: 2010-01-28 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency