simpaut 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simpaut/device_mapper.rb +4 -1
- data/lib/simpaut/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0123ffc15ff94a05041fa4ec42fe88966471fd1
|
4
|
+
data.tar.gz: f72cabea958c9035e45dde5301e30af3b72dec32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc95e1d0f53252df012784c5bde8b5376a565bd08daa40772d601c405ef9a43c502df4020cb8a8e6485f1f775e3c1f8f2ac25feb2c3ccf6befa66e33221e051f
|
7
|
+
data.tar.gz: d403eed4f33767ecc7a13faaec33d2c7cc9add00598e707cdae701a743e36dd2d254dae146638224d4aac749c2f992ab9210817cb857e21b54cfd494b698157d
|
@@ -1,8 +1,11 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
|
3
3
|
class DeviceMapper
|
4
|
+
GLOBAL_CONFIG_PATH = '/etc/simpaut/settings.yml'
|
5
|
+
|
4
6
|
def self.find_by_name(name, logger)
|
5
|
-
|
7
|
+
path = File.exists?(GLOBAL_CONFIG_PATH) ? GLOBAL_CONFIG_PATH : 'config/settings.yml'
|
8
|
+
@devices ||= YAML.load_file(path)['devices']
|
6
9
|
attrs = @devices[name.to_s]
|
7
10
|
attrs[:logger] = logger
|
8
11
|
SamsungWamApi::Device.new(attrs.symbolize_keys)
|
data/lib/simpaut/version.rb
CHANGED