pgcrypto 0.3.4 → 0.3.5
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/CHANGES.md +5 -0
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/pgcrypto.gemspec +5 -5
- data/spec/lib/pgcrypto_spec.rb +15 -6
- metadata +6 -6
data/CHANGES.md
CHANGED
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.5
|
data/pgcrypto.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "pgcrypto"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Flip Sasser"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-09-02"
|
13
13
|
s.description = "\n PGCrypto is an ActiveRecord::Base extension that allows you to asymmetrically\n encrypt PostgreSQL columns with as little trouble as possible. It's totally\n freaking rad.\n "
|
14
14
|
s.email = "flip@x451.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -53,16 +53,16 @@ Gem::Specification.new do |s|
|
|
53
53
|
s.specification_version = 3
|
54
54
|
|
55
55
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
56
|
-
s.add_runtime_dependency(%q<activerecord>, ["
|
56
|
+
s.add_runtime_dependency(%q<activerecord>, [">= 3.2"])
|
57
57
|
s.add_runtime_dependency(%q<big_spoon>, [">= 0.2.1"])
|
58
58
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
59
59
|
else
|
60
|
-
s.add_dependency(%q<activerecord>, ["
|
60
|
+
s.add_dependency(%q<activerecord>, [">= 3.2"])
|
61
61
|
s.add_dependency(%q<big_spoon>, [">= 0.2.1"])
|
62
62
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
63
63
|
end
|
64
64
|
else
|
65
|
-
s.add_dependency(%q<activerecord>, ["
|
65
|
+
s.add_dependency(%q<activerecord>, [">= 3.2"])
|
66
66
|
s.add_dependency(%q<big_spoon>, [">= 0.2.1"])
|
67
67
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
68
68
|
end
|
data/spec/lib/pgcrypto_spec.rb
CHANGED
@@ -14,29 +14,29 @@ specs = proc do
|
|
14
14
|
model.should respond_to(:test_column=)
|
15
15
|
end
|
16
16
|
|
17
|
-
it "be settable on create" do
|
17
|
+
it "should be settable on create" do
|
18
18
|
model = PGCryptoTestModel.new(:test_column => 'this is a test')
|
19
19
|
model.save!.should be_true
|
20
20
|
end
|
21
21
|
|
22
|
-
it "be settable on update" do
|
22
|
+
it "should be settable on update" do
|
23
23
|
model = PGCryptoTestModel.create!
|
24
24
|
model.test_column = 'this is another test'
|
25
25
|
model.save!.should be_true
|
26
26
|
end
|
27
27
|
|
28
|
-
it "be update-able" do
|
28
|
+
it "should be update-able" do
|
29
29
|
model = PGCryptoTestModel.create!(:test_column => 'i am test column')
|
30
30
|
model.update_attributes!(:test_column => 'but now i am a different column, son').should be_true
|
31
31
|
model.test_column.should == 'but now i am a different column, son'
|
32
32
|
end
|
33
33
|
|
34
|
-
it "be retrievable at create" do
|
34
|
+
it "should be retrievable at create" do
|
35
35
|
model = PGCryptoTestModel.create!(:test_column => 'i am test column')
|
36
36
|
model.test_column.should == 'i am test column'
|
37
37
|
end
|
38
38
|
|
39
|
-
it "be retrievable after create" do
|
39
|
+
it "should be retrievable after create" do
|
40
40
|
model = PGCryptoTestModel.create!(:test_column => 'i should return to you')
|
41
41
|
PGCryptoTestModel.find(model.id).test_column.should == 'i should return to you'
|
42
42
|
end
|
@@ -117,7 +117,16 @@ describe PGCrypto do
|
|
117
117
|
describe "with password-protected keys" do
|
118
118
|
before :each do
|
119
119
|
PGCrypto.keys[:private] = {:path => File.join(keypath, 'private.password.key'), :password => 'password'}
|
120
|
-
PGCrypto.keys[:public] = {:path => File.join(keypath, 'public.password.key')
|
120
|
+
PGCrypto.keys[:public] = {:path => File.join(keypath, 'public.password.key')}
|
121
|
+
end
|
122
|
+
|
123
|
+
instance_eval(&specs)
|
124
|
+
end
|
125
|
+
|
126
|
+
describe "with Brett's keys" do
|
127
|
+
before :each do
|
128
|
+
PGCrypto.keys[:private] = {:path => File.join(keypath, 'private.brett.key'), :password => '4a13zhUF'}
|
129
|
+
PGCrypto.keys[:public] = {:path => File.join(keypath, 'public.brett.key')}
|
121
130
|
end
|
122
131
|
|
123
132
|
instance_eval(&specs)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pgcrypto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,24 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- - '
|
19
|
+
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.2
|
21
|
+
version: '3.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- - '
|
27
|
+
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 3.2
|
29
|
+
version: '3.2'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: big_spoon
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|