rails_compatibility 0.0.6 → 0.0.7
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 +4 -4
- data/CHANGELOG.md +24 -21
- data/lib/rails_compatibility/apply_join_dependency.rb +24 -0
- data/lib/rails_compatibility/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae768066a68750297b2c1a459adbf672138188b49e514cc201a4cc179918ed8e
|
4
|
+
data.tar.gz: b1e1716ee996279e97ad89edc5c38252754d046d2e99ca0de2edea42df0d79a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d31f07bec2771a538dde11784e9c2eb01effeff85345611fb8254ebfb2e86302b345ee35b0ff6f1d722d5bd7acc0a84502941fefafb847a9225af5d3461c7be4
|
7
|
+
data.tar.gz: 71ff54c2535676494177875cafd9abf9e8fd9d2261ed29cb38e58c74d59831e88c183e9f26b60a032b219f4d752e301b825cd480f54a4fb6287370190c08621c
|
data/CHANGELOG.md
CHANGED
@@ -1,21 +1,24 @@
|
|
1
|
-
## Change Log
|
2
|
-
|
3
|
-
### [v0.0.
|
4
|
-
- [#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
- [#
|
9
|
-
|
10
|
-
### [v0.0.
|
11
|
-
- [#
|
12
|
-
|
13
|
-
|
14
|
-
- [#
|
15
|
-
- [#
|
16
|
-
|
17
|
-
|
18
|
-
- [#
|
19
|
-
|
20
|
-
### v0.0.1 2019/12/
|
21
|
-
- [#
|
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
|
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.
|
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
|