crypt_keeper_providers 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /home/justin/work/ruby/crypt_keeper_providers
3
3
  specs:
4
- crypt_keeper_providers (0.4.0)
4
+ crypt_keeper_providers (0.5.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /home/justin/work/ruby/crypt_keeper_providers
3
3
  specs:
4
- crypt_keeper_providers (0.4.0)
4
+ crypt_keeper_providers (0.5.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /home/justin/work/ruby/crypt_keeper_providers
3
3
  specs:
4
- crypt_keeper_providers (0.4.0)
4
+ crypt_keeper_providers (0.5.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -18,16 +18,16 @@ module CryptKeeperProviders
18
18
  #
19
19
  # Returns an encrypted string
20
20
  def encrypt(value)
21
- value = Base64.encode64(value)
22
- escape_and_execute_sql(["SELECT AES_ENCRYPT(?, ?)", value, key]).first
21
+ Base64.encode64 escape_and_execute_sql(
22
+ ["SELECT AES_ENCRYPT(?, ?)", value, key]).first
23
23
  end
24
24
 
25
25
  # Public: Decrypts a string
26
26
  #
27
27
  # Returns a plaintext string
28
28
  def decrypt(value)
29
- value = Base64.decode64(value)
30
- escape_and_execute_sql(["SELECT AES_DECRYPT(?, ?)", value, key]).first
29
+ escape_and_execute_sql(
30
+ ["SELECT AES_DECRYPT(?, ?)", Base64.decode64(value), key]).first
31
31
  end
32
32
 
33
33
  private
@@ -1,3 +1,3 @@
1
1
  module CryptKeeperProviders
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
@@ -15,7 +15,7 @@ module CryptKeeperProviders
15
15
  end
16
16
 
17
17
  it "filters mysql aes functions" do
18
- subject.should_receive(:sql_without_mysql_aes).with do |event|
18
+ subject.should_receive(:sql_without_mysql_aes) do |event|
19
19
  event.payload[:sql].should == output_query
20
20
  end
21
21
 
@@ -15,7 +15,7 @@ module CryptKeeperProviders
15
15
  end
16
16
 
17
17
  it "filters pgp functions" do
18
- subject.should_receive(:sql_without_postgres_pgp).with do |event|
18
+ subject.should_receive(:sql_without_postgres_pgp) do |event|
19
19
  event.payload[:sql].should == output_query
20
20
  end
21
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crypt_keeper_providers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -191,7 +191,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
191
191
  version: '0'
192
192
  segments:
193
193
  - 0
194
- hash: -1861140725241316358
194
+ hash: -3721720512107072383
195
195
  required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  none: false
197
197
  requirements:
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  version: '0'
201
201
  segments:
202
202
  - 0
203
- hash: -1861140725241316358
203
+ hash: -3721720512107072383
204
204
  requirements: []
205
205
  rubyforge_project:
206
206
  rubygems_version: 1.8.23