mind_meld 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mind_meld/device.rb +9 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9d0ba40a18f35d0c355af76acaca4d9ae4bfad4
|
4
|
+
data.tar.gz: 1ae4db663fe0273179b6654865edb6f324779f68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76c96230d574d71f238499d4d653bc0e1e2619d9c2ab52bafe48e0102583ebee039b8519f90f4c39765f5a09b5b28191b993601f50d2819651c0069521e27b1f
|
7
|
+
data.tar.gz: 52063c167072582502f024eaa913913c51a23fce1117f8064527e326f41e3aeb9ba4e0448890b435eae440c79c4ad111b74bdc0befa0c5a5d5bbeaffac8f6ecb
|
data/lib/mind_meld/device.rb
CHANGED
@@ -9,6 +9,7 @@ class MindMeld::Device < MindMeld
|
|
9
9
|
|
10
10
|
@device = options[:device]
|
11
11
|
# To trigger registration (is this needed?)
|
12
|
+
@device_details = {}
|
12
13
|
device_details
|
13
14
|
end
|
14
15
|
|
@@ -45,8 +46,14 @@ class MindMeld::Device < MindMeld
|
|
45
46
|
end
|
46
47
|
|
47
48
|
def device_details(refresh = false)
|
48
|
-
if refresh
|
49
|
-
@device_details
|
49
|
+
if refresh || ! @device_details.has_key?(:id)
|
50
|
+
if @device_details.has_key? :id
|
51
|
+
@device_details = request :get, "devices/#{@device_details[:id]}"
|
52
|
+
elsif @device.has_key? :id
|
53
|
+
@device_details = request :get, "devices/#{@device[:id]}"
|
54
|
+
else
|
55
|
+
@device_details = register @device
|
56
|
+
end
|
50
57
|
else
|
51
58
|
@device_details
|
52
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mind_meld
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
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
|
+
date: 2016-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|