seed-do 3.0.1 → 3.0.2

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +54 -29
  3. data/lib/seed-do/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18ec9fb81796b2fb8c24d686eb2e2f7bb7434f13e69e968f13ea5683b48cf211
4
- data.tar.gz: d67817e2f0bc3bf16ac5a05c853669e485151c4b412cf5ab33f08e41acf80028
3
+ metadata.gz: 9f5b724f7e1308c3ebee229f2d9185be161a5ae010eb2b1e93859af741db9574
4
+ data.tar.gz: e363d0fdc5472472bc28125ab700a5ec542e6be06a636231294fca5c098d36f6
5
5
  SHA512:
6
- metadata.gz: 26032a64a24b0e543e4bd5bcabf776551c3c615a1fe49b948e07b2572e84ed9b58bc70286ad6ed7d146891653279cec411515c3c89227afe26ba2d0c8ee46ef5
7
- data.tar.gz: ef24c2ad905e56f29d9c50f56325074ea7509cd9681269fe6ce8923a4f1ccb07187593325810de7f9c1595fa33f241ed9699169bcf501c40b9e799330c23690a
6
+ metadata.gz: 96f4bd06ef0064917e2ad938a8ea98c5a5bd571de14cf1ba44e326816612a391b62f183566ff36b0474e09c5e09e608fe4c87206a68085f0b9250c411f859b80
7
+ data.tar.gz: a0b54d620916ed12f12fca5c786c57f2868df495a70b6e00920a8a154f9a14a728aa908f847439ecb08759bd684fe73edaaa8d125c2d5c3dd0b59a18287f2316
data/README.md CHANGED
@@ -4,39 +4,14 @@ This project is a fork of [seed-fu](https://github.com/mbleigh/seed-fu).
4
4
 
5
5
  Seed Do is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.
6
6
 
7
- ## Basic Example
8
-
9
- ### In `db/fixtures/users.rb`
10
-
11
- ```ruby
12
- User.seed do |s|
13
- s.id = 1
14
- s.login = "jon"
15
- s.email = "jon@example.com"
16
- s.name = "Jon"
17
- end
18
-
19
- User.seed do |s|
20
- s.id = 2
21
- s.login = "emily"
22
- s.email = "emily@example.com"
23
- s.name = "Emily"
24
- end
25
- ```
26
-
27
- ### To load the data:
28
-
29
- ```ruby
30
- $ rake db:seed_do
31
- == Seed from /path/to/app/db/fixtures/users.rb
32
- - User {:id=>1, :login=>"jon", :email=>"jon@example.com", :name=>"Jon"}
33
- - User {:id=>2, :login=>"emily", :email=>"emily@example.com", :name=>"Emily"}
34
- ```
35
-
36
7
  ## Installation
37
8
 
38
9
  Just add `gem 'seed-do'` to your `Gemfile`
39
10
 
11
+ ## Documentation
12
+
13
+ For detailed API documentation, please visit: https://rubydoc.info/github/willnet/seed-do
14
+
40
15
  ## Migrating from seed-fu
41
16
 
42
17
  If you are migrating from seed-fu to seed-do, you'll need to make the following changes:
@@ -70,6 +45,36 @@ require 'seed-do/capistrano'
70
45
  require 'seed-do/capistrano3'
71
46
  ```
72
47
 
48
+ ## Basic Example
49
+
50
+
51
+ ### In `db/fixtures/users.rb`
52
+
53
+ ```ruby
54
+ User.seed do |s|
55
+ s.id = 1
56
+ s.login = "jon"
57
+ s.email = "jon@example.com"
58
+ s.name = "Jon"
59
+ end
60
+
61
+ User.seed do |s|
62
+ s.id = 2
63
+ s.login = "emily"
64
+ s.email = "emily@example.com"
65
+ s.name = "Emily"
66
+ end
67
+ ```
68
+
69
+ ### To load the data:
70
+
71
+ ```ruby
72
+ $ rake db:seed_do
73
+ == Seed from /path/to/app/db/fixtures/users.rb
74
+ - User {:id=>1, :login=>"jon", :email=>"jon@example.com", :name=>"Jon"}
75
+ - User {:id=>2, :login=>"emily", :email=>"emily@example.com", :name=>"Emily"}
76
+ ```
77
+
73
78
  ## Constraints
74
79
 
75
80
  Constraints are used to identify seeds, so that they can be updated if necessary. For example:
@@ -175,6 +180,26 @@ require 'seed-do/capistrano3'
175
180
  before 'deploy:publishing', 'db:seed_do'
176
181
  ```
177
182
 
183
+ ## Development
184
+
185
+ ### To run the specs
186
+
187
+ ```
188
+ bundle install # Install the dependencies
189
+ bundle exec rspec # Run the specs
190
+ ```
191
+
192
+ By default an sqlite3 database is used.
193
+
194
+ ### To test others
195
+
196
+ ```
197
+ DB=mysql2 bundle exec rspec
198
+ DB=postgresql bundle exec rspec
199
+ ```
200
+
201
+ The connection paramaters for each of these are specified in spec/connections/, which you can edit if necessary (for example to change the username/password).
202
+
178
203
  ## Original Author
179
204
 
180
205
  [Michael Bleigh](http://www.mbleigh.com/) is the original author
@@ -1,3 +1,3 @@
1
1
  module SeedDo
2
- VERSION = '3.0.1'
2
+ VERSION = '3.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seed-do
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinichi Maeshima