icersplicer 0.7.2 → 0.7.6
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/bin/icersplicer +0 -8
- data/lib/icersplicer.rb +17 -6
- 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: 7335ae1ec2c26b35c118a4a819080fb12bae349d
|
4
|
+
data.tar.gz: 7952657256c1031014176561ba806c061d0bd29f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59898e152ed090c3e22721f3357f91215b2e9e37b3e6a37bc292f61ddc9d238195bd24a7553ec8005274f334e2099f33a35fa6224557766091a92c099c271d3d
|
7
|
+
data.tar.gz: b17daa09375ac79f4d3373a31c91b3d2203d6e5fb41aa1c7726d13d7bd7d055590776955cf6ab89e8518ed3f959b4447a37e04d35eb81cb3c30f2240b5f3d518
|
data/bin/icersplicer
CHANGED
@@ -22,14 +22,6 @@ require File.expand_path(File.join(
|
|
22
22
|
|
23
23
|
include Icersplicer
|
24
24
|
|
25
|
-
def reset_screen
|
26
|
-
puts "\e[0m\ "
|
27
|
-
end
|
28
|
-
|
29
|
-
def filterlinestats(filterlines)
|
30
|
-
puts "\nLines Displayed by Filter: #{filterlines}"
|
31
|
-
end
|
32
|
-
|
33
25
|
trap("INT") {
|
34
26
|
puts "Goodbye see you soon!"
|
35
27
|
reset_screen
|
data/lib/icersplicer.rb
CHANGED
@@ -15,8 +15,8 @@ module Icersplicer
|
|
15
15
|
module VERSION #:nodoc:
|
16
16
|
MAJOR = 0
|
17
17
|
MINOR = 7
|
18
|
-
TINY =
|
19
|
-
CODENAME = "Ice
|
18
|
+
TINY = 6
|
19
|
+
CODENAME = "Ice Creambar !"
|
20
20
|
STRING = [MAJOR, MINOR, TINY].join('.')
|
21
21
|
end
|
22
22
|
|
@@ -33,7 +33,15 @@ module Icersplicer
|
|
33
33
|
"purple" => 5,
|
34
34
|
"cyan" => 6,
|
35
35
|
"white" => 7}
|
36
|
+
|
37
|
+
def reset_screen
|
38
|
+
puts "\e[0m\ "
|
39
|
+
end
|
36
40
|
|
41
|
+
def filterlinestats(filterlines)
|
42
|
+
puts "\nLines Displayed by Filter: #{filterlines}"
|
43
|
+
end
|
44
|
+
|
37
45
|
def followtail(filename, number)
|
38
46
|
File::Tail::Logfile.open(filename) do |log|
|
39
47
|
log.interval = 3
|
@@ -116,9 +124,10 @@ module Icersplicer
|
|
116
124
|
end
|
117
125
|
|
118
126
|
def skip_processor(filter)
|
119
|
-
skip_lines =
|
127
|
+
skip_lines = Hash.new
|
128
|
+
skipcounter = 0
|
120
129
|
filter.to_s.split(",").each {|n|
|
121
|
-
skip_lines
|
130
|
+
skip_lines.update({skipcounter => n.to_i})
|
122
131
|
# Allow line ranges
|
123
132
|
min = n.split("-")[0].to_i
|
124
133
|
max = n.split("-")[1].to_i
|
@@ -132,9 +141,11 @@ module Icersplicer
|
|
132
141
|
exit
|
133
142
|
end
|
134
143
|
min.upto(max) {|s|
|
135
|
-
skip_lines
|
144
|
+
skip_lines.update({skipcounter => s}) unless skip_lines[skip_lines.size - 1] == s
|
145
|
+
skipcounter += 1
|
136
146
|
}
|
137
147
|
end
|
148
|
+
skipcounter += 1
|
138
149
|
}
|
139
150
|
return skip_lines
|
140
151
|
end
|
@@ -142,7 +153,7 @@ module Icersplicer
|
|
142
153
|
def skip(line)
|
143
154
|
begin
|
144
155
|
if instance_variable_defined?("@skip_lines")
|
145
|
-
line_element = @skip_lines.
|
156
|
+
line_element = @skip_lines.key(line)
|
146
157
|
if line_element != nil
|
147
158
|
skiper = @skip_lines[line_element]
|
148
159
|
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.7.
|
4
|
+
version: 0.7.6
|
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-
|
11
|
+
date: 2016-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: walltime
|