rails_select_on_includes 5.1.5.1 → 5.2.0.1

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
  SHA1:
3
- metadata.gz: 4ec07844e06d10d2c75e591cb9ce4a3de3af6739
4
- data.tar.gz: 4fbf0fa3eb78a0927958af64236d06cbd171bcbb
3
+ metadata.gz: 111837fa99c6412e8cf7f35950a5fff9ef18e98c
4
+ data.tar.gz: 76747c77067ab62b90f47f8cf339b9262fffa990
5
5
  SHA512:
6
- metadata.gz: 2f78d348a76a17b026062ace97a6248fd28c69134f4383b2b24d7ddfd793db8faf5b6cc85baca9e36c2ff1827486329088883086185025cd949b94d2f45abb39
7
- data.tar.gz: fe46be5453ed9db5e7b99b4e91c2f748d63af500940e04c4db399af0c1d4b54cd9e47794ca7c14599e8a1a92f57bbdba7cae6c1257343feba7ab769f4f89cb33
6
+ metadata.gz: e91e4d41a8448016921633b48d1047fcb65a26d0dbbe60883b5e7a78695738fd8ceb3be1bbe95eb8d6c969b422b6ea8bfe51bb6e2cfa01c37445079bd5ab74a2
7
+ data.tar.gz: ff63efb783be02f43a5c5da592a3747e3d2c5291f17be4709193b033fb8befb8fad223c85a59b50e289e58db3db7b583f3a375b6184f075c2bcb9450197b71ab
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in rails_select_on_includes.gemspec
4
- gemspec
4
+ gemspec
data/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
  Selected virtual attributes will be now typecasted as usual attributes
3
3
 
4
4
  #Rails version
5
- Supports rails 4.x and rails 5-5.1.4, and 5.1.5 now!
5
+ Supports rails 4.x and rails 5-5.1.4, 5.1.5, and 5.2.0.rc1 now!
6
6
 
7
- Master is now runs on rails 5.1.5,
7
+ Master is now runs on rails 5.2,
8
8
  rails_5.1.4 branch is for rails less than 5.1.5,
9
9
  rails_4 branch is for rails 4 support
10
10
 
@@ -74,8 +74,15 @@ Add this line to your application's Gemfile:
74
74
  #rails 4
75
75
  gem 'rails_select_on_includes', '~> 0.4.11'
76
76
 
77
- #rails 5
78
- gem 'rails_select_on_includes', '~> 0.5.7'
77
+ #rails 5.1.4
78
+ gem 'rails_select_on_includes', '~> 5.1.4.0'
79
+
80
+ #rails 5.1.5
81
+ gem 'rails_select_on_includes', '~> 5.1.5.0'
82
+
83
+
84
+ #rails 5.2
85
+ gem 'rails_select_on_includes', '~> 5.2.0.1'
79
86
  ```
80
87
 
81
88
  And then execute:
@@ -112,14 +112,15 @@ end
112
112
  ::ActiveRecord::Relation.class_eval do
113
113
  private
114
114
 
115
- def exec_queries(&block)
115
+ def exec_queries(&block)
116
+ skip_query_cache_if_necessary do
116
117
  @records =
117
118
  if eager_loading?
118
- find_with_associations do |relation, join_dependency|
119
+ apply_join_dependency do |relation, join_dependency|
119
120
  if ActiveRecord::NullRelation === relation
120
121
  []
121
122
  else
122
- rows = connection.select_all(relation.arel, "SQL", relation.bound_attributes)
123
+ rows = connection.select_all(relation.arel, "SQL")
123
124
  #1 DISTINCTION IS HERE:
124
125
  # now we gently mokey-patching existing column aliases with select values
125
126
  join_dependency.aliases.update_aliases_to_select_values(values[:select]) unless values[:select].blank?
@@ -128,7 +129,7 @@ end
128
129
  end.freeze
129
130
  end
130
131
  else
131
- klass.find_by_sql(arel, bound_attributes, &block).freeze
132
+ klass.find_by_sql(arel, &block).freeze
132
133
  end
133
134
 
134
135
  preload = preload_values
@@ -144,5 +145,7 @@ end
144
145
  @loaded = true
145
146
  @records
146
147
  end
148
+ end
149
+
147
150
 
148
151
  end
@@ -1,3 +1,3 @@
1
1
  module RailsSelectOnIncludes
2
- VERSION = "5.1.5.1"
2
+ VERSION = "5.2.0.1"
3
3
  end
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_dependency "activerecord", ">=5.1.5", '<5.2'
33
+ spec.add_dependency "activerecord", ">=5.2.0.rc1"
34
34
 
35
35
  spec.add_development_dependency "rails", ">=5"
36
36
  spec.add_development_dependency "bundler", "~> 1.13"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_select_on_includes
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.5.1
4
+ version: 5.2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - alekseyl
@@ -16,20 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.1.5
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '5.2'
19
+ version: 5.2.0.rc1
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: 5.1.5
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '5.2'
26
+ version: 5.2.0.rc1
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: rails
35
29
  requirement: !ruby/object:Gem::Requirement