megegen 0.1.9 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9250578b0518e8bf15052f6de129ca5a7820a707
4
- data.tar.gz: 07a65817ed38e777da6415993c1dc9cc56d1f2ea
3
+ metadata.gz: 58504edc55f71b469c7ba3f03d7f1c9d33c09b08
4
+ data.tar.gz: c7afd8b8569da78d6f7c1a0ca0b7d355df7c70d4
5
5
  SHA512:
6
- metadata.gz: aa4168c839d43e7b3c61253f32f40397e7cd4b77f84261b10f22cf4a70a3f860456ff61dcf56748a29c61a58728036965cad818c908d760c092a5688f4a297fe
7
- data.tar.gz: 6399063bc59124ccf96f7316268a5c1086e4d106e44003fafb70dbb934e9a01ae5d06a1de451a43b45c2c923538e560cc5b2bad9565c162b887a42fca8279449
6
+ metadata.gz: 1dedebc24f112399aea50c021b7d23e4a4996474a6d46df3a9816cab6dc731d25d4a542c0b5cdfd10465f2083faebdc94bb78050fa3d059d14cad49bb8bcac98
7
+ data.tar.gz: cd785d8a36ce448405fb8eb7297fa4d8948b5e3cfcb9cf62caf2992ba07d05c42f43167693a386c339fae227b35e75161e4f0274fd9ecdfa8e553e5c85d0574a
data/README.md CHANGED
@@ -1,29 +1,42 @@
1
1
  # Mege.Gen
2
2
 
3
- Migration file enerator - It knows how to invoke Rails's ActiveRecord enerator
4
- Mege.Gen can only generates ActiveRecord timestamped migrations
3
+ ActiveRecord timestamped migrations generator - It knows how to invoke Rails's ActiveRecord generator
4
+ So you can use Rails Migration Generator without include Rails in your project.
5
5
 
6
- ## How to use it
7
- Include this gem in your Gemfile
6
+ ---
7
+ NOTE: *Mege.Gen* can only generates ActiveRecord timestamped migrations
8
+ NOTE: Please use 0.2.1 and above
9
+ ---
10
+
11
+ MegeGen provides two interfaces to Rails's Migration Generator
12
+ - CLI
13
+ - db Rake Task
8
14
 
15
+ ## Via CLI Interface
16
+ Install megegen as gem locally
17
+ Then you will have megegen as command
9
18
  ```
10
- gem 'megegen', '0.2.0'
19
+ gem install megegen
20
+ cd <project>
21
+ megegen generate <NameOfMigration>
22
+
11
23
  ```
12
24
 
13
- Type the following command in your console
25
+ ## Via Rake Task
26
+ Include this gem in your Gemfile
14
27
 
15
28
  ```
16
- # Normally you don't need to tell megegen your migrations_path
17
- bundle exec rake db:new_migration name=CreateLedgerEntires --trace
18
- # May be you do sometimes
19
- bundle exec rake db:new_migration name=CreateLedgerEntires migrations_path=./db/cool_migrates --trace
29
+ gem 'megegen', '0.2.0'
20
30
  ```
21
31
 
22
- ## CLI Interface
32
+ Then in your Rakefile
23
33
  ```
24
- gem install megegen
25
- cd <project>
26
- megegen generate <NameOfMigration>
34
+ require 'megegen'
35
+ ```
36
+
37
+ Type the following command in your console
27
38
 
28
39
  ```
40
+ bundle exec rake -T db
41
+ ```
29
42
 
data/bin/megegen CHANGED
File without changes
data/lib/megegen/cli.rb CHANGED
@@ -16,10 +16,10 @@ end
16
16
 
17
17
  module Megegen
18
18
  class CLI < Thor
19
- desc "generate <NameOfMigration>", "generate ActiveRecord migration"
19
+ desc "generate <NameOfMigration> <MigrationsPath>", "generate ActiveRecord timestamped migrations"
20
20
  def generate(migration_name, migrations_path = nil)
21
- migrations_path = migration_name || ENV['migrations_path']
22
- name = migrations_path || ENV['name']
21
+ migrations_name = migration_name || ENV['migrations_name']
22
+ migrations_path = migrations_path || ENV['migrations_path']
23
23
 
24
24
  # Primitive approach take no options
25
25
  params = [migration_name]
@@ -1,3 +1,3 @@
1
1
  module Megegen
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.1"
3
3
  end
data/megegen.gemspec CHANGED
@@ -9,9 +9,9 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Jack Wu"]
10
10
  spec.email = ["xuwupeng2000@gmail.com"]
11
11
 
12
- spec.summary = %q{Mege.Gen Migration file generator - It knows how to invoke Rails's generator }
13
- spec.description = %q{Migration file generator - It knows how to invoke Rails's generator }
14
- spec.homepage = "https://github.com/xuwupeng2000/migration-generator"
12
+ spec.summary = %q{ActiveRecord timestamped migrations generator - It knows how to invoke Rails's ActiveRecord generator So you can use Rails Migration Generator without include Rails in your project.}
13
+ spec.description = %q{ActiveRecord timestamped migrations generator - It knows how to invoke Rails's ActiveRecord generator So you can use Rails Migration Generator without include Rails in your project.}
14
+ spec.homepage = "https://github.com/xuwupeng2000/megegen"
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: megegen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Wu
@@ -66,7 +66,9 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: 'Migration file generator - It knows how to invoke Rails''s generator '
69
+ description: ActiveRecord timestamped migrations generator - It knows how to invoke
70
+ Rails's ActiveRecord generator So you can use Rails Migration Generator without
71
+ include Rails in your project.
70
72
  email:
71
73
  - xuwupeng2000@gmail.com
72
74
  executables:
@@ -90,7 +92,7 @@ files:
90
92
  - lib/megegen/tasks/new_migration.rake
91
93
  - lib/megegen/version.rb
92
94
  - megegen.gemspec
93
- homepage: https://github.com/xuwupeng2000/migration-generator
95
+ homepage: https://github.com/xuwupeng2000/megegen
94
96
  licenses:
95
97
  - MIT
96
98
  metadata:
@@ -114,5 +116,7 @@ rubyforge_project:
114
116
  rubygems_version: 2.2.2
115
117
  signing_key:
116
118
  specification_version: 4
117
- summary: Mege.Gen Migration file generator - It knows how to invoke Rails's generator
119
+ summary: ActiveRecord timestamped migrations generator - It knows how to invoke Rails's
120
+ ActiveRecord generator So you can use Rails Migration Generator without include
121
+ Rails in your project.
118
122
  test_files: []