mi 0.3.0 → 1.0.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: 1de27288fe514834c187cfe245745fd890f117b1
4
- data.tar.gz: 512d891179f0ae8e2c3582c1b15bb889ce1d9fd1
3
+ metadata.gz: 0dd79087afa454d1061fa5b33d2efcd796962271
4
+ data.tar.gz: f8cb5a5dcd2d9675af2714ab81aa7948da3eb8fb
5
5
  SHA512:
6
- metadata.gz: e04e24948c240f8a564020499e8ba2f9f54bf9c2ba7b8c60992cb2aed940a598811a0cb4be77a9509fa06b6a32f472883b684bc64cb01c504dd4d84f96a3fb75
7
- data.tar.gz: fa147966d9f03257db7078d734fbf2c79cf06e014bf5b5e7e1010719ec66511dd10ebe5dc194909634771bb2ee1fcd5915039dd335959017b4d971f2754e2626
6
+ metadata.gz: 7ce63c031245201dec52b9ff4787855895e950f351a800df52816947fcd96a0824751351ec5d0b209f7fdf60c0f0043cf4a9e9b4e35d2cb8ca4db0879cdb4689
7
+ data.tar.gz: 63b9b8301de573e6adf8184636df2460cce95480926e361fbc10ff3176cfd9f06f9f49c682272f308b7cb5b163eeb44fff4680ee28a7d9bbc98ca05aed273914
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ gemfiles/*.gemfile.lock
@@ -5,6 +5,13 @@ rvm:
5
5
  - 2.3.1
6
6
  - ruby-head
7
7
 
8
+ gemfile:
9
+ # Comment out because travis was slow...
10
+ # - gemfiles/rails40.gemfile
11
+ # - gemfiles/rails41.gemfile
12
+ - gemfiles/rails42.gemfile
13
+ - gemfiles/rails50.gemfile
14
+
8
15
  cache: bundler
9
16
  bundler_args: --jobs=4 --retry=3
10
17
  sudo: false
@@ -0,0 +1,15 @@
1
+ appraise 'rails40' do
2
+ gem 'rails', '~> 4.0.0'
3
+ end
4
+
5
+ appraise 'rails41' do
6
+ gem 'rails', '~> 4.1.0'
7
+ end
8
+
9
+ appraise 'rails42' do
10
+ gem 'rails', '~> 4.2.0'
11
+ end
12
+
13
+ appraise 'rails50' do
14
+ gem 'rails', '~> 5.0.0'
15
+ end
data/README.md CHANGED
@@ -119,10 +119,6 @@ $ bin/rails g mi users +email:string --edit
119
119
  - Rails 4
120
120
 
121
121
 
122
- ## TODOs
123
-
124
- - Support Rails 5 [#12](https://github.com/pocke/mi/issues/12)
125
-
126
122
 
127
123
  ## Contributing
128
124
 
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_DISABLE_SHARED_GEMS: true
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.0.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.1.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.2.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 5.0.0"
6
+
7
+ gemspec :path => "../"
@@ -87,6 +87,11 @@ module Mi
87
87
  name = name[1..-1]
88
88
  {name: name, type: type, options: options, method: method}
89
89
  end
90
+
91
+ def migration_version
92
+ return "" unless defined? ActiveRecord::Migration.current_version
93
+ "[#{ActiveRecord::Migration.current_version}]"
94
+ end
90
95
  end
91
96
  end
92
97
  end
@@ -1,4 +1,4 @@
1
- class <%= migration_class_name %> < ActiveRecord::Migration
1
+ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
2
2
  def change
3
3
  create_table :<%= table_name %> do |t|
4
4
  <%- arg_groups.each do |_table, columns| -%>
@@ -1,4 +1,4 @@
1
- class <%= migration_class_name %> < ActiveRecord::Migration
1
+ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
2
2
  def change
3
3
  <%- arg_groups.each do |table, columns| -%>
4
4
  <%- columns.each do |column| -%>
@@ -1,3 +1,3 @@
1
1
  module Mi
2
- VERSION = "0.3.0".freeze
2
+ VERSION = "1.0.0".freeze
3
3
  end
data/mi.gemspec CHANGED
@@ -36,4 +36,5 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency 'rspec-power_assert', '~> 0.3.0'
37
37
  spec.add_development_dependency 'coveralls', '~> 0.8.13'
38
38
  spec.add_development_dependency 'simplecov', '~> 0.11.0'
39
+ spec.add_development_dependency 'appraisal'
39
40
  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.3.0
4
+ version: 1.0.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-07-08 00:00:00.000000000 Z
11
+ date: 2016-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -192,6 +192,20 @@ dependencies:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: 0.11.0
195
+ - !ruby/object:Gem::Dependency
196
+ name: appraisal
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
195
209
  description: Mi is a generator of migration file instead of `rails generate migration`.
196
210
  email:
197
211
  - p.ck.t22@gmail.com
@@ -203,6 +217,7 @@ files:
203
217
  - ".rspec"
204
218
  - ".rubocop.yml"
205
219
  - ".travis.yml"
220
+ - Appraisals
206
221
  - Gemfile
207
222
  - Guardfile
208
223
  - LICENSE
@@ -210,6 +225,11 @@ files:
210
225
  - Rakefile
211
226
  - bin/console
212
227
  - bin/setup
228
+ - gemfiles/.bundle/config
229
+ - gemfiles/rails40.gemfile
230
+ - gemfiles/rails41.gemfile
231
+ - gemfiles/rails42.gemfile
232
+ - gemfiles/rails50.gemfile
213
233
  - lib/generators/mi.rb
214
234
  - lib/generators/mi/create_generator.rb
215
235
  - lib/generators/mi/mi_generator.rb