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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90ee419a56178c15697a2c4ad7cf46059b1a2852e3d367a0eade7df584738fb0
4
- data.tar.gz: 745f4d68b8155d081e63b98acd128c8b8484ee2115e657d187e90707bd4441d7
3
+ metadata.gz: b8b0d3cc0e6741285bd09e96547211610a8fb5279d41089d5c4f9fa1160ab007
4
+ data.tar.gz: cdac8e691194f1f771d11a365db1fbfb98b0cad629abd0edd9d6a13483012e48
5
5
  SHA512:
6
- metadata.gz: ac62927b6acb33e0adc17f917d5a17e20036a679df72ec0b36b8954bd1e9fad7059a701ace69ee3ad28cefcc2bbebeaa1e1edcb2d0117145142e825d8123e33a
7
- data.tar.gz: 1ca1b8fc02b71884c1163754d4db94bb2c3728f67470da0596fb4df35155d9f26c5c73f70ca2cbdda7a1ba2036d57a9496bc36957fc59fa670f6802efeefe44a
6
+ metadata.gz: 0734a9cd1fa6e61b832d0bf22582fd582d583dc1af2ab2ea59a6812f768d662309d82e5df7acc66b13b7aeac2a7c8ed2eec840d21d8679273a437165b7c52a2b
7
+ data.tar.gz: 20f64940f62aa8dc06fd9e0e6f098bead28ab38ad558650a9892f13f99d97384e220707bfbbfb158ce8ddbe65fcc3a4d98d779866e152b92fcb6273502b9ad48
@@ -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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  SimpleCov.configure do
2
4
  enable_coverage :branch
3
5
  add_filter '/spec/'
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "http://rubygems.org"
2
4
 
3
5
  gemspec
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.0 - Drop AR < 5.2 and add 6.0 and 6.1 support
62
- * 0.4.0 - Allow AR 5.2
63
- * 0.3.0 - Allow AR 5.1
64
- * 0.2.0 - Replace the ill-defined `connection.tables_without_deprecation` with `connection.tables_only` which truly returns solely tables.
65
- * 0.1.0 - Initial release
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler'
2
4
  Bundler::GemHelper.install_tasks
3
5
 
@@ -0,0 +1,4 @@
1
+ base_gemfile = File.expand_path('../../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile)
3
+
4
+ gem "activerecord", ">= 7.0", "< 7.1"
@@ -0,0 +1,10 @@
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
+
4
+ platform :ruby do
5
+ gem "mysql2"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcmysql-adapter'
10
+ end
@@ -0,0 +1,10 @@
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
+
4
+ platform :ruby do
5
+ gem "pg"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcpostgresql-adapter'
10
+ end
@@ -0,0 +1,10 @@
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
+
4
+ platform :ruby do
5
+ gem "sqlite3"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcsqlite3-adapter', '>=1.3.0.beta2'
10
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SchemaPlus::Compatibility
2
4
  module ActiveRecord
3
5
  module ConnectionAdapters
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SchemaPlus::Compatibility
2
4
  module ActiveRecord
3
5
  module ConnectionAdapters
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SchemaPlus::Compatibility
2
4
  module ActiveRecord
3
5
  module ConnectionAdapters
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SchemaPlus::Compatibility
2
4
  module ActiveRecord
3
5
  module ConnectionAdapters
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SchemaPlus::Compatibility
2
4
  module ActiveRecord
3
5
  module Migration
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SchemaPlus
2
4
  module Compatibility
3
- VERSION = "1.0.0"
5
+ VERSION = "1.0.1"
4
6
  end
5
7
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'schema_monkey'
2
4
 
3
5
  require_relative 'compatibility/version'
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'schema_plus/compatibility'
data/schema_dev.yml CHANGED
@@ -2,10 +2,12 @@ ruby:
2
2
  - 2.5
3
3
  - 2.7
4
4
  - 3.0
5
+ - 3.1
5
6
  activerecord:
6
7
  - 5.2
7
8
  - 6.0
8
9
  - 6.1
10
+ - 7.0
9
11
  db:
10
12
  - mysql2
11
13
  - sqlite3
@@ -1,4 +1,5 @@
1
- # coding: utf-8
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.0"
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.1"
30
+ gem.add_development_dependency "schema_dev", "~> 4.2.0"
30
31
  end
@@ -1,4 +1,5 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  describe ActiveRecord::Migration do
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'simplecov'
2
- SimpleCov.start
4
+ SimpleCov.start unless SimpleCov.running
3
5
 
4
6
  $LOAD_PATH.unshift(File.dirname(__FILE__))
5
7
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
@@ -1,4 +1,5 @@
1
- # encoding: utf-8
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 if ActiveRecord::VERSION::MAJOR >= 5 # ensure metadata table exists
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
- if ActiveRecord::VERSION::MAJOR >= 5
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.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-04-15 00:00:00.000000000 Z
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.0'
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.0'
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: '3.0'
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: '3.0'
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: '4.1'
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: '4.1'
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