icersplicer 0.4.2 → 0.5.8

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/icersplicer +9 -6
  3. data/lib/icersplicer.rb +3 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e74103ad7acd91e846845928dee5cd14a68b2a0
4
- data.tar.gz: e99b949b976c0e3ee96f8b707db4dd5db1395b60
3
+ metadata.gz: ba2bed10d7fecedf88f2a994375c57942ed2608d
4
+ data.tar.gz: faa5e49314dab1bf8b69496fa839017f99fbd460
5
5
  SHA512:
6
- metadata.gz: 8a1bac8788290a8f83ae8117ff9a8d69c199e38216c880eaa3da7f754e28984d098e889978917712405d63a10305eafd8cca0f78042a205b35cfe9805e7c18ca
7
- data.tar.gz: 7e8ab2a5375746f32a6cb0ad556569e0d948b4300c66ebe5a2afa97f24e1ec2c8904d4d90ab041bc7f4f3e446b966fbdac9c4176bdc1bf00c332bae43fcae686
6
+ metadata.gz: ac0d1d712a7754f603bbe8b9bad08dc82c94bba1ad3ea4aa05de228aea824d6119d2353932fda423f867cb70c57bee38e3266258efea22aa47d6b57c4eb10477
7
+ data.tar.gz: 07f072756da7bb2dbdd316e3882ea800698e611c004800d151ccfe55d6e3a9b9aee53dbfb6923978a9e06dceaf7e92bd90bb055d8ccf3e6f492975eb9e033553
data/bin/icersplicer CHANGED
@@ -12,7 +12,7 @@
12
12
  # Why: for processing large datasets quickly.
13
13
  ########################################################################
14
14
 
15
- require 'getoptlong'
15
+ require 'getoptlong'
16
16
  require 'walltime'
17
17
  require 'pp'
18
18
 
@@ -144,6 +144,7 @@ quietmode = false | @quiet_mode
144
144
 
145
145
  inputfile = @inputfile
146
146
  outputfile = @outputfile
147
+ grep = @grep
147
148
 
148
149
  if @countlines == true
149
150
  countlines(inputfile)
@@ -162,26 +163,27 @@ begin
162
163
  n.each_line {|data|
163
164
  data_orig = data.clone
164
165
  if search_and_replace == true
165
- data_orig.gsub!("#{search}", "#{replace}")
166
166
  data.gsub!("#{search}", "#{replace}")
167
167
  end
168
168
  unless lineoffset > increment_offset
169
169
  unless linelimit == 0
170
170
  unless increment_limit > linelimit
171
- unless instance_variable_defined?("@skipblank") and data.strip == ""
172
- unless instance_variable_defined?("@grep") and data =~ %r=#{@grep}=
171
+ unless instance_variable_defined?("@skipblank") and data_orig.strip == ""
172
+ if data_orig =~ /#{grep}/
173
173
  print_to_screen(linecounter, text_processor(data), quietmode) unless skip(linecounter)
174
174
  if instance_variable_defined?("@outputfile")
175
+ data_orig.gsub!("#{search}", "#{replace}")
175
176
  processdata(data_orig, outputfile, quietmode) unless skip(linecounter)
176
177
  end
177
178
  end
178
179
  end
179
180
  end
180
181
  else
181
- unless instance_variable_defined?("@skipblank") and data.strip == ""
182
- unless instance_variable_defined?("@grep") and data =~ %r=#{@grep}=
182
+ unless instance_variable_defined?("@skipblank") and data_orig.strip == ""
183
+ if data_orig =~ /#{grep}/
183
184
  print_to_screen(linecounter, text_processor(data), quietmode) unless skip(linecounter)
184
185
  if instance_variable_defined?("@outputfile")
186
+ data_orig.gsub!("#{search}", "#{replace}")
185
187
  processdata(data_orig, outputfile, quietmode) unless skip(linecounter)
186
188
  end
187
189
  end
@@ -200,3 +202,4 @@ closefile if instance_variable_defined?("@exp")
200
202
  stats(inputfile, outputfile)
201
203
  timer.watch('stop')
202
204
  timer.print_stats
205
+ puts "\e[0m\ "
data/lib/icersplicer.rb CHANGED
@@ -13,9 +13,9 @@ module Icersplicer
13
13
 
14
14
  module VERSION #:nodoc:
15
15
  MAJOR = 0
16
- MINOR = 4
17
- TINY = 2
18
- CODENAME = "Ice Axe !"
16
+ MINOR = 5
17
+ TINY = 8
18
+ CODENAME = "Icicle World !"
19
19
  STRING = [MAJOR, MINOR, TINY].join('.')
20
20
  end
21
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icersplicer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Hood