seedbank 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -18,7 +18,7 @@ Seedbank seeds follow this structure;
18
18
 
19
19
  db/seeds/
20
20
  bar.seeds.rb
21
- develpment/
21
+ development/
22
22
  users.seeds.rb
23
23
  foo.seeds.rb
24
24
 
data/lib/seedbank.rb CHANGED
@@ -1,10 +1,8 @@
1
1
  require 'seedbank/dsl'
2
- require 'seedbank/task'
2
+ require 'seedbank/rename_task'
3
3
  require 'seedbank/task_manager'
4
4
  require 'seedbank/runner'
5
5
 
6
- require 'rake' unless defined?(Rake)
7
-
8
6
  module Seedbank
9
7
 
10
8
  class << self
data/lib/seedbank/dsl.rb CHANGED
@@ -1,6 +1,11 @@
1
1
  module Seedbank
2
2
  module DSL
3
3
 
4
+ def self.included(base)
5
+ Rake::Task.extend(Seedbank::RenameTask)
6
+ Rake::Application.send(:include, Seedbank::TaskManager)
7
+ end
8
+
4
9
  def override_task(*args, &block)
5
10
  name, params, deps = Rake.application.resolve_args(args.dup)
6
11
  fq_name = Rake.application.instance_variable_get(:@scope).dup.push(name).join(':')
@@ -1,5 +1,5 @@
1
1
  module Seedbank
2
- module Task
2
+ module RenameTask
3
3
 
4
4
  def rename_task(fq_name, new_name)
5
5
  Rake.application.rename_task(fq_name, new_name)
@@ -1,3 +1,3 @@
1
1
  module Seedbank
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/tasks/seed.rake CHANGED
@@ -1,7 +1,5 @@
1
1
  namespace :db do
2
2
 
3
- Rake::Task.extend(Seedbank::Task)
4
- Rake::Application.send(:include, Seedbank::TaskManager)
5
3
  include Seedbank::DSL
6
4
 
7
5
  base_dependencies = ['db:seed:original']
metadata CHANGED
@@ -1,155 +1,172 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: seedbank
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
4
5
  prerelease:
5
- version: 0.1.1
6
6
  platform: ruby
7
- authors:
8
- - James McCarthy
7
+ authors:
8
+ - James McCarthy
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-03-13 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: minitest
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - ~>
22
- - !ruby/object:Gem::Version
23
- version: "3.2"
24
- type: :development
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: flexmock
28
- prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: "0"
35
- type: :development
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: rails
39
- prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 3.2.6
46
- type: :development
47
- version_requirements: *id003
48
- description: "\n Extends Rails seeds to split out complex seeds into multiple\n files and lets each environment have it's own seeds.\n "
12
+ date: 2012-03-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: minitest
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '3.2'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3.2'
30
+ - !ruby/object:Gem::Dependency
31
+ name: flexmock
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rails
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 3.2.6
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 3.2.6
62
+ description: ! "\n Extends Rails seeds to split out complex seeds into multiple\n
63
+ \ files and lets each environment have it's own seeds.\n "
49
64
  email: james2mccarthy@gmail.com
50
65
  executables: []
51
-
52
66
  extensions: []
53
-
54
- extra_rdoc_files:
55
- - MIT-LICENSE
56
- - README.md
57
- files:
58
- - .gitignore
59
- - .travis.yml
60
- - Gemfile
61
- - MIT-LICENSE
62
- - README.md
63
- - Rakefile
64
- - TODO.txt
65
- - lib/seedbank.rb
66
- - lib/seedbank/dsl.rb
67
- - lib/seedbank/railtie.rb
68
- - lib/seedbank/runner.rb
69
- - lib/seedbank/task.rb
70
- - lib/seedbank/task_manager.rb
71
- - lib/seedbank/version.rb
72
- - lib/tasks/seed.rake
73
- - seedbank.gemspec
74
- - test/dummy/Rakefile
75
- - test/dummy/app/controllers/application_controller.rb
76
- - test/dummy/app/models/fake_model.rb
77
- - test/dummy/config.ru
78
- - test/dummy/config/application.rb
79
- - test/dummy/config/boot.rb
80
- - test/dummy/config/database.yml
81
- - test/dummy/config/environment.rb
82
- - test/dummy/config/environments/development.rb
83
- - test/dummy/config/environments/test.rb
84
- - test/dummy/config/initializers/secret_token.rb
85
- - test/dummy/config/initializers/session_store.rb
86
- - test/dummy/config/initializers/wrap_parameters.rb
87
- - test/dummy/config/locales/en.yml
88
- - test/dummy/config/routes.rb
89
- - test/dummy/db/seeds.rb
90
- - test/dummy/db/seeds/circular1.seeds.rb
91
- - test/dummy/db/seeds/circular2.seeds.rb
92
- - test/dummy/db/seeds/dependency.seeds.rb
93
- - test/dummy/db/seeds/dependency2.seeds.rb
94
- - test/dummy/db/seeds/dependent.seeds.rb
95
- - test/dummy/db/seeds/dependent_on_nested.seeds.rb
96
- - test/dummy/db/seeds/dependent_on_several.seeds.rb
97
- - test/dummy/db/seeds/no_block.seeds.rb
98
- - test/dummy/script/rails
99
- - test/seedbank/runner_test.rb
100
- - test/test_helper.rb
67
+ extra_rdoc_files:
68
+ - MIT-LICENSE
69
+ - README.md
70
+ files:
71
+ - .gitignore
72
+ - .travis.yml
73
+ - Gemfile
74
+ - MIT-LICENSE
75
+ - README.md
76
+ - Rakefile
77
+ - TODO.txt
78
+ - lib/seedbank.rb
79
+ - lib/seedbank/dsl.rb
80
+ - lib/seedbank/railtie.rb
81
+ - lib/seedbank/rename_task.rb
82
+ - lib/seedbank/runner.rb
83
+ - lib/seedbank/task_manager.rb
84
+ - lib/seedbank/version.rb
85
+ - lib/tasks/seed.rake
86
+ - seedbank.gemspec
87
+ - test/dummy/Rakefile
88
+ - test/dummy/app/controllers/application_controller.rb
89
+ - test/dummy/app/models/fake_model.rb
90
+ - test/dummy/config.ru
91
+ - test/dummy/config/application.rb
92
+ - test/dummy/config/boot.rb
93
+ - test/dummy/config/database.yml
94
+ - test/dummy/config/environment.rb
95
+ - test/dummy/config/environments/development.rb
96
+ - test/dummy/config/environments/test.rb
97
+ - test/dummy/config/initializers/secret_token.rb
98
+ - test/dummy/config/initializers/session_store.rb
99
+ - test/dummy/config/initializers/wrap_parameters.rb
100
+ - test/dummy/config/locales/en.yml
101
+ - test/dummy/config/routes.rb
102
+ - test/dummy/db/seeds.rb
103
+ - test/dummy/db/seeds/circular1.seeds.rb
104
+ - test/dummy/db/seeds/circular2.seeds.rb
105
+ - test/dummy/db/seeds/dependency.seeds.rb
106
+ - test/dummy/db/seeds/dependency2.seeds.rb
107
+ - test/dummy/db/seeds/dependent.seeds.rb
108
+ - test/dummy/db/seeds/dependent_on_nested.seeds.rb
109
+ - test/dummy/db/seeds/dependent_on_several.seeds.rb
110
+ - test/dummy/db/seeds/no_block.seeds.rb
111
+ - test/dummy/script/rails
112
+ - test/seedbank/runner_test.rb
113
+ - test/test_helper.rb
101
114
  homepage: http://github.com/james2m/seedbank
102
115
  licenses: []
103
-
104
- post_install_message: "\n ================================================================================\n\n Rails 2.x\n ---------\n If you are using Seedbank with Rails 2.x you will need to place the following at \n the end of your Rakefile so Rubygems can load the seedbank tasks;\n\n require 'seedbank'\n Seedbank.load_tasks if defined?(Seedbank)\n\n Rails 3.x\n ---------\n Your work here is done!\n\n ================================================================================\n "
105
- rdoc_options:
106
- - --charset=UTF-8
107
- require_paths:
108
- - lib
109
- required_ruby_version: !ruby/object:Gem::Requirement
116
+ post_install_message: ! "\n ================================================================================\n\n
117
+ \ Rails 2.x\n ---------\n If you are using Seedbank with Rails 2.x you will need
118
+ to place the following at \n the end of your Rakefile so Rubygems can load the
119
+ seedbank tasks;\n\n require 'seedbank'\n Seedbank.load_tasks if defined?(Seedbank)\n\n
120
+ \ Rails 3.x\n ---------\n Your work here is done!\n\n ================================================================================\n
121
+ \ "
122
+ rdoc_options:
123
+ - --charset=UTF-8
124
+ require_paths:
125
+ - lib
126
+ required_ruby_version: !ruby/object:Gem::Requirement
110
127
  none: false
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- version: "0"
115
- required_rubygems_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
133
  none: false
117
- requirements:
118
- - - ">="
119
- - !ruby/object:Gem::Version
120
- version: 1.2.0
134
+ requirements:
135
+ - - ! '>='
136
+ - !ruby/object:Gem::Version
137
+ version: 1.2.0
121
138
  requirements: []
122
-
123
139
  rubyforge_project:
124
140
  rubygems_version: 1.8.24
125
141
  signing_key:
126
142
  specification_version: 3
127
- summary: Extends Rails seeds to split out complex seeds into their own file and have different seeds for each environment.
128
- test_files:
129
- - test/dummy/Rakefile
130
- - test/dummy/app/controllers/application_controller.rb
131
- - test/dummy/app/models/fake_model.rb
132
- - test/dummy/config.ru
133
- - test/dummy/config/application.rb
134
- - test/dummy/config/boot.rb
135
- - test/dummy/config/database.yml
136
- - test/dummy/config/environment.rb
137
- - test/dummy/config/environments/development.rb
138
- - test/dummy/config/environments/test.rb
139
- - test/dummy/config/initializers/secret_token.rb
140
- - test/dummy/config/initializers/session_store.rb
141
- - test/dummy/config/initializers/wrap_parameters.rb
142
- - test/dummy/config/locales/en.yml
143
- - test/dummy/config/routes.rb
144
- - test/dummy/db/seeds.rb
145
- - test/dummy/db/seeds/circular1.seeds.rb
146
- - test/dummy/db/seeds/circular2.seeds.rb
147
- - test/dummy/db/seeds/dependency.seeds.rb
148
- - test/dummy/db/seeds/dependency2.seeds.rb
149
- - test/dummy/db/seeds/dependent.seeds.rb
150
- - test/dummy/db/seeds/dependent_on_nested.seeds.rb
151
- - test/dummy/db/seeds/dependent_on_several.seeds.rb
152
- - test/dummy/db/seeds/no_block.seeds.rb
153
- - test/dummy/script/rails
154
- - test/seedbank/runner_test.rb
155
- - test/test_helper.rb
143
+ summary: Extends Rails seeds to split out complex seeds into their own file and have
144
+ different seeds for each environment.
145
+ test_files:
146
+ - test/dummy/Rakefile
147
+ - test/dummy/app/controllers/application_controller.rb
148
+ - test/dummy/app/models/fake_model.rb
149
+ - test/dummy/config.ru
150
+ - test/dummy/config/application.rb
151
+ - test/dummy/config/boot.rb
152
+ - test/dummy/config/database.yml
153
+ - test/dummy/config/environment.rb
154
+ - test/dummy/config/environments/development.rb
155
+ - test/dummy/config/environments/test.rb
156
+ - test/dummy/config/initializers/secret_token.rb
157
+ - test/dummy/config/initializers/session_store.rb
158
+ - test/dummy/config/initializers/wrap_parameters.rb
159
+ - test/dummy/config/locales/en.yml
160
+ - test/dummy/config/routes.rb
161
+ - test/dummy/db/seeds.rb
162
+ - test/dummy/db/seeds/circular1.seeds.rb
163
+ - test/dummy/db/seeds/circular2.seeds.rb
164
+ - test/dummy/db/seeds/dependency.seeds.rb
165
+ - test/dummy/db/seeds/dependency2.seeds.rb
166
+ - test/dummy/db/seeds/dependent.seeds.rb
167
+ - test/dummy/db/seeds/dependent_on_nested.seeds.rb
168
+ - test/dummy/db/seeds/dependent_on_several.seeds.rb
169
+ - test/dummy/db/seeds/no_block.seeds.rb
170
+ - test/dummy/script/rails
171
+ - test/seedbank/runner_test.rb
172
+ - test/test_helper.rb