baby_squeel 1.2.1 → 1.3.0
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 +5 -5
- data/CHANGELOG.md +6 -1
- data/lib/baby_squeel/active_record/calculations.rb +3 -1
- data/lib/baby_squeel/pluck.rb +2 -2
- data/lib/baby_squeel/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: af276fe0363304d4906df4766ea988557406c2328d3ebc09e3e6c6ff020970bc
|
4
|
+
data.tar.gz: a2657f186940a7306b8d891883a7e0f182bcf5d8af54239fc8de4bf678d34ab1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be1242d3245214970d7c295014e0caf931ccf93193ff0a37b868557334a2382df346385f36c4a06c8079f1b358a695ba557eb8d55f68a925491fc8524008e831
|
7
|
+
data.tar.gz: 5812711b6fd09a716e1b8d5959a2c15103611807d61cbe92c52ff36fb08785bc6226943847c6e921369fc78fda0479768a0eae306d278268e54433dac6144d19
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
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
|
-
|
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)
|
data/lib/baby_squeel/pluck.rb
CHANGED
@@ -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.
|
12
|
+
def self.decorate(node); node; end
|
13
13
|
else
|
14
|
-
def self.
|
14
|
+
def self.decorate(node); new(node); end
|
15
15
|
end
|
16
16
|
|
17
17
|
def initialize(node)
|
data/lib/baby_squeel/version.rb
CHANGED
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.
|
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
|
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
|
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.
|