v2_intuity 1.0.7 → 1.0.8

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: 6aea9d3edd90bc078679cf8224949923f3d20fbc
4
- data.tar.gz: da5b9a378c6f718d762abc76509b9cd27843768f
3
+ metadata.gz: cbd7b3f7ead4b9c20e0c0de775ed2ef9fb5d75f2
4
+ data.tar.gz: 51a331236ca49fee463b61398c70760e2a726804
5
5
  SHA512:
6
- metadata.gz: 69ef81331bad735bbd59197280f6151c3bfcec656fbfe0d9704ed275978ea26e6df4f575c23c0f4c8590160358e3973fe435e2e56c2607e050306f768498c534
7
- data.tar.gz: 2d5e9b71ac2edc953f2fe2a7e6d6ef65464b0953240258a3ee3173d4bc141e4e241367e37890ea5ee88b676395393c9a51f757ba0a273383f7901c3b9ec29f13
6
+ metadata.gz: ead98f583b1fe8eb62ffd2ede164ca3b26d150cc73f38f4fcaa3f0a9a1b7271fd24f0096c45f647571f072cd3831b9ed4914e9aa8fee4072eb577905bf810d49
7
+ data.tar.gz: f72ce42889ccab39976e3c6c210287180835a4504e5ce60748353d0069b9cacba9c5b17fe2a5e8973d1551560e6c050d48129ef342c29bce82eafd8eac14c6ea
@@ -35,13 +35,13 @@ module V2Intuity
35
35
  when V2Intuity::Request::METHODS[:post]
36
36
  raise 'name is required' unless name
37
37
  body = { name: name, start_date: start_date,
38
- resource_filters: resource_filters }.compact # supported resource_query_filters include measurement, nutrition, sleep, workout
39
- options = { method: method, body: body.compact }
38
+ resource_filters: resource_filters }.delete_if {|k,v| v.nil?} # supported resource_query_filters include measurement, nutrition, sleep, workout
39
+ options = { method: method, body: body.delete_if {|k,v| v.nil?} }
40
40
 
41
41
  when V2Intuity::Request::METHODS[:put]
42
42
  raise 'stream id is needed' unless stream_id
43
43
  body = { name: name }
44
- options = { method: method, body: body.compact, id: stream_id }
44
+ options = { method: method, body: body.delete_if {|k,v| v.nil?}, id: stream_id }
45
45
 
46
46
  else
47
47
  raise 'incorrect method verb'
@@ -49,7 +49,7 @@ module V2Intuity
49
49
 
50
50
  options[:query_filters] = query_filters unless query_filters.empty?
51
51
 
52
- [V2Intuity::Endpoints::Stream.new, options.compact]
52
+ [V2Intuity::Endpoints::Stream.new, options.delete_if {|k,v| v.nil?} ]
53
53
  end
54
54
 
55
55
  def format_resource_filters(filters)
@@ -1,3 +1,3 @@
1
1
  module V2Intuity
2
- VERSION = '1.0.7'.freeze
2
+ VERSION = '1.0.8'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: v2_intuity
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - rruiz858