ksconnect 0.1.8 → 0.1.9

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/ksconnect/api/plugin.rb +6 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a289dfc0aa28d7916621f2cce6a2911130768768
4
- data.tar.gz: c6327ca7d0a3b783399c250cac7c5f97a83274ed
3
+ metadata.gz: 4c98509e5053c6fdaa63c5f98360954b13423b38
4
+ data.tar.gz: 267ccd52e07a1637cfd99cd07fcfaac628b2306d
5
5
  SHA512:
6
- metadata.gz: 4045f3843ba7840b9d76b6339ea148cb25d00fb366ef1a07fa3cfc2da10d4d6577d2b07381ff7cf903ed1cb309f51b7b3ac56daa0421f99c843b157e10f9b3d8
7
- data.tar.gz: ed01264b40ee641489e033f30396901a304197da32b571fc756c43534073298e1aa7a4fbb552587b83885e5264aad5ebb494b67dba6743bfa1e0b7ba2fc77b6b
6
+ metadata.gz: 28326bc46292483e69f1a3d180f7ce344aacf23235fb449de75fab3a513217aecec1579b44b74d88c3b4670d42747611e606e6c8a49c139f4f8d68a8ca36c340
7
+ data.tar.gz: 2c328348be2e8e81899dbd71d76dd28dfb4e7cdacdf75d4da6304c7da857fc5b62a82597a9a019bce4fa8647cb04c7615f5ff7ff473d6e9551b8ea738ee4663a
@@ -90,11 +90,15 @@ class KSConnect
90
90
  @domains[domain_name] = Domain.new(domain_name, get_ip_for(domain_name), @name)
91
91
  config.on_initialize.call(request)
92
92
  when 'update'
93
- @domains[domain_name].update_ip_address
93
+ if @domains[domain_name]
94
+ @domains[domain_name].update_ip_address
95
+ else
96
+ @domains[domain_name] = Domain.new(domain_name, get_ip_for(domain_name), @name)
97
+ end
94
98
  config.on_update.call(request)
95
99
  when 'teardown'
96
- @domains.delete(domain_name)
97
100
  config.on_teardown.call(request)
101
+ @domains.delete(domain_name)
98
102
  else
99
103
  raise "Invalid request type"
100
104
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ksconnect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Poon