copy-expander 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 +4 -4
- data/lib/copy-expander/version.rb +1 -1
- data/lib/copy_expander.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00fcb3c729d97a1751e9a630a460f2978d36a3ea
|
4
|
+
data.tar.gz: cf787f6e8364ba7a079c8af454dceb8e403391bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4434b06c177f961e83aa7eba26e325f71b79625d58b59ba91963ebad32a6d0dfc405647728547ba7484e2172bc6c14a7795637be1bd70d406886e7a7894f011e
|
7
|
+
data.tar.gz: a458cbcde8581814fa702fd468d1065826f467708cab7ce808ec65c2150147918e45b3ba8f4d5b7fea68e8416289e4a198b76e30a0f2caba8334db0e20ce4fab
|
data/lib/copy_expander.rb
CHANGED
@@ -66,6 +66,11 @@ module CopyExpander
|
|
66
66
|
# line when we make text substitutions.
|
67
67
|
#
|
68
68
|
def break_up_source_line line
|
69
|
+
if line[70] == ' ' && line[71..72] != ' '
|
70
|
+
line[72..79] = line[71..78]
|
71
|
+
line[71] = ' '
|
72
|
+
end
|
73
|
+
|
69
74
|
line.length >= 6 ? @first_six_characters = line[0..5] : nil
|
70
75
|
line.length >= 80 ? @last_eight_characters = line[72..79] : nil
|
71
76
|
line.length >= 72 ? @work_area = line[6..71] : nil
|
@@ -75,6 +80,9 @@ module CopyExpander
|
|
75
80
|
# Is this line logically blank?
|
76
81
|
#
|
77
82
|
def blank? line
|
83
|
+
if ! line.valid_encoding?
|
84
|
+
line = line.encode("UTF-16be", :invalid=>:replace, :replace=>" ").encode('UTF-8')
|
85
|
+
end
|
78
86
|
line == nil || line.gsub(/\s/, '').length == 0
|
79
87
|
end
|
80
88
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copy-expander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Nicolette
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|