migrate-well 0.1.1 → 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.
- data/CHANGELOG.md +11 -0
- data/README.md +6 -6
- data/lib/migrate-well/version.rb +1 -1
- data/lib/tasks/migrate-well.rake +7 -9
- data/migrate-well.gemspec +1 -1
- metadata +4 -3
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
migrate-well
|
2
2
|
============
|
3
3
|
|
4
|
-
migrate-well is a very simple gem for Rails 3. It adds a rake task `db:migrate:well` that runs `rake db:migrate`, `rake db:migrate:redo`, `rake db:test:prepare` and `annotate
|
4
|
+
migrate-well is a very simple gem for Rails 3. It adds a rake task `db:migrate:well` that runs `rake db:migrate`, `rake db:migrate:redo`, `rake db:test:prepare` and `annotate` (only if the annotate gem is installed).
|
5
5
|
|
6
6
|
It has been tested with Rails 3.0.3.
|
7
7
|
|
@@ -11,14 +11,14 @@ To run: `rake db:migrate:well`
|
|
11
11
|
|
12
12
|
Options:
|
13
13
|
|
14
|
-
* `
|
15
|
-
* `
|
16
|
-
* `
|
14
|
+
* `redo=false`: don't run the `db:migrate:redo` task
|
15
|
+
* `test=false`: don't run the `db:test:prepare` task
|
16
|
+
* `anno=false`: don't run the `annotate` command
|
17
17
|
|
18
18
|
Examples:
|
19
19
|
|
20
|
-
* run without annotating: `rake db:migrate:well
|
21
|
-
* run without annotating and without redoing the migration: `rake db:migrate:well
|
20
|
+
* run without annotating: `rake db:migrate:well anno=false`
|
21
|
+
* run without annotating and without redoing the migration: `rake db:migrate:well anno=false redo=false`
|
22
22
|
|
23
23
|
TODO
|
24
24
|
|
data/lib/migrate-well/version.rb
CHANGED
data/lib/tasks/migrate-well.rake
CHANGED
@@ -1,18 +1,16 @@
|
|
1
1
|
namespace :db do
|
2
2
|
namespace :migrate do
|
3
|
-
desc 'Run migration (db:migrate), redo it (db:redo), prepare test db (db:test:prepare) and annotate models (annotate). Options: "
|
3
|
+
desc 'Run migration (db:migrate), redo it (db:redo), prepare test db (db:test:prepare) and annotate models (annotate). Options: "redo=false": without db:redo; "test=false": without db:test:prepare; "anno=false": without annotate.'
|
4
4
|
task :well do
|
5
|
+
abort "Aborted because you use removed options. Please use the new options, to see them run rake -D well" if ENV["without_redo"] || ENV["wr"] || ENV["without_test_prepare"] || ENV["wt"] || ENV["without_annotate"] || ENV["wa"]
|
6
|
+
|
5
7
|
system_with_echo "rake db:migrate"
|
8
|
+
|
9
|
+
system_with_echo "rake db:migrate:redo" unless ENV["redo"] == "false"
|
6
10
|
|
7
|
-
|
8
|
-
system_with_echo "rake db:migrate:redo"
|
9
|
-
end
|
11
|
+
system_with_echo "rake db:test:prepare" unless ENV["test"] == "false"
|
10
12
|
|
11
|
-
unless ENV["
|
12
|
-
system_with_echo "rake db:test:prepare"
|
13
|
-
end
|
14
|
-
|
15
|
-
unless ENV["without_annotate"] == "true" || ENV["wa"] == "true"
|
13
|
+
unless ENV["anno"] == "false"
|
16
14
|
begin
|
17
15
|
require "annotate"
|
18
16
|
system_with_echo "bundle exec annotate"
|
data/migrate-well.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.email = ["florent2@gmail.com"]
|
11
11
|
s.homepage = %q{http://github.com/Florent2/migrate-well}
|
12
12
|
s.summary = %q{Adds a rake task that runs "rake db:migrate", "rake db:migrate:redo", "rake db:test:prepare" and "annotate".}
|
13
|
-
s.description = %q{Adds a rake task "db:migrate:well" that runs "rake db:migrate", "rake db:migrate:redo", "rake db:test:prepare" and "annotate". Options: "
|
13
|
+
s.description = %q{Adds a rake task "db:migrate:well" that runs "rake db:migrate", "rake db:migrate:redo", "rake db:test:prepare" and "annotate". Options: "redo:false": without db:redo; "test:false": without db:test:prepare; "anno:false": without annotate.}
|
14
14
|
s.licenses = ["MIT"]
|
15
15
|
|
16
16
|
s.files = `git ls-files`.split("\n")
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: migrate-well
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: "0.2"
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Florent Guilleux
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-02-
|
13
|
+
date: 2011-02-15 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
version: "0"
|
25
25
|
type: :runtime
|
26
26
|
version_requirements: *id001
|
27
|
-
description: "Adds a rake task \"db:migrate:well\" that runs \"rake db:migrate\", \"rake db:migrate:redo\", \"rake db:test:prepare\" and \"annotate\". Options: \"
|
27
|
+
description: "Adds a rake task \"db:migrate:well\" that runs \"rake db:migrate\", \"rake db:migrate:redo\", \"rake db:test:prepare\" and \"annotate\". Options: \"redo:false\": without db:redo; \"test:false\": without db:test:prepare; \"anno:false\": without annotate."
|
28
28
|
email:
|
29
29
|
- florent2@gmail.com
|
30
30
|
executables: []
|
@@ -35,6 +35,7 @@ extra_rdoc_files: []
|
|
35
35
|
|
36
36
|
files:
|
37
37
|
- .gitignore
|
38
|
+
- CHANGELOG.md
|
38
39
|
- Gemfile
|
39
40
|
- LICENSE
|
40
41
|
- README.md
|