r_decryptor 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a732996e0732b16f03af640ccd0f97457bc7af5
4
- data.tar.gz: 0c43e094ab4c9b24327fec6e437dd35d89bfa7a0
3
+ metadata.gz: ca166d4d1e1d303dd611190f093faecebae030a1
4
+ data.tar.gz: 616458ffb3a582bb39083bb61fc40e58560bab0a
5
5
  SHA512:
6
- metadata.gz: a9f8ec506fc03db76185b00032be99e1506013f8efdd0fa73881d45e75a558330d1a32c55463de07fa8e98004c809a0821edb85179a203a530800b46f92234f0
7
- data.tar.gz: a37c3c4ac9bec26a5a725d0550ff245c10113452c314724784fbe2a11a5ec66afa74086887aeac9cc6852f52fc9bb8bdc199dd46b59b0d6b535c4bfebd739c01
6
+ metadata.gz: 9d55ddb654043a49e1e3a55a34396195f35b4be5a29981607bd1cb524a58e84a0b33334e9616b50a38a96be76bc0f1d1b2566d3792d9b8c923298f11af425266
7
+ data.tar.gz: 3d762566c383b08df694e958328627764a66f9e5bdb7ed201e15761e5b1eabc076f37bfa6ad20d9f123a50fdc15ba9ba82bf7e0d91fb9f96d63aa28ef0b18fe3
data/lib/r_decryptor.rb CHANGED
@@ -24,25 +24,25 @@ module RDecryptor
24
24
  decipher.decrypt
25
25
  decipher.key = key
26
26
  decipher.iv = iv
27
- # File.open(File.expand_path('../application2.yml', __FILE__), 'wb') do |dec|
28
- # File.open(encrypted_db_yml, 'rb') do |f|
29
- # loop do
30
- # r = f.read(4096)
31
- # break unless r
32
- # decoded = decipher.update(r)
33
- # dec << decoded
34
- # end
35
- # end
36
-
37
- # dec << decipher.final
38
- # end
39
-
40
- # # Create CONFIG[:foo] constants from temp application2.yml
41
- # CONFIG = YAML.load(File.read(File.expand_path('../application2.yml', __FILE__)))
42
- # CONFIG.merge! CONFIG.fetch(Rails.env, {})
43
- # CONFIG.symbolize_keys!
44
-
45
- # # Delete temp application2.yml
46
- # File.delete(File.expand_path('../application2.yml', __FILE__))
27
+ File.open(File.expand_path('../application2.yml', __FILE__), 'wb') do |dec|
28
+ File.open(encrypted_db_yml, 'rb') do |f|
29
+ loop do
30
+ r = f.read(4096)
31
+ break unless r
32
+ decoded = decipher.update(r)
33
+ dec << decoded
34
+ end
35
+ end
36
+
37
+ dec << decipher.final
38
+ end
39
+
40
+ # Create CONFIG[:foo] constants from temp application2.yml
41
+ CONFIG = YAML.load(File.read(File.expand_path('../application2.yml', __FILE__)))
42
+ CONFIG.merge! CONFIG.fetch(Rails.env, {})
43
+ CONFIG.symbolize_keys!
44
+
45
+ # Delete temp application2.yml
46
+ File.delete(File.expand_path('../application2.yml', __FILE__))
47
47
  end
48
48
  end
@@ -1,3 +1,3 @@
1
1
  module RDecryptor
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r_decryptor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Mentis