slim_migrations 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +1 -1
- data/README.rdoc +18 -13
- data/lib/slim_migrations/version.rb +1 -1
- data/lib/slim_migrations.rb +3 -1
- metadata +30 -38
data/MIT-LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -12,7 +12,7 @@ Turns
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
into
|
15
|
+
into
|
16
16
|
|
17
17
|
migration do
|
18
18
|
def up
|
@@ -31,31 +31,36 @@ into:
|
|
31
31
|
|
32
32
|
=== Install
|
33
33
|
|
34
|
+
==== Rails 3.2
|
35
|
+
|
36
|
+
# in your Gemfile
|
37
|
+
gem 'slim_migrations', '~> 3.2.1'
|
38
|
+
|
34
39
|
==== Rails 3.1
|
35
40
|
|
36
41
|
# as plugin:
|
37
|
-
rails plugin install
|
38
|
-
# or in Gemfile:
|
39
|
-
gem 'slim_migrations', '~> 3.1.
|
42
|
+
rails plugin install git://github.com/janlelis/slim_migrations.git -r 3.1
|
43
|
+
# or in your Gemfile:
|
44
|
+
gem 'slim_migrations', '~> 3.1.1'
|
40
45
|
|
41
46
|
==== Rails 3.0
|
42
47
|
|
43
48
|
# as plugin:
|
44
|
-
rails plugin install
|
45
|
-
# or in Gemfile:
|
46
|
-
gem 'slim_migrations', '~> 3.0.
|
49
|
+
rails plugin install git://github.com/janlelis/slim_migrations.git -r 3.0
|
50
|
+
# or in your Gemfile:
|
51
|
+
gem 'slim_migrations', '~> 3.0.1'
|
47
52
|
|
48
53
|
==== Rails 2.3
|
49
54
|
|
50
55
|
# as plugin:
|
51
|
-
|
52
|
-
# or in
|
53
|
-
gem 'slim_migrations', '~> 2.3.
|
56
|
+
script/plugin install git://github.com/janlelis/slim_migrations.git -r 2.3
|
57
|
+
# or in your config/environment.rb
|
58
|
+
config.gem 'slim_migrations', :version => '~> 2.3.1'
|
54
59
|
|
55
60
|
=== Credits
|
56
61
|
|
57
|
-
|
62
|
+
Blog post: http://rbjl.net/53-three-little-tips-for-slimmer-rails-migrations
|
58
63
|
|
59
|
-
|
64
|
+
Thanks to contributions from: Manuel Meurer
|
60
65
|
|
61
|
-
J-_-L
|
66
|
+
MIT-LICENSE, J-_-L
|
data/lib/slim_migrations.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'slim_migrations/version'
|
2
|
+
|
1
3
|
module SlimMigrations
|
2
4
|
class Railtie < Rails::Railtie
|
3
5
|
rake_tasks do
|
@@ -11,7 +13,7 @@ module Kernel
|
|
11
13
|
|
12
14
|
# initialize migrations with <tt>migration do</tt> instead of <tt>class SomeMigration < ActiveRecord::Migration</tt>
|
13
15
|
def migration(&block)
|
14
|
-
if caller[0].rindex(
|
16
|
+
if caller[0].rindex(/\/(?:[0-9]+)_([_a-z0-9]*).rb:\d+(?::in `.*')?$/)
|
15
17
|
m = Object.const_set $1.camelize, Class.new(ActiveRecord::Migration)
|
16
18
|
m.instance_eval(&block) # 3.0
|
17
19
|
else
|
metadata
CHANGED
@@ -1,77 +1,69 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: slim_migrations
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.0.1
|
4
5
|
prerelease:
|
5
|
-
version: 3.0.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Jan Lelis
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-01-29 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: rails
|
17
|
-
requirement: &
|
16
|
+
requirement: &21449980 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
|
-
requirements:
|
18
|
+
requirements:
|
20
19
|
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
20
|
+
- !ruby/object:Gem::Version
|
22
21
|
version: 3.0.0
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
24
|
+
version_requirements: *21449980
|
26
25
|
description: Let's you write even slimmer migrations.
|
27
26
|
email: mail@janlelis.de
|
28
27
|
executables: []
|
29
|
-
|
30
28
|
extensions: []
|
31
|
-
|
32
29
|
extra_rdoc_files: []
|
33
|
-
|
34
|
-
files:
|
30
|
+
files:
|
35
31
|
- lib/slim_migrations.rb
|
36
32
|
- lib/slim_migrations/version.rb
|
37
|
-
- lib/rails/generators/active_record/migration/migration_generator.rb
|
38
|
-
- lib/rails/generators/active_record/migration/templates/migration.rb
|
39
33
|
- lib/tasks/slim_migrations_tasks.rake
|
34
|
+
- lib/rails/generators/active_record/migration/templates/migration.rb
|
35
|
+
- lib/rails/generators/active_record/migration/migration_generator.rb
|
40
36
|
- MIT-LICENSE
|
41
37
|
- Rakefile
|
42
38
|
- README.rdoc
|
43
39
|
homepage: https://github.com/janlelis/slim_migrations
|
44
40
|
licenses: []
|
45
|
-
|
46
41
|
post_install_message:
|
47
42
|
rdoc_options: []
|
48
|
-
|
49
|
-
require_paths:
|
43
|
+
require_paths:
|
50
44
|
- lib
|
51
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
46
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
segments:
|
47
|
+
requirements:
|
48
|
+
- - ! '>='
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
51
|
+
segments:
|
58
52
|
- 0
|
59
|
-
|
60
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
hash: 115165297047775359
|
54
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
55
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
66
|
-
segments:
|
56
|
+
requirements:
|
57
|
+
- - ! '>='
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
segments:
|
67
61
|
- 0
|
68
|
-
|
62
|
+
hash: 115165297047775359
|
69
63
|
requirements: []
|
70
|
-
|
71
64
|
rubyforge_project:
|
72
|
-
rubygems_version: 1.8.
|
65
|
+
rubygems_version: 1.8.11
|
73
66
|
signing_key:
|
74
67
|
specification_version: 3
|
75
68
|
summary: Let's you write even slimmer migrations.
|
76
69
|
test_files: []
|
77
|
-
|