vae 0.8.9 → 0.8.10

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: 54507e3e6fa15c2953098accc0f757245a4b2da7
4
- data.tar.gz: 69e68a12422ddb5a524d5113fbec7c782c91f722
3
+ metadata.gz: 01d18ccf811849c32165d5614ee4499353c868d5
4
+ data.tar.gz: 7c5d675425d5dccac944464871c099a02a3a93c6
5
5
  SHA512:
6
- metadata.gz: fa17dc13f03680ec312b0cacc9406c33dc052ce40c435b665b020767661195bd5e07056e37443a65808a950e6fce3af01b62d367ba065625e6c1a6be1e7501cc
7
- data.tar.gz: 876e84672c110bd34f5fadc8ea57337b3a2c69d203762705e0669b7535c0b65ca95bd987f13713777320e312c15ba797b14d903c3f7694e8a3bbe2f4e8c71bbb
6
+ metadata.gz: 617c181ec88bc340e041953901433f0d48b4b2034ad39d6799521761c7114a3a6eda0e62be617735eb20e597c8b739860a1fb2d00e48b427161b5b9c01bbda06
7
+ data.tar.gz: eefe5d0fb55cb1e917b43c36df87ea64d2f50120871e98877f20ae11caf406ca7a3b00237d7518ad5b3f8ff7ef8d14919bfeea2a8e4cd42b228b6d89e8467423
@@ -38,10 +38,12 @@ class Site
38
38
  res = fetch_from_server(req)
39
39
  data = JSON.parse(res.body)
40
40
  if data == nil or data == []
41
+ VaeLocal.write_auth_key(subdomain, nil)
41
42
  raise VaeError, "Invalid password or insufficient permissions."
42
43
  elsif data['alert']
43
44
  puts data['alert']
44
45
  elsif data['valid'] != "valid"
46
+ VaeLocal.write_auth_key(subdomain, nil)
45
47
  raise VaeError, "Invalid password or insufficient permissions."
46
48
  end
47
49
  if data['auth_key'] and !auth_key
@@ -38,7 +38,8 @@ class VaeLocal
38
38
 
39
39
  def self.write_auth_key(site, key)
40
40
  data = read_auth_keys
41
- data['site_keys'][site] = key
41
+ data['site_keys'][site] = key if key
42
+ data['site_keys'].delete(site) if key.nil?
42
43
  File.open(auth_key_path, 'w') { |f| f.write data.to_yaml }
43
44
  end
44
45
 
@@ -84,7 +85,7 @@ class VaeLocal
84
85
  raise VaeError, "We could not determine the Vae subdomain for this site. Please specify it manually by using the --site option or create a __vae.yml file within the site root." if options[:site].nil?
85
86
 
86
87
  keys = VaeLocal.read_auth_keys
87
- if key = keys['site_keys'][options[:site]]
88
+ if key = keys['site_keys'][options[:site]] and options[:password].nil?
88
89
  options[:auth_key] = key
89
90
  end
90
91
 
@@ -1 +1 @@
1
- VER = "0.8.9"
1
+ VER = "0.8.10"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vae
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.9
4
+ version: 0.8.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Action Verb, LLC
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-02-23 00:00:00.000000000 Z
12
+ date: 2019-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chunky_png