plunk 0.2.8 → 0.2.9
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 +3 -1
- data/lib/plunk/parser.rb +1 -1
- data/plunk.gemspec +2 -1
- data/spec/regexp_spec.rb +7 -0
- data/spec/shared/time_stubs.rb +9 -3
- metadata +16 -5
- data/spec/shared/basic.rb +0 -5
- data/spec/shared/field_value.rb +0 -7
- data/spec/shared/last.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5505fcd0ad4d40a7f6194b21fb79117bafd55ff
|
4
|
+
data.tar.gz: 77bab32e0ebb6e0abf15f77878b12741e2e1f4fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 754126eedfa73415b97280dc2aba93c54d359b721adac035563ed3d98e2820698c57a8ca64e7c5c05d6fb729a9452f8d503ffd6e1b5534d9da66b0615c82f21a
|
7
|
+
data.tar.gz: f400be0e7a58b4cd1b39381e167fd2a96941b26a617cef3b8dcdcd0d36e16f8e64025ed9f85a1890c9e6752f84b02f84d07482a8b27c6c496f3a252b729327c4
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
plunk (0.2.
|
4
|
+
plunk (0.2.8)
|
5
5
|
activesupport
|
6
6
|
elasticsearch
|
7
7
|
json
|
@@ -46,6 +46,7 @@ GEM
|
|
46
46
|
rspec-mocks (2.14.4)
|
47
47
|
thread_safe (0.1.3)
|
48
48
|
atomic
|
49
|
+
timecop (0.7.1)
|
49
50
|
tzinfo (0.3.38)
|
50
51
|
|
51
52
|
PLATFORMS
|
@@ -54,3 +55,4 @@ PLATFORMS
|
|
54
55
|
DEPENDENCIES
|
55
56
|
plunk!
|
56
57
|
rspec
|
58
|
+
timecop
|
data/lib/plunk/parser.rb
CHANGED
data/plunk.gemspec
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "plunk"
|
3
|
-
s.version = "0.2.
|
3
|
+
s.version = "0.2.9"
|
4
4
|
s.add_runtime_dependency "json"
|
5
5
|
s.add_runtime_dependency "parslet"
|
6
6
|
s.add_runtime_dependency "elasticsearch"
|
7
7
|
s.add_runtime_dependency "activesupport"
|
8
8
|
s.add_development_dependency "rspec"
|
9
|
+
s.add_development_dependency "timecop"
|
9
10
|
s.summary = "Elasticsearch query language"
|
10
11
|
s.description = "Human-friendly query language for Elasticsearch"
|
11
12
|
s.authors = ["Ram Mehta", "Jamil Bou Kheir"]
|
data/spec/regexp_spec.rb
CHANGED
@@ -7,4 +7,11 @@ describe 'regexp searches' do
|
|
7
7
|
query: 'foo:/blah foo/'
|
8
8
|
}}}}})
|
9
9
|
end
|
10
|
+
|
11
|
+
it 'should parse foo=/blah\/ foo/' do
|
12
|
+
result = @transformer.apply @parser.parse('foo=/blah\/ foo/')
|
13
|
+
expect(result.query).to eq({query:{filtered:{query:{query_string:{
|
14
|
+
query: 'foo:/blah\/ foo/'
|
15
|
+
}}}}})
|
16
|
+
end
|
10
17
|
end
|
data/spec/shared/time_stubs.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
+
require 'timecop'
|
2
|
+
|
1
3
|
shared_context "time stubs" do
|
2
|
-
before
|
3
|
-
|
4
|
-
Time.
|
4
|
+
before do
|
5
|
+
Timecop.freeze(Time.local(2012))
|
6
|
+
@time = Time.now
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
Timecop.return
|
5
11
|
end
|
6
12
|
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.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ram Mehta
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -81,6 +81,20 @@ dependencies:
|
|
81
81
|
- - '>='
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: timecop
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
84
98
|
description: Human-friendly query language for Elasticsearch
|
85
99
|
email:
|
86
100
|
- ram.mehta@gmail.com
|
@@ -110,9 +124,6 @@ files:
|
|
110
124
|
- spec/last_spec.rb
|
111
125
|
- spec/nested_search_spec.rb
|
112
126
|
- spec/regexp_spec.rb
|
113
|
-
- spec/shared/basic.rb
|
114
|
-
- spec/shared/field_value.rb
|
115
|
-
- spec/shared/last.rb
|
116
127
|
- spec/shared/plunk_stubs.rb
|
117
128
|
- spec/shared/time_stubs.rb
|
118
129
|
- spec/spec_helper.rb
|
data/spec/shared/basic.rb
DELETED
data/spec/shared/field_value.rb
DELETED