yEnc 0.0.31 → 0.0.32
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 +7 -0
- data/lib/y_enc.rb +28 -27
- metadata +20 -39
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: ad36b05e72d7d917aa32538f98a4de9e772543ec
|
|
4
|
+
data.tar.gz: 71a45bd68dddffb9e0fca66e9f2da90df98dbc32
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 1939b13e56873e46ae6075fd458a6016d60ce5e5c6e4913ede5fa730c9f818cd1466eb8993f7b8b8ab2886e9f728ff10ec78b8903a4565ddc6990a4e020a92cf
|
|
7
|
+
data.tar.gz: a99b0c1e7e086d61366bc43d55f78249930911b790f2f83bc0131356f77e5bc4e4415e5aba65b060d14acb6614840c1645081de29d53c10139d6d8ab09bbcd33
|
data/lib/y_enc.rb
CHANGED
|
@@ -72,49 +72,50 @@ class YEnc
|
|
|
72
72
|
|
|
73
73
|
File.open(@filepath, 'r').each_line do |line|
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
begin_read = true
|
|
78
|
-
next
|
|
79
|
-
end
|
|
80
|
-
if line.include?("=yend")
|
|
75
|
+
if begin_read
|
|
76
|
+
if line.start_with?("=yend")
|
|
81
77
|
breakdown_endline line
|
|
82
78
|
begin_read=false
|
|
83
79
|
break #stop looking through the file we are done
|
|
84
80
|
end
|
|
85
81
|
#end of reading lines
|
|
86
82
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
83
|
+
#puts "LINE COUNT: #{line.length}"
|
|
84
|
+
#Decode and write to binary file
|
|
85
|
+
esc = false
|
|
86
|
+
line.each_byte do |c|
|
|
87
|
+
next if c == 13 or c == 10
|
|
88
|
+
|
|
89
|
+
if c == 61 and not esc #escape character hit goto the next one
|
|
90
|
+
esc = true
|
|
91
|
+
next
|
|
92
|
+
else
|
|
93
|
+
if esc
|
|
94
|
+
esc = false
|
|
95
|
+
c = c - 64
|
|
96
|
+
end
|
|
93
97
|
|
|
94
|
-
if c
|
|
95
|
-
|
|
96
|
-
next
|
|
98
|
+
if c.between?(0,41)
|
|
99
|
+
decoded = c + 214
|
|
97
100
|
else
|
|
98
|
-
|
|
99
|
-
esc = false
|
|
100
|
-
c = c - 64
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
if c.between?(0,41)
|
|
104
|
-
decoded = c + 214
|
|
105
|
-
else
|
|
106
|
-
decoded = c - 42
|
|
107
|
-
end
|
|
101
|
+
decoded = c - 42
|
|
108
102
|
end
|
|
109
|
-
@new_file.putc decoded
|
|
110
103
|
end
|
|
104
|
+
@new_file.putc decoded
|
|
111
105
|
end
|
|
112
106
|
|
|
107
|
+
else
|
|
108
|
+
if line.start_with?("=ybegin") #This is the begin size
|
|
109
|
+
breakdown_header line
|
|
110
|
+
begin_read = true
|
|
111
|
+
next
|
|
112
|
+
end
|
|
113
|
+
end
|
|
113
114
|
end
|
|
114
|
-
@new_file.close
|
|
115
115
|
else
|
|
116
116
|
false
|
|
117
117
|
end
|
|
118
|
+
@new_file.close
|
|
118
119
|
end
|
|
119
120
|
|
|
120
121
|
#Does this pass the crc32 check
|
metadata
CHANGED
|
@@ -1,63 +1,44 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yEnc
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
5
|
-
segments:
|
|
6
|
-
- 0
|
|
7
|
-
- 0
|
|
8
|
-
- 31
|
|
9
|
-
version: 0.0.31
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.32
|
|
10
5
|
platform: ruby
|
|
11
|
-
authors:
|
|
6
|
+
authors:
|
|
12
7
|
- Sam Contapay
|
|
13
8
|
- Tadeus Dobrovolskij
|
|
14
9
|
autorequire:
|
|
15
10
|
bindir: bin
|
|
16
11
|
cert_chain: []
|
|
17
|
-
|
|
18
|
-
date: 2013-11-08 00:00:00 -08:00
|
|
19
|
-
default_executable:
|
|
12
|
+
date: 2013-11-17 00:00:00.000000000 Z
|
|
20
13
|
dependencies: []
|
|
21
|
-
|
|
22
14
|
description: yEnc decoder written in Ruby
|
|
23
15
|
email: sam.contapay@gmail.com
|
|
24
16
|
executables: []
|
|
25
|
-
|
|
26
17
|
extensions: []
|
|
27
|
-
|
|
28
18
|
extra_rdoc_files: []
|
|
29
|
-
|
|
30
|
-
files:
|
|
19
|
+
files:
|
|
31
20
|
- lib/y_enc.rb
|
|
32
|
-
has_rdoc: true
|
|
33
21
|
homepage: https://github.com/madgeekfiend/yenc
|
|
34
22
|
licenses: []
|
|
35
|
-
|
|
23
|
+
metadata: {}
|
|
36
24
|
post_install_message:
|
|
37
25
|
rdoc_options: []
|
|
38
|
-
|
|
39
|
-
require_paths:
|
|
26
|
+
require_paths:
|
|
40
27
|
- lib
|
|
41
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
42
|
-
requirements:
|
|
43
|
-
- -
|
|
44
|
-
- !ruby/object:Gem::Version
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- !ruby/object:Gem::Version
|
|
52
|
-
segments:
|
|
53
|
-
- 0
|
|
54
|
-
version: "0"
|
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - '>='
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
34
|
+
requirements:
|
|
35
|
+
- - '>='
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
55
38
|
requirements: []
|
|
56
|
-
|
|
57
39
|
rubyforge_project:
|
|
58
|
-
rubygems_version:
|
|
40
|
+
rubygems_version: 2.0.14
|
|
59
41
|
signing_key:
|
|
60
|
-
specification_version:
|
|
42
|
+
specification_version: 4
|
|
61
43
|
summary: yEnc
|
|
62
44
|
test_files: []
|
|
63
|
-
|