simplificator-withings 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,6 +16,9 @@ class Withings::MeasurementGroup
16
16
  TYPE_SYSTOLIC_BLOOD_PRESSURE = 10 # mmHg (max, upper)
17
17
  TYPE_HEART_PULSE = 11 # bpm
18
18
 
19
+ BLOOD_PRESSURE_MONITOR_TYPES = [TYPE_DIASTOLIC_BLOOD_PRESSURE, TYPE_SYSTOLIC_BLOOD_PRESSURE, TYPE_HEART_PULSE]
20
+ SCALE_TYPES = [TYPE_WEIGHT, TYPE_SIZE, TYPE_FAT_FREE_MASS_WEIGHT, TYPE_FAT_RATIO, TYPE_FAT_MASS_WEIGHT]
21
+
19
22
  attr_reader :group_id, :attribution, :created_at, :category
20
23
  attr_reader :weight, :size, :fat, :ratio, :fat_free, :diastolic_blood_pressure, :systolic_blood_pressure, :heart_pulse
21
24
  def initialize(params)
data/lib/withings/user.rb CHANGED
@@ -79,12 +79,12 @@ class Withings::User
79
79
  end
80
80
 
81
81
  # sharing enabled for a device?
82
- def share?(device = Withings::DEVICE_SCALE | Withings::DEVICE_BLOOD_PRESSURE_MONITOR)
82
+ def share?(device = Withings::SCALE | Withings::BLOOD_PRESSURE_MONITOR)
83
83
  @share & device
84
84
  end
85
85
 
86
86
  def to_s
87
- "[User #{short_name} / #{:user_id} / #{sharing?}]"
87
+ "[User #{short_name} / #{:user_id} / #{share?}]"
88
88
  end
89
89
 
90
90
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{simplificator-withings}
5
- s.version = "0.3.0"
5
+ s.version = "0.3.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["pascalbetz"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplificator-withings
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - pascalbetz