mince_migrator 0.0.1

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/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mince_migrations.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Matt Simpson
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,111 @@
1
+ # Mince Migrator
2
+
3
+ **This is not yet released, this read me is a roadmap for what to do, it is not necessarily what has been done yet.**
4
+
5
+ Mince Migrator is a library that provides a way to run database migrations for your application using the [Mince libraries](https://github.com/coffeencoke/mince).
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'mince_migrator'
12
+
13
+ And then execute:
14
+
15
+ $ bundle install
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install mince_migrator
20
+
21
+ ## Usage
22
+
23
+ ### Generate a migration
24
+
25
+ $ bundle exec mince_migrator create "Load admin users"
26
+
27
+ ### Implement your migration
28
+
29
+ The template provided to you for a migration looks like this:
30
+
31
+ ```ruby
32
+ module MinceMigrator
33
+ module Migration
34
+ module LoadAdminUsers
35
+ def self.run
36
+ # Actual migration goes here
37
+ end
38
+
39
+ def self.revert
40
+ # In case you need to revert this one migration
41
+ end
42
+
43
+ # So you can change the order to run more easily
44
+ def self.time_created
45
+ "2013-02-23 19:03:27 UTC"
46
+ end
47
+
48
+ module Temporary
49
+ # Migration dependent classes go here
50
+ end
51
+ end
52
+ end
53
+ end
54
+ ```
55
+
56
+ For an evolving explanation for the Temporary module, view [Migrating With Temporary Classes](https://github.com/coffeencoke/mince_migrator/wiki/migrating-with-temporary-classes).
57
+
58
+ ### Run your single migration
59
+
60
+ $ bundle exec mince_migrator run "Load admin users"
61
+
62
+ *You can use any of the following as the name for the above command:*
63
+
64
+ * `Load admin users` (in quotes)*
65
+ * `LoadAdminUsers`
66
+ * `load_admin_users`
67
+
68
+ ### Revert your single migration
69
+
70
+ $ bundle exec mince_migrator revert "Load admin users"
71
+
72
+ ### Run all migrations that have not yet been ran
73
+
74
+ $ bundle exec mince_migrator run_all
75
+
76
+ ### Check the status of a migration
77
+
78
+ $ bundle exec mince_migrator status "Load admin users"
79
+
80
+ ### View all available commands
81
+
82
+ *Run any of the following*
83
+
84
+ $ bundle exec mince_migrator
85
+ $ bundle exec mince_migrator --help
86
+ $ bundle exec mince_migrator help
87
+
88
+ ## Contributing
89
+
90
+ 1. Fork it
91
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
92
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
93
+ 4. Push to the branch (`git push origin my-new-feature`)
94
+ 5. Create new Pull Request
95
+
96
+ ## Bonus contributions!
97
+
98
+ 1. Talk with me first
99
+ 2. Make all commits stable
100
+ 3. Include tests
101
+ 4. Update documentation for your added feature
102
+
103
+ Special Thanks to [@davetron5000](https://github.com/davetron5000) for writing [gli](https://github.com/davetron5000/gli)
104
+
105
+ # License
106
+
107
+ Copyright (c) 2013 Matt Simpson
108
+
109
+ MIT License
110
+
111
+ View the LICENSE.txt file included in the source
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake'
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new(:spec) do |spec|
6
+ spec.pattern = 'spec/**/*_spec.rb'
7
+ spec.rspec_opts = ['--backtrace']
8
+ # spec.ruby_opts = ['-w']
9
+ end
10
+
11
+ task :default => :spec
12
+
@@ -0,0 +1,5 @@
1
+ require "mince_migrator/version"
2
+
3
+ module MinceMigrator
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,3 @@
1
+ module MinceMigrator
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'mince_migrator/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "mince_migrator"
8
+ gem.version = MinceMigrator::VERSION
9
+ gem.authors = ["Matt Simpson"]
10
+ gem.email = ["matt.simpson3@gmail.com"]
11
+ gem.description = %q{Mince Migrator is a library that provides a way to run database migrations for your application using the Mince libraries}
12
+ gem.summary = %q{Provides the ability to write migrations for the mince gems}
13
+ gem.homepage = "https://github.com/coffeencoke/mince_migrator"
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+ end
metadata ADDED
@@ -0,0 +1,55 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mince_migrator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Matt Simpson
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-02-23 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Mince Migrator is a library that provides a way to run database migrations
15
+ for your application using the Mince libraries
16
+ email:
17
+ - matt.simpson3@gmail.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - .gitignore
23
+ - Gemfile
24
+ - LICENSE.txt
25
+ - README.md
26
+ - Rakefile
27
+ - lib/mince_migrator.rb
28
+ - lib/mince_migrator/version.rb
29
+ - mince_migrator.gemspec
30
+ homepage: https://github.com/coffeencoke/mince_migrator
31
+ licenses: []
32
+ post_install_message:
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ requirements: []
49
+ rubyforge_project:
50
+ rubygems_version: 1.8.24
51
+ signing_key:
52
+ specification_version: 3
53
+ summary: Provides the ability to write migrations for the mince gems
54
+ test_files: []
55
+ has_rdoc: