expressive 0.0.27 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/expressive.rb +1 -1
- data/lib/expressive/version.rb +1 -1
- data/spec/expressive_spec.rb +6 -6
- metadata +43 -5
- checksums.yaml +0 -15
data/Gemfile.lock
CHANGED
data/lib/expressive.rb
CHANGED
@@ -20,7 +20,7 @@ module Expressive
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def self.all_symbols
|
23
|
-
%w(+ - * / = set sum $sub post >= > < <= and or if date datetime get put lookup $lookup $head $tail $reverse round $round $days_ago $hours_ago $minutes_ago $append $id $hash $concat $split $sms)
|
23
|
+
%w(+ - * / = set sum $sub post >= > < <= and or if date datetime get put lookup $lookup $head $tail $reverse round $round $days_ago $hours_ago $minutes_ago $append $id $hash $concat $split $sms $hval)
|
24
24
|
end
|
25
25
|
|
26
26
|
module Boolean
|
data/lib/expressive/version.rb
CHANGED
data/spec/expressive_spec.rb
CHANGED
@@ -6,7 +6,7 @@ describe "Expressive" do
|
|
6
6
|
end
|
7
7
|
|
8
8
|
describe "all_symbols" do
|
9
|
-
it { Expressive.all_symbols.should =~ %w(+ - * / = set sum $sub get put post >= > < <= and or if date datetime lookup round $round $days_ago $hours_ago $minutes_ago $append $id $head $lookup $reverse $tail $hash $concat $split $sms) }
|
9
|
+
it { Expressive.all_symbols.should =~ %w(+ - * / = set sum $sub get put post >= > < <= and or if date datetime lookup round $round $days_ago $hours_ago $minutes_ago $append $id $head $lookup $reverse $tail $hash $concat $split $sms $hval) }
|
10
10
|
end
|
11
11
|
|
12
12
|
describe "understands booleans" do
|
@@ -262,9 +262,9 @@ EOH
|
|
262
262
|
it "using single set commands with if" do
|
263
263
|
@scope['vsi'] = 'oldvalue'
|
264
264
|
Expressive.run('(set vsi (if (= 1 2) "vsi1234", vsi))', @scope)
|
265
|
-
@scope['vsi'].should eql 'oldvalue'
|
265
|
+
@scope['vsi'].should eql 'oldvalue'
|
266
266
|
Expressive.run('(set vsi (if (= 1 1) "vsi1234", vsi))', @scope).should eql "vsi1234"
|
267
|
-
@scope['vsi'].should eql 'vsi1234'
|
267
|
+
@scope['vsi'].should eql 'vsi1234'
|
268
268
|
end
|
269
269
|
|
270
270
|
it "using multiple set commands" do
|
@@ -345,7 +345,7 @@ EOH
|
|
345
345
|
@scope['documents'].should == [{"test" => "value", "another_test" => 53.2, "and_a_date" => Time.parse(Date.today.to_s).utc}]
|
346
346
|
end
|
347
347
|
end
|
348
|
-
|
348
|
+
|
349
349
|
describe "understands retrieving the id of an object" do
|
350
350
|
it do
|
351
351
|
@scope["an_object"] = mock(:an_object, id: 5)
|
@@ -405,14 +405,14 @@ EOH
|
|
405
405
|
Expressive.run('($sms "447968115250" "this is a test")', @scope)
|
406
406
|
assert_requested(request)
|
407
407
|
@scope['goodbye'].should eql 'srsly'
|
408
|
-
end
|
408
|
+
end
|
409
409
|
it "should normalise international phone numbers" do
|
410
410
|
@scope['mobile_phone_no'] = "+447968115250"
|
411
411
|
request = stub_request(:get, @base_url + "&to=447968115250&text=this%20is%20a%20test").to_return(body: {'goodbye' => 'srsly'})
|
412
412
|
Expressive.run('($sms "447968115250" "this is a test")', @scope)
|
413
413
|
assert_requested(request)
|
414
414
|
@scope['goodbye'].should eql 'srsly'
|
415
|
-
end
|
415
|
+
end
|
416
416
|
it "should encode data" do
|
417
417
|
@scope['mobile_phone_no'] = "+447968115250"
|
418
418
|
request = stub_request(:get, @base_url + "&to=447968115250&text=This%20is%20you%27re%20text%20-%20it%20%26%20the%20message%20should%20be%20encoded").to_return(body: {'goodbye' => 'srsly'})
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expressive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.28
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Ijonas Kisselbach
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-24 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: ruby_gntp
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rspec
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rdoc
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ~>
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -55,6 +62,7 @@ dependencies:
|
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: bundler
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ~>
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ~>
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -69,6 +78,7 @@ dependencies:
|
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: guard
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
83
|
- - ~>
|
74
84
|
- !ruby/object:Gem::Version
|
@@ -76,6 +86,7 @@ dependencies:
|
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
91
|
- - ~>
|
81
92
|
- !ruby/object:Gem::Version
|
@@ -83,6 +94,7 @@ dependencies:
|
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: guard-rspec
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
99
|
- - ~>
|
88
100
|
- !ruby/object:Gem::Version
|
@@ -90,6 +102,7 @@ dependencies:
|
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
107
|
- - ~>
|
95
108
|
- !ruby/object:Gem::Version
|
@@ -97,6 +110,7 @@ dependencies:
|
|
97
110
|
- !ruby/object:Gem::Dependency
|
98
111
|
name: webmock
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
100
114
|
requirements:
|
101
115
|
- - ~>
|
102
116
|
- !ruby/object:Gem::Version
|
@@ -104,6 +118,7 @@ dependencies:
|
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
107
122
|
requirements:
|
108
123
|
- - ~>
|
109
124
|
- !ruby/object:Gem::Version
|
@@ -111,6 +126,7 @@ dependencies:
|
|
111
126
|
- !ruby/object:Gem::Dependency
|
112
127
|
name: pry
|
113
128
|
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
114
130
|
requirements:
|
115
131
|
- - ~>
|
116
132
|
- !ruby/object:Gem::Version
|
@@ -118,6 +134,7 @@ dependencies:
|
|
118
134
|
type: :development
|
119
135
|
prerelease: false
|
120
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
121
138
|
requirements:
|
122
139
|
- - ~>
|
123
140
|
- !ruby/object:Gem::Version
|
@@ -125,6 +142,7 @@ dependencies:
|
|
125
142
|
- !ruby/object:Gem::Dependency
|
126
143
|
name: timecop
|
127
144
|
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
128
146
|
requirements:
|
129
147
|
- - ~>
|
130
148
|
- !ruby/object:Gem::Version
|
@@ -132,6 +150,7 @@ dependencies:
|
|
132
150
|
type: :development
|
133
151
|
prerelease: false
|
134
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
135
154
|
requirements:
|
136
155
|
- - ~>
|
137
156
|
- !ruby/object:Gem::Version
|
@@ -139,6 +158,7 @@ dependencies:
|
|
139
158
|
- !ruby/object:Gem::Dependency
|
140
159
|
name: rake
|
141
160
|
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
142
162
|
requirements:
|
143
163
|
- - ! '>='
|
144
164
|
- !ruby/object:Gem::Version
|
@@ -146,6 +166,7 @@ dependencies:
|
|
146
166
|
type: :development
|
147
167
|
prerelease: false
|
148
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
149
170
|
requirements:
|
150
171
|
- - ! '>='
|
151
172
|
- !ruby/object:Gem::Version
|
@@ -153,6 +174,7 @@ dependencies:
|
|
153
174
|
- !ruby/object:Gem::Dependency
|
154
175
|
name: polyglot
|
155
176
|
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
156
178
|
requirements:
|
157
179
|
- - ~>
|
158
180
|
- !ruby/object:Gem::Version
|
@@ -160,6 +182,7 @@ dependencies:
|
|
160
182
|
type: :runtime
|
161
183
|
prerelease: false
|
162
184
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
163
186
|
requirements:
|
164
187
|
- - ~>
|
165
188
|
- !ruby/object:Gem::Version
|
@@ -167,6 +190,7 @@ dependencies:
|
|
167
190
|
- !ruby/object:Gem::Dependency
|
168
191
|
name: json
|
169
192
|
requirement: !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
170
194
|
requirements:
|
171
195
|
- - ! '>='
|
172
196
|
- !ruby/object:Gem::Version
|
@@ -174,6 +198,7 @@ dependencies:
|
|
174
198
|
type: :runtime
|
175
199
|
prerelease: false
|
176
200
|
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
177
202
|
requirements:
|
178
203
|
- - ! '>='
|
179
204
|
- !ruby/object:Gem::Version
|
@@ -181,6 +206,7 @@ dependencies:
|
|
181
206
|
- !ruby/object:Gem::Dependency
|
182
207
|
name: treetop
|
183
208
|
requirement: !ruby/object:Gem::Requirement
|
209
|
+
none: false
|
184
210
|
requirements:
|
185
211
|
- - ~>
|
186
212
|
- !ruby/object:Gem::Version
|
@@ -188,6 +214,7 @@ dependencies:
|
|
188
214
|
type: :runtime
|
189
215
|
prerelease: false
|
190
216
|
version_requirements: !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
191
218
|
requirements:
|
192
219
|
- - ~>
|
193
220
|
- !ruby/object:Gem::Version
|
@@ -195,6 +222,7 @@ dependencies:
|
|
195
222
|
- !ruby/object:Gem::Dependency
|
196
223
|
name: awesome_print
|
197
224
|
requirement: !ruby/object:Gem::Requirement
|
225
|
+
none: false
|
198
226
|
requirements:
|
199
227
|
- - ~>
|
200
228
|
- !ruby/object:Gem::Version
|
@@ -202,6 +230,7 @@ dependencies:
|
|
202
230
|
type: :runtime
|
203
231
|
prerelease: false
|
204
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
none: false
|
205
234
|
requirements:
|
206
235
|
- - ~>
|
207
236
|
- !ruby/object:Gem::Version
|
@@ -209,6 +238,7 @@ dependencies:
|
|
209
238
|
- !ruby/object:Gem::Dependency
|
210
239
|
name: rest-client
|
211
240
|
requirement: !ruby/object:Gem::Requirement
|
241
|
+
none: false
|
212
242
|
requirements:
|
213
243
|
- - ~>
|
214
244
|
- !ruby/object:Gem::Version
|
@@ -216,6 +246,7 @@ dependencies:
|
|
216
246
|
type: :runtime
|
217
247
|
prerelease: false
|
218
248
|
version_requirements: !ruby/object:Gem::Requirement
|
249
|
+
none: false
|
219
250
|
requirements:
|
220
251
|
- - ~>
|
221
252
|
- !ruby/object:Gem::Version
|
@@ -251,26 +282,33 @@ files:
|
|
251
282
|
- spec/webhook_examples.rb
|
252
283
|
homepage: http://github.com/emergeadapt/expressive
|
253
284
|
licenses: []
|
254
|
-
metadata: {}
|
255
285
|
post_install_message:
|
256
286
|
rdoc_options: []
|
257
287
|
require_paths:
|
258
288
|
- lib
|
259
289
|
required_ruby_version: !ruby/object:Gem::Requirement
|
290
|
+
none: false
|
260
291
|
requirements:
|
261
292
|
- - ! '>='
|
262
293
|
- !ruby/object:Gem::Version
|
263
294
|
version: '0'
|
295
|
+
segments:
|
296
|
+
- 0
|
297
|
+
hash: 2507656080840932177
|
264
298
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
299
|
+
none: false
|
265
300
|
requirements:
|
266
301
|
- - ! '>='
|
267
302
|
- !ruby/object:Gem::Version
|
268
303
|
version: '0'
|
304
|
+
segments:
|
305
|
+
- 0
|
306
|
+
hash: 2507656080840932177
|
269
307
|
requirements: []
|
270
308
|
rubyforge_project:
|
271
|
-
rubygems_version:
|
309
|
+
rubygems_version: 1.8.24
|
272
310
|
signing_key:
|
273
|
-
specification_version:
|
311
|
+
specification_version: 3
|
274
312
|
summary: Scheme-like language for manipulating CaseBlocks cases
|
275
313
|
test_files:
|
276
314
|
- spec/expressive_spec.rb
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
N2I2ZjM0OTM3MWVhMjA4OWMyNjZlOTJmOWFkNzA3M2U5NDU5ODk0NA==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MDhiNjhjMjU1NWRkZGYzNmY1Y2U2ZWNjYTQ0NmUyZjI5Nzk5OTFiOQ==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ZmM1ZGJkOTc5NjAyNTdjZjkxOTY3MWM3MTZhZmFhOTgwODU5ZDg4NDNhMTM3
|
10
|
-
YmZhZDY1YTAzMTNlM2JiZjNjMDIwOThlYTAwNWUzMGZhMGRkMjMyMDFiOWIy
|
11
|
-
Y2FhYzBhZWI4YWIzMzY3NzY2ZmE0OTgxZTBjZjhiZTg0NjFhZjM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YzkzYzUyNjI2NmU5MDc3MzdkMDI3Zjc4YjU0OTE2ZmVhMDMzNWQ2MzdiNDYw
|
14
|
-
NTVmMWRjMWQxZDI0YzQyOWNlNmMyNGZlMmZkY2M4Mjk0NTI3YTA3NDkxYTE2
|
15
|
-
MGQzYmYxZmNjMmQ0MWU0ZmIzNGQ3YTFmNGYxYjljMWY5NGE5MGM=
|