CloudSesame 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/cloud_sesame.gemspec +1 -1
- data/lib/cloud_sesame/query/ast/range_value.rb +0 -1
- metadata +1 -3
- data/spec/cloud_sesame/query/dsl_spec.rb +0 -96
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 613761dd7ba257e52f1cf2db7ec4041bdde9e407
|
4
|
+
data.tar.gz: 59068ac2327bf2975068be1daea7bbe3a4525834
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1b9860864172024274401d981454d1fdd501533dc61d4e5ea992a6eb7fdb92f2f394dcf04991c26b9ffa25cecf88932e5ce9705aacae214d23d09b1234a22d1
|
7
|
+
data.tar.gz: 331648c6632f1ba080fd6f22e32334b527f8062bcbb925459d3465d8922fdf62888c9f3be4bacf35cc353e08d4d38ecd65a2e935c97ea9eb0c7033f89d9240f9
|
data/Gemfile.lock
CHANGED
data/cloud_sesame.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: CloudSesame
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Chu
|
@@ -190,7 +190,6 @@ files:
|
|
190
190
|
- spec/cloud_sesame/query/dsl/block_methods_spec.rb
|
191
191
|
- spec/cloud_sesame/query/dsl/field_accessors_spec.rb
|
192
192
|
- spec/cloud_sesame/query/dsl/field_array_methods_spec.rb
|
193
|
-
- spec/cloud_sesame/query/dsl_spec.rb
|
194
193
|
- spec/cloud_sesame/query/node/abstract_spec.rb
|
195
194
|
- spec/cloud_sesame/query/node/facet_spec.rb
|
196
195
|
- spec/cloud_sesame/query/node/filter_query_spec.rb
|
@@ -242,7 +241,6 @@ test_files:
|
|
242
241
|
- spec/cloud_sesame/query/dsl/block_methods_spec.rb
|
243
242
|
- spec/cloud_sesame/query/dsl/field_accessors_spec.rb
|
244
243
|
- spec/cloud_sesame/query/dsl/field_array_methods_spec.rb
|
245
|
-
- spec/cloud_sesame/query/dsl_spec.rb
|
246
244
|
- spec/cloud_sesame/query/node/abstract_spec.rb
|
247
245
|
- spec/cloud_sesame/query/node/facet_spec.rb
|
248
246
|
- spec/cloud_sesame/query/node/filter_query_spec.rb
|
@@ -1,96 +0,0 @@
|
|
1
|
-
# module CloudSesame
|
2
|
-
# module Query
|
3
|
-
# describe DSL do
|
4
|
-
|
5
|
-
# class TestClass
|
6
|
-
# include DSL
|
7
|
-
# def context
|
8
|
-
# @context ||= {}
|
9
|
-
# end
|
10
|
-
# def children
|
11
|
-
# @children ||= []
|
12
|
-
# end
|
13
|
-
# end
|
14
|
-
|
15
|
-
# subject { TestClass.new }
|
16
|
-
|
17
|
-
# describe '#and' do
|
18
|
-
# it 'should create an AND node' do
|
19
|
-
# expect(AST::And).to receive(:new).with({})
|
20
|
-
# subject.and
|
21
|
-
# end
|
22
|
-
# it 'should add the AND node to it\s children' do
|
23
|
-
# expect(AST::And).to receive(:new).with({})
|
24
|
-
# expect{ subject.and }.to change{ subject.children.size }.by(1)
|
25
|
-
# end
|
26
|
-
# it 'should return it\'s own scope' do
|
27
|
-
# expect(subject.and).to eq subject
|
28
|
-
# end
|
29
|
-
# end
|
30
|
-
|
31
|
-
# describe '#or' do
|
32
|
-
# it 'should create an OR node' do
|
33
|
-
# expect(AST::Or).to receive(:new).with({})
|
34
|
-
# subject.or
|
35
|
-
# end
|
36
|
-
# it 'should add the OR node to it\s children' do
|
37
|
-
# expect(AST::Or).to receive(:new).with({})
|
38
|
-
# expect{ subject.or }.to change{ subject.children.size }.by(1)
|
39
|
-
# end
|
40
|
-
# it 'should return it\'s own scope' do
|
41
|
-
# expect(subject.and).to eq subject
|
42
|
-
# end
|
43
|
-
# end
|
44
|
-
|
45
|
-
# describe 'literal' do
|
46
|
-
|
47
|
-
# it 'should create a literal node' do
|
48
|
-
# expect(AST::Literal).to receive(:new).with('description', '123', Hash)
|
49
|
-
# subject.literal('description', '123')
|
50
|
-
# end
|
51
|
-
# it 'should add the literal node to it\'s children' do
|
52
|
-
# expect{ subject.literal('description', '123') }.to change{ subject.children.size }.by(1)
|
53
|
-
# end
|
54
|
-
# it 'should return the literal node' do
|
55
|
-
# expect(subject.literal('description', '123')).to be_kind_of(AST::Literal)
|
56
|
-
# end
|
57
|
-
|
58
|
-
# context 'when field is define in context' do
|
59
|
-
# before { subject.context[:fields] = { description: {} } }
|
60
|
-
# it 'should be triggered by calling the field name as a method' do
|
61
|
-
# expect(subject).to receive(:literal).with(:description, '123', {})
|
62
|
-
# subject.description "123"
|
63
|
-
# end
|
64
|
-
# it 'should accept multiple values' do
|
65
|
-
# expect(subject).to receive(:literal).exactly(3).times
|
66
|
-
# subject.description "123", "456", "789"
|
67
|
-
# end
|
68
|
-
|
69
|
-
# it 'should return literal nodes in an array' do
|
70
|
-
# result = subject.description("123", "456", "789")
|
71
|
-
# expect(result).to include(AST::Literal)
|
72
|
-
# end
|
73
|
-
# end
|
74
|
-
|
75
|
-
# context 'when field is not defined' do
|
76
|
-
# it 'should raise method missing error when calling the field name as a method' do
|
77
|
-
# expect{ subject.not_defined() }.to raise_error(NoMethodError)
|
78
|
-
# end
|
79
|
-
# end
|
80
|
-
# end
|
81
|
-
|
82
|
-
# describe 'prefix' do
|
83
|
-
# it 'should set the literal prefix option to true' do
|
84
|
-
# literals = (1..3).map { |i| AST::Literal.new(:int, i) }
|
85
|
-
# subject.prefix(literals)
|
86
|
-
|
87
|
-
# literals.each do |literal|
|
88
|
-
# expect(literal.options).to include(prefix: true)
|
89
|
-
# end
|
90
|
-
|
91
|
-
# end
|
92
|
-
# end
|
93
|
-
|
94
|
-
# end
|
95
|
-
# end
|
96
|
-
# end
|