schema_plus_compatibility 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/prs.yml +26 -0
- data/.simplecov +2 -0
- data/Gemfile +2 -0
- data/README.md +18 -5
- data/Rakefile +2 -0
- data/gemfiles/activerecord-7.0/Gemfile.base +4 -0
- data/gemfiles/activerecord-7.0/Gemfile.mysql2 +10 -0
- data/gemfiles/activerecord-7.0/Gemfile.postgresql +10 -0
- data/gemfiles/activerecord-7.0/Gemfile.sqlite3 +10 -0
- data/lib/schema_plus/compatibility/active_record/connection_adapters/abstract_adapter.rb +2 -0
- data/lib/schema_plus/compatibility/active_record/connection_adapters/mysql2_adapter.rb +2 -0
- data/lib/schema_plus/compatibility/active_record/connection_adapters/postgresql_adapter.rb +2 -0
- data/lib/schema_plus/compatibility/active_record/connection_adapters/sqlite3_adapter.rb +2 -0
- data/lib/schema_plus/compatibility/active_record/migration.rb +2 -0
- data/lib/schema_plus/compatibility/version.rb +3 -1
- data/lib/schema_plus/compatibility.rb +2 -0
- data/lib/schema_plus_compatibility.rb +2 -0
- data/schema_dev.yml +2 -0
- data/schema_plus_compatibility.gemspec +5 -4
- data/spec/migration_spec.rb +2 -1
- data/spec/spec_helper.rb +3 -1
- data/spec/tables_only_spec.rb +4 -7
- metadata +12 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8b0d3cc0e6741285bd09e96547211610a8fb5279d41089d5c4f9fa1160ab007
|
4
|
+
data.tar.gz: cdac8e691194f1f771d11a365db1fbfb98b0cad629abd0edd9d6a13483012e48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0734a9cd1fa6e61b832d0bf22582fd582d583dc1af2ab2ea59a6812f768d662309d82e5df7acc66b13b7aeac2a7c8ed2eec840d21d8679273a437165b7c52a2b
|
7
|
+
data.tar.gz: 20f64940f62aa8dc06fd9e0e6f098bead28ab38ad558650a9892f13f99d97384e220707bfbbfb158ce8ddbe65fcc3a4d98d779866e152b92fcb6273502b9ad48
|
data/.github/workflows/prs.yml
CHANGED
@@ -22,10 +22,12 @@ jobs:
|
|
22
22
|
- '2.5'
|
23
23
|
- '2.7'
|
24
24
|
- '3.0'
|
25
|
+
- '3.1'
|
25
26
|
activerecord:
|
26
27
|
- '5.2'
|
27
28
|
- '6.0'
|
28
29
|
- '6.1'
|
30
|
+
- '7.0'
|
29
31
|
db:
|
30
32
|
- mysql2
|
31
33
|
- sqlite3
|
@@ -35,6 +37,10 @@ jobs:
|
|
35
37
|
exclude:
|
36
38
|
- ruby: '3.0'
|
37
39
|
activerecord: '5.2'
|
40
|
+
- ruby: '3.1'
|
41
|
+
activerecord: '5.2'
|
42
|
+
- ruby: '2.5'
|
43
|
+
activerecord: '7.0'
|
38
44
|
- db: skip
|
39
45
|
dbversion: skip
|
40
46
|
include:
|
@@ -62,6 +68,10 @@ jobs:
|
|
62
68
|
activerecord: '6.1'
|
63
69
|
db: postgresql
|
64
70
|
dbversion: '9.6'
|
71
|
+
- ruby: '2.7'
|
72
|
+
activerecord: '7.0'
|
73
|
+
db: postgresql
|
74
|
+
dbversion: '9.6'
|
65
75
|
- ruby: '3.0'
|
66
76
|
activerecord: '6.0'
|
67
77
|
db: postgresql
|
@@ -70,6 +80,22 @@ jobs:
|
|
70
80
|
activerecord: '6.1'
|
71
81
|
db: postgresql
|
72
82
|
dbversion: '9.6'
|
83
|
+
- ruby: '3.0'
|
84
|
+
activerecord: '7.0'
|
85
|
+
db: postgresql
|
86
|
+
dbversion: '9.6'
|
87
|
+
- ruby: '3.1'
|
88
|
+
activerecord: '6.0'
|
89
|
+
db: postgresql
|
90
|
+
dbversion: '9.6'
|
91
|
+
- ruby: '3.1'
|
92
|
+
activerecord: '6.1'
|
93
|
+
db: postgresql
|
94
|
+
dbversion: '9.6'
|
95
|
+
- ruby: '3.1'
|
96
|
+
activerecord: '7.0'
|
97
|
+
db: postgresql
|
98
|
+
dbversion: '9.6'
|
73
99
|
env:
|
74
100
|
BUNDLE_GEMFILE: "${{ github.workspace }}/gemfiles/activerecord-${{ matrix.activerecord }}/Gemfile.${{ matrix.db }}"
|
75
101
|
MYSQL_DB_HOST: 127.0.0.1
|
data/.simplecov
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
[![Build Status](https://github.com/SchemaPlus/schema_plus_compatibility/actions/workflows/prs.yml/badge.svg)](https://github.com/SchemaPlus/schema_plus_compatibility/actions)
|
3
3
|
[![Coverage Status](https://coveralls.io/repos/github/SchemaPlus/schema_plus_compatibility/badge.svg)](https://coveralls.io/github/SchemaPlus/schema_plus_compatibility)
|
4
4
|
|
5
|
+
# Deprecation notice
|
6
|
+
|
7
|
+
This gem is officially deprecated and will no longer be maintained.
|
8
|
+
|
9
|
+
Newer Active record versions correclty ignore views from the connection.tables list so this gem is no longer needed.
|
10
|
+
Also as we are only supporting AR 5.2+ there is no need for the "latest\_version" method either.
|
11
|
+
|
5
12
|
# SchemaPlus::Compatibility
|
6
13
|
|
7
14
|
SchemaPlus::Compatibility provides compatibility support for developing and testing using different versions of ActiveRecord.
|
@@ -51,18 +58,24 @@ SchemaPlus::Compatibility is tested on:
|
|
51
58
|
* ruby **2.7** with activerecord **5.2**, using **mysql2**, **sqlite3** or **postgresql:9.6**
|
52
59
|
* ruby **2.7** with activerecord **6.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
|
53
60
|
* ruby **2.7** with activerecord **6.1**, using **mysql2**, **sqlite3** or **postgresql:9.6**
|
61
|
+
* ruby **2.7** with activerecord **7.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
|
54
62
|
* ruby **3.0** with activerecord **6.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
|
55
63
|
* ruby **3.0** with activerecord **6.1**, using **mysql2**, **sqlite3** or **postgresql:9.6**
|
64
|
+
* ruby **3.0** with activerecord **7.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
|
65
|
+
* ruby **3.1** with activerecord **6.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
|
66
|
+
* ruby **3.1** with activerecord **6.1**, using **mysql2**, **sqlite3** or **postgresql:9.6**
|
67
|
+
* ruby **3.1** with activerecord **7.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
|
56
68
|
|
57
69
|
<!-- SCHEMA_DEV: MATRIX - end -->
|
58
70
|
|
59
71
|
## Release Notes
|
60
72
|
|
61
|
-
* 1.0.
|
62
|
-
* 0.
|
63
|
-
* 0.
|
64
|
-
* 0.
|
65
|
-
* 0.
|
73
|
+
* **1.0.1** - Add AR 7.0 support and deprecate gem.
|
74
|
+
* **1.0.0** - Drop AR < 5.2 and add 6.0 and 6.1 support
|
75
|
+
* **0.4.0** - Allow AR 5.2
|
76
|
+
* **0.3.0** - Allow AR 5.1
|
77
|
+
* **0.2.0** - Replace the ill-defined `connection.tables_without_deprecation` with `connection.tables_only` which truly returns solely tables.
|
78
|
+
* **0.1.0** - Initial release
|
66
79
|
|
67
80
|
## Development & Testing
|
68
81
|
|
data/Rakefile
CHANGED
data/schema_dev.yml
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
lib = File.expand_path('../lib', __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'schema_plus/compatibility/version'
|
@@ -20,11 +21,11 @@ Gem::Specification.new do |gem|
|
|
20
21
|
|
21
22
|
gem.required_ruby_version = ">= 2.5.0"
|
22
23
|
|
23
|
-
gem.add_dependency "activerecord", ">= 5.2", "< 7.
|
24
|
-
gem.add_dependency "schema_monkey", "~> 3.0"
|
24
|
+
gem.add_dependency "activerecord", ">= 5.2", "< 7.1"
|
25
|
+
gem.add_dependency "schema_monkey", "~> 3.0.2"
|
25
26
|
|
26
27
|
gem.add_development_dependency "bundler"
|
27
28
|
gem.add_development_dependency "rake", "~> 13.0"
|
28
29
|
gem.add_development_dependency "rspec", "~> 3.0"
|
29
|
-
gem.add_development_dependency "schema_dev", "~> 4.
|
30
|
+
gem.add_development_dependency "schema_dev", "~> 4.2.0"
|
30
31
|
end
|
data/spec/migration_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/tables_only_spec.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'spec_helper'
|
3
4
|
|
4
5
|
describe "tables_only" do
|
@@ -18,7 +19,7 @@ describe "tables_only" do
|
|
18
19
|
connection.tables_only.each do |table|
|
19
20
|
connection.drop_table table, force: :cascade
|
20
21
|
end
|
21
|
-
ActiveRecord::InternalMetadata.create_table
|
22
|
+
ActiveRecord::InternalMetadata.create_table
|
22
23
|
connection.create_table :t1
|
23
24
|
connection.create_table :t2
|
24
25
|
create_dummy_view :v1, :t1
|
@@ -38,11 +39,7 @@ describe "tables_only" do
|
|
38
39
|
end
|
39
40
|
|
40
41
|
let(:ar_internal_tables) {
|
41
|
-
|
42
|
-
[ActiveRecord::InternalMetadata.table_name]
|
43
|
-
else
|
44
|
-
[]
|
45
|
-
end
|
42
|
+
[ActiveRecord::InternalMetadata.table_name]
|
46
43
|
}
|
47
44
|
|
48
45
|
it "lists all tables" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema_plus_compatibility
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ronen barzel
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-06-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
version: '5.2'
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '7.
|
23
|
+
version: '7.1'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -30,21 +30,21 @@ dependencies:
|
|
30
30
|
version: '5.2'
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '7.
|
33
|
+
version: '7.1'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: schema_monkey
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 3.0.2
|
41
41
|
type: :runtime
|
42
42
|
prerelease: false
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 3.0.2
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: bundler
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,14 +93,14 @@ dependencies:
|
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 4.2.0
|
97
97
|
type: :development
|
98
98
|
prerelease: false
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 4.2.0
|
104
104
|
description: Compatibility helpers for the SchemaPlus family of gems
|
105
105
|
email:
|
106
106
|
- ronen@barzel.org
|
@@ -129,6 +129,10 @@ files:
|
|
129
129
|
- gemfiles/activerecord-6.1/Gemfile.mysql2
|
130
130
|
- gemfiles/activerecord-6.1/Gemfile.postgresql
|
131
131
|
- gemfiles/activerecord-6.1/Gemfile.sqlite3
|
132
|
+
- gemfiles/activerecord-7.0/Gemfile.base
|
133
|
+
- gemfiles/activerecord-7.0/Gemfile.mysql2
|
134
|
+
- gemfiles/activerecord-7.0/Gemfile.postgresql
|
135
|
+
- gemfiles/activerecord-7.0/Gemfile.sqlite3
|
132
136
|
- lib/schema_plus/compatibility.rb
|
133
137
|
- lib/schema_plus/compatibility/active_record/connection_adapters/abstract_adapter.rb
|
134
138
|
- lib/schema_plus/compatibility/active_record/connection_adapters/mysql2_adapter.rb
|