strongbox 0.4.5 → 0.4.6

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.
data/lib/strongbox.rb CHANGED
@@ -5,7 +5,7 @@ require 'strongbox/lock'
5
5
 
6
6
  module Strongbox
7
7
 
8
- VERSION = "0.4.5"
8
+ VERSION = "0.4.6"
9
9
 
10
10
  RSA_PKCS1_PADDING = OpenSSL::PKey::RSA::PKCS1_PADDING
11
11
  RSA_SSLV23_PADDING = OpenSSL::PKey::RSA::SSLV23_PADDING
@@ -100,6 +100,10 @@ module Strongbox
100
100
  decrypt
101
101
  end
102
102
 
103
+ def to_json(options = nil)
104
+ to_s
105
+ end
106
+
103
107
  # Needed for validations
104
108
  def blank?
105
109
  @instance[@name].blank?
@@ -46,6 +46,12 @@ class StrongboxTest < Test::Unit::TestCase
46
46
  end
47
47
  end
48
48
 
49
+ should 'impliment to_json' do
50
+ assert_nothing_raised do
51
+ @dummy.secret.to_json
52
+ end
53
+ end
54
+
49
55
  context 'updating unencrypted fields' do
50
56
  setup do
51
57
  @dummy.in_the_clear = 'I see you...'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongbox
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 5
10
- version: 0.4.5
9
+ - 6
10
+ version: 0.4.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Spike Ilacqua