pgcrypto 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ 0.0.3
2
+ * Fixed a join bug on SELECT statements
3
+
1
4
  0.0.2
2
5
  * Fixed a number of key-related bugs discovered in testing with our
3
6
  second production app with encrypted columns. Also duck-typed AREL
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/lib/pgcrypto.rb CHANGED
@@ -27,6 +27,7 @@ module PGCrypto
27
27
  unless columns_hash[encrypted_column_name]
28
28
  puts "WARNING: You defined #{column_name} as an encrypted column, but you don't have a corresponding #{encrypted_column_name} column in your database!"
29
29
  end
30
+
30
31
  # Stash the encryption type in our module so various monkeypatches can access it later!
31
32
  PGCrypto[table_name][encrypted_column_name] = options.symbolize_keys!
32
33
 
@@ -35,7 +36,7 @@ module PGCrypto
35
36
  def #{column_name}
36
37
  @attributes["#{column_name}"]
37
38
  end
38
-
39
+
39
40
  # We write the attribute twice - once as the alias so the accessor keeps working, and once
40
41
  # so the actual attribute value is dirty and will be queued up for assignment
41
42
  def #{column_name}=(value)
@@ -50,7 +50,7 @@ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.class_eval do
50
50
  if !PGCrypto[projection.relation.name].empty?
51
51
  # Okay, so first, check if it's a broad select
52
52
  if projection.name == '*'
53
- # In this case, we want to just grap all the keys from columns in this table
53
+ # In this case, we want to just grab all the keys from columns in this table
54
54
  # and select them fancy-like
55
55
  PGCrypto[projection.relation.name].each do |column, options|
56
56
  new_projections.push(pgcrypto_tweak_select_column(column, options, joins))
@@ -61,7 +61,7 @@ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.class_eval do
61
61
  end
62
62
  end
63
63
  end
64
- core.projections.push(*new_projections)
64
+ core.projections.push(*new_projections.compact)
65
65
 
66
66
  # Dios mio! What an operation! Now we'll do something similar for the WHERE statements
67
67
  core.wheres.each do |where|
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.0.1"
8
+ s.version = "0.0.3"
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-02-24"
12
+ s.date = "2012-02-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 = [
@@ -27,7 +27,8 @@ Gem::Specification.new do |s|
27
27
  "lib/pgcrypto/active_record.rb",
28
28
  "lib/pgcrypto/arel.rb",
29
29
  "lib/pgcrypto/key.rb",
30
- "lib/pgcrypto/table_manager.rb"
30
+ "lib/pgcrypto/table_manager.rb",
31
+ "pgcrypto.gemspec"
31
32
  ]
32
33
  s.homepage = "http://github.com/Plinq/pgcrypto"
33
34
  s.require_paths = ["lib"]
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.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: