embark-journey 0.1.4 → 0.1.5

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: bc0830971d20c67bd883e8c093a71f62e969aafc
4
- data.tar.gz: 89858c74cf931301740860f1908f0b873fd58fc1
3
+ metadata.gz: 18c9b267ba2cffc78635ed6da60a9fc0cdd541f7
4
+ data.tar.gz: 2ee2f6281fa95ab36e8cb447b8772cd5ac4fe137
5
5
  SHA512:
6
- metadata.gz: 0ef62b307f2b1e366c47c91e6a534001d6c11c337cb7599324a7c378047cf1d3750bf65677517534f5f4066156ecfc74a43f510967260f40ad67954fbae434da
7
- data.tar.gz: 4c3cad71bc5ca0c85fe11eb7a5f1c992b0855334f8326d3a30ff1b32a3f29b26db17360736981488be62397d735f4f2b7326344aaab89106fc075d43ac16ac1a
6
+ metadata.gz: 45cead5f6647b4a247627480fc3d57f4e2d3b71cb338a2c54ac2312215cb3ba933900f58ad123b9764f45da84e7c38048da416f91ff9d5573a6848773efdc997
7
+ data.tar.gz: db86af47a90b175ea80e6e36b73c65736bc32498ae3041210a8235eb6aa3cfa8b850329b7ae3874fbf9883923f8caa537e76c6474a44d64ec6a2c81009cda695
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ v0.1.5
2
+ - Fixed a bug where in `where_multiple` and `count_multiple` that performed destructive options on the argument hash (methods now use `dup`)
3
+
1
4
  v0.1.4
2
5
  - Fixed a bug where `batch_where` wasnt using `count_multiple` (therefore breaking for nested queries)
3
6
 
@@ -6,7 +6,6 @@ module Journey::Resource::BatchWhere
6
6
  included do
7
7
 
8
8
  def self.batch_where(clauses, batch_size=100)
9
-
10
9
  total_count = count_multiple(clauses)
11
10
  query_count = (total_count / batch_size.to_f).ceil.to_i
12
11
 
@@ -4,7 +4,8 @@ module Journey::Resource::WhereMultiple
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  included do
7
- def self.where_multiple(clauses)
7
+ def self.where_multiple(c)
8
+ clauses = c.dup
8
9
 
9
10
  query = clauses.delete(:query)
10
11
  query_keys_with_array_values = query.map do |key, value|
@@ -25,8 +26,9 @@ module Journey::Resource::WhereMultiple
25
26
  end
26
27
  end
27
28
 
28
- def self.count_multiple(clauses)
29
+ def self.count_multiple(c)
29
30
  # TODO refactor me to re-use all the same recursive query logic in `where_multiple`
31
+ clauses = c.dup
30
32
 
31
33
  query = clauses.delete(:query)
32
34
  query_keys_with_array_values = query.map do |key, value|
@@ -2,7 +2,7 @@ module Journey
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 4
5
+ TINY = 5
6
6
  PRE = nil
7
7
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embark-journey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Davey