rails_select_on_includes 5.2.1 → 6.0.0

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: 4d39a2874d64c8681290836b2a7a7ece40572769ab425c451ca4c4a1f854cd15
4
- data.tar.gz: ad32d81616f470249d37d7da77f6af3f52670b050afc075216beb9d586730170
3
+ metadata.gz: e3af4d14781af22c9f021619f3ec07e83d353a96145227a1ab3c6dbc2b956ed1
4
+ data.tar.gz: fe28d9937d55fab0548ae565ddcf773697346866719bbdf5676a35d11d6adba4
5
5
  SHA512:
6
- metadata.gz: df43fcd041449a955903f07a09055a92a346bfc607b45ca521469684636e0fc3d9629297a76b78292f4c27a2bd92d714d0027422d59698f5d3c8ffe658e45e7e
7
- data.tar.gz: 7fdfd73563b6f769af6e8908de76ad71b11c002c26109cc59c0b102b5723dfa71379fb7723d6119779bb1f74c4893ddb01a3de39f8c59fb9029483ada1577381
6
+ metadata.gz: f0a10497309de2e7e3bc49fd84c9f104a115bcc6e960e0a1a28f1b45a502c5dbcc65286e3517c1a9942c5a753eb70da7cea35397e791fbbd07f123ebdec51803
7
+ data.tar.gz: 740bd6b513b7c45a3481f28322ea3527d09d9255cd71e079f333e59461eae8d0416909ab60400302869e707eccb4f7e43b3c94cb14ddce340abcce6135f1c49e
@@ -0,0 +1,6 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.4
5
+ - 2.5.1
6
+ - 2.3.7
@@ -1,3 +1,6 @@
1
+ #6.0.0
2
+ * support for rails 6.0, master now on rails 6.
3
+
1
4
  # 5.2.1
2
5
  * resolve issue #16
3
6
  * add development dependencies on niceql and byebug
data/README.md CHANGED
@@ -71,6 +71,9 @@ post.comments.first.testval # Undefined method!
71
71
  Add this line to your application's Gemfile:
72
72
 
73
73
  ```ruby
74
+ #rails 6
75
+ gem 'rails_select_on_includes', '~> 6.0.0'
76
+
74
77
  #rails 4
75
78
  gem 'rails_select_on_includes', '~> 0.4.11'
76
79
 
@@ -10,13 +10,10 @@ require 'active_support/core_ext/string/filters'
10
10
  i[column.name] = column.alias
11
11
  }
12
12
  }
13
- @name_and_alias_cache = tables.each_with_object({}) { |table,h|
14
- h[table.node] = table.columns.map { |column|
15
- [column.name, column.alias]
16
- }
13
+ @columns_cache = tables.each_with_object({}) { |table, h|
14
+ h[table.node] = table.columns
17
15
  @base_class_node_aliases ||= h[table.node] if table.node.is_a?(ActiveRecord::Associations::JoinDependency::JoinBase)
18
16
  }
19
-
20
17
  @virtual_attributes_names = []
21
18
  end
22
19
  # valid formats are:
@@ -59,7 +56,7 @@ require 'active_support/core_ext/string/filters'
59
56
  end
60
57
 
61
58
  def add_virtual_attribute(selected_column)
62
- @base_class_node_aliases << [selected_column, selected_column]
59
+ @base_class_node_aliases << ActiveRecord::Associations::JoinDependency::Aliases::Column.new(selected_column, selected_column)
63
60
  @virtual_attributes_names << selected_column
64
61
  end
65
62
  end
@@ -102,7 +99,7 @@ end
102
99
 
103
100
  parent = parents[parent_key] ||=
104
101
  join_root.instantiate(row_hash, column_aliases, aliases.slice_selected_attr_types( result_set.column_types ), &block )
105
- construct(parent, join_root, row_hash, result_set, seen, model_cache, aliases)
102
+ construct(parent, join_root, row_hash, seen, model_cache)
106
103
  }
107
104
  end
108
105
 
@@ -1,3 +1,3 @@
1
1
  module RailsSelectOnIncludes
2
- VERSION = "5.2.1"
2
+ VERSION = "6.0.0"
3
3
  end
@@ -30,9 +30,9 @@ 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.2.1"
33
+ spec.add_dependency "activerecord", ">=6"
34
34
 
35
- spec.add_development_dependency "rails", ">=5.2.1"
35
+ spec.add_development_dependency "rails", ">=6"
36
36
  spec.add_development_dependency "bundler", "~> 1.13"
37
37
  spec.add_development_dependency "rake", "~> 10.0"
38
38
  spec.add_development_dependency 'sqlite3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_select_on_includes
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.1
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - alekseyl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-25 00:00:00.000000000 Z
11
+ date: 2019-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.2.1
19
+ version: '6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 5.2.1
26
+ version: '6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 5.2.1
33
+ version: '6'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 5.2.1
40
+ version: '6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -117,6 +117,7 @@ extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
119
  - ".gitignore"
120
+ - ".travis.yml"
120
121
  - CHANGELOG.md
121
122
  - Gemfile
122
123
  - LICENSE.txt
@@ -148,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
149
  version: '0'
149
150
  requirements: []
150
151
  rubyforge_project:
151
- rubygems_version: 2.7.7
152
+ rubygems_version: 2.7.9
152
153
  signing_key:
153
154
  specification_version: 4
154
155
  summary: Patching rails include/select/virtual attributes issue