guh 0.0.5 → 0.0.6

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: 5235b6474992e17c357ef76970d42ee02ec621d1
4
- data.tar.gz: 6e1d10867d7d79c684101e8b61b56508d4dbdb32
3
+ metadata.gz: 5d7818d85be5cc2c84e9f264cfad1e6dd66b1113
4
+ data.tar.gz: ec4126300b995bc6a69587dfdd9a12c8a9a6043e
5
5
  SHA512:
6
- metadata.gz: a35059a8681bcb5ab7d0fa424e2c746772b21b688265a6e9c95a444e525638bfb7a316112546fbfdb8a50092c36850db5226ad8a0f6e0ec4029289de6920be85
7
- data.tar.gz: a33ea01d69fe5fc43d52d2e4f86e749ef363f28842c444591b8ba619e80aa0c8fe2bf8185410bbac58ee07e841fb066d3c95deba00bf310ea92f259ae2435e66
6
+ metadata.gz: b1f0d20dff3fc72ac81beea8e42008561b98cb91f8bd0794f1b100945ebdb12e6a8bbcd1eedc91db902d6294e3f08859441482b034a66090146bea408a5c7bbe
7
+ data.tar.gz: b175d25c133246a079394d2e62eb5217221bf58ce3afef8e0f2e0eee6a2643c175653b8fd5bfe3c835fc4c7baecc9fd7b0f461adc529399677d313755aa1296f
data/lib/guh.rb CHANGED
@@ -20,5 +20,6 @@ module Guh
20
20
  class ConnectionError < Exception; end
21
21
  class ResponseError < Exception; end
22
22
  class ArgumentError < Exception; end
23
+ class DeviceClassNotFound < Exception; end
23
24
 
24
25
  end
@@ -23,7 +23,7 @@ module Guh
23
23
  }
24
24
  })
25
25
 
26
- if response['success']==true
26
+ if response['success'] == 'success'
27
27
  return response
28
28
  else
29
29
  raise Guh::ArgumentError, response['errorMessage']
@@ -48,7 +48,7 @@ module Guh
48
48
  #
49
49
  # Guh::Device.discover("{985195aa-17ad-4530-88a4-cdd753d747d7}", [{name: 'location', value: 'Salzburg'}])
50
50
  #
51
- def self.discover(device_class_id, discovery_params = {})
51
+ def self.discover(device_class_id, discovery_params = [])
52
52
  response = get({
53
53
  id: generate_request_id,
54
54
  method: "Devices.GetDiscoveredDevices",
@@ -58,7 +58,7 @@ module Guh
58
58
  }
59
59
  })
60
60
 
61
- if response['success'] == true
61
+ if response['success'] == 'success'
62
62
  return response['deviceDescriptors']
63
63
  else
64
64
  raise Guh::ResponseError, response['errorMessage']
@@ -117,7 +117,7 @@ module Guh
117
117
  }
118
118
  })
119
119
 
120
- if response['success']==true
120
+ if response['success'] == 'success'
121
121
  return response
122
122
  else
123
123
  raise Guh::ArgumentError, response['errorMessage']
@@ -142,7 +142,7 @@ module Guh
142
142
  deviceId: device_id
143
143
  }
144
144
  })
145
- if response['success']==true
145
+ if response['success'] == 'success'
146
146
  return true
147
147
  else
148
148
  raise Guh::ResponseError, response['errorMessage']
@@ -171,7 +171,7 @@ module Guh
171
171
  }
172
172
  })
173
173
 
174
- if response['success']==true
174
+ if response['success'] == 'success'
175
175
  return response['deviceId']
176
176
  else
177
177
  raise Guh::ArgumentError, response['errorMessage']
@@ -198,7 +198,7 @@ module Guh
198
198
  }
199
199
  })
200
200
 
201
- if response['success']==true
201
+ if response['success'] == 'success'
202
202
  return response['deviceId']
203
203
  else
204
204
  raise Guh::ArgumentError, response['errorMessage']
@@ -215,7 +215,7 @@ module Guh
215
215
  }
216
216
  })
217
217
 
218
- if response['success']==true
218
+ if response['success'] == 'success'
219
219
  return response
220
220
  else
221
221
  raise Guh::ArgumentError, response['errorMessage']
@@ -1,3 +1,3 @@
1
1
  module Guh
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Edthofer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-10 00:00:00.000000000 Z
12
+ date: 2014-11-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json