rails_compatibility 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae768066a68750297b2c1a459adbf672138188b49e514cc201a4cc179918ed8e
4
- data.tar.gz: b1e1716ee996279e97ad89edc5c38252754d046d2e99ca0de2edea42df0d79a2
3
+ metadata.gz: e10843554c7729ecd8fb3b9ef7418fc458cb92ad18da1f4e6ce2829dd5ab1566
4
+ data.tar.gz: bdea2e8109abd52b32df8ca66675bc6ae3cd9a5ad3c6e1b73081d0344526e25b
5
5
  SHA512:
6
- metadata.gz: d31f07bec2771a538dde11784e9c2eb01effeff85345611fb8254ebfb2e86302b345ee35b0ff6f1d722d5bd7acc0a84502941fefafb847a9225af5d3461c7be4
7
- data.tar.gz: 71ff54c2535676494177875cafd9abf9e8fd9d2261ed29cb38e58c74d59831e88c183e9f26b60a032b219f4d752e301b825cd480f54a4fb6287370190c08621c
6
+ metadata.gz: f80ced4f5e1e7c22d04262c170fb478d46aa17c02a767cc37af0b4f170e634de81d1bf6824857e4f41bbeed846eb7365b28ee670e11262dd3da0b457ea2ea06e
7
+ data.tar.gz: b30469894f18200d7d102ddfe9f0308cda268c66236da7f7b6c6f53827a41616f03a871d92da95f89cd903485c139415ef0637c5c3605778fc928b9ebb661277
@@ -23,6 +23,8 @@ jobs:
23
23
  - 2.2
24
24
  - 2.6
25
25
  - 2.7
26
+ - 3.0
27
+ - 3.1
26
28
  gemfile:
27
29
  - 3.2.gemfile
28
30
  - 4.2.gemfile
@@ -31,32 +33,57 @@ jobs:
31
33
  - 5.2.gemfile
32
34
  - 6.0.gemfile
33
35
  - 6.1.gemfile
36
+ - 7.0.gemfile
34
37
  exclude:
35
38
  - gemfile: 3.2.gemfile
36
39
  ruby: 2.6
37
40
  - gemfile: 3.2.gemfile
38
41
  ruby: 2.7
42
+ - gemfile: 3.2.gemfile
43
+ ruby: 3.0
44
+ - gemfile: 3.2.gemfile
45
+ ruby: 3.1
39
46
  - gemfile: 4.2.gemfile
40
47
  ruby: 2.7
48
+ - gemfile: 4.2.gemfile
49
+ ruby: 3.0
50
+ - gemfile: 4.2.gemfile
51
+ ruby: 3.1
52
+ - gemfile: 5.0.gemfile
53
+ ruby: 3.0
54
+ - gemfile: 5.0.gemfile
55
+ ruby: 3.1
56
+ - gemfile: 5.1.gemfile
57
+ ruby: 3.0
58
+ - gemfile: 5.1.gemfile
59
+ ruby: 3.1
60
+ - gemfile: 5.2.gemfile
61
+ ruby: 3.0
62
+ - gemfile: 5.2.gemfile
63
+ ruby: 3.1
41
64
  - gemfile: 6.0.gemfile
42
65
  ruby: 2.2
43
66
  - gemfile: 6.1.gemfile
44
67
  ruby: 2.2
68
+ - gemfile: 7.0.gemfile
69
+ ruby: 2.2
70
+ - gemfile: 7.0.gemfile
71
+ ruby: 2.6
45
72
  env:
46
73
  BUNDLE_GEMFILE: "gemfiles/${{ matrix.gemfile }}"
47
74
 
48
75
  steps:
49
- - name: Checkout
50
- uses: actions/checkout@v2
51
- - name: Setup Ruby
52
- uses: ruby/setup-ruby@v1
53
- with:
54
- ruby-version: ${{ matrix.ruby }}
55
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
56
- - name: Run tests
57
- run: bundle exec rake
58
- - name: Publish code coverage
59
- if: ${{ success() }}
60
- uses: paambaati/codeclimate-action@v2.7.5
61
- env:
62
- CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
76
+ - name: Checkout
77
+ uses: actions/checkout@v2
78
+ - name: Setup Ruby
79
+ uses: ruby/setup-ruby@v1
80
+ with:
81
+ ruby-version: ${{ matrix.ruby }}
82
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
83
+ - name: Run tests
84
+ run: bundle exec rake
85
+ - name: Publish code coverage
86
+ if: ${{ success() }}
87
+ uses: paambaati/codeclimate-action@v2.7.5
88
+ env:
89
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## Change Log
2
2
 
