aubergine 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/courgette/device.rb +4 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8c748eb0ceea9e180717350d161488a6a2583cb
4
- data.tar.gz: aae09a118f236dbe68b2fc58386b77c5b130bbda
3
+ metadata.gz: 6cbe35ecf75c4bd113f990c19f521e19b32ab145
4
+ data.tar.gz: 314d3b235249c9bddcebd1346b38d7a4953bcc54
5
5
  SHA512:
6
- metadata.gz: 08ed759c2782b093f9c6cd3da93adb0585ec68ba386973635eefb327b6de8ffc2233568f0fb0371faaecaa186b97ce60de4103ae34aefbe9f8510b5c84223562
7
- data.tar.gz: 812ff25cc6802bc42c3c04c646e7856b893b40a8d286536d131e7f9affdae7190c726ae924e42c9bc9d2ff7161ee8290b19367ac30a52131afac26d3b0165655
6
+ metadata.gz: 695387d367cab7b7d66021e90c2b187baa8b5869c44ca7c5677accf6ef5b8f65b7c7b1300404cda442a0f59812b615c89bc08bfcb4a053609200ab2af9e45c37
7
+ data.tar.gz: 342aeb39548602c9bbb3cb4a9554fe7db11d2acbdcdaa6e90782591313ee5fb41d81ef5380cd65bca053e826008fb1e71bbbc3b8b427106fe6398fa37f46081f
@@ -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, @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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aubergine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Rose