origin 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/lib/origin/optional.rb +17 -0
- data/lib/origin/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bc672a2ce1d16327ed5f44392c0741adc4bdb43
|
4
|
+
data.tar.gz: 8337f86b5dcbd0df24ec81e3fbc97d23777c7999
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b02c78f5b3547c216fa015582f10bdc519a1f1f6348b7cda15743471a2e4a94999c091d976fea35ee5b9114530480eb1edf8697845c0d6b1e294b757eb679236
|
7
|
+
data.tar.gz: c71a92c08b33f7d997908e0a267527ee0b928fdd9cd319835d8d04ec5a0b233d9315e3a73aa8943151a067b5f48024d5dcb4ce45334594ddda413ba261354618
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
# Overview
|
2
2
|
|
3
|
-
## 2.
|
3
|
+
## 2.1.0
|
4
|
+
|
5
|
+
### New Features
|
6
|
+
|
7
|
+
* Aliased `order` to `order_by` for compatibility with AR query methods.
|
8
|
+
|
9
|
+
* Added `reorder` to queryables to have a way to completely overwrite existing
|
10
|
+
ordering instead of always having to merge. This takes the same syntax
|
11
|
+
as `order`.
|
12
|
+
|
13
|
+
## 2.0.0
|
4
14
|
|
5
15
|
### Major Changes (Backwards Incompatible)
|
6
16
|
|
data/lib/origin/optional.rb
CHANGED
@@ -177,6 +177,23 @@ module Origin
|
|
177
177
|
end
|
178
178
|
end
|
179
179
|
end
|
180
|
+
alias :order :order_by
|
181
|
+
|
182
|
+
# Instead of merging the order criteria, use this method to completely
|
183
|
+
# replace the existing ordering with the provided.
|
184
|
+
#
|
185
|
+
# @example Replace the ordering.
|
186
|
+
# optional.reorder(name: :asc)
|
187
|
+
#
|
188
|
+
# @param [ Array, Hash, String ] spec The sorting specification.
|
189
|
+
#
|
190
|
+
# @return [ Optional ] The cloned optional.
|
191
|
+
#
|
192
|
+
# @since 2.1.0
|
193
|
+
def reorder(*spec)
|
194
|
+
options.delete(:sort)
|
195
|
+
order_by(*spec)
|
196
|
+
end
|
180
197
|
|
181
198
|
# Add the number of documents to skip.
|
182
199
|
#
|
data/lib/origin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Durran Jordan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Origin is a simple DSL for generating MongoDB selectors and options
|
14
14
|
email:
|
@@ -17,7 +17,13 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- CHANGELOG.md
|
21
|
+
- LICENSE
|
22
|
+
- README.md
|
23
|
+
- Rakefile
|
24
|
+
- lib/origin.rb
|
20
25
|
- lib/origin/aggregable.rb
|
26
|
+
- lib/origin/extensions.rb
|
21
27
|
- lib/origin/extensions/array.rb
|
22
28
|
- lib/origin/extensions/big_decimal.rb
|
23
29
|
- lib/origin/extensions/boolean.rb
|
@@ -34,7 +40,6 @@ files:
|
|
34
40
|
- lib/origin/extensions/symbol.rb
|
35
41
|
- lib/origin/extensions/time.rb
|
36
42
|
- lib/origin/extensions/time_with_zone.rb
|
37
|
-
- lib/origin/extensions.rb
|
38
43
|
- lib/origin/forwardable.rb
|
39
44
|
- lib/origin/key.rb
|
40
45
|
- lib/origin/macroable.rb
|
@@ -47,11 +52,6 @@ files:
|
|
47
52
|
- lib/origin/selector.rb
|
48
53
|
- lib/origin/smash.rb
|
49
54
|
- lib/origin/version.rb
|
50
|
-
- lib/origin.rb
|
51
|
-
- CHANGELOG.md
|
52
|
-
- LICENSE
|
53
|
-
- README.md
|
54
|
-
- Rakefile
|
55
55
|
homepage: http://mongoid.org
|
56
56
|
licenses: []
|
57
57
|
metadata: {}
|
@@ -61,17 +61,17 @@ require_paths:
|
|
61
61
|
- lib
|
62
62
|
required_ruby_version: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
|
-
- -
|
64
|
+
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- -
|
69
|
+
- - ">="
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: 1.3.6
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project: origin
|
74
|
-
rubygems_version: 2.
|
74
|
+
rubygems_version: 2.2.0
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: Simple DSL for MongoDB query generation
|