redtastic 0.3.3 → 0.3.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 861a12fa35fa9f12ce98f02a903f5009e1774ce0
4
- data.tar.gz: b3182c21c83d2dd90c76981c712f219a79f7e2af
3
+ metadata.gz: 760a4755853fbe582ee3ed320662ae66d9321988
4
+ data.tar.gz: 119370f58d4aa68ba8c0baecf7d78a5c135ae76a
5
5
  SHA512:
6
- metadata.gz: 18b1c126af13fbb63102eb4915292183109e0a6964fd08191189cbe46bef69c034832fd95de0a65c0b0be7e2fe16107f3fdee71a6871a14691560eff94a8fb2d
7
- data.tar.gz: a20adec1b09e6b2bb3d84bf6041688960fa5bbef05c02b47d7537cbc3c9aa8dc74b9ec8a9a10ee23caa183b799e0dd0f71cfbd9d6bdd3f94368512bf8ebb6094
6
+ metadata.gz: a80be7139570cb50051e678a8f23244676267b3b010e0113cdb7cbe8ba8a7930300e8916f8804b9bef4726b928d14eb4b9d4fda7f742ca04305f275bcc505d2b
7
+ data.tar.gz: 87f7e433c24c1ef6e37558fa0bfefe4a9d99bf9b521ea06eb7e3cf46181707319602d11e504b731793b36db976653a43237142c9e2d39b7be5024af06c97d7a0
data/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
1
  master
2
2
  ======
3
3
  * Added a CHANGELOG
4
+
5
+ 0.3.4
6
+ =====
7
+ * [Fix for multiple ids](https://github.com/bellycard/redtastic/pull/39)
8
+
9
+ 0.3.3
10
+ =====
4
11
  * [Fix for dates on weekly metrics](https://github.com/bellycard/redtastic/pull/37)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redtastic (0.3.3)
4
+ redtastic (0.3.4)
5
5
  activesupport
6
6
  redis
7
7
 
@@ -52,9 +52,10 @@ module Redtastic
52
52
  # Handle multiple ids
53
53
  ids = param_to_array(params[:id])
54
54
 
55
+ temp_params = params.dup
55
56
  ids.each do |id|
56
- params[:id] = id
57
- keys << key(params)
57
+ temp_params[:id] = id
58
+ keys << key(temp_params)
58
59
  argv << index(id)
59
60
  end
60
61
 
@@ -165,16 +166,17 @@ module Redtastic
165
166
  # Handle multiple keys
166
167
  ids = param_to_array(params[:id])
167
168
 
169
+ temp_params = params.dup
168
170
  ids.each do |id|
169
- params[:id] = id
171
+ temp_params[:id] = id
170
172
  if params[:timestamp].present?
171
173
  # This is for an update, so we want to build a key for each resolution that is applicable to the model
172
174
  scoped_resolutions.each do |resolution|
173
- keys << key(params, resolution)
175
+ keys << key(temp_params, resolution)
174
176
  argv << index(id)
175
177
  end
176
178
  else
177
- keys << key(params)
179
+ keys << key(temp_params)
178
180
  argv << index(id)
179
181
  end
180
182
  end
@@ -197,13 +199,14 @@ module Redtastic
197
199
  interval = @_resolution
198
200
  end
199
201
 
202
+ temp_params = params.dup
200
203
  current_date = start_date
201
204
  while current_date <= end_date
202
- params[:timestamp] = current_date
205
+ temp_params[:timestamp] = current_date
203
206
  dates << formatted_timestamp(current_date, interval)
204
207
  ids.each do |id|
205
- params[:id] = id
206
- keys << key(params, interval)
208
+ temp_params[:id] = id
209
+ keys << key(temp_params, interval)
207
210
  argv << index(id)
208
211
  end
209
212
  current_date = current_date.advance(interval => +1)
@@ -1,3 +1,3 @@
1
1
  module Redtastic
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redtastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe DiVita