pgcrypto 0.2.1 → 0.2.2

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.
Files changed (5) hide show
  1. data/CHANGES +4 -0
  2. data/VERSION +1 -1
  3. data/lib/pgcrypto.rb +1 -0
  4. data/pgcrypto.gemspec +3 -3
  5. metadata +3 -3
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ 0.2.2
2
+ * Don't try to load columns on new records; should further reduce
3
+ unnecessary database calls!
4
+
1
5
  0.2.1
2
6
  * Added ActiveModel::Dirty support, so you can now call *_changed?
3
7
  on your models tracking pgcrypto columns.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
data/lib/pgcrypto.rb CHANGED
@@ -69,6 +69,7 @@ module PGCrypto
69
69
 
70
70
  module InstanceMethods
71
71
  def select_pgcrypto_column(column_name)
72
+ return nil if new_record?
72
73
  # Now here's the fun part. We want the selector on PGCrypto columns to do the decryption
73
74
  # for us, so we have override the SELECT and add a JOIN to build out the decrypted value
74
75
  # whenever it's requested.
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.2.0"
8
+ s.version = "0.2.2"
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-03-28"
12
+ s.date = "2012-06-28"
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 = [
@@ -44,7 +44,7 @@ Gem::Specification.new do |s|
44
44
  ]
45
45
  s.homepage = "http://github.com/Plinq/pgcrypto"
46
46
  s.require_paths = ["lib"]
47
- s.rubygems_version = "1.8.10"
47
+ s.rubygems_version = "1.8.15"
48
48
  s.summary = "A transparent ActiveRecord::Base extension for encrypted columns"
49
49
 
50
50
  if s.respond_to? :specification_version then
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.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-06-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &70340389612080 !ruby/object:Gem::Requirement
16
+ requirement: &70354686216580 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '3.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70340389612080
24
+ version_requirements: *70354686216580
25
25
  description: ! "\n PGCrypto is an ActiveRecord::Base extension that allows you
26
26
  to asymmetrically\n encrypt PostgreSQL columns with as little trouble as possible.
27
27
  It's totally\n freaking rad.\n "