mongoid_rails_migrations 0.0.8 → 0.0.9
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/Gemfile +9 -4
- data/Gemfile.lock +55 -51
- data/README.rdoc +7 -2
- data/Rakefile +4 -3
- data/lib/mongoid_rails_migrations.rb +2 -7
- data/lib/mongoid_rails_migrations/mongoid_ext/mongoid.rb +18 -8
- data/mongoid_rails_migrations.gemspec +1 -2
- metadata +7 -52
data/Gemfile
CHANGED
@@ -2,7 +2,12 @@
|
|
2
2
|
# Use `bundle exec rake` in order to run the specs using the bundle
|
3
3
|
source :rubygems
|
4
4
|
|
5
|
-
|
6
|
-
gem "
|
7
|
-
gem "
|
8
|
-
gem "
|
5
|
+
group :default do
|
6
|
+
gem "rails", "~> 3.0.0"
|
7
|
+
gem "railties", "~> 3.0.0"
|
8
|
+
gem "activesupport", "~> 3.0.0"
|
9
|
+
end
|
10
|
+
|
11
|
+
group :test do
|
12
|
+
gem "mongoid", "~> 2.0.0.rc", :git => "http://github.com/mongoid/mongoid.git"
|
13
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,77 +1,81 @@
|
|
1
|
+
GIT
|
2
|
+
remote: http://github.com/mongoid/mongoid.git
|
3
|
+
revision: 26be62e1ad35eb28abd7919b504c5f9e2ea11ce7
|
4
|
+
specs:
|
5
|
+
mongoid (2.0.0.rc.7)
|
6
|
+
activemodel (~> 3.0)
|
7
|
+
mongo (~> 1.2)
|
8
|
+
tzinfo (~> 0.3.22)
|
9
|
+
will_paginate (~> 3.0.pre)
|
10
|
+
|
1
11
|
GEM
|
2
12
|
remote: http://rubygems.org/
|
3
13
|
specs:
|
4
14
|
abstract (1.0.0)
|
5
|
-
actionmailer (3.0.
|
6
|
-
actionpack (= 3.0.
|
7
|
-
mail (~> 2.2.
|
8
|
-
actionpack (3.0.
|
9
|
-
activemodel (= 3.0.
|
10
|
-
activesupport (= 3.0.
|
15
|
+
actionmailer (3.0.4)
|
16
|
+
actionpack (= 3.0.4)
|
17
|
+
mail (~> 2.2.15)
|
18
|
+
actionpack (3.0.4)
|
19
|
+
activemodel (= 3.0.4)
|
20
|
+
activesupport (= 3.0.4)
|
11
21
|
builder (~> 2.1.2)
|
12
22
|
erubis (~> 2.6.6)
|
13
|
-
i18n (~> 0.4
|
23
|
+
i18n (~> 0.4)
|
14
24
|
rack (~> 1.2.1)
|
15
|
-
rack-mount (~> 0.6.
|
16
|
-
rack-test (~> 0.5.
|
25
|
+
rack-mount (~> 0.6.13)
|
26
|
+
rack-test (~> 0.5.7)
|
17
27
|
tzinfo (~> 0.3.23)
|
18
|
-
activemodel (3.0.
|
19
|
-
activesupport (= 3.0.
|
28
|
+
activemodel (3.0.4)
|
29
|
+
activesupport (= 3.0.4)
|
20
30
|
builder (~> 2.1.2)
|
21
|
-
i18n (~> 0.4
|
22
|
-
activerecord (3.0.
|
23
|
-
activemodel (= 3.0.
|
24
|
-
activesupport (= 3.0.
|
25
|
-
arel (~>
|
31
|
+
i18n (~> 0.4)
|
32
|
+
activerecord (3.0.4)
|
33
|
+
activemodel (= 3.0.4)
|
34
|
+
activesupport (= 3.0.4)
|
35
|
+
arel (~> 2.0.2)
|
26
36
|
tzinfo (~> 0.3.23)
|
27
|
-
activeresource (3.0.
|
28
|
-
activemodel (= 3.0.
|
29
|
-
activesupport (= 3.0.
|
30
|
-
activesupport (3.0.
|
31
|
-
arel (
|
32
|
-
|
33
|
-
bson (1.1.1)
|
37
|
+
activeresource (3.0.4)
|
38
|
+
activemodel (= 3.0.4)
|
39
|
+
activesupport (= 3.0.4)
|
40
|
+
activesupport (3.0.4)
|
41
|
+
arel (2.0.8)
|
42
|
+
bson (1.2.1)
|
34
43
|
builder (2.1.2)
|
35
44
|
erubis (2.6.6)
|
36
45
|
abstract (>= 1.0.0)
|
37
|
-
i18n (0.
|
38
|
-
mail (2.2.
|
46
|
+
i18n (0.5.0)
|
47
|
+
mail (2.2.15)
|
39
48
|
activesupport (>= 2.3.6)
|
40
|
-
i18n (
|
49
|
+
i18n (>= 0.4.0)
|
41
50
|
mime-types (~> 1.16)
|
42
51
|
treetop (~> 1.4.8)
|
43
52
|
mime-types (1.16)
|
44
|
-
mongo (1.
|
45
|
-
bson (>= 1.
|
46
|
-
mongoid (2.0.0.beta.19)
|
47
|
-
activemodel (~> 3.0)
|
48
|
-
mongo (= 1.0.9)
|
49
|
-
tzinfo (~> 0.3.22)
|
50
|
-
will_paginate (~> 3.0.pre)
|
53
|
+
mongo (1.2.1)
|
54
|
+
bson (>= 1.2.1)
|
51
55
|
polyglot (0.3.1)
|
52
56
|
rack (1.2.1)
|
53
57
|
rack-mount (0.6.13)
|
54
58
|
rack (>= 1.0.0)
|
55
|
-
rack-test (0.5.
|
59
|
+
rack-test (0.5.7)
|
56
60
|
rack (>= 1.0)
|
57
|
-
rails (3.0.
|
58
|
-
actionmailer (= 3.0.
|
59
|
-
actionpack (= 3.0.
|
60
|
-
activerecord (= 3.0.
|
61
|
-
activeresource (= 3.0.
|
62
|
-
activesupport (= 3.0.
|
63
|
-
bundler (~> 1.0
|
64
|
-
railties (= 3.0.
|
65
|
-
railties (3.0.
|
66
|
-
actionpack (= 3.0.
|
67
|
-
activesupport (= 3.0.
|
68
|
-
rake (>= 0.8.
|
69
|
-
thor (~> 0.14.
|
61
|
+
rails (3.0.4)
|
62
|
+
actionmailer (= 3.0.4)
|
63
|
+
actionpack (= 3.0.4)
|
64
|
+
activerecord (= 3.0.4)
|
65
|
+
activeresource (= 3.0.4)
|
66
|
+
activesupport (= 3.0.4)
|
67
|
+
bundler (~> 1.0)
|
68
|
+
railties (= 3.0.4)
|
69
|
+
railties (3.0.4)
|
70
|
+
actionpack (= 3.0.4)
|
71
|
+
activesupport (= 3.0.4)
|
72
|
+
rake (>= 0.8.7)
|
73
|
+
thor (~> 0.14.4)
|
70
74
|
rake (0.8.7)
|
71
|
-
thor (0.14.
|
72
|
-
treetop (1.4.
|
75
|
+
thor (0.14.6)
|
76
|
+
treetop (1.4.9)
|
73
77
|
polyglot (>= 0.3.1)
|
74
|
-
tzinfo (0.3.
|
78
|
+
tzinfo (0.3.24)
|
75
79
|
will_paginate (3.0.pre2)
|
76
80
|
|
77
81
|
PLATFORMS
|
@@ -79,6 +83,6 @@ PLATFORMS
|
|
79
83
|
|
80
84
|
DEPENDENCIES
|
81
85
|
activesupport (~> 3.0.0)
|
82
|
-
mongoid (~> 2.0.0.
|
86
|
+
mongoid (~> 2.0.0.rc)!
|
83
87
|
rails (~> 3.0.0)
|
84
88
|
railties (~> 3.0.0)
|
data/README.rdoc
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== RELEASE NOTES
|
2
|
+
* This version is designed to support all current development versions of Mongoid 2.0. The inclusion of the mongoid dependency has been removed.
|
3
|
+
* In 2.0.0.rc.1, Mongoid::Config changed from a Class to a Module.
|
4
|
+
* In your application, please be sure to require mongoid before mongoid_rails_migrations. Again, this is necessary to support both pre/post 2.0.0.rc.1. I plan on fixing the ugly once mongoid goes 2.0 final.
|
5
|
+
|
1
6
|
== SYNOPSIS
|
2
7
|
* Data migrations for Mongoid.
|
3
8
|
|
@@ -7,11 +12,11 @@
|
|
7
12
|
|
8
13
|
== REQUIREMENTS
|
9
14
|
* rails ~> 3.0.0
|
10
|
-
* mongoid ~> 2.0.0
|
15
|
+
* mongoid ~> 2.0.0 (this isn't currently enforced)
|
11
16
|
|
12
17
|
== INSTALL
|
13
18
|
* gem install mongoid_rails_migrations
|
14
|
-
* In your Gemfile, include:
|
19
|
+
* In your Gemfile, include (after including mongoid):
|
15
20
|
gem "mongoid_rails_migrations", ">=0.0.2" # or whatever the current version happens to be
|
16
21
|
|
17
22
|
== FEATURES AND HOW TO USE
|
data/Rakefile
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__))
|
2
|
-
|
3
|
-
require File.dirname(__FILE__) + "/test/config"
|
4
|
-
|
5
2
|
namespace :test do
|
3
|
+
require 'bundler/setup'
|
4
|
+
Bundler.require(:test)
|
5
|
+
|
6
6
|
namespace :mongoid do
|
7
7
|
desc "Test mongoid rails migrations"
|
8
8
|
task :migrations do
|
9
|
+
require File.dirname(__FILE__) + "/test/config"
|
9
10
|
require 'test/migration_test'
|
10
11
|
end
|
11
12
|
end
|
@@ -1,13 +1,8 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
require 'rubygems'
|
4
|
-
|
5
|
-
|
6
|
-
require 'bundler'
|
7
|
-
Bundler.setup
|
8
|
-
end
|
9
|
-
|
10
|
-
Bundler.require(:default) if defined?(Bundler)
|
4
|
+
require 'bundler/setup'
|
5
|
+
Bundler.require(:default)
|
11
6
|
|
12
7
|
# Add base to path incase not included as a gem
|
13
8
|
$:.unshift(File.dirname(__FILE__)) unless
|
@@ -1,13 +1,23 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
+
module Mongoid
|
3
|
+
# Specify whether or not to use timestamps for migration versions
|
4
|
+
# NOTE: newer style is a module
|
5
|
+
# Config.module_eval would work for both but still need to determine the type
|
6
|
+
# that's why we do it the ug way.
|
7
|
+
if Config.is_a? Class
|
8
|
+
# older mongoid style; pre 2.0.0.rc.1
|
9
|
+
Config.module_eval do
|
10
|
+
cattr_accessor :timestamped_migrations
|
11
|
+
@@timestamped_migrations ||= true # default true
|
2
12
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
13
|
+
def self.reset
|
14
|
+
@@timestamped_migrations = true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
else # module
|
18
|
+
Config.module_eval do
|
19
|
+
# newer mongoid style; >= 2.0.0.rc.1
|
20
|
+
option :timestamped_migrations, :default => true
|
11
21
|
end
|
12
22
|
end
|
13
23
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.platform = Gem::Platform::RUBY
|
3
3
|
s.name = 'mongoid_rails_migrations'
|
4
|
-
s.version = '0.0.
|
4
|
+
s.version = '0.0.9'
|
5
5
|
s.summary = 'Data migrations for Mongoid in Active Record style, minus column input.'
|
6
6
|
s.description = 'Migrations for the migrator.'
|
7
7
|
|
@@ -22,7 +22,6 @@ Gem::Specification.new do |s|
|
|
22
22
|
rails_version = '~> 3.0.0'
|
23
23
|
|
24
24
|
s.add_dependency('bundler', '>= 0.9.19')
|
25
|
-
s.add_dependency('mongoid', '~> 2.0.0.beta.17')
|
26
25
|
s.add_dependency('rails', rails_version)
|
27
26
|
s.add_dependency('railties', rails_version)
|
28
27
|
s.add_dependency('activesupport', rails_version)
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_rails_migrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 8
|
9
|
-
version: 0.0.8
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.9
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Alan Da Costa
|
@@ -25,75 +21,42 @@ dependencies:
|
|
25
21
|
requirements:
|
26
22
|
- - ">="
|
27
23
|
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 0
|
30
|
-
- 9
|
31
|
-
- 19
|
32
24
|
version: 0.9.19
|
33
25
|
type: :runtime
|
34
26
|
version_requirements: *id001
|
35
27
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
28
|
+
name: rails
|
37
29
|
prerelease: false
|
38
30
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
31
|
none: false
|
40
32
|
requirements:
|
41
33
|
- - ~>
|
42
34
|
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
- 2
|
45
|
-
- 0
|
46
|
-
- 0
|
47
|
-
- beta
|
48
|
-
- 17
|
49
|
-
version: 2.0.0.beta.17
|
35
|
+
version: 3.0.0
|
50
36
|
type: :runtime
|
51
37
|
version_requirements: *id002
|
52
38
|
- !ruby/object:Gem::Dependency
|
53
|
-
name:
|
39
|
+
name: railties
|
54
40
|
prerelease: false
|
55
41
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
42
|
none: false
|
57
43
|
requirements:
|
58
44
|
- - ~>
|
59
45
|
- !ruby/object:Gem::Version
|
60
|
-
segments:
|
61
|
-
- 3
|
62
|
-
- 0
|
63
|
-
- 0
|
64
46
|
version: 3.0.0
|
65
47
|
type: :runtime
|
66
48
|
version_requirements: *id003
|
67
49
|
- !ruby/object:Gem::Dependency
|
68
|
-
name:
|
50
|
+
name: activesupport
|
69
51
|
prerelease: false
|
70
52
|
requirement: &id004 !ruby/object:Gem::Requirement
|
71
53
|
none: false
|
72
54
|
requirements:
|
73
55
|
- - ~>
|
74
56
|
- !ruby/object:Gem::Version
|
75
|
-
segments:
|
76
|
-
- 3
|
77
|
-
- 0
|
78
|
-
- 0
|
79
57
|
version: 3.0.0
|
80
58
|
type: :runtime
|
81
59
|
version_requirements: *id004
|
82
|
-
- !ruby/object:Gem::Dependency
|
83
|
-
name: activesupport
|
84
|
-
prerelease: false
|
85
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
86
|
-
none: false
|
87
|
-
requirements:
|
88
|
-
- - ~>
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
segments:
|
91
|
-
- 3
|
92
|
-
- 0
|
93
|
-
- 0
|
94
|
-
version: 3.0.0
|
95
|
-
type: :runtime
|
96
|
-
version_requirements: *id005
|
97
60
|
description: Migrations for the migrator.
|
98
61
|
email: alandacosta@gmail.com.com
|
99
62
|
executables: []
|
@@ -142,25 +105,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
105
|
requirements:
|
143
106
|
- - ">="
|
144
107
|
- !ruby/object:Gem::Version
|
145
|
-
segments:
|
146
|
-
- 1
|
147
|
-
- 8
|
148
|
-
- 6
|
149
108
|
version: 1.8.6
|
150
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
110
|
none: false
|
152
111
|
requirements:
|
153
112
|
- - ">="
|
154
113
|
- !ruby/object:Gem::Version
|
155
|
-
segments:
|
156
|
-
- 1
|
157
|
-
- 3
|
158
|
-
- 6
|
159
114
|
version: 1.3.6
|
160
115
|
requirements: []
|
161
116
|
|
162
117
|
rubyforge_project:
|
163
|
-
rubygems_version: 1.
|
118
|
+
rubygems_version: 1.5.0
|
164
119
|
signing_key:
|
165
120
|
specification_version: 3
|
166
121
|
summary: Data migrations for Mongoid in Active Record style, minus column input.
|