unix_utils 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/lib/unix_utils.rb +2 -12
- data/lib/unix_utils/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
data/lib/unix_utils.rb
CHANGED
@@ -177,12 +177,7 @@ module UnixUtils
|
|
177
177
|
|
178
178
|
def self.unix2dos(infile)
|
179
179
|
infile = ::File.expand_path infile
|
180
|
-
if available?('
|
181
|
-
outfile = tmp_path infile
|
182
|
-
argv = ['unix2dos', '--force', '--newfile', infile, outfile ]
|
183
|
-
spawn argv
|
184
|
-
outfile
|
185
|
-
elsif available?('gawk') or available?('awk')
|
180
|
+
if available?('gawk') or available?('awk')
|
186
181
|
awk infile, '{ sub(/\r/, ""); printf("%s\r\n", $0) }'
|
187
182
|
else
|
188
183
|
perl infile, 's/\r\n|\n|\r/\r\n/g'
|
@@ -191,12 +186,7 @@ module UnixUtils
|
|
191
186
|
|
192
187
|
def self.dos2unix(infile)
|
193
188
|
infile = ::File.expand_path infile
|
194
|
-
if available?('
|
195
|
-
outfile = tmp_path infile
|
196
|
-
argv = ['dos2unix', '--force', '--newfile', infile, outfile ]
|
197
|
-
spawn argv
|
198
|
-
outfile
|
199
|
-
elsif available?('gawk') or available?('awk')
|
189
|
+
if available?('gawk') or available?('awk')
|
200
190
|
awk infile, '{ sub(/\r/, ""); printf("%s\n", $0) }'
|
201
191
|
else
|
202
192
|
perl infile, 's/\r\n|\n|\r/\n/g'
|
data/lib/unix_utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unix_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: posix-spawn
|