mince_migrator 1.0.1 → 1.0.2

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: 2645b8a38ac118c432757c8a5efccb6b691bb16d
4
- data.tar.gz: 5ee1e303a5cf09400e183957babea7c507752b70
3
+ metadata.gz: 4970ab56e20586bbb6fbed75b96da905fe44cfaf
4
+ data.tar.gz: 4db88ed335467034f71816032f5f827aa4fda33a
5
5
  SHA512:
6
- metadata.gz: 7b26ef928f0c524bb485ee7dc05d46261d5431cdfd81109004bc4f7a72a924bffeb5ada874e528663f032ae0f4eefef84e136d3493a5cae1927920ea36d97067
7
- data.tar.gz: 3d76da888ba05bf3a03ed2c92b78b77369271d2a5ca0933e6ef9a92d46c4b323863c3bf772623ce76a63709748638acadb017d8de7c43391b9e22a2acfc478ea
6
+ metadata.gz: 69a6683c1d5256fccb9c2e2a185a872654c264d1691b0f1436c318cb76b45cd2ba466b49026d2e0bf3fa22d9ac89fa9116d0b0a6bb01a0a3b84dbbc3c19bd74f
7
+ data.tar.gz: 628239e0af4352fc1e3f57eff9aa03be78d5b5870f4754e14b68193919cee429af475fac2e586ed3e84090ee88bcedd77ce7de7686fb454b26b29aa736fe1672
data/README.md CHANGED
@@ -5,62 +5,34 @@
5
5
  Mince Migrator is a library that provides a way to run database
6
6
  migrations for your ruby applications.
7
7
 
8
- ## Installation
8
+ ## 1. Install
9
9
 
10
10
  $ gem install mince_migrator
11
11
 
12
- ## Usage
12
+ ## 2. Use
13
13
 
14
- ### Generate a migration
14
+ $ mince_migrator create Load admin users
15
+ # Implement your migration by opening db/migration/load_admin_users.rb
16
+ $ mince_migrator run Load admin users
15
17
 
16
- $ mince_migrator create "Load admin users"
18
+ ## 3. Learn more
17
19
 
