mi 0.0.3 → 0.1.0

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: 5d5312b8b93dae6b7ce277263007c40397213704
4
- data.tar.gz: f04ce7d04fe4dec0f4346f65da646ead3266169b
3
+ metadata.gz: 4d74b095ca988d1bb68b286520b448aadb8100ff
4
+ data.tar.gz: 73be5672f5afea9b1f61e60669bc5aca7f49f739
5
5
  SHA512:
6
- metadata.gz: 377469978ee9420f5a7fc4b1ba93e135a2138bcc5121e7b39aad1038db563daf9972638076cce6704954c29b2a30f60cdb09ec33db18ac703078bd441f3b5116
7
- data.tar.gz: 6a9d385bd1a6e324310aa0b0bf6fdc8edc708ae54446158edf75a473ea87355485818fc681139e39d886e1ef1aa757afd499bf80598d8dfe101e5f4661b12188
6
+ metadata.gz: 731fee1baa7d74572d22d5bd0703104d6699b27cdeb8ebc5fcad4b5c11184b59bf70c728dff926bfa8f3339d1c0c3e8d96d35fda197fd49793e29424a769553e
7
+ data.tar.gz: 05f0c2b97aac8ec4e05b7ec63753b719be6bce2b9ce204641bdb59101ebd683221cd421173334948879c7a211d58185ce79428d209fefef5c7f451a2ae9d2fcb
@@ -5,7 +5,7 @@ AllCops:
5
5
  TargetRubyVersion: 2.3
6
6
 
7
7
  Rails:
8
- Enabled: true
8
+ Enabled: false
9
9
 
10
10
  Style/BlockDelimiters:
11
11
  Enabled: false
data/README.md CHANGED
@@ -78,6 +78,18 @@ class ChangeEmailToUsers < ActiveRecord::Migration
78
78
  end
79
79
  ```
80
80
 
81
+ ## Dependencies
82
+
83
+ - Ruby 2.2 or higher
84
+ - Rails 4
85
+
86
+
87
+ ## TODOs
88
+
89
+ - Support `create_talbe` [#9](https://github.com/pocke/mi/issues/9)
90
+ - Support Rails 5 [#12](https://github.com/pocke/mi/issues/12)
91
+
92
+
81
93
  ## Contributing
82
94
 
83
95
  Bug reports and pull requests are welcome on GitHub at https://github.com/pocke/mi.
@@ -21,15 +21,24 @@ class MiGenerator < Rails::Generators::Base
21
21
  source_root File.expand_path('../templates', __FILE__)
22
22
 
23
23
  def doing
24
+ if arguments.include?('--version')
25
+ puts Mi::VERSION
26
+ return
27
+ end
28
+
24
29
  migration_template('migration.rb.erb', "db/migrate/#{destination}.rb")
25
30
  end
26
31
 
27
32
 
28
33
  private
29
34
 
35
+ def arguments
36
+ @_initializer[0..1].flatten
37
+ end
38
+
30
39
  def arg_groups
31
40
  @arg_groups ||= (
32
- args = @_initializer[0..1].flatten.reject{|x| x.start_with?('--')}
41
+ args = arguments.reject{|x| x.start_with?('--')}
33
42
 
34
43
  current = nil
35
44
  res = args.group_by do |a|
@@ -1,3 +1,3 @@
1
1
  module Mi
2
- VERSION = "0.0.3".freeze
2
+ VERSION = "0.1.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masataka Kuwabara
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-30 00:00:00.000000000 Z
11
+ date: 2016-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails