icersplicer 0.6.3 → 0.6.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/icersplicer +12 -3
  3. data/lib/icersplicer.rb +3 -4
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1892b6805aa206e5e038b2e7f08cf6a648fa76d
4
- data.tar.gz: 23f80e0359e4cc844a41436bd74d6704e59a3ee8
3
+ metadata.gz: 889426ecfe9153b4293de8e06333ac4feeaac615
4
+ data.tar.gz: 7a2196e1727a5d01ac9964cddf298830f90de887
5
5
  SHA512:
6
- metadata.gz: f6ca0af3a34d7658f7ad73258bf979e7e749835bf5ebb8db575e33540564accddf8668e3d2c41c4ef24d777f2e517d5f63d98d9d2fe439031648ae87b0921703
7
- data.tar.gz: 7151e0cc9958595c318dfb75853e3b01b298b3c4ecf6e6c7d7532c9be3b7a47d98be6c028d44b58e71a5e7b1e187cc4c39b446b3cb3712dd1dc3269b587b733b
6
+ metadata.gz: 7770195438891c57b9d698452b73f1784f2404cda696f1da5d82eb640e49b732713b516c17ba14dadb6c6e5432605968ddb416123fe2faaaf95491bfc4e73742
7
+ data.tar.gz: 383c035caf2233f322aa72accf814429d087dd3c35f8a92172b024ea28b9d74bd0d715c0052680b464263ba8581291cd5d49a02704e05012fe79261c01dea04d
data/bin/icersplicer CHANGED
@@ -30,6 +30,8 @@ opts = GetoptLong.new(
30
30
  [ '--help', '-h', GetoptLong::NO_ARGUMENT ],
31
31
  [ '--lineoffset', '-l', GetoptLong::OPTIONAL_ARGUMENT],
32
32
  [ '--linelimit', '-n', GetoptLong::REQUIRED_ARGUMENT],
33
+ [ '--head', '-3', GetoptLong::REQUIRED_ARGUMENT],
34
+ [ '--tail', '-4', GetoptLong::REQUIRED_ARGUMENT],
33
35
  [ '--incrementlimit', '-i', GetoptLong::OPTIONAL_ARGUMENT],
34
36
  [ '--inputfile', '-f', GetoptLong::REQUIRED_ARGUMENT],
35
37
  [ '--skiplines', '-s', GetoptLong::OPTIONAL_ARGUMENT],
@@ -53,6 +55,8 @@ opts.each do |opt, arg|
53
55
  show help
54
56
  --lineoffset '-l' INTEGER
55
57
  --linelimit '-n' INTEGER
58
+ --head '-3' INTEGER
59
+ --tail '-4' INTEGER
56
60
  --inputfile '-f' filename
57
61
  --skiplines '-s' LINE NUMBERS 3,5,6
58
62
  --skipblank '-b' NO ARGUMENTS ( Ommit blank lines )
@@ -79,9 +83,14 @@ Written by Brian Hood
79
83
  ]
80
84
  puts helper
81
85
  exit
82
- when '--lineoffset'
83
- @line_offset = arg.to_i
84
- when '--linelimit'
86
+ when /^--lineoffset|^--tail/
87
+ if opt == "--lineoffset"
88
+ @line_offset = arg.to_i
89
+ else
90
+ count = countlines(@inputfile)
91
+ @line_offset = count - arg.to_i
92
+ end
93
+ when /^--linelimit|^--head/
85
94
  @line_limit = arg.to_i
86
95
  when '--incrementlimit'
87
96
  @increment_limit = arg.to_i
data/lib/icersplicer.rb CHANGED
@@ -14,8 +14,8 @@ module Icersplicer
14
14
  module VERSION #:nodoc:
15
15
  MAJOR = 0
16
16
  MINOR = 6
17
- TINY = 3
18
- CODENAME = "Ice Pick !"
17
+ TINY = 8
18
+ CODENAME = "Ice Climber !"
19
19
  STRING = [MAJOR, MINOR, TINY].join('.')
20
20
  end
21
21
 
@@ -102,6 +102,7 @@ module Icersplicer
102
102
  puts "Filename: #{inputfile} Total Line Count: #{lines}"
103
103
  end
104
104
  end
105
+ return lines
105
106
  end
106
107
 
107
108
  def skip_processor(filter)
@@ -169,8 +170,6 @@ module Icersplicer
169
170
  def stats(inputfile, outputfile)
170
171
  print "Inputfile lines: "
171
172
  countlines(inputfile)
172
- #print "Outputfile lines: "
173
- #countlines(outputfile)
174
173
  end
175
174
 
176
175
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icersplicer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Hood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-22 00:00:00.000000000 Z
11
+ date: 2016-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: walltime