named_seeds 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,9 @@
1
+
2
+ ### v1.0.1
3
+
4
+ * Do nothing unless there is a seed file.
5
+
6
+
7
+ ### v1.0.0
8
+
9
+ * Initial release
@@ -20,9 +20,11 @@ module NamedSeeds
20
20
  end
21
21
 
22
22
  def load_seed
23
- setup_test_environment
24
- clean_test_database
25
- load_all_seeds
23
+ if seed_file
24
+ setup_test_environment
25
+ clean_test_database
26
+ load_all_seeds
27
+ end
26
28
  end
27
29
 
28
30
 
@@ -49,8 +51,11 @@ module NamedSeeds
49
51
  def load_all_seeds
50
52
  Rails.application.load_seed if config.named_seeds.app_load_seed
51
53
  config.named_seeds.engines_with_load_seed.each { |engine| engine.load_seed }
52
- seed_file = Rails.application.paths["db/test/seeds"].existent.first
53
- load(seed_file) if seed_file
54
+ load seed_file
55
+ end
56
+
57
+ def seed_file
58
+ Rails.application.paths["db/test/seeds"].existent.first
54
59
  end
55
60
 
56
61
  end
@@ -1,3 +1,3 @@
1
1
  module NamedSeeds
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: named_seeds
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ken Collins
@@ -104,6 +104,7 @@ extra_rdoc_files: []
104
104
 
105
105
  files:
106
106
  - .gitignore
107
+ - CHANGELOG.md
107
108
  - Gemfile
108
109
  - LICENSE
109
110
  - README.md