tailstrom 0.0.9 → 0.0.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f024c5b10c7a71e02ca1c1555ab122af54b7b5c3
4
- data.tar.gz: 0cfe7ba4da0855fa6bffe474c26d7fd37084da0b
3
+ metadata.gz: d6720202d46441e9ffd7ae73a403b26e14b2bb5e
4
+ data.tar.gz: 1e4fb279861cb744697f16b8e912a013ffd58ad8
5
5
  SHA512:
6
- metadata.gz: 2e6c8d72a007efb913f5202331eb0550970ae96ae227a053cd67853b4b4f5bccbd2164b007f82ab95442029397f87c2a311bd2846aeed4ba20ba7f4ab2b46e15
7
- data.tar.gz: 7e29a3cd6d1de6c322394043d033f9616cde73f292e8e2ccab756febb556f6b7036773e40ea0173e5eaee2bc26ca3eff7e23fb5ebf0b65cb7d81546c7d960a10
6
+ metadata.gz: f630928244c74256aa1c488b4d005dd53af9d10a24b92d2d9001cb0cd86110d667b25618855ad8121d24d3309a4b79bc4ec3004d524a3734ae442282fff3ed3d
7
+ data.tar.gz: 6bdcbcb947d610518768e24d00f945ec9d35466c5364ab4438f1485ac806f31b057187920b354530bcd2c141fe6f8ef318da67314b6c1d9aabb687fd432f7548
@@ -90,7 +90,7 @@ module Tailstrom
90
90
  counters = counters.sort_by do |key, c|
91
91
  sum, avg, min, max, count =
92
92
  c.sum, c.avg, c.min, c.max, c.count
93
- binding.eval sort
93
+ eval sort
94
94
  end
95
95
  else
96
96
  counters = counters.sort_by do |key, c|
@@ -104,7 +104,7 @@ module Tailstrom
104
104
  if filter = @options[:out_filter]
105
105
  sum, avg, min, max, count =
106
106
  counter.sum, counter.avg, counter.min, counter.max, counter.count
107
- binding.eval filter
107
+ eval filter
108
108
  else
109
109
  true
110
110
  end
@@ -35,15 +35,19 @@ module Tailstrom
35
35
  key = @options[:key] ? col[@options[:key]] : :nil
36
36
  in_filter = @options[:in_filter]
37
37
 
38
+ scripts = []
39
+
38
40
  if @options[:map]
39
- binding.eval(@options[:map])
40
- value = format_value value
41
+ scripts << @options[:map]
42
+ scripts << 'value=format_value(value)'
41
43
  end
42
44
 
43
45
  if in_filter
44
- return nil unless binding.eval(in_filter)
46
+ scripts << in_filter
47
+ return nil unless eval scripts.join(';')
45
48
  end
46
49
 
50
+ eval scripts.join(';')
47
51
  { :line => line, :columns => col, :key => key, :value => value }
48
52
  end
49
53
 
@@ -1,3 +1,3 @@
1
1
  module Tailstrom
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailstrom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Issei Naruta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-08 00:00:00.000000000 Z
11
+ date: 2013-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec