rails_compatibility 0.0.6 → 0.0.7

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: 1f0a8bf0a252bd80fd89c2c9e74271704669413cf8f84ff57c8d7499057adcc4
4
- data.tar.gz: cebe77b327bb26d893fb1397ac2c1b3ebf93ad387ae3a3d1befea255ab3cdf93
3
+ metadata.gz: ae768066a68750297b2c1a459adbf672138188b49e514cc201a4cc179918ed8e
4
+ data.tar.gz: b1e1716ee996279e97ad89edc5c38252754d046d2e99ca0de2edea42df0d79a2
5
5
  SHA512:
6
- metadata.gz: c7ef487f53d011bc4fac483b592d26c64c6e110107bca035488885004f7e800de0c46b6af4fcad0fd01527823b11f154513eb9a56f8852cbdc418b9527ceeedd
7
- data.tar.gz: 646e2089e7c6351fdcd54800a55cea5be2cd051aafbcfbed17e55e8affc5e52353abf1c2b4ddf76a3f7668b296e59bda9cb843a55f35f167bcced2a062476f99
6
+ metadata.gz: d31f07bec2771a538dde11784e9c2eb01effeff85345611fb8254ebfb2e86302b345ee35b0ff6f1d722d5bd7acc0a84502941fefafb847a9225af5d3461c7be4
7
+ data.tar.gz: 71ff54c2535676494177875cafd9abf9e8fd9d2261ed29cb38e58c74d59831e88c183e9f26b60a032b219f4d752e301b825cd480f54a4fb6287370190c08621c
data/CHANGELOG.md CHANGED
@@ -1,21 +1,24 @@
1
- ## Change Log
2
-
3
- ### [v0.0.5](https://github.com/khiav223577/rails_compatibility/compare/v0.0.4...v0.0.5) 2021/05/05
4
- - [#10](https://github.com/khiav223577/rails_compatibility/pull/10) Implement #pick (@khiav223577)
5
- - [#9](https://github.com/khiav223577/rails_compatibility/pull/9) refactor: use GTE_RAILS_4_0 (@khiav223577)
6
-
7
- ### [v0.0.4](https://github.com/khiav223577/rails_compatibility/compare/v0.0.3...v0.0.4) 2021/04/10
8
- - [#8](https://github.com/khiav223577/rails_compatibility/pull/8) Fix: join dependency construct wrongly when HABTM associations have custom name (@khiav223577)
9
-
10
- ### [v0.0.3](https://github.com/khiav223577/rails_compatibility/compare/v0.0.2...v0.0.3) 2021/02/09
11
- - [#7](https://github.com/khiav223577/rails_compatibility/pull/7) Implement #build_joins (@khiav223577)
12
- - [#6](https://github.com/khiav223577/rails_compatibility/pull/6) Support Rails 6.1 (@khiav223577)
13
- - [#5](https://github.com/khiav223577/rails_compatibility/pull/5) Migrating from Travis CI to GitHub Actions (@khiav223577)
14
- - [#4](https://github.com/khiav223577/rails_compatibility/pull/4) Fix: test files should not be included in coverage (@khiav223577)
15
- - [#3](https://github.com/khiav223577/rails_compatibility/pull/3) Support Ruby 2.7 (@khiav223577)
16
-
17
- ### [v0.0.2](https://github.com/khiav223577/rails_compatibility/compare/v0.0.1...v0.0.2) 2019/12/18
18
- - [#2](https://github.com/khiav223577/rails_compatibility/pull/2) Implement `attribute_types` (@khiav223577)
19
-
20
- ### v0.0.1 2019/12/17
21
- - [#1](https://github.com/khiav223577/rails_compatibility/pull/1) Implement `unscope_where` (@khiav223577)
1
+ ## Change Log
2
+
3
+ ### [v0.0.6](https://github.com/khiav223577/rails_compatibility/compare/v0.0.5...v0.0.6) 2021/06/10
4
+ - [#11](https://github.com/khiav223577/rails_compatibility/pull/11) Implement #has_include? (@khiav223577)
5
+
6
+ ### [v0.0.5](https://github.com/khiav223577/rails_compatibility/compare/v0.0.4...v0.0.5) 2021/05/05
7
+ - [#10](https://github.com/khiav223577/rails_compatibility/pull/10) Implement #pick (@khiav223577)
8
+ - [#9](https://github.com/khiav223577/rails_compatibility/pull/9) refactor: use GTE_RAILS_4_0 (@khiav223577)
9
+
10
+ ### [v0.0.4](https://github.com/khiav223577/rails_compatibility/compare/v0.0.3...v0.0.4) 2021/04/10
11
+ - [#8](https://github.com/khiav223577/rails_compatibility/pull/8) Fix: join dependency construct wrongly when HABTM associations have custom name (@khiav223577)
12
+
13
+ ### [v0.0.3](https://github.com/khiav223577/rails_compatibility/compare/v0.0.2...v0.0.3) 2021/02/09
14
+ - [#7](https://github.com/khiav223577/rails_compatibility/pull/7) Implement #build_joins (@khiav223577)
15
+ - [#6](https://github.com/khiav223577/rails_compatibility/pull/6) Support Rails 6.1 (@khiav223577)
16
+ - [#5](https://github.com/khiav223577/rails_compatibility/pull/5) Migrating from Travis CI to GitHub Actions (@khiav223577)
17
+ - [#4](https://github.com/khiav223577/rails_compatibility/pull/4) Fix: test files should not be included in coverage (@khiav223577)
18
+ - [#3](https://github.com/khiav223577/rails_compatibility/pull/3) Support Ruby 2.7 (@khiav223577)
19
+
20
+ ### [v0.0.2](https://github.com/khiav223577/rails_compatibility/compare/v0.0.1...v0.0.2) 2019/12/18
21
+ - [#2](https://github.com/khiav223577/rails_compatibility/pull/2) Implement `attribute_types` (@khiav223577)
22
+
23
+ ### v0.0.1 2019/12/17
24
+ - [#1](https://github.com/khiav223577/rails_compatibility/pull/1) Implement `unscope_where` (@khiav223577)
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails_compatibility'
4
+ require 'rails_compatibility/active_record'
5
+
6
+ class << RailsCompatibility
7
+ if GTE_RAILS_5_2
8
+ def apply_join_dependency(relation)
9
+ relation.send(:apply_join_dependency)
10
+ end
11
+ elsif GTE_RAILS_5_1
12
+ def apply_join_dependency(relation)
13
+ relation.send(:construct_relation_for_association_calculations)
14
+ end
15
+ elsif GTE_RAILS_5_0
16
+ def apply_join_dependency(relation)
17
+ relation.dup.send(:construct_relation_for_association_calculations)
18
+ end
19
+ else
20
+ def apply_join_dependency(relation)
21
+ relation.send(:construct_relation_for_association_calculations)
22
+ end
23
+ end
24
+ end
@@ -1,3 +1,3 @@
1
1
  module RailsCompatibility
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_compatibility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - khiav reoy
@@ -128,6 +128,7 @@ files:
128
128
  - gemfiles/6.1.gemfile
129
129
  - lib/rails_compatibility.rb
130
130
  - lib/rails_compatibility/active_record.rb
131
+ - lib/rails_compatibility/apply_join_dependency.rb
131
132
  - lib/rails_compatibility/attribute_types.rb
132
133
  - lib/rails_compatibility/build_joins.rb
133
134
  - lib/rails_compatibility/construct_join_dependency.rb