pgcrypto 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.md CHANGED
@@ -1,4 +1,9 @@
1
1
  # CHANGELOG
2
+ ## 0.3.4
3
+ - Rewrote specs and found a bug in password-protected keys;
4
+ fixed now! Thanks again to Brett for helping me find the
5
+ problem.
6
+
2
7
  ## 0.3.3
3
8
  - Solved a mass-assignment issue thanks to Brett Levine
4
9
 
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'activerecord', '3.2.7', :require => 'active_record'
3
+ gem 'activerecord', '>= 3.2', :require => 'active_record'
4
4
  gem 'big_spoon', '>= 0.2.1'
5
5
 
6
6
  group :development do
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.4
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.4"
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-08-22"
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>, ["= 3.2.7"])
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>, ["= 3.2.7"])
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>, ["= 3.2.7"])
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
@@ -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'), :password => 'password'}
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
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-08-22 00:00:00.000000000 Z
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.7
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.7
29
+ version: '3.2'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: big_spoon
32
32
  requirement: !ruby/object:Gem::Requirement