aubergine 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/courgette/device.rb +4 -3
- 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: 6cbe35ecf75c4bd113f990c19f521e19b32ab145
|
4
|
+
data.tar.gz: 314d3b235249c9bddcebd1346b38d7a4953bcc54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 695387d367cab7b7d66021e90c2b187baa8b5869c44ca7c5677accf6ef5b8f65b7c7b1300404cda442a0f59812b615c89bc08bfcb4a053609200ab2af9e45c37
|
7
|
+
data.tar.gz: 342aeb39548602c9bbb3cb4a9554fe7db11d2acbdcdaa6e90782591313ee5fb41d81ef5380cd65bca053e826008fb1e71bbbc3b8b427106fe6398fa37f46081f
|
data/lib/courgette/device.rb
CHANGED
@@ -7,19 +7,20 @@ module Courgette
|
|
7
7
|
|
8
8
|
attr_reader :ip, :vendor
|
9
9
|
|
10
|
-
def initialize(ip, vendor, login, password)
|
10
|
+
def initialize(ip, vendor, login, password, enable)
|
11
11
|
@ip = ip
|
12
12
|
@vendor = vendor
|
13
13
|
@login = login
|
14
14
|
@password = password
|
15
|
+
@enable = enable
|
15
16
|
end
|
16
17
|
|
17
18
|
def self.build(hash)
|
18
|
-
new(hash['ip'], hash['vendor'], hash['login'], hash['password'])
|
19
|
+
new(hash['ip'], hash['vendor'], hash['login'], hash['password'], hash['enable'] || hash['password'])
|
19
20
|
end
|
20
21
|
|
21
22
|
def fetch(debug = false)
|
22
|
-
credentials = Commutateurs::Credentials.new(@login, @password, @
|
23
|
+
credentials = Commutateurs::Credentials.new(@login, @password, @enable)
|
23
24
|
|
24
25
|
device = VENDOR_CLASSES[vendor].new(ip, credentials, debug)
|
25
26
|
device.connect
|