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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0cb9e67dd168e4c97d845a04b5f0e22269dc192
4
- data.tar.gz: 90f4eedbabd4635ed0e0eb9f9b0c2a085d274705
3
+ metadata.gz: e0123ffc15ff94a05041fa4ec42fe88966471fd1
4
+ data.tar.gz: f72cabea958c9035e45dde5301e30af3b72dec32
5
5
  SHA512:
6
- metadata.gz: 14a75126922445a9b71194198a220d7401e9ed4e00b99288e99a03e70add07f16f929416c42522cd0360b99035c100ddc3d561ca150a9794669b0ac39cf9f20d
7
- data.tar.gz: 3728c863aad1cc7c3fb636e1185d048b3fc4a3da9d18d6ba913a9d2e3361cb7c91e40a021ad2faf71fe924a7a5abfcae3ddd79fcd1184f43e7b5309f36a73186
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
- @devices ||= YAML.load_file('config/settings.yml')['devices']
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)
@@ -1,3 +1,3 @@
1
1
  module Simpaut
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simpaut
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marek Hulan