thieve 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/thieve.rb +5 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 511125d4e5f3e0e7c7eba6d5c230bcccb56ff5ee
4
- data.tar.gz: 187842c83f24c7028a58879a695d008b736c8f89
3
+ metadata.gz: '094636f7b335bf92cec3926a8e5f6bf21d8a4543'
4
+ data.tar.gz: 0b5cb2263bdabc7684dffc68d7d85cc7022ca1d6
5
5
  SHA512:
6
- metadata.gz: 5236f38898f9a7ae1485c369f58bd7f55896e840383b9f3dfcc434e17057d43d7918f06ae7d861f6b4564869396fd823b48eb112d64423bdd56f958c6dbd38d1
7
- data.tar.gz: c501c33a33a591b172909e217f5de7e0f0fcbe2c8f765aeab967930652eb885b3d48373ffebf788a2c54b159b6da9d9410891fd308bd5956f49ceda5ba1b0d02
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
- start = true if (line.include?("BEGIN"))
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thieve
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker