db_reference 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +1 -24
  2. data/lib/db_reference.rb +2 -2
  3. metadata +5 -20
data/Rakefile CHANGED
@@ -35,15 +35,13 @@ PKG_FILES = FileList[
35
35
 
36
36
  spec = Gem::Specification.new do |s|
37
37
  s.name = "db_reference"
38
- s.version = "0.0.3"
38
+ s.version = "0.0.4"
39
39
  s.author = "Cam Fowler"
40
40
  s.email = "cameron.fowler@abletech.co.nz"
41
41
  s.homepage = "http://www.abletech.co.nz/"
42
42
  s.platform = Gem::Platform::RUBY
43
43
  s.summary = "Loads files from db/reference/"
44
44
  s.description = """
45
- Reference
46
- =========
47
45
 
48
46
  Used for creating a predefined set of models, similar to db:seed, but will not repopulate if entries already exist.
49
47
 
@@ -52,27 +50,6 @@ References will be loaded in ascending order, so if an order is desired, prepend
52
50
 
53
51
  Run with:
54
52
  rake reference:load
55
-
56
- Example
57
- =======
58
-
59
- The below example ensures that there are 6 locations existing in the database after running the 'rake reference:load'
60
-
61
-
62
- # db/schema.rb
63
- create_table 'locations', :force => true do |t|
64
- t.string 'name', :null => false
65
- end
66
-
67
-
68
- # db/reference/000_locations.rb
69
- Location.update_or_create :id => 1, :name => 'Wellington City'
70
- Location.update_or_create :id => 2, :name => 'Lower Hutt'
71
- Location.update_or_create :id => 3, :name => 'Kapiti Coast'
72
- Location.update_or_create :id => 4, :name => 'Porirua'
73
- Location.update_or_create :id => 5, :name => 'Upper Hutt'
74
- Location.update_or_create :id => 6, :name => 'Wairarapa'
75
-
76
53
  """
77
54
  s.files = PKG_FILES.to_a
78
55
  s.require_path = "lib"
@@ -1,2 +1,2 @@
1
- require 'reference/active_record_ext'
2
- require 'reference/railtie'
1
+ require 'db_reference/active_record_ext'
2
+ require 'db_reference/railtie'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db_reference
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Cam Fowler
@@ -19,26 +19,11 @@ date: 2010-12-20 00:00:00 +13:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
22
- description: "\n\
23
- Reference\n\
24
- =========\n\n\
22
+ description: "\n\n\
25
23
  Used for creating a predefined set of models, similar to db:seed, but will not repopulate if entries already exist.\n\n\
26
24
  Place references in 'db/reference/'\n\
27
25
  References will be loaded in ascending order, so if an order is desired, prepend 000, 001, 002... etc to the filename.\n\n\
28
- Run with:\n rake reference:load\n\n\
29
- Example\n\
30
- =======\n\n\
31
- The below example ensures that there are 6 locations existing in the database after running the 'rake reference:load'\n\n\n\
32
- # db/schema.rb\n\
33
- create_table 'locations', :force => true do |t|\n t.string 'name', :null => false\n\
34
- end\n\n\n\
35
- # db/reference/000_locations.rb\n\
36
- Location.update_or_create :id => 1, :name => 'Wellington City'\n\
37
- Location.update_or_create :id => 2, :name => 'Lower Hutt'\n\
38
- Location.update_or_create :id => 3, :name => 'Kapiti Coast'\n\
39
- Location.update_or_create :id => 4, :name => 'Porirua'\n\
40
- Location.update_or_create :id => 5, :name => 'Upper Hutt'\n\
41
- Location.update_or_create :id => 6, :name => 'Wairarapa'\n\n "
26
+ Run with:\n rake reference:load\n "
42
27
  email: cameron.fowler@abletech.co.nz
43
28
  executables: []
44
29