18
- ### Implement your migration
19
-
20
- The output of creating the migration will tell you where the migration was created.
21
-
22
- Implement the `run` method with the behavior of your migration.
23
-
24
- ### Run your single migration
25
-
26
- $ mince_migrator run "Load admin users"
27
-
28
- ### Revert your single migration
29
-
30
- $ mince_migrator revert "Load admin users"
31
-
32
- ### Run all migrations that have not yet been ran
33
-
34
- $ mince_migrator run_all
35
-
36
- ### View all migrations
37
-
38
- *My favorite!*
39
-
40
- $ mince_migrator list
41
-
42
- ### Check the status of a migration
43
-
44
- $ mince_migrator show "Load admin users"
45
-
46
- ### View all available commands
47
-
48
- $ mince_migrator --help
20
+ For more info, view the [home page](http://coffeencoke.github.io/mince_migrator/).
49
21
 
50
22
  ## Contributing
51
23
 
52
24
  1. Fork it
53
- 2. Create your feature branch (`git checkout -b my-new-feature`)
54
- 3. Commit your changes (`git commit -am 'Add some feature'`)
55
- 4. Push to the branch (`git push origin my-new-feature`)
56
- 5. Create new Pull Request
25
+ 2. Create feature branch (`git checkout -b my-new-feature`)
26
+ 3. Commit changes (`git commit -am 'Add some feature'`)
27
+ 4. Push the branch (`git push origin my-new-feature`)
28
+ 5. Create Pull Request
57
29
 
58
30
  ## Bonus contributions!
59
31
 
60
- 1. Talk with me first
61
- 2. Make all commits stable
62
- 3. Include tests
63
- 4. Update documentation for your added feature
32
+ * Talk with me first
33
+ * Make all commits stable
34
+ * Include tests
35
+ * Update documentation for your added feature
64
36
 
65
37
  Special Thanks to [@davetron5000](https://github.com/davetron5000) for writing [gli](https://github.com/davetron5000/gli)
66
38
 
@@ -1,5 +1,3 @@
1
- require 'debugger'
2
-
3
1
  module MinceMigrator
4
2
  require_relative 'migrations/file'
5
3
  require_relative 'ran_migration'
@@ -56,9 +54,9 @@ module MinceMigrator
56
54
 
57
55
  def self.new_from_file(file)
58
56
  new(
59
- klass: file.klass,
60
- name: file.name,
61
- relative_path: file.full_relative_path,
57
+ klass: file.klass,
58
+ name: file.name,
59
+ relative_path: file.full_relative_path,
62
60
  path: file.full_path
63
61
  )
64
62
  end
@@ -9,7 +9,7 @@ module MinceMigrator
9
9
  end
10
10
 
11
11
  def self.patch
12
- 1
12
+ 2
13
13
  end
14
14
  end
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mince_migrator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Simpson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-25 00:00:00.000000000 Z
11
+ date: 2013-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mince
@@ -243,14 +243,6 @@ files:
243
243
  - spec/integration/reverting_a_migration_spec.rb
244
244
  - spec/integration/running_a_migration_spec.rb
245
245
  - spec/integration_helper.rb
246
- - spec/support/db/a_second_migration.rb
247
- - spec/support/db/a_second_migration_2.rb
248
- - spec/support/db/create_seeded_admin_users.rb
249
- - spec/support/db/first_migration.rb
250
- - spec/support/db/first_migration_2.rb
251
- - spec/support/db/first_migration_3.rb
252
- - spec/support/db/first_migration_4.rb
253
- - spec/support/db/name_of_migration.rb
254
246
  - spec/support/invalid_interface_migration.rb
255
247
  - spec/support/not_a_migration.rb
256
248
  - spec/support/test_migration.rb
@@ -299,14 +291,6 @@ test_files:
299
291
  - spec/integration/reverting_a_migration_spec.rb
300
292
  - spec/integration/running_a_migration_spec.rb
301
293
  - spec/integration_helper.rb
302
- - spec/support/db/a_second_migration.rb
303
- - spec/support/db/a_second_migration_2.rb
304
- - spec/support/db/create_seeded_admin_users.rb
305
- - spec/support/db/first_migration.rb
306
- - spec/support/db/first_migration_2.rb
307
- - spec/support/db/first_migration_3.rb
308
- - spec/support/db/first_migration_4.rb
309
- - spec/support/db/name_of_migration.rb
310
294
  - spec/support/invalid_interface_migration.rb
311
295
  - spec/support/not_a_migration.rb
312
296
  - spec/support/test_migration.rb
@@ -1,24 +0,0 @@
1
- module MinceMigrator
2
- module Migrations
3
- require 'time'
4
-
5
- module ASecondMigration
6
- def self.run
7
- # Actual migration goes here
8
- end
9
-
10
- def self.revert
11
- # In case you need to revert this one migration
12
- end
13
-
14
- # So you can change the order to run more easily
15
- def self.time_created
16
- Time.parse "2013-03-28 05:03:26 UTC"
17
- end
18
-
19
- module Temporary
20
- # Migration dependent classes go here
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module MinceMigrator
2
- module Migrations
3
- require 'time'
4
-
5
- module ASecondMigration2
6
- def self.run
7
- # Actual migration goes here
8
- end
9
-
10
- def self.revert
11
- # In case you need to revert this one migration
12
- end
13
-
14
- # So you can change the order to run more easily
15
- def self.time_created
16
- Time.parse "2013-03-28 05:03:26 UTC"
17
- end
18
-
19
- module Temporary
20
- # Migration dependent classes go here
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module MinceMigrator
2
- module Migrations
3
- require 'time'
4
-
5
- module CreateSeededAdminUsers
6
- def self.run
7
- # Actual migration goes here
8
- end
9
-
10
- def self.revert
11
- # In case you need to revert this one migration
12
- end
13
-
14
- # So you can change the order to run more easily
15
- def self.time_created
16
- Time.parse "2013-03-28 05:03:26 UTC"
17
- end
18
-
19
- module Temporary
20
- # Migration dependent classes go here
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module MinceMigrator
2
- module Migrations
3
- require 'time'
4
-
5
- module FirstMigration
6
- def self.run
7
- # Actual migration goes here
8
- end
9
-
10
- def self.revert
11
- # In case you need to revert this one migration
12
- end
13
-
14
- # So you can change the order to run more easily
15
- def self.time_created
16
- Time.parse "2013-03-28 05:03:26 UTC"
17
- end
18
-
19
- module Temporary
20
- # Migration dependent classes go here
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module MinceMigrator
2
- module Migrations
3
- require 'time'
4
-
5
- module FirstMigration2
6
- def self.run
7
- # Actual migration goes here
8
- end
9
-
10
- def self.revert
11
- # In case you need to revert this one migration
12
- end
13
-
14
- # So you can change the order to run more easily
15
- def self.time_created
16
- Time.parse "2013-03-28 05:03:26 UTC"
17
- end
18
-
19
- module Temporary
20
- # Migration dependent classes go here
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module MinceMigrator
2
- module Migrations
3
- require 'time'
4
-
5
- module FirstMigration3
6
- def self.run
7
- # Actual migration goes here
8
- end
9
-
10
- def self.revert
11
- # In case you need to revert this one migration
12
- end
13
-
14
- # So you can change the order to run more easily
15
- def self.time_created
16
- Time.parse "2013-03-28 05:03:26 UTC"
17
- end
18
-
19
- module Temporary
20
- # Migration dependent classes go here
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module MinceMigrator
2
- module Migrations
3
- require 'time'
4
-
5
- module FirstMigration4
6
- def self.run
7
- # Actual migration goes here
8
- end
9
-
10
- def self.revert
11
- # In case you need to revert this one migration
12
- end
13
-
14
- # So you can change the order to run more easily
15
- def self.time_created
16
- Time.parse "2013-03-28 05:03:26 UTC"
17
- end
18
-
19
- module Temporary
20
- # Migration dependent classes go here
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module MinceMigrator
2
- module Migrations
3
- require 'time'
4
-
5
- module NameOfMigration
6
- def self.run
7
- # Actual migration goes here
8
- end
9
-
10
- def self.revert
11
- # In case you need to revert this one migration
12
- end
13
-
14
- # So you can change the order to run more easily
15
- def self.time_created
16
- Time.parse "2013-03-28 05:03:26 UTC"
17
- end
18
-
19
- module Temporary
20
- # Migration dependent classes go here
21
- end
22
- end
23
- end
24
- end