expressive 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- expressive (0.0.3)
4
+ expressive (0.0.5)
5
5
  awesome_print (~> 1.0.2)
6
6
  polyglot (~> 0.3.3)
7
7
  rest-client (~> 1.6.7)
@@ -64,7 +64,7 @@ PLATFORMS
64
64
  ruby
65
65
 
66
66
  DEPENDENCIES
67
- bundler (~> 1.1.4)
67
+ bundler (~> 1.0)
68
68
  expressive!
69
69
  guard (~> 1.3.2)
70
70
  guard-rspec (~> 1.2.1)
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
19
19
  gem.add_development_dependency "ruby_gntp", "~> 0.3.4"
20
20
  gem.add_development_dependency "rspec", "~> 2.11.0"
21
21
  gem.add_development_dependency "rdoc", "~> 3.12"
22
- gem.add_development_dependency "bundler", "~> 1.1.4"
22
+ gem.add_development_dependency "bundler", "~> 1.0"
23
23
  gem.add_development_dependency "guard", "~> 1.3.2"
24
24
  gem.add_development_dependency "guard-rspec", "~> 1.2.1"
25
25
  gem.add_development_dependency "webmock", "~> 1.8.11"
@@ -20,86 +20,80 @@ module Expressive
20
20
  def self.all_symbols
21
21
  %w(+ - * / = set sum post >= > < <= and or if)
22
22
  end
23
- end
24
23
 
25
- module Boolean
26
- def eval(scope)
27
- 'true' == text_value
24
+ module Boolean
25
+ def eval(scope)
26
+ 'true' == text_value
27
+ end
28
28
  end
29
- end
30
29
 
31
- module IntegerValue
32
- def eval(scope)
33
- text_value.to_i
30
+ module IntegerValue
31
+ def eval(scope)
32
+ text_value.to_i
33
+ end
34
34
  end
35
- end
36
35
 
37
- module FloatValue
38
- def eval(scope)
39
- text_value.to_f
36
+ module FloatValue
37
+ def eval(scope)
38
+ text_value.to_f
39
+ end
40
40
  end
41
- end
42
41
 
43
- module StringValue
44
- def eval(scope)
45
- text_value.gsub('"', '')
42
+ module StringValue
43
+ def eval(scope)
44
+ text_value.gsub('"', '')
45
+ end
46
46
  end
47
- end
48
47
 
49
- class Program < Treetop::Runtime::SyntaxNode
50
- def eval(scope)
51
- elements.map {|e|
52
- e.eval(scope)
53
- }.last
48
+ class Program < Treetop::Runtime::SyntaxNode
49
+ def eval(scope)
50
+ elements.map {|e|
51
+ e.eval(scope)
52
+ }.last
53
+ end
54
54
  end
55
- end
56
55
 
57
- class List < Treetop::Runtime::SyntaxNode
58
- def statements
59
- elements[1].elements.map {|e| e.data }
60
- end
56
+ class List < Treetop::Runtime::SyntaxNode
57
+ def statements
58
+ elements[1].elements.map {|e| e.data }
59
+ end
61
60
 
62
- def eval(scope)
63
- function = statements.first.eval(scope)
64
- function.call(scope, statements[1..-1])
61
+ def eval(scope)
62
+ function = statements.first.eval(scope)
63
+ function.call(scope, statements[1..-1])
64
+ end
65
65
  end
66
- end
67
66
 
68
- class Statement < Treetop::Runtime::SyntaxNode
69
- def data
70
- elements[1]
71
- end
67
+ class Statement < Treetop::Runtime::SyntaxNode
68
+ def data
69
+ elements[1]
70
+ end
72
71
 
73
- def eval(scope)
74
- data.eval(scope)
72
+ def eval(scope)
73
+ data.eval(scope)
74
+ end
75
75
  end
76
- end
77
-
78
- # class SetNode < Treetop::Runtime::SyntaxNode
79
- # def pieces
80
- # [ :set, fieldname.text_value, value.text_value ]
81
- # end
82
- # end
83
76
 
84
- class Identifier < Treetop::Runtime::SyntaxNode
85
- def eval(scope)
86
- scope[text_value]
77
+ class Identifier < Treetop::Runtime::SyntaxNode
78
+ def eval(scope)
79
+ scope[text_value]
80
+ end
87
81
  end
88
- end
89
82
 
90
- class Function
91
- def initialize(&block)
92
- @block = block
93
- end
83
+ class Function
84
+ def initialize(&block)
85
+ @block = block
86
+ end
94
87
 
95
- def call(scope, statements)
96
- parameters = statements.map {|c| c.eval(scope)}
97
- @block.call(*parameters)
88
+ def call(scope, statements)
89
+ parameters = statements.map {|c| c.eval(scope)}
90
+ @block.call(*parameters)
91
+ end
98
92
  end
99
- end
100
93
 
101
- class Syntax < Function
102
- def call(scope, statements)
103
- @block.call(scope, statements)
94
+ class Syntax < Function
95
+ def call(scope, statements)
96
+ @block.call(scope, statements)
97
+ end
104
98
  end
105
99
  end
@@ -1,3 +1,3 @@
1
1
  module Expressive
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -1,55 +1,117 @@
1
- class Scope
2
- def initialize(parent = {})
3
- @parent = parent
4
- @symbols = {}
5
- end
1
+ module Expressive
2
+ class Scope
3
+ def initialize(parent = {})
4
+ @parent = parent
5
+ @symbols = {}
6
+ end
6
7
 
7
- def [](name)
8
- @symbols[name] || @parent[name]
9
- end
8
+ def [](name)
9
+ @symbols[name] || @parent[name]
10
+ end
10
11
 
11
- def []=(name, value)
12
- @symbols[name] = value
13
- end
12
+ def []=(name, value)
13
+ @symbols[name] = value
14
+ end
14
15
 
15
- def merge(scope)
16
- @symbols.merge!(scope)
17
- end
16
+ def merge(scope)
17
+ @symbols.merge!(scope)
18
+ end
18
19
 
19
- def override_scope(scope)
20
- scope.merge!(@symbols)
21
- @symbols = scope
22
- end
20
+ def override_scope(scope)
21
+ scope.merge!(@symbols)
22
+ @symbols = scope
23
+ end
23
24
 
24
- def retrieve_scope
25
- @symbols
26
- end
25
+ def retrieve_scope
26
+ @symbols
27
+ end
27
28
 
28
- def define(name, &block)
29
- self[name] = Function.new(&block)
30
- end
29
+ def define(name, &block)
30
+ self[name] = Function.new(&block)
31
+ end
31
32
 
32
- def syntax(name, &block)
33
- self[name] = Syntax.new(&block)
33
+ def syntax(name, &block)
34
+ self[name] = Syntax.new(&block)
35
+ end
34
36
  end
35
- end
36
37
 
37
- class TopLevel < Scope
38
- def initialize
39
- super
38
+ class Webhook
40
39
 
41
- syntax('set') do |scope, cells|
42
- scope[cells.first.text_value] = cells[1].eval(scope)
40
+ def initialize(verb, url, params)
41
+ @verb, @url, @params = verb, url, params
43
42
  end
44
43
 
45
- syntax('post') do |scope, cells|
46
- uri = cells.shift.text_value.gsub('"', '')
47
- payload = {}
48
- cells.each do |key|
49
- payload[key.text_value] = scope[key.text_value]
44
+ def execute
45
+ self.send(@verb)
46
+ end
47
+
48
+ private
49
+
50
+ def post
51
+ RestClient.post(@url, @params)
52
+ end
53
+
54
+ def get
55
+ RestClient.get(@url, {params: @params})
56
+ end
57
+
58
+ def put
59
+ RestClient.put(@url, @params)
60
+ end
61
+
62
+ end
63
+
64
+ class TopLevel < Scope
65
+
66
+ def initialize
67
+ super
68
+
69
+ syntax('set') do |scope, cells|
70
+ scope[cells.first.text_value] = cells[1].eval(scope)
71
+ end
72
+
73
+ syntax('post') do |scope, cells|
74
+ perform_webhook(:post, scope, cells)
75
+ end
76
+
77
+ syntax('put') do |scope, cells|
78
+ perform_webhook(:put, scope, cells)
50
79
  end
80
+
81
+ syntax('get') do |scope, cells|
82
+ perform_webhook(:get, scope, cells)
83
+ end
84
+
85
+ define('+') {|a,b| a.to_f + b.to_f }
86
+ define('-') {|a,b| a.to_f - b.to_f }
87
+ define('*') {|a,b| a.to_f * b.to_f }
88
+ define('/') {|a,b| a.to_f / b.to_f }
89
+ define('=') {|a,b| a == b }
90
+ define('>') {|a,b| a.to_f > b.to_f }
91
+ define('<') {|a,b| a.to_f < b.to_f }
92
+ define('>=') {|a,b| a.to_f >= b.to_f }
93
+ define('<=') {|a,b| a.to_f <= b.to_f }
94
+ define('and') {|a,b| !!a && !!b }
95
+ define('or') {|a,b| !!a || !!b }
96
+ define('sum') { |*args| args.flatten.map(&:to_f).reduce(:+) }
97
+ define('if') { |*args| args.compact!; args[0] ? args[1] : args[2] }
98
+ end
99
+
100
+ def to_hash
101
+ h = self.retrieve_scope.dup
102
+ h.delete_if{|k, v| v.kind_of?(Expressive::Function)}
103
+ end
104
+
105
+ private
106
+
107
+ #(post "http://example.com" name age other)
108
+ #(get "http://example.com" "*")
109
+
110
+ def perform_webhook(verb, scope, cells)
111
+ url = cells.shift.text_value.gsub('"', '')
112
+ params = create_webhook_parameters(scope, cells)
51
113
  begin
52
- response = RestClient.post uri, payload
114
+ response = Webhook.new(verb, url, params).execute
53
115
  scope = scope.merge(response) if response.is_a?(Hash)
54
116
  rescue RestClient::Exception => e
55
117
  scope['_errors'] = e.message
@@ -57,18 +119,15 @@ class TopLevel < Scope
57
119
  scope
58
120
  end
59
121
 
60
- define('+') {|a,b| a.to_f + b.to_f }
61
- define('-') {|a,b| a.to_f - b.to_f }
62
- define('*') {|a,b| a.to_f * b.to_f }
63
- define('/') {|a,b| a.to_f / b.to_f }
64
- define('=') {|a,b| a == b }
65
- define('>') {|a,b| a.to_f > b.to_f }
66
- define('<') {|a,b| a.to_f < b.to_f }
67
- define('>=') {|a,b| a.to_f >= b.to_f }
68
- define('<=') {|a,b| a.to_f <= b.to_f }
69
- define('and') {|a,b| !!a && !!b }
70
- define('or') {|a,b| !!a || !!b }
71
- define('sum') { |*args| args.flatten.map(&:to_f).reduce(:+) }
72
- define('if') { |*args| args.compact!; args[0] ? args[1] : args[2] }
122
+ def create_webhook_parameters(scope, cells)
123
+ if cells.first && cells.first.text_value.gsub('"', '') == '*'
124
+ scope.to_hash
125
+ else
126
+ cells.inject({}) do |params, key|
127
+ params[key.text_value] = scope[key.text_value]
128
+ params
129
+ end
130
+ end
131
+ end
73
132
  end
74
133
  end
@@ -1,8 +1,9 @@
1
+
1
2
  require "spec_helper"
2
3
 
3
4
  describe "Expressive" do
4
5
  before(:each) do
5
- @scope = TopLevel.new
6
+ @scope = Expressive::TopLevel.new
6
7
  end
7
8
 
8
9
  describe "all_symbols" do
@@ -88,105 +89,64 @@ describe "Expressive" do
88
89
  end
89
90
 
90
91
  describe "understands web-hook statements" do
91
- context "with a valid response" do
92
- it "should post to the given uri" do
93
- request = stub_request(:post, "www.example.com")
94
- Expressive.run('(post "http://www.example.com")')
92
+ context "put" do
93
+ it_should_behave_like "a webhook", :put
94
+ it "should put the cope parameters if given" do
95
+ @scope['ohai'] = "world"
96
+ request = stub_request(:put, "www.example.com").with(body: {'ohai' => 'world'}).to_return(body: {'goodbye' => 'srsly'})
97
+ Expressive.run('(put "http://www.example.com" ohai)', @scope)
95
98
  assert_requested(request)
99
+ @scope['goodbye'].should eql 'srsly'
96
100
  end
97
101
 
98
- it "should post the cope parameters if given" do
102
+ it "should put all parameters if wild card is given" do
99
103
  @scope['ohai'] = "world"
100
- request = stub_request(:post, "www.example.com").with(body: {'ohai' => 'world'})
101
- Expressive.run('(post "http://www.example.com" ohai)', @scope)
104
+ @scope['monty'] = "python"
105
+ request = stub_request(:put, "www.example.com").with(body: {'monty' => 'python', 'ohai' => 'world'}).to_return(body: {'goodbye' => 'srsly'})
106
+ Expressive.run('(put "http://www.example.com" "*")', @scope)
102
107
  assert_requested(request)
108
+ @scope['goodbye'].should eql 'srsly'
103
109
  end
110
+ end
104
111
 
105
- it "should update the scope based on the response" do
112
+ context "get" do
113
+ it_should_behave_like "a webhook", :get
114
+ it "should get with parameters if given" do
106
115
  @scope['ohai'] = "world"
107
- request = stub_request(:post, "www.example.com").with(body: {'ohai' => 'world'}).to_return(body: {'goodbye' => 'srsly'})
108
- Expressive.run('(post "http://www.example.com" ohai)', @scope)
116
+ request = stub_request(:get, "www.example.com/?ohai=world").to_return(body: {'goodbye' => 'srsly'})
117
+ Expressive.run('(get "http://www.example.com" ohai)', @scope)
118
+ assert_requested(request)
109
119
  @scope['goodbye'].should eql 'srsly'
110
120
  end
111
- end
112
121
 
113
- context "when the response is invalid" do
114
- context "sets error custom message" do
115
- it "should add an entry in the errors element of the scope" do
116
- message = 'Something went Pete Tong'
117
- exception = RestClient::Exception.new
118
- exception.message = message
119
- stub_request(:post, 'www.example.com').to_raise(exception)
120
- Expressive.run('(post "http://www.example.com")', @scope)
121
- @scope['_errors'].should eql message
122
- end
122
+ it "should get with all parameters if wild card is given" do
123
+ @scope['ohai'] = "world"
124
+ @scope["monty"] = "python"
125
+ request = stub_request(:get, "www.example.com/?ohai=world&monty=python").to_return(body: {'goodbye' => 'srsly'})
126
+ Expressive.run('(get "http://www.example.com" "*")', @scope)
127
+ assert_requested(request)
128
+ @scope['goodbye'].should eql 'srsly'
123
129
  end
130
+ end
124
131
 
125
- context "bad uri" do
126
- it "should add an entry in the errors element of the scope" do
127
- stub_request(:post, "badexample.com").to_raise(RestClient::ResourceNotFound.new)
128
- Expressive.run('(post "badexample.com")', @scope)
129
- @scope['_errors'].should eql 'Resource Not Found'
130
- end
132
+ context "post" do
133
+ it_should_behave_like "a webhook", :post
134
+ it "should post the cope parameters if given" do
135
+ @scope['ohai'] = "world"
136
+ request = stub_request(:post, "www.example.com").with(body: {'ohai' => 'world'}).to_return(body: {'goodbye' => 'srsly'})
137
+ Expressive.run('(post "http://www.example.com" ohai)', @scope)
138
+ assert_requested(request)
139
+ @scope['goodbye'].should eql 'srsly'
131
140
  end
132
141
 
133
- context "timeout" do
134
- it "should add an entry in the errors element of the scope" do
135
- stub_request(:post, 'www.example.com').to_timeout
136
- Expressive.run('(post "http://www.example.com")', @scope)
137
- @scope['_errors'].should eql 'Request Timeout'
138
- end
142
+ it "should get with all parameters if wild card is given" do
143
+ @scope['ohai'] = "world"
144
+ @scope["monty"] = "python"
145
+ request = stub_request(:post, "www.example.com").with(body: {'monty' => 'python', 'ohai' => 'world'}).to_return(body: {'goodbye' => 'srsly'})
146
+ Expressive.run('(post "http://www.example.com" "*")', @scope)
147
+ assert_requested(request)
148
+ @scope['goodbye'].should eql 'srsly'
139
149
  end
140
150
  end
141
151
  end
142
-
143
- context "looking up an id based on a value" do
144
- it "should use the lookup method, find an id based on value" do
145
- #Expressive.run("lookup_case_state 'not_started'", @scope)
146
- #@payload[:_].should eql 1
147
- end
148
- end
149
-
150
- context "when setting simple properties" do
151
- it "should set order_no to 1234" do
152
- Expressive.run("(set order_no 1234)", @scope).should eql 1234
153
- @scope["order_no"].should eql 1234
154
- end
155
- it "should reuse set properties" do
156
- Expressive.run("(set order_no 1234)(+ order_no 11)", @scope).should eql 1245.0
157
- end
158
- it "should sum scoped arrays" do
159
- @scope["sub_totals"] = [100, 200, 300]
160
- Expressive.run("(sum sub_totals)", @scope).should eql 600.0
161
- end
162
- end
163
-
164
- context "when setting complex properties" do
165
- context "e.g. current_state" do
166
- before(:each) { Expressive.run("(set current_state (lookup_case_state, 'not started'))", @scope) }
167
- it "should set current_state to 'started'"
168
- it "should set current_state_id to 2"
169
- end
170
- context "e.g. owned_by" do
171
- it "should set owned_by_id to 1"
172
- it "should set owned_by_type to 'CaseBlocks::User'"
173
- end
174
- end
175
-
176
- context "when setting multiple properties" do
177
- # it {
178
-
179
- # Expressive.apply_to @scope do |scope|
180
- # apply "set order_no 1234"
181
- # apply "set current_state (lookup case_state 'not started')"
182
- # apply "set owned_by (lookup_user_by_email 'ijonas@ijonas.com')"
183
- # end
184
- # @scope["order_no"].should eql "1234"
185
- # }
186
- end
187
-
188
-
189
- context "register external lookup functions" do
190
-
191
- end
192
152
  end
@@ -0,0 +1,12 @@
1
+ require "spec_helper"
2
+
3
+ describe "TopLevel" do
4
+
5
+ describe "to_hash" do
6
+ it "return only the hash data" do
7
+ @scope = Expressive::TopLevel.new
8
+ @scope["hello"] = "world"
9
+ @scope.to_hash.should eql({"hello" => "world"})
10
+ end
11
+ end
12
+ end
@@ -15,3 +15,4 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
15
15
  $LOAD_PATH.unshift(File.dirname(__FILE__))
16
16
 
17
17
  require 'expressive'
18
+ require 'webhook_examples'
@@ -0,0 +1,28 @@
1
+ shared_examples_for "a webhook" do |verb|
2
+ it "should #{verb} to the given uri" do
3
+ request = stub_request(verb, "www.example.com")
4
+ Expressive.run("(#{verb} \"http://www.example.com\")")
5
+ assert_requested(request)
6
+ end
7
+
8
+ it "should add an entry in the errors element of the scope" do
9
+ message = 'Something went Pete Tong'
10
+ exception = RestClient::Exception.new
11
+ exception.message = message
12
+ stub_request(verb, 'www.example.com').to_raise(exception)
13
+ Expressive.run("(#{verb} \"http://www.example.com\")", @scope)
14
+ @scope['_errors'].should eql message
15
+ end
16
+
17
+ it "should add an entry in the errors element of the scope" do
18
+ stub_request(verb, "badexample.com").to_raise(RestClient::ResourceNotFound.new)
19
+ Expressive.run("(#{verb} \"badexample.com\")", @scope)
20
+ @scope['_errors'].should eql 'Resource Not Found'
21
+ end
22
+
23
+ it "should add an entry in the errors element of the scope" do
24
+ stub_request(verb, 'www.example.com').to_timeout
25
+ Expressive.run("(#{verb} \"http://www.example.com\")", @scope)
26
+ @scope['_errors'].should eql 'Request Timeout'
27
+ end
28
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expressive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-17 00:00:00.000000000 Z
12
+ date: 2012-10-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby_gntp
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70261240748780 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: 0.3.4
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: 0.3.4
24
+ version_requirements: *70261240748780
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: rspec
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &70261240748260 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ~>
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: 2.11.0
38
33
  type: :development
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 2.11.0
35
+ version_requirements: *70261240748260
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: rdoc
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &70261240747780 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ~>
@@ -53,31 +43,21 @@ dependencies:
53
43
  version: '3.12'
54
44
  type: :development
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: '3.12'
46
+ version_requirements: *70261240747780
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: bundler
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &70261240747100 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ~>
68
53
  - !ruby/object:Gem::Version
69
- version: 1.1.4
54
+ version: '1.0'
70
55
  type: :development
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ~>
76
- - !ruby/object:Gem::Version
77
- version: 1.1.4
57
+ version_requirements: *70261240747100
78
58
  - !ruby/object:Gem::Dependency
79
59
  name: guard
80
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &70261240746320 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
63
  - - ~>
@@ -85,15 +65,10 @@ dependencies:
85
65
  version: 1.3.2
86
66
  type: :development
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ~>
92
- - !ruby/object:Gem::Version
93
- version: 1.3.2
68
+ version_requirements: *70261240746320
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: guard-rspec
96
- requirement: !ruby/object:Gem::Requirement
71
+ requirement: &70261240745320 !ruby/object:Gem::Requirement
97
72
  none: false
98
73
  requirements:
99
74
  - - ~>
@@ -101,15 +76,10 @@ dependencies:
101
76
  version: 1.2.1
102
77
  type: :development
103
78
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ~>
108
- - !ruby/object:Gem::Version
109
- version: 1.2.1
79
+ version_requirements: *70261240745320
110
80
  - !ruby/object:Gem::Dependency
111
81
  name: webmock
112
- requirement: !ruby/object:Gem::Requirement
82
+ requirement: &70261240744640 !ruby/object:Gem::Requirement
113
83
  none: false
114
84
  requirements:
115
85
  - - ~>
@@ -117,15 +87,10 @@ dependencies:
117
87
  version: 1.8.11
118
88
  type: :development
119
89
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ~>
124
- - !ruby/object:Gem::Version
125
- version: 1.8.11
90
+ version_requirements: *70261240744640
126
91
  - !ruby/object:Gem::Dependency
127
92
  name: pry
128
- requirement: !ruby/object:Gem::Requirement
93
+ requirement: &70261240743580 !ruby/object:Gem::Requirement
129
94
  none: false
130
95
  requirements:
131
96
  - - ~>
@@ -133,15 +98,10 @@ dependencies:
133
98
  version: 0.9.10
134
99
  type: :development
135
100
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ~>
140
- - !ruby/object:Gem::Version
141
- version: 0.9.10
101
+ version_requirements: *70261240743580
142
102
  - !ruby/object:Gem::Dependency
143
103
  name: polyglot
144
- requirement: !ruby/object:Gem::Requirement
104
+ requirement: &70261240742840 !ruby/object:Gem::Requirement
145
105
  none: false
146
106
  requirements:
147
107
  - - ~>
@@ -149,15 +109,10 @@ dependencies:
149
109
  version: 0.3.3
150
110
  type: :runtime
151
111
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ~>
156
- - !ruby/object:Gem::Version
157
- version: 0.3.3
112
+ version_requirements: *70261240742840
158
113
  - !ruby/object:Gem::Dependency
159
114
  name: treetop
160
- requirement: !ruby/object:Gem::Requirement
115
+ requirement: &70261240543280 !ruby/object:Gem::Requirement
161
116
  none: false
162
117
  requirements:
163
118
  - - ~>
@@ -165,15 +120,10 @@ dependencies:
165
120
  version: 1.4.10
166
121
  type: :runtime
167
122
  prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
171
- - - ~>
172
- - !ruby/object:Gem::Version
173
- version: 1.4.10
123
+ version_requirements: *70261240543280
174
124
  - !ruby/object:Gem::Dependency
175
125
  name: awesome_print
176
- requirement: !ruby/object:Gem::Requirement
126
+ requirement: &70261240541560 !ruby/object:Gem::Requirement
177
127
  none: false
178
128
  requirements:
179
129
  - - ~>
@@ -181,15 +131,10 @@ dependencies:
181
131
  version: 1.0.2
182
132
  type: :runtime
183
133
  prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ~>
188
- - !ruby/object:Gem::Version
189
- version: 1.0.2
134
+ version_requirements: *70261240541560
190
135
  - !ruby/object:Gem::Dependency
191
136
  name: rest-client
192
- requirement: !ruby/object:Gem::Requirement
137
+ requirement: &70261240540720 !ruby/object:Gem::Requirement
193
138
  none: false
194
139
  requirements:
195
140
  - - ~>
@@ -197,12 +142,7 @@ dependencies:
197
142
  version: 1.6.7
198
143
  type: :runtime
199
144
  prerelease: false
200
- version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
- requirements:
203
- - - ~>
204
- - !ruby/object:Gem::Version
205
- version: 1.6.7
145
+ version_requirements: *70261240540720
206
146
  description: Scheme-like language for manipulating CaseBlocks cases
207
147
  email:
208
148
  - ijonas@emergeadapt.com
@@ -212,6 +152,7 @@ extra_rdoc_files: []
212
152
  files:
213
153
  - .document
214
154
  - .gitignore
155
+ - .rspec
215
156
  - Gemfile
216
157
  - Gemfile.lock
217
158
  - Guardfile
@@ -226,7 +167,9 @@ files:
226
167
  - lib/expressive_grammar.treetop
227
168
  - lib/scope.rb
228
169
  - spec/expressive_spec.rb
170
+ - spec/scope_spec.rb
229
171
  - spec/spec_helper.rb
172
+ - spec/webhook_examples.rb
230
173
  homepage: http://github.com/emergeadapt/expressive
231
174
  licenses: []
232
175
  post_install_message:
@@ -241,7 +184,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
241
184
  version: '0'
242
185
  segments:
243
186
  - 0
244
- hash: -977329044772272752
187
+ hash: -3178828988294476295
245
188
  required_rubygems_version: !ruby/object:Gem::Requirement
246
189
  none: false
247
190
  requirements:
@@ -250,13 +193,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
193
  version: '0'
251
194
  segments:
252
195
  - 0
253
- hash: -977329044772272752
196
+ hash: -3178828988294476295
254
197
  requirements: []
255
198
  rubyforge_project:
256
- rubygems_version: 1.8.23
199
+ rubygems_version: 1.8.15
257
200
  signing_key:
258
201
  specification_version: 3
259
202
  summary: Scheme-like language for manipulating CaseBlocks cases
260
203
  test_files:
261
204
  - spec/expressive_spec.rb
205
+ - spec/scope_spec.rb
262
206
  - spec/spec_helper.rb
207
+ - spec/webhook_examples.rb