3
+ ### [v0.0.7](https://github.com/khiav223577/rails_compatibility/compare/v0.0.6...v0.0.7) 2021/06/10
4
+ - [#12](https://github.com/khiav223577/rails_compatibility/pull/12) Implement #apply_join_dependency (@khiav223577)
5
+
3
6
  ### [v0.0.6](https://github.com/khiav223577/rails_compatibility/compare/v0.0.5...v0.0.6) 2021/06/10
4
7
  - [#11](https://github.com/khiav223577/rails_compatibility/pull/11) Implement #has_include? (@khiav223577)
5
8
 
data/README.md CHANGED
@@ -7,8 +7,8 @@
7
7
  [![Test Coverage](https://codeclimate.com/github/khiav223577/rails_compatibility/badges/coverage.svg)](https://codeclimate.com/github/khiav223577/rails_compatibility/coverage)
8
8
 
9
9
  ## Supports
10
- - Ruby 2.2 ~ 2.7
11
- - Rails 3.2, 4.2, 5.0, 5.1, 5.2, 6.0
10
+ - Ruby 2.2 ~ 2.7, 3.0 ~ 3.1
11
+ - Rails 3.2, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1, 7.0
12
12
 
13
13
  ## Installation
14
14
 
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'zeitwerk'
4
+ gem 'activerecord', '~> 7.0.0'
5
+ gem 'pluck_all', '~> 2.2.1'
6
+
7
+ group :test do
8
+ gem 'simplecov', '< 0.18'
9
+ gem 'sqlite3', '~> 1.4.1'
10
+ end
11
+
12
+ gemspec path: '../'
@@ -4,6 +4,7 @@ require 'rails_compatibility'
4
4
  require 'active_record'
5
5
 
6
6
  class << RailsCompatibility
7
+ GTE_RAILS_7_0 = Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new('7.0.0')
7
8
  GTE_RAILS_6_1 = Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new('6.1.0')
8
9
  GTE_RAILS_6_0 = Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new('6.0.0')
9
10
  GTE_RAILS_5_2 = Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new('5.2.0')
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails_compatibility'
4
+
5
+ class << RailsCompatibility
6
+ if ActiveSupport::VERSION::MAJOR >= 7
7
+ def setup_autoload_paths(paths)
8
+ require 'zeitwerk'
9
+ loader = Zeitwerk::Loader.new
10
+
11
+ paths.each do |path|
12
+ ActiveSupport::Dependencies.autoload_paths << path
13
+ loader.push_dir(path)
14
+ end
15
+
16
+ loader.setup
17
+ end
18
+ else
19
+ def setup_autoload_paths(paths)
20
+ paths.each do |path|
21
+ ActiveSupport::Dependencies.autoload_paths << path
22
+ end
23
+ end
24
+ end
25
+ end
@@ -1,3 +1,3 @@
1
1
  module RailsCompatibility
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_compatibility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - khiav reoy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-10 00:00:00.000000000 Z
11
+ date: 2022-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -126,6 +126,7 @@ files:
126
126
  - gemfiles/5.2.gemfile
127
127
  - gemfiles/6.0.gemfile
128
128
  - gemfiles/6.1.gemfile
129
+ - gemfiles/7.0.gemfile
129
130
  - lib/rails_compatibility.rb
130
131
  - lib/rails_compatibility/active_record.rb
131
132
  - lib/rails_compatibility/apply_join_dependency.rb
@@ -134,6 +135,7 @@ files:
134
135
  - lib/rails_compatibility/construct_join_dependency.rb
135
136
  - lib/rails_compatibility/has_include.rb
136
137
  - lib/rails_compatibility/pick.rb
138
+ - lib/rails_compatibility/setup_autoload_paths.rb
137
139
  - lib/rails_compatibility/unscope_where.rb
138
140
  - lib/rails_compatibility/version.rb
139
141
  - rails_compatibility.gemspec