plunk 0.3.6 → 0.3.7
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/Gemfile.lock +4 -4
- data/examples/simple.json +25 -0
- data/examples/simple.rb +10 -0
- data/plunk.gemspec +1 -1
- data/spec/window_spec.rb +12 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c087cc562303642c7d9b652826777dd3f5c619a
|
4
|
+
data.tar.gz: dda76e41f929a5fde5a17e647f590c25f61e6c28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d7e3988dabdd28807f05b734cbcdc4eac4bc7942f95df0963bed087820e9a8c8f23c325e46b920635af0ad6f5043ad7739ee792cbc6db22ce2b7642dc8f23b5
|
7
|
+
data.tar.gz: 56a9fcaaf6104c5b456b840a4cbf7f2f17eb51eb92cdb9a3dc708b19d614755a3d93f72da74d3baeac1a62d4d4d8333b8501eeff48ae4481c87333776f9938fc
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
plunk (0.3.
|
4
|
+
plunk (0.3.6)
|
5
5
|
activesupport (~> 4.0, >= 4.0.0)
|
6
6
|
chronic (~> 0.10, >= 0.10.0)
|
7
7
|
elasticsearch
|
@@ -41,10 +41,10 @@ GEM
|
|
41
41
|
rspec-core (~> 2.14.0)
|
42
42
|
rspec-expectations (~> 2.14.0)
|
43
43
|
rspec-mocks (~> 2.14.0)
|
44
|
-
rspec-core (2.14.
|
45
|
-
rspec-expectations (2.14.
|
44
|
+
rspec-core (2.14.8)
|
45
|
+
rspec-expectations (2.14.5)
|
46
46
|
diff-lcs (>= 1.1.3, < 2.0)
|
47
|
-
rspec-mocks (2.14.
|
47
|
+
rspec-mocks (2.14.6)
|
48
48
|
thread_safe (0.3.3)
|
49
49
|
timecop (0.7.1)
|
50
50
|
tzinfo (1.1.0)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"query":{
|
3
|
+
"filtered":{
|
4
|
+
"filter":{
|
5
|
+
"and":[
|
6
|
+
{
|
7
|
+
"range":{
|
8
|
+
"timestamp":{
|
9
|
+
"gte":"2014-04-01T16:00:00.000+00:00",
|
10
|
+
"lte":"2014-04-07T16:00:00.000+00:00"
|
11
|
+
}
|
12
|
+
}
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"query":{
|
16
|
+
"query_string":{
|
17
|
+
"query":"_type:syslog"
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
]
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
data/examples/simple.rb
ADDED
data/plunk.gemspec
CHANGED
data/spec/window_spec.rb
CHANGED
@@ -39,4 +39,16 @@ describe 'the window command' do
|
|
39
39
|
)
|
40
40
|
expect(result).to eq(expected)
|
41
41
|
end
|
42
|
+
|
43
|
+
it 'should parse NOT window -60m to -30m' do
|
44
|
+
result = Plunk.search 'NOT window -60m to -30m'
|
45
|
+
expected = Plunk::Helper.filter_builder(
|
46
|
+
not:
|
47
|
+
Plunk::Helper.range_builder(
|
48
|
+
Plunk::Helper.timestamp_format(@time - 60.minutes),
|
49
|
+
Plunk::Helper.timestamp_format(@time - 30.minutes)
|
50
|
+
)
|
51
|
+
)
|
52
|
+
expect(result).to eq(expected)
|
53
|
+
end
|
42
54
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plunk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ram Mehta
|
@@ -164,6 +164,8 @@ files:
|
|
164
164
|
- README.md
|
165
165
|
- Rakefile
|
166
166
|
- bin/plunk
|
167
|
+
- examples/simple.json
|
168
|
+
- examples/simple.rb
|
167
169
|
- lib/plunk.rb
|
168
170
|
- lib/plunk/helper.rb
|
169
171
|
- lib/plunk/parser.rb
|