immigrant 0.3.5 → 0.3.6

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: 178034936e28a389c8a909243a9576c6212d8fb0
4
- data.tar.gz: 881d1940852983b4a262e1904b7ccc9471233d25
3
+ metadata.gz: d4e015fcd1add02b718ee8ffc114101a854c58c4
4
+ data.tar.gz: 5330b728b20026ea5c8991eedcbe785f0ee2ec7b
5
5
  SHA512:
6
- metadata.gz: e59b3cd9d311554a884b871421e719082944ed0c6e891a8b28ddc8f20c8d09ac803a5afa708d7336fda28e141856276eb40034f21d43d0e0b00baa9df56c4f4e
7
- data.tar.gz: 44a246c9e00744f3003a4c2d4481d3654129659a1f1dbd6c208b1d5d0d646d8ac100c3368da087d062e0703f4e6a3bf4a5048a6527ed36e2dad178c580619f14
6
+ metadata.gz: d656b400f34a7ad7f34d1ffb9992d8265cdc766e63389db866e4c9e8db72fab723f7e816c604535d0346c739e99c85d4bb72409d506f680165ad0e06787f9966
7
+ data.tar.gz: 8fc875b94ccb27d385abce33aee430e2a89b6a697f0f319919825dbbe672058fbad57b905232f829cab83004defa6e6ee9af37c046e54e1eaa685e472a657006
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Immigrant
2
- [<img src="https://secure.travis-ci.org/jenseng/immigrant.png?rvm=1.9.3" />](http://travis-ci.org/jenseng/immigrant)
2
+ [<img src="https://secure.travis-ci.org/jenseng/immigrant.svg?rvm=1.9.3" />](http://travis-ci.org/jenseng/immigrant)
3
3
 
4
4
  Immigrant gives Rails a foreign key migration generator so you can
5
5
  effortlessly find and add missing keys. This is particularly helpful
@@ -17,4 +17,14 @@ class ImmigrationGenerator < ActiveRecord::Generators::Base
17
17
  end
18
18
 
19
19
  source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
20
+
21
+ def migration_version
22
+ if supports_versioning?
23
+ "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
24
+ end
25
+ end
26
+
27
+ def supports_versioning?
28
+ Rails.version >= '5'
29
+ end
20
30
  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
  <% @keys.each do |key| -%>
4
4
  <%= key.to_ruby(:add) %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: immigrant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Jensen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-21 00:00:00.000000000 Z
11
+ date: 2017-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -74,9 +74,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  version: 1.3.5
75
75
  requirements: []
76
76
  rubyforge_project:
77
- rubygems_version: 2.2.2
77
+ rubygems_version: 2.5.1
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: Foreign key migration generator for Rails
81
81
  test_files: []
82
- has_rdoc: