mongration 0.0.1.pre.alpha → 0.0.2.1.pre.alpha
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +3 -9
- data/Guardfile +7 -0
- data/README.md +1 -1
- data/lib/mongration.rb +0 -1
- data/lib/mongration/data_store/in_memory/store.rb +0 -1
- data/lib/mongration/data_store/mongoid/store.rb +0 -1
- data/lib/mongration/version.rb +1 -1
- data/mongration.gemspec +2 -2
- data/spec/spec_helper.rb +10 -5
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1603bd8159c8dd3d0a091bf46b4dd8f05523d8d1
|
4
|
+
data.tar.gz: 95f9681b466c422ff29cfafcc1352598b7f0222f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e419610f423dfb1d32baccd5f6df998d5737a75bb257df83f40506a52d344f39beff5198738946ca27c0f0cf19c3360bf4334d87f49be2baaf2d79a91de78e5
|
7
|
+
data.tar.gz: cb9806f0a5be02366ff97731bbb45890c6d843b43efb1377c273f8718fce7c166f59e39faa9bce0b5f1961ea279715ef86628dfb2921638f6775385726d3d28f
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,14 +1,8 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
gem 'rspec-legacy_formatters'
|
7
|
-
gem 'rspec-nc'
|
8
|
-
|
9
|
-
gem 'guard-rspec', '4.3.1', require: false
|
10
|
-
|
11
|
-
gem 'rantly', github: 'hayeah/rantly'
|
3
|
+
group :test do
|
4
|
+
gem 'guard-rspec', '4.3.1', require: false
|
5
|
+
end
|
12
6
|
|
13
7
|
# Specify your gem's dependencies in mongration.gemspec
|
14
8
|
gemspec
|
data/Guardfile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
2
|
+
watch(%r{^spec/.+_spec\.rb$})
|
3
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
|
4
|
+
watch('spec/spec_helper.rb') { "spec" }
|
5
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
6
|
+
watch(%r{^spec/fixtures/(.+)\.rb$}) { "spec" }
|
7
|
+
end
|
data/README.md
CHANGED
data/lib/mongration.rb
CHANGED
@@ -9,7 +9,6 @@ require 'mongration/migration_file_writer'
|
|
9
9
|
require 'mongration/null_migration'
|
10
10
|
require 'mongration/rake_task'
|
11
11
|
|
12
|
-
require 'mongration/data_store/base_store'
|
13
12
|
require 'mongration/data_store/mongoid/store'
|
14
13
|
require 'mongration/data_store/in_memory/store'
|
15
14
|
|
data/lib/mongration/version.rb
CHANGED
data/mongration.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Mongration::VERSION
|
9
9
|
spec.authors = ["Mike Dalton"]
|
10
10
|
spec.email = ["michaelcdalton@gmail.com"]
|
11
|
-
spec.summary = %q{Migrations for Mongoid}
|
12
|
-
spec.description = %q{Mongration is a tool for migrating data. It is designed to have the same interface as ActiveRecord's migrations but be used with Mongoid instead of
|
11
|
+
spec.summary = %q{ActiveRecord-like Migrations for Mongoid}
|
12
|
+
spec.description = %q{Mongration is a tool for migrating data. It is designed to have the same interface as ActiveRecord's migrations but be used with Mongoid instead of an SQL database.}
|
13
13
|
spec.homepage = "https://github.com/kcdragon/mongration"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
2
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
3
|
|
4
|
-
require '
|
4
|
+
require 'timecop'
|
5
5
|
|
6
6
|
require 'mongration'
|
7
7
|
Mongration.configure do |config|
|
@@ -11,7 +11,6 @@ end
|
|
11
11
|
Dir[File.join(Dir.pwd, 'spec', 'support', '*.rb')].each { |f| require f }
|
12
12
|
Dir[File.join(Dir.pwd, 'spec', 'fixtures', '*.rb')].each { |f| require f }
|
13
13
|
|
14
|
-
require 'timecop'
|
15
14
|
Timecop.safe_mode = true
|
16
15
|
|
17
16
|
RSpec.configure do |config|
|
@@ -68,15 +67,17 @@ RSpec.configure do |config|
|
|
68
67
|
mocks.verify_partial_doubles = true
|
69
68
|
end
|
70
69
|
|
71
|
-
|
72
|
-
|
73
|
-
# clear out migration files created
|
70
|
+
def clean_migration_files
|
74
71
|
dir = File.join('spec', 'db', 'migrate')
|
75
72
|
Mongration.configure do |config|
|
76
73
|
config.dir = dir
|
77
74
|
config.timestamps = false
|
78
75
|
end
|
79
76
|
Dir.glob(File.join(dir, '*')).each { |f| File.delete(f) }
|
77
|
+
end
|
78
|
+
|
79
|
+
config.before(:each) do
|
80
|
+
clean_migration_files
|
80
81
|
|
81
82
|
# clear out database
|
82
83
|
Mongoid.purge!
|
@@ -85,4 +86,8 @@ RSpec.configure do |config|
|
|
85
86
|
Foo.instances = []
|
86
87
|
Bar.instances = []
|
87
88
|
end
|
89
|
+
|
90
|
+
config.after(:all) do
|
91
|
+
clean_migration_files # prevents tailor from looking in this directory
|
92
|
+
end
|
88
93
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.pre.alpha
|
4
|
+
version: 0.0.2.1.pre.alpha
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Dalton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.7.1
|
97
97
|
description: Mongration is a tool for migrating data. It is designed to have the same
|
98
|
-
interface as ActiveRecord's migrations but be used with Mongoid instead of
|
98
|
+
interface as ActiveRecord's migrations but be used with Mongoid instead of an SQL
|
99
99
|
database.
|
100
100
|
email:
|
101
101
|
- michaelcdalton@gmail.com
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- .tailor
|
110
110
|
- .travis.yml
|
111
111
|
- Gemfile
|
112
|
+
- Guardfile
|
112
113
|
- LICENSE.txt
|
113
114
|
- README.md
|
114
115
|
- Rakefile
|
@@ -158,7 +159,7 @@ rubyforge_project:
|
|
158
159
|
rubygems_version: 2.2.2
|
159
160
|
signing_key:
|
160
161
|
specification_version: 4
|
161
|
-
summary: Migrations for Mongoid
|
162
|
+
summary: ActiveRecord-like Migrations for Mongoid
|
162
163
|
test_files:
|
163
164
|
- spec/config/mongoid.yml
|
164
165
|
- spec/db/migrate/.gitkeep
|