otr-activerecord 1.2.7 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/otr-activerecord/activerecord.rb +1 -0
- data/lib/otr-activerecord/compatibility_6.rb +43 -0
- data/lib/otr-activerecord/defaults.rb +1 -0
- data/lib/otr-activerecord/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e901d95b96b53e3558c490bde1012d91a55b86db6ef1ad2158104c7c339c086
|
4
|
+
data.tar.gz: f0eb40274e92d6b61f1802c8344c80db158727df3e227bb415d083b2138d18dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4ce3da9776d7c3771ef4f62fca66618036630cdc54ad3487bedf8b3901f2b224f6fba0124c3407b17ff3a11ac169e30ed9642b2b41c5865638db2a45901d9b2
|
7
|
+
data.tar.gz: 845f66293799de390aea7c7ad731f02a7ffb050a4219c45f4af7c60073f25fe16b01ebab450ed7abb2cd238285116728ad2b9e0ddc4b912f4ab6d1ab9b67435d
|
data/README.md
CHANGED
@@ -6,6 +6,7 @@ module OTR
|
|
6
6
|
module ActiveRecord
|
7
7
|
autoload :Compatibility4, 'otr-activerecord/compatibility_4'
|
8
8
|
autoload :Compatibility5, 'otr-activerecord/compatibility_5'
|
9
|
+
autoload :Compatibility6, 'otr-activerecord/compatibility_6'
|
9
10
|
|
10
11
|
class << self
|
11
12
|
# Relative path to the "db" dir
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module OTR
|
2
|
+
module ActiveRecord
|
3
|
+
# Compatibility layer for ActiveRecord 6
|
4
|
+
class Compatibility6
|
5
|
+
attr_reader :major_version
|
6
|
+
|
7
|
+
# Compatibility layer for ActiveRecord 6
|
8
|
+
def initialize
|
9
|
+
@major_version = 6
|
10
|
+
::ActiveRecord::Base.default_timezone = :utc
|
11
|
+
::ActiveRecord::Base.logger = Logger.new(STDOUT)
|
12
|
+
end
|
13
|
+
|
14
|
+
# All db migration dir paths
|
15
|
+
def migrations_paths
|
16
|
+
OTR::ActiveRecord.migrations_paths
|
17
|
+
end
|
18
|
+
|
19
|
+
# The dir in which to put new migrations
|
20
|
+
def migrations_path
|
21
|
+
OTR::ActiveRecord.migrations_paths[0]
|
22
|
+
end
|
23
|
+
|
24
|
+
# Basename of migration classes
|
25
|
+
def migration_base_class_name
|
26
|
+
version = "6.#{::ActiveRecord::VERSION::MINOR}"
|
27
|
+
"ActiveRecord::Migration[#{version}]"
|
28
|
+
end
|
29
|
+
|
30
|
+
# Force RACK_ENV/RAILS_ENV to be 'test' when running any db:test:* tasks
|
31
|
+
def force_db_test_env?
|
32
|
+
false
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# https://github.com/rails/rails/issues/35902
|
39
|
+
module ActiveRecord::Tasks::DatabaseTasks
|
40
|
+
def for_each
|
41
|
+
return
|
42
|
+
end
|
43
|
+
end
|
@@ -7,4 +7,5 @@ OTR::ActiveRecord.seed_file = 'seeds.rb'
|
|
7
7
|
OTR::ActiveRecord._normalizer = case ::ActiveRecord::VERSION::MAJOR
|
8
8
|
when 4 then OTR::ActiveRecord::Compatibility4.new
|
9
9
|
when 5 then OTR::ActiveRecord::Compatibility5.new
|
10
|
+
when 6 then OTR::ActiveRecord::Compatibility6.new
|
10
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: otr-activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan Hollinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '6.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '6.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: hashie-forbidden_attributes
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- lib/otr-activerecord/activerecord.rb
|
58
58
|
- lib/otr-activerecord/compatibility_4.rb
|
59
59
|
- lib/otr-activerecord/compatibility_5.rb
|
60
|
+
- lib/otr-activerecord/compatibility_6.rb
|
60
61
|
- lib/otr-activerecord/defaults.rb
|
61
62
|
- lib/otr-activerecord/middleware/connection_management.rb
|
62
63
|
- lib/otr-activerecord/version.rb
|