auric-vault-door 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  module Auric
2
2
  module Vault
3
3
  class Door
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
  end
6
6
  end
7
7
  end
@@ -5,6 +5,10 @@ require 'HTTParty'
5
5
  module Auric
6
6
  module Vault
7
7
  class Door
8
+ class EncryptionError < StandardError; end
9
+ class DecryptionError < StandardError; end
10
+
11
+
8
12
  attr_accessor :secret, :mtid, :config_id, :production, :segment
9
13
  attr_reader :error, :success
10
14
  SANDBOXURLS = ['https://vault01-sb.auricsystems.com/vault/v2/', 'https://vault02-sb.auricsystems.com/vault/v2/']
@@ -35,7 +39,7 @@ module Auric
35
39
  return json['result']['token']
36
40
  else
37
41
  @error = json['error']
38
- return false
42
+ raise EncryptionError, @error
39
43
  end
40
44
  end
41
45
 
@@ -45,7 +49,7 @@ module Auric
45
49
  return json['result']['plaintextValue']
46
50
  else
47
51
  @error = json['error']
48
- return false
52
+ raise DecryptionError, @error
49
53
  end
50
54
  end
51
55
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auric-vault-door
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-04 00:00:00.000000000 Z
12
+ date: 2014-09-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty