thieve 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.
- checksums.yaml +4 -4
- data/lib/thieve.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '094636f7b335bf92cec3926a8e5f6bf21d8a4543'
|
4
|
+
data.tar.gz: 0b5cb2263bdabc7684dffc68d7d85cc7022ca1d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4606fa31e50eae55fa8dac6dfaff58541529a7b03f4e41491e199515f770bfb2d07a7affcc44083d96ba95c455285db1394406b658af68ca6d4030133a542f2
|
7
|
+
data.tar.gz: 3f89f76ffe014825ab1b59ee19343833fd7512092592fa22fa46912986ce0f0e7100b234e1b0305eb71e640432de3b32723a9e2e5df4e7bd9aebaab81a1a83eb
|
data/lib/thieve.rb
CHANGED
@@ -47,12 +47,15 @@ class Thieve
|
|
47
47
|
key = ""
|
48
48
|
|
49
49
|
File.open(file).each do |line|
|
50
|
-
|
50
|
+
if (line.include?("-----BEGIN"))
|
51
|
+
start = true
|
52
|
+
key = ""
|
53
|
+
end
|
51
54
|
|
52
55
|
# Don't include newlines for now
|
53
56
|
key += line.unpack("C*").pack("U*").strip if (start)
|
54
57
|
|
55
|
-
if (line.include?("END"))
|
58
|
+
if (line.include?("-----END"))
|
56
59
|
# Remove " + " or ' + '
|
57
60
|
key.gsub!(%r{["'] *\+ *["']?|["']? *\+ *["']}, "")
|
58
61
|
|
@@ -102,7 +105,6 @@ class Thieve
|
|
102
105
|
end
|
103
106
|
|
104
107
|
start = false
|
105
|
-
key = ""
|
106
108
|
end
|
107
109
|
end
|
108
110
|
end
|