ambient-ruby-client 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -1
  3. data/Gemfile +13 -0
  4. data/Gemfile.lock +83 -0
  5. data/lib/ambient/client.rb +2 -2
  6. data/lib/ambient/device.rb +6 -6
  7. data/lib/version.rb +1 -1
  8. data/vendor/cache/ast-2.4.2.gem +0 -0
  9. data/vendor/cache/diff-lcs-1.5.1.gem +0 -0
  10. data/vendor/cache/docile-1.4.1.gem +0 -0
  11. data/vendor/cache/io-console-0.7.2.gem +0 -0
  12. data/vendor/cache/irb-1.14.0.gem +0 -0
  13. data/vendor/cache/json-2.7.2.gem +0 -0
  14. data/vendor/cache/language_server-protocol-3.17.0.3.gem +0 -0
  15. data/vendor/cache/parallel-1.26.3.gem +0 -0
  16. data/vendor/cache/parser-3.3.4.2.gem +0 -0
  17. data/vendor/cache/psych-5.1.2.gem +0 -0
  18. data/vendor/cache/racc-1.8.1.gem +0 -0
  19. data/vendor/cache/rainbow-3.1.1.gem +0 -0
  20. data/vendor/cache/rake-13.2.1.gem +0 -0
  21. data/vendor/cache/rdoc-6.7.0.gem +0 -0
  22. data/vendor/cache/regexp_parser-2.9.2.gem +0 -0
  23. data/vendor/cache/reline-0.5.9.gem +0 -0
  24. data/vendor/cache/rspec-3.13.0.gem +0 -0
  25. data/vendor/cache/rspec-core-3.13.1.gem +0 -0
  26. data/vendor/cache/rspec-expectations-3.13.2.gem +0 -0
  27. data/vendor/cache/rspec-mocks-3.13.1.gem +0 -0
  28. data/vendor/cache/rspec-support-3.13.1.gem +0 -0
  29. data/vendor/cache/rubocop-1.66.0.gem +0 -0
  30. data/vendor/cache/rubocop-ast-1.32.2.gem +0 -0
  31. data/vendor/cache/ruby-progressbar-1.13.0.gem +0 -0
  32. data/vendor/cache/simplecov-0.22.0.gem +0 -0
  33. data/vendor/cache/simplecov-erb-1.0.1.gem +0 -0
  34. data/vendor/cache/simplecov-html-0.12.3.gem +0 -0
  35. data/vendor/cache/simplecov_json_formatter-0.1.4.gem +0 -0
  36. data/vendor/cache/stringio-3.1.1.gem +0 -0
  37. data/vendor/cache/unicode-display_width-2.5.0.gem +0 -0
  38. metadata +33 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f5774b557c895de5da75ebbc1a1aeae0d0d0c3ce1dd5414652d867ae8738663
4
- data.tar.gz: 2bbfeea305c3c8e2eab7cdd7c7f04937af5a4f31389c231b48dd1f524efc55d6
3
+ metadata.gz: f24874bd157faa92fd091571baf86d6766378f0589e6a40809277367fb7b2ad6
4
+ data.tar.gz: d7b93d3009cab106add6b90b78786e77e88bd7432fc12211c6f27b6e3d476615
5
5
  SHA512:
6
- metadata.gz: '069b20da0446e1ea4df52e0c446199395dcbb9a80a6b2e2a97451a614116fe75f6fece86220f83e2d1bd3a031c96c70421518d00b147424d57845a69369b2e1d'
7
- data.tar.gz: 6be6e04180d5251aa160879b617308253e0c637f1fd03b982af5e014d64acecaeb6763eac3bf078919ee799e29b1a16684571c444b80a31a97a84b12c5633ec6
6
+ metadata.gz: 347abf4d517c36218a7e11a90626d72620458becd9e161c43d39b948d6aab227ce5df8884c5293785212e77ffb95309cba33bd5946c53a3498bd361d2748ce82
7
+ data.tar.gz: 91f6e7d0659629371d8b0f743b4f86b037abfc1df5c3d3f854a456f6af603cdb88a06f386881e73713fe51558d2dcdf991fc4e327695de0b25e31206bca6e88e
data/CHANGELOG.md CHANGED
@@ -1,2 +1,5 @@
1
- # 0.1.2
1
+ # 0.1.5
2
+ A version that may even work!
3
+
4
+ # 0.1.4
2
5
  The initial version
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in ambient-ruby-client.gemspec
6
+ gemspec
7
+
8
+ gem "irb", "~> 1.14", :group => :development
9
+ gem "rake", "~> 13.2", :group => :development
10
+ gem "rspec", "~> 3.0", group: :development
11
+ gem "rubocop", "~> 1.21", group: :development
12
+ gem "simplecov", "~> 0.22.0", group: :development
13
+ gem "simplecov-erb", "~> 1.0", :group => :development
data/Gemfile.lock ADDED
@@ -0,0 +1,83 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ambient-ruby-client (0.1.5)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ diff-lcs (1.5.1)
11
+ docile (1.4.1)
12
+ io-console (0.7.2)
13
+ irb (1.14.0)
14
+ rdoc (>= 4.0.0)
15
+ reline (>= 0.4.2)
16
+ json (2.7.2)
17
+ language_server-protocol (3.17.0.3)
18
+ parallel (1.26.3)
19
+ parser (3.3.4.2)
20
+ ast (~> 2.4.1)
21
+ racc
22
+ psych (5.1.2)
23
+ stringio
24
+ racc (1.8.1)
25
+ rainbow (3.1.1)
26
+ rake (13.2.1)
27
+ rdoc (6.7.0)
28
+ psych (>= 4.0.0)
29
+ regexp_parser (2.9.2)
30
+ reline (0.5.9)
31
+ io-console (~> 0.5)
32
+ rspec (3.13.0)
33
+ rspec-core (~> 3.13.0)
34
+ rspec-expectations (~> 3.13.0)
35
+ rspec-mocks (~> 3.13.0)
36
+ rspec-core (3.13.1)
37
+ rspec-support (~> 3.13.0)
38
+ rspec-expectations (3.13.2)
39
+ diff-lcs (>= 1.2.0, < 2.0)
40
+ rspec-support (~> 3.13.0)
41
+ rspec-mocks (3.13.1)
42
+ diff-lcs (>= 1.2.0, < 2.0)
43
+ rspec-support (~> 3.13.0)
44
+ rspec-support (3.13.1)
45
+ rubocop (1.66.0)
46
+ json (~> 2.3)
47
+ language_server-protocol (>= 3.17.0)
48
+ parallel (~> 1.10)
49
+ parser (>= 3.3.0.2)
50
+ rainbow (>= 2.2.2, < 4.0)
51
+ regexp_parser (>= 2.4, < 3.0)
52
+ rubocop-ast (>= 1.32.1, < 2.0)
53
+ ruby-progressbar (~> 1.7)
54
+ unicode-display_width (>= 2.4.0, < 3.0)
55
+ rubocop-ast (1.32.2)
56
+ parser (>= 3.3.1.0)
57
+ ruby-progressbar (1.13.0)
58
+ simplecov (0.22.0)
59
+ docile (~> 1.1)
60
+ simplecov-html (~> 0.11)
61
+ simplecov_json_formatter (~> 0.1)
62
+ simplecov-erb (1.0.1)
63
+ simplecov (< 1.0)
64
+ simplecov-html (0.12.3)
65
+ simplecov_json_formatter (0.1.4)
66
+ stringio (3.1.1)
67
+ unicode-display_width (2.5.0)
68
+
69
+ PLATFORMS
70
+ ruby
71
+ x86_64-linux
72
+
73
+ DEPENDENCIES
74
+ ambient-ruby-client!
75
+ irb (~> 1.14)
76
+ rake (~> 13.2)
77
+ rspec (~> 3.0)
78
+ rubocop (~> 1.21)
79
+ simplecov (~> 0.22.0)
80
+ simplecov-erb (~> 1.0)
81
+
82
+ BUNDLED WITH
83
+ 2.5.9
@@ -41,8 +41,8 @@ module Ambient
41
41
  end
42
42
 
43
43
  def device_data(device_mac_address, end_date: nil, limit: 288)
44
- path = "devices/macAddress"
45
- params = {macAddress: device_mac_address, endDate: end_date, limit: }
44
+ path = "devices/#{device_mac_address}"
45
+ params = {endDate: end_date, limit: }
46
46
 
47
47
  begin
48
48
  response = _get(path, @config, params: )
@@ -2,15 +2,15 @@
2
2
 
3
3
  module Ambient
4
4
  class DeviceInfo
5
- attr_reader :name, :location
5
+ attr_reader :name, :coords
6
6
 
7
7
  def self.from_hash(data)
8
- DeviceInfo.new(data.dig("name"), data.dig("location"))
8
+ DeviceInfo.new(data.dig("name"), data.dig("coords"))
9
9
  end
10
10
 
11
- def initialize(name, location)
11
+ def initialize(name, coords)
12
12
  @name = name
13
- @location = location
13
+ @coords = coords
14
14
  end
15
15
  end
16
16
 
@@ -18,7 +18,7 @@ module Ambient
18
18
  attr_reader :mac_address, :info, :last_data
19
19
 
20
20
  def self.from_hash(data)
21
- Device.new(data.dig("macAddress"), Ambient::DeviceInfo.from_hash(data.dig("info")), data.dig("lastData"))
21
+ Ambient::Device.new(data.dig("macAddress"), Ambient::DeviceInfo.from_hash(data.dig("info")), data.dig("lastData"))
22
22
  end
23
23
 
24
24
  ###
@@ -28,7 +28,7 @@ module Ambient
28
28
  # @param info [Ambient::DeviceInfo] information about the device
29
29
  # @param last_data [Hash] the latest measurement data from the device
30
30
  def initialize(mac_address, info, last_data)
31
- @mac_address = mac_address,
31
+ @mac_address = mac_address
32
32
  @info = info
33
33
  @last_data = last_data
34
34
  end
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ambient
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
5
5
  end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ambient-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Ruiz
@@ -19,6 +19,8 @@ extra_rdoc_files: []
19
19
  files:
20
20
  - ".ruby-version"
21
21
  - CHANGELOG.md
22
+ - Gemfile
23
+ - Gemfile.lock
22
24
  - LICENSE.txt
23
25
  - README.md
24
26
  - Rakefile
@@ -27,6 +29,36 @@ files:
27
29
  - lib/ambient/client_config.rb
28
30
  - lib/ambient/device.rb
29
31
  - lib/version.rb
32
+ - vendor/cache/ast-2.4.2.gem
33
+ - vendor/cache/diff-lcs-1.5.1.gem
34
+ - vendor/cache/docile-1.4.1.gem
35
+ - vendor/cache/io-console-0.7.2.gem
36
+ - vendor/cache/irb-1.14.0.gem
37
+ - vendor/cache/json-2.7.2.gem
38
+ - vendor/cache/language_server-protocol-3.17.0.3.gem
39
+ - vendor/cache/parallel-1.26.3.gem
40
+ - vendor/cache/parser-3.3.4.2.gem
41
+ - vendor/cache/psych-5.1.2.gem
42
+ - vendor/cache/racc-1.8.1.gem
43
+ - vendor/cache/rainbow-3.1.1.gem
44
+ - vendor/cache/rake-13.2.1.gem
45
+ - vendor/cache/rdoc-6.7.0.gem
46
+ - vendor/cache/regexp_parser-2.9.2.gem
47
+ - vendor/cache/reline-0.5.9.gem
48
+ - vendor/cache/rspec-3.13.0.gem
49
+ - vendor/cache/rspec-core-3.13.1.gem
50
+ - vendor/cache/rspec-expectations-3.13.2.gem
51
+ - vendor/cache/rspec-mocks-3.13.1.gem
52
+ - vendor/cache/rspec-support-3.13.1.gem
53
+ - vendor/cache/rubocop-1.66.0.gem
54
+ - vendor/cache/rubocop-ast-1.32.2.gem
55
+ - vendor/cache/ruby-progressbar-1.13.0.gem
56
+ - vendor/cache/simplecov-0.22.0.gem
57
+ - vendor/cache/simplecov-erb-1.0.1.gem
58
+ - vendor/cache/simplecov-html-0.12.3.gem
59
+ - vendor/cache/simplecov_json_formatter-0.1.4.gem
60
+ - vendor/cache/stringio-3.1.1.gem
61
+ - vendor/cache/unicode-display_width-2.5.0.gem
30
62
  homepage: https://github.com/jar349/ambient-ruby-client
31
63
  licenses:
32
64
  - MIT