mind_meld 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mind_meld/device.rb +19 -0
  3. metadata +13 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 965156ebbb57d0fbf56135e730dbaf5afd77e4a7
4
- data.tar.gz: fc387114e2ead0065b6b9a17d637d91c45f77994
3
+ metadata.gz: d00ef508edcd245cd8feac1cd762b3a374b91fb9
4
+ data.tar.gz: 8dabe0d3a0e80fd88357d663009f214191aa1cbd
5
5
  SHA512:
6
- metadata.gz: ac135e252446ebedbedf5d3c0880a120508d7a492f11a91059c9e30cd0cd600df83616bde86c65c002199f33ab378acfa8a8cfe96921328e976f1bb4917a29fa
7
- data.tar.gz: b1f6f0e9486b40a945988910487a7e626051efb538b9e7afa372b78283d9dd254cf4a00460cf6ebe6e3553ded2dd592169727f1273f6c7d998ea5af8a4ea30eb
6
+ metadata.gz: d8311c3c8a44f39903f6f87caf6b288d5c2d45d4e4867c33472994d5fb27bfe374efd041b7c981d383381ad120ec8de7d97f54ec3aee1effe9f706b5853d102c
7
+ data.tar.gz: 06491e1b2829f0367077219377481cf5543635880890029300da79d171a67d514b0f0a9291c64a97d7fa99604dbfb765ab2d236fe75980b76f9936eee3eae1bd
@@ -87,4 +87,23 @@ class MindMeld::Device < MindMeld
87
87
  super data
88
88
  end
89
89
 
90
+ def clear_state options = {}
91
+ state_params = {
92
+ device_id: self.id,
93
+ state: 'clear'
94
+ }
95
+ state_params[:component] = options[:component] if options.has_key? :component
96
+ request :put, 'devices/update_state', { device_state: state_params }
97
+ end
98
+
99
+ def set_state options
100
+ request :put, 'devices/update_state',
101
+ { device_state: {
102
+ device_id: self.id,
103
+ state: options[:state] || 'info',
104
+ component: options[:component] || '[None]',
105
+ message: options[:message]
106
+ }
107
+ }
108
+ end
90
109
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mind_meld
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Haig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-10 00:00:00.000000000 Z
11
+ date: 2016-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: webmock
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.21'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.21'
55
55
  description: API for Hive Mind
@@ -61,11 +61,11 @@ extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
63
  - README.md
64
+ - bin/mind_meld
65
+ - lib/mind_meld.rb
64
66
  - lib/mind_meld/device.rb
65
67
  - lib/mind_meld/hive.rb
66
68
  - lib/mind_meld/tv.rb
67
- - lib/mind_meld.rb
68
- - bin/mind_meld
69
69
  homepage: https://github.org/bbc/mind_meld
70
70
  licenses:
71
71
  - MIT
@@ -76,17 +76,17 @@ require_paths:
76
76
  - lib
77
77
  required_ruby_version: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - '>='
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - '>='
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  requirements: []
88
88
  rubyforge_project:
89
- rubygems_version: 2.0.14
89
+ rubygems_version: 2.6.7
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: API for Hive Mind