mongration 0.0.1.pre.alpha → 0.0.2.1.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 449e5a096f4e6f6a0e0dba9e03a6a5377f614ec3
4
- data.tar.gz: d425dd02caf53a9e61afec6dbb3384d7629758f8
3
+ metadata.gz: 1603bd8159c8dd3d0a091bf46b4dd8f05523d8d1
4
+ data.tar.gz: 95f9681b466c422ff29cfafcc1352598b7f0222f
5
5
  SHA512:
6
- metadata.gz: 8ba1932bd58d46878d8c82ffc12fa72fb35149329721cd9729481275b0c95e46698977f4bd7b843f312cb1228d51ec20200dbcc0196dd906198c8519e647d07c
7
- data.tar.gz: b1ba75f054ab12cfcf498ea544b25bb02ad2948bc0d0c17e63ddbf7ae1a70ede0d72e48f5d27d73b2a1f36ab9012330141235c89df6795e3bc7a96936765915d
6
+ metadata.gz: 7e419610f423dfb1d32baccd5f6df998d5737a75bb257df83f40506a52d344f39beff5198738946ca27c0f0cf19c3360bf4334d87f49be2baaf2d79a91de78e5
7
+ data.tar.gz: cb9806f0a5be02366ff97731bbb45890c6d843b43efb1377c273f8718fce7c166f59e39faa9bce0b5f1961ea279715ef86628dfb2921638f6775385726d3d28f
data/.gitignore CHANGED
@@ -20,3 +20,4 @@ tmp
20
20
  *.o
21
21
  *.a
22
22
  mkmf.log
23
+ spec/db/migrate
data/Gemfile CHANGED
@@ -1,14 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'byebug'
4
- require 'byebug'
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
@@ -27,7 +27,7 @@ And then execute:
27
27
 
28
28
  Or install it yourself as:
29
29
 
30
- $ gem install mongration
30
+ $ gem install mongration --pre
31
31
 
32
32
  ## Usage
33
33
 
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
 
@@ -2,7 +2,6 @@ module Mongration
2
2
  module DataStore
3
3
  module InMemory
4
4
  class Store
5
- include BaseStore
6
5
 
7
6
  class Migration < Struct.new(:version, :file_names)
8
7
  attr_reader :destroyed
@@ -6,7 +6,6 @@ module Mongration
6
6
  module DataStore
7
7
  module Mongoid
8
8
  class Store
9
- include BaseStore
10
9
 
11
10
  class Mongration::DataStore::Mongoid::ConfigNotFound < ::Mongration::Errors
12
11
  def initialize(path)
@@ -1,3 +1,3 @@
1
1
  module Mongration
2
- VERSION = '0.0.1-alpha'
2
+ VERSION = '0.0.2.1-alpha'
3
3
  end
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 a SQL database.}
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 'rantly/rspec_extensions'
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
- config.before(:each) do
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-26 00:00:00.000000000 Z
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 a SQL
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