sinatra-activerecord 2.0.10 → 2.0.11

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: 6a13239550230a493ce9ccff2522d3388086d015
4
- data.tar.gz: a2026e6c361446847cbabbd3ef6175285eba01ce
3
+ metadata.gz: aad1665d3059cd4294cedb3ba0e096b06b689e76
4
+ data.tar.gz: 037f3ccf17201ddb5cbfc59c4803a29263d34c42
5
5
  SHA512:
6
- metadata.gz: b027e361b09da93519bc9bf7e02ffe14de1dd4a1d5484b5a2a95cc5855c59553e9eb9424221d8bb0b78c0cd89d1aa3719b6c39ad47e512f20def3f8b6fbf1ba1
7
- data.tar.gz: 31732cfa6c9acbe83b4072458c79468a7a8384af2c97bcf95fad32f9697dae0caf0d432cfbc07dc329a54dad46a7619ecb574445740e28ced00e8dc33a00b439
6
+ metadata.gz: e68be8bb67a389752661a49222055c436363849e79269971ccc4882a5d8a8e0a6eaf55d2af3f363d8b21ce3cff330662c834bce7c57149a2eaad030f277a31f7
7
+ data.tar.gz: 4b3432d14da9954ddaf9b6902ee7e706a86d9d14fd466c85ec4568e9bd2d949f80ace64c085d4a3ab7b16749064448b600550f39ecf90776f677069d50069bc8
@@ -25,10 +25,14 @@ namespace :db do
25
25
  filename = "#{version}_#{name}.rb"
26
26
  dirname = ActiveRecord::Migrator.migrations_paths.first
27
27
  path = File.join(dirname, filename)
28
+ ar_maj = ActiveRecord::VERSION::MAJOR
29
+ ar_min = ActiveRecord::VERSION::MINOR
30
+ base = "ActiveRecord::Migration"
31
+ base += "[#{ar_maj}.#{ar_min}]" if ar_maj >= 5
28
32
 
29
33
  FileUtils.mkdir_p(dirname)
30
34
  File.write path, <<-MIGRATION.strip_heredoc
31
- class #{name.camelize} < ActiveRecord::Migration
35
+ class #{name.camelize} < #{base}
32
36
  def change
33
37
  end
34
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 2.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Mizerany
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-07-05 00:00:00.000000000 Z
12
+ date: 2016-10-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra