baby_squeel 1.2.1 → 1.3.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
- SHA1:
3
- metadata.gz: f491f71692c6a13ed97203fd5cf7c9b08afeac2b
4
- data.tar.gz: 5da604986d6d6478b703414f9b78307871ca8adf
2
+ SHA256:
3
+ metadata.gz: af276fe0363304d4906df4766ea988557406c2328d3ebc09e3e6c6ff020970bc
4
+ data.tar.gz: a2657f186940a7306b8d891883a7e0f182bcf5d8af54239fc8de4bf678d34ab1
5
5
  SHA512:
6
- metadata.gz: 60f3bfa7c9de2b6fdcc470a65f23e945d340d538f1dd54f19237f8844a1c5b348d8cf713d74f36e7a333dc9e836fd44ae3b234acfc57173bb1556844963065f8
7
- data.tar.gz: 5739d55d7eaf421f1091ab580cff50e263a73543ade85b4a43bab64a79342269111c988d8144daff5bb7eac72d511e38194256a124998352d2add127c19ed789
6
+ metadata.gz: be1242d3245214970d7c295014e0caf931ccf93193ff0a37b868557334a2382df346385f36c4a06c8079f1b358a695ba557eb8d55f68a925491fc8524008e831
7
+ data.tar.gz: 5812711b6fd09a716e1b8d5959a2c15103611807d61cbe92c52ff36fb08785bc6226943847c6e921369fc78fda0479768a0eae306d278268e54433dac6144d19
@@ -2,6 +2,10 @@
2
2
 
3
3
  Nothing to see here.
4
4
 
5
+ ## [1.3.0] - 2018-05-04
6
+ ## Added
7
+ - The ability to use `plucking` with an array of nodes. For example, `User.plucking { [id, name] }`.
8
+
5
9
  ## [1.2.1] - 2018-04-25
6
10
  ## Fixed
7
11
  - Added support for Active Record 5.2
@@ -131,7 +135,8 @@ Nothing to see here.
131
135
  ### Added
132
136
  - Initial support for selects, orders, wheres, and joins.
133
137
 
134
- [Unreleased]: https://github.com/rzane/baby_squeel/compare/v1.2.1...HEAD
138
+ [Unreleased]: https://github.com/rzane/baby_squeel/compare/v1.3.0...HEAD
139
+ [1.3.0]: https://github.com/rzane/baby_squeel/compare/v1.2.1...v1.3.0
135
140
  [1.2.1]: https://github.com/rzane/baby_squeel/compare/v1.2.0...v1.2.1
136
141
  [1.2.0]: https://github.com/rzane/baby_squeel/compare/v1.1.5...v1.2.0
137
142
  [1.1.5]: https://github.com/rzane/baby_squeel/compare/v1.1.4...v1.1.5
@@ -5,7 +5,9 @@ module BabySqueel
5
5
  module ActiveRecord
6
6
  module Calculations
7
7
  def plucking(&block)
8
- pluck Pluck.wrap(DSL.evaluate(self, &block))
8
+ nodes = Array.wrap(DSL.evaluate(self, &block))
9
+ nodes = nodes.map { |node| Pluck.decorate(node) }
10
+ pluck(*nodes)
9
11
  end
10
12
 
11
13
  def counting(&block)
@@ -9,9 +9,9 @@ module BabySqueel
9
9
  # bother to use this there.
10
10
 
11
11
  if ::ActiveRecord::VERSION::MAJOR >= 5
12
- def self.wrap(node); node; end
12
+ def self.decorate(node); node; end
13
13
  else
14
- def self.wrap(node); new(node); end
14
+ def self.decorate(node); new(node); end
15
15
  end
16
16
 
17
17
  def initialize(node)
@@ -1,3 +1,3 @@
1
1
  module BabySqueel
2
- VERSION = '1.2.1'.freeze
2
+ VERSION = '1.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baby_squeel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ray Zane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-25 00:00:00.000000000 Z
11
+ date: 2018-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  requirements: []
167
167
  rubyforge_project:
168
- rubygems_version: 2.6.10
168
+ rubygems_version: 2.7.6
169
169
  signing_key:
170
170
  specification_version: 4
171
171
  summary: An expressive query DSL for Active Record 4 and 5.