rails_select_on_includes 0.4.12 → 0.4.13

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
  SHA1:
3
- metadata.gz: 37eb178e85b211db899f8fe04370ba20c23acdec
4
- data.tar.gz: 554f55e820e660f39f6e5ed9c3f265bd4475d54d
3
+ metadata.gz: c852c3d1442a00364c772c952eb8f3d830c06a2e
4
+ data.tar.gz: f82498a6fec69c8edd50051c3c4ada20dad2c2a6
5
5
  SHA512:
6
- metadata.gz: 4be073c1decfabe90d26d6333e0b7e4fb07b20eb57116256e75bd6af74981f2f2244fa4ed113346c0bb1ed7ae1a745b54f7fe71c2353ee393ba660cf7e12bb81
7
- data.tar.gz: 02bb83258ee385cd0e80c82fbe88aa1456212660d232b1f4f7d3f6d9a65df344cd8bc5905990a8835bfe7ca1b45f3af65ac20db425d01c9ac4eaf0fbc715947e
6
+ metadata.gz: c358688dc0abf1e5fedd3936fbd8cdb0d6531738ecc6a38e84a7449e8904d569794c93a2bb0ca3379033dc692bd6bb22b0da79f3257ed44a7b9979f4ddb1f383
7
+ data.tar.gz: 81677479752a34e29db8fbb6beeb5c80b6e63f8d6f5996711c4f2820c5ec95c829ee0700a95e8f6bf6b07012849487e62776996b94d07fcf2cbd36218f6b8898
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.4.13
2
+ * resolve issue #15
3
+
1
4
  # 0.4.12
2
5
 
3
6
  * Arel::Nodes::TableAlias added
@@ -30,8 +30,8 @@ require 'active_support/core_ext/string/filters'
30
30
  # if sv is symbol that we assume that its a base table column and it will be aliased and added as usual
31
31
  # all we need is some specials joins+select from related tables
32
32
  case sv
33
- when String
34
- sv.split( ", " ).each do |sub_sv|
33
+ when String
34
+ sv.split(/,[\s$]*/).each do |sub_sv|
35
35
  if sub_sv[/.+ as .+/i]
36
36
  add_virtual_attribute(sub_sv.rpartition(/ as /i).last.strip)
37
37
  elsif sub_sv[/.+\.[^\*]+/]
@@ -86,7 +86,7 @@ end
86
86
  message_bus = ActiveSupport::Notifications.instrumenter
87
87
 
88
88
  payload = {
89
- record_count: result_set.length,
89
+ record_count: result_set.respond_to?(:length) ? result_set.length : result_set.rows.length,
90
90
  class_name: join_root.base_klass.name
91
91
  }
92
92
 
@@ -1,3 +1,3 @@
1
1
  module RailsSelectOnIncludes
2
- VERSION = "0.4.12"
2
+ VERSION = "0.4.13"
3
3
  end
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: 0.4.12
4
+ version: 0.4.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - alekseyl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-19 00:00:00.000000000 Z
11
+ date: 2018-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord