gauge-ruby 0.0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,84 @@
1
+ # Copyright 2015 ThoughtWorks, Inc.
2
+
3
+ # This file is part of Gauge-Ruby.
4
+
5
+ # Gauge-Ruby is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+
10
+ # Gauge-Ruby is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU General Public License for more details.
14
+
15
+ # You should have received a copy of the GNU General Public License
16
+ # along with Gauge-Ruby. If not, see <http://www.gnu.org/licenses/>.
17
+
18
+ module Gauge
19
+ # @api public
20
+ class DataStore
21
+
22
+ # @api private
23
+ def initialize
24
+ clear
25
+ end
26
+
27
+ # Fetches the object corresponding to the given key
28
+ # @param key [string], the key for retrieving object.
29
+ # @return [object]
30
+ def get(key)
31
+ @data_map[key]
32
+ end
33
+
34
+ # Stores the object against the given key
35
+ # @param key [string], the key for storing the object, has to be unique
36
+ # @param value [object], the object to be persisted
37
+ def put(key, value)
38
+ @data_map[key] = value
39
+ end
40
+
41
+ # @api private
42
+ def clear
43
+ @data_map = Hash.new
44
+ end
45
+ end
46
+
47
+
48
+ # @api public
49
+ class DataStoreFactory
50
+ # Gets a datastore, that lives throughout the suite execution
51
+ # @example
52
+ # DataStoreFactory.suite_datastore.put("foo", {:name=>"foo"})
53
+ # DataStoreFactory.suite_datastore.get("foo")
54
+ # => {:name=>"foo"}
55
+ def self.suite_datastore
56
+ return @@suite_datastore
57
+ end
58
+
59
+ # Gets a datastore, that lives throughout a specification execution
60
+ # This is purged after every specification execution.
61
+ # @example
62
+ # DataStoreFactory.scenario_datastore.put("foo", {:name=>"foo"})
63
+ # DataStoreFactory.scenario_datastore.get("foo")
64
+ # => {:name=>"foo"}
65
+ def self.spec_datastore
66
+ return @@spec_datastore
67
+ end
68
+
69
+ # Gets a datastore, that lives throughout a scenario execution
70
+ # This is purged after every scenario execution.
71
+ # @example
72
+ # DataStoreFactory.scenario_datastore.put("foo", {:name=>"foo"})
73
+ # DataStoreFactory.scenario_datastore.get("foo")
74
+ # => {:name=>"foo"}
75
+ def self.scenario_datastore
76
+ return @@scenario_datastore
77
+ end
78
+
79
+ private
80
+ @@suite_datastore = DataStore.new
81
+ @@spec_datastore = DataStore.new
82
+ @@scenario_datastore = DataStore.new
83
+ end
84
+ end
@@ -0,0 +1,47 @@
1
+ # Copyright 2015 ThoughtWorks, Inc.
2
+
3
+ # This file is part of Gauge-Ruby.
4
+
5
+ # Gauge-Ruby is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+
10
+ # Gauge-Ruby is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU General Public License for more details.
14
+
15
+ # You should have received a copy of the GNU General Public License
16
+ # along with Gauge-Ruby. If not, see <http://www.gnu.org/licenses/>.
17
+
18
+ require_relative 'gauge'
19
+
20
+ module Gauge
21
+ # @api private
22
+ module Executor
23
+ def self.load_steps(steps_implementation_dir)
24
+ Dir["#{steps_implementation_dir}/**/*.rb"].each { |x| require x }
25
+ end
26
+
27
+ def self.execute_step(step, args)
28
+ block = MethodCache.get_step step
29
+ if args.size == 1
30
+ block.call(args[0])
31
+ else
32
+ block.call(args)
33
+ end
34
+ end
35
+
36
+ def self.execute_hooks(hooks, currentExecutionInfo)
37
+ begin
38
+ hooks.each do |hook|
39
+ hook.call(currentExecutionInfo)
40
+ end
41
+ return nil
42
+ rescue Exception => e
43
+ return e
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,105 @@
1
+ # Copyright 2015 ThoughtWorks, Inc.
2
+
3
+ # This file is part of Gauge-Ruby.
4
+
5
+ # Gauge-Ruby is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+
10
+ # Gauge-Ruby is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU General Public License for more details.
14
+
15
+ # You should have received a copy of the GNU General Public License
16
+ # along with Gauge-Ruby. If not, see <http://www.gnu.org/licenses/>.
17
+
18
+ require_relative 'connector'
19
+ require_relative 'method_cache'
20
+ require_relative 'configuration'
21
+
22
+ # @api public
23
+ module Kernel
24
+ class << self
25
+ private
26
+ # @!macro [attach] self.hook
27
+ # @method $1(&block)
28
+ # @api public
29
+ # @param block [block], this block is called while executing the $1 hook
30
+ # @example
31
+ # $1 do
32
+ # puts "I am the $1 hook"
33
+ # end
34
+ def hook(hook)
35
+ define_method hook do |&block|
36
+ Gauge::MethodCache.send("add_#{hook}_hook".to_sym, &block)
37
+ end
38
+ end
39
+ end
40
+
41
+ # Specify implementation for a given step
42
+ #
43
+ #
44
+ # @example
45
+ # step 'this is a simple step' do
46
+ # puts 'hello there!'
47
+ # end
48
+ # @example
49
+ # # step with parameters
50
+ # # * say "hello" to "gauge"
51
+ # step 'say <what> to <who>' do |what, who|
52
+ # puts "say #{what} to #{who}"
53
+ # end
54
+ # @example
55
+ # # step with aliases, two step texts can map to the same definition
56
+ # # provided they have the same parameter signature
57
+ # # * say "hello" to "gauge"
58
+ # # * When you meet "gauge", say "hello"
59
+ #
60
+ # step 'say <what> to <who>', 'When you meet <who>, say <what>' do |what, who|
61
+ # puts "say #{what} to #{who}"
62
+ # end
63
+ # @example
64
+ # # step with table
65
+ # # * Step that takes a table
66
+ # # |Product| Description |
67
+ # # |-------|-----------------------------|
68
+ # # |Gauge |BDD style testing with ease |
69
+ # # |Mingle |Agile project management |
70
+ # # |Snap |Hosted continuous integration|
71
+ # # |Gocd |Continuous delivery platform |
72
+ #
73
+ # step 'Step that takes a table <table>' do |table|
74
+ # # note the extra <table> that is added to the description
75
+ # puts x.columns.join("|")
76
+ # x.rows.each { |r| puts r.join("|") }
77
+ # end
78
+ # @param step_texts [string, ...] the step text(s)
79
+ # @param block [block] the implementation block for given step.
80
+ def step(*step_texts, &block)
81
+ step_texts.each do |text|
82
+ parameterized_step_text = Gauge::Connector.step_value(text)
83
+ Gauge::MethodCache.add_step(parameterized_step_text, &block)
84
+ Gauge::MethodCache.add_step_text(parameterized_step_text, text)
85
+ end
86
+ Gauge::MethodCache.add_step_alias(*step_texts)
87
+ end
88
+
89
+ # Invoked before execution of every step.
90
+ hook "before_step"
91
+ # Invoked after execution of every step.
92
+ hook "after_step"
93
+ # Invoked before execution of every specification.
94
+ hook "before_spec"
95
+ # Invoked after execution of every specification.
96
+ hook "after_spec"
97
+ # Invoked before execution of every scenario.
98
+ hook "before_scenario"
99
+ # Invoked after execution of every scenario.
100
+ hook "after_scenario"
101
+ # Invoked before execution of the entire suite.
102
+ hook "before_suite"
103
+ # Invoked after execution of the entire suite.
104
+ hook "after_suite"
105
+ end
@@ -0,0 +1,78 @@
1
+ # Copyright 2015 ThoughtWorks, Inc.
2
+
3
+ # This file is part of Gauge-Ruby.
4
+
5
+ # Gauge-Ruby is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+
10
+ # Gauge-Ruby is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU General Public License for more details.
14
+
15
+ # You should have received a copy of the GNU General Public License
16
+ # along with Gauge-Ruby. If not, see <http://www.gnu.org/licenses/>.
17
+
18
+ require 'socket'
19
+ require 'protocol_buffers'
20
+
21
+ require_relative 'messages.pb'
22
+ require_relative 'executor'
23
+ require_relative 'connector'
24
+ require_relative 'message_processor'
25
+
26
+
27
+ module Gauge
28
+ # @api private
29
+ module Runtime
30
+ DEFAULT_IMPLEMENTATIONS_DIR_PATH = File.join(Dir.pwd, 'step_implementations')
31
+
32
+ def self.dispatch_messages(socket)
33
+ while (!socket.eof?)
34
+ len = Connector.message_length(socket)
35
+ data = socket.read len
36
+ message = Messages::Message.parse(data)
37
+ handle_message(socket, message)
38
+ if (message.messageType == Messages::Message::MessageType::KillProcessRequest || message.messageType == Messages::Message::MessageType::ExecutionEnding)
39
+ socket.close
40
+ return
41
+ end
42
+ end
43
+ end
44
+
45
+
46
+ def self.handle_message(socket, message)
47
+ if (!MessageProcessor.is_valid_message(message))
48
+ puts "Invalid message received : #{message}"
49
+ execution_status_response = Messages::ExecutionStatusResponse.new(:executionResult => Messages::ProtoExecutionResult.new(:failed => true, :executionTime => 0))
50
+ message = Messages::Message.new(:messageType => Messages::Message::MessageType::ExecutionStatusResponse, :messageId => message.messageId, :executionStatusResponse => execution_status_response)
51
+ write_message(socket, message)
52
+ else
53
+ response = MessageProcessor.process_message message
54
+ write_message(socket, response)
55
+ end
56
+ end
57
+
58
+ def self.write_message(socket, message)
59
+ serialized_message = message.to_s
60
+ size = serialized_message.bytesize
61
+ ProtocolBuffers::Varint.encode(socket, size)
62
+ socket.write serialized_message
63
+ end
64
+
65
+ def self.portFromEnvVariable(envVariable)
66
+ port = ENV[envVariable]
67
+ if (port.nil?)
68
+ raise RuntimeError, "Could not find Env variable :#{envVariable}"
69
+ end
70
+ return port
71
+ end
72
+
73
+ STDOUT.sync = true
74
+ Connector.make_connections()
75
+ Executor.load_steps(DEFAULT_IMPLEMENTATIONS_DIR_PATH)
76
+ dispatch_messages(Connector.executionSocket)
77
+ end
78
+ end
@@ -0,0 +1,55 @@
1
+ # Copyright 2015 ThoughtWorks, Inc.
2
+
3
+ # This file is part of Gauge-Ruby.
4
+
5
+ # Gauge-Ruby is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+
10
+ # Gauge-Ruby is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU General Public License for more details.
14
+
15
+ # You should have received a copy of the GNU General Public License
16
+ # along with Gauge-Ruby. If not, see <http://www.gnu.org/licenses/>.
17
+
18
+ require_relative 'messages.pb'
19
+ require_relative 'executor'
20
+ require_relative 'table'
21
+ Dir[File.join(File.dirname(__FILE__), 'processors/*.rb')].each {|file| require file }
22
+
23
+ module Gauge
24
+ # @api private
25
+ class MessageProcessor
26
+ extend Processors
27
+
28
+ @processors = Hash.new
29
+ @processors[Messages::Message::MessageType::StepValidateRequest] = method(:process_step_validation_request)
30
+ @processors[Messages::Message::MessageType::ExecutionStarting] = method(:process_execution_start_request)
31
+ @processors[Messages::Message::MessageType::ExecutionEnding] = method(:process_execution_end_request)
32
+ @processors[Messages::Message::MessageType::SpecExecutionStarting] = method(:process_spec_execution_start_request)
33
+ @processors[Messages::Message::MessageType::SpecExecutionEnding] = method(:process_spec_execution_end_request)
34
+ @processors[Messages::Message::MessageType::ScenarioExecutionStarting] = method(:process_scenario_execution_start_request)
35
+ @processors[Messages::Message::MessageType::ScenarioExecutionEnding] = method(:process_scenario_execution_end_request)
36
+ @processors[Messages::Message::MessageType::StepExecutionStarting] = method(:process_step_execution_start_request)
37
+ @processors[Messages::Message::MessageType::StepExecutionEnding] = method(:process_step_execution_end_request)
38
+ @processors[Messages::Message::MessageType::ExecuteStep] = method(:process_execute_step_request)
39
+ @processors[Messages::Message::MessageType::StepNamesRequest] = method(:process_step_names_request)
40
+ @processors[Messages::Message::MessageType::KillProcessRequest] = method(:process_kill_processor_request)
41
+ @processors[Messages::Message::MessageType::SuiteDataStoreInit] = method(:process_datastore_init)
42
+ @processors[Messages::Message::MessageType::SpecDataStoreInit] = method(:process_datastore_init)
43
+ @processors[Messages::Message::MessageType::ScenarioDataStoreInit] = method(:process_datastore_init)
44
+ @processors[Messages::Message::MessageType::StepNameRequest] = method(:process_step_name_request)
45
+ @processors[Messages::Message::MessageType::RefactorRequest] = method(:refactor_step)
46
+
47
+ def self.is_valid_message(message)
48
+ return @processors.has_key? message.messageType
49
+ end
50
+
51
+ def self.process_message(message)
52
+ @processors[message.messageType].call message
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,308 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Copyright 2015 ThoughtWorks, Inc.
4
+
5
+ # This file is part of Gauge-Ruby.
6
+
7
+ # Gauge-Ruby is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+
12
+ # Gauge-Ruby is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with Gauge-Ruby. If not, see <http://www.gnu.org/licenses/>.
19
+
20
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
21
+
22
+ require 'protocol_buffers'
23
+
24
+ begin; require 'spec.pb'; rescue LoadError; end
25
+
26
+ module Gauge
27
+ # @api private
28
+ module Messages
29
+ # forward declarations
30
+ class KillProcessRequest < ::ProtocolBuffers::Message; end
31
+ class ExecutionStatusResponse < ::ProtocolBuffers::Message; end
32
+ class ExecutionStartingRequest < ::ProtocolBuffers::Message; end
33
+ class SpecExecutionStartingRequest < ::ProtocolBuffers::Message; end
34
+ class SpecExecutionEndingRequest < ::ProtocolBuffers::Message; end
35
+ class ScenarioExecutionStartingRequest < ::ProtocolBuffers::Message; end
36
+ class ScenarioExecutionEndingRequest < ::ProtocolBuffers::Message; end
37
+ class StepExecutionStartingRequest < ::ProtocolBuffers::Message; end
38
+ class StepExecutionEndingRequest < ::ProtocolBuffers::Message; end
39
+ class ExecutionInfo < ::ProtocolBuffers::Message; end
40
+ class SpecInfo < ::ProtocolBuffers::Message; end
41
+ class ScenarioInfo < ::ProtocolBuffers::Message; end
42
+ class StepInfo < ::ProtocolBuffers::Message; end
43
+ class ExecuteStepRequest < ::ProtocolBuffers::Message; end
44
+ class StepValidateRequest < ::ProtocolBuffers::Message; end
45
+ class StepValidateResponse < ::ProtocolBuffers::Message; end
46
+ class ExecutionEndingRequest < ::ProtocolBuffers::Message; end
47
+ class SuiteExecutionResult < ::ProtocolBuffers::Message; end
48
+ class StepNamesRequest < ::ProtocolBuffers::Message; end
49
+ class StepNamesResponse < ::ProtocolBuffers::Message; end
50
+ class ScenarioDataStoreInitRequest < ::ProtocolBuffers::Message; end
51
+ class SpecDataStoreInitRequest < ::ProtocolBuffers::Message; end
52
+ class SuiteDataStoreInitRequest < ::ProtocolBuffers::Message; end
53
+ class ParameterPosition < ::ProtocolBuffers::Message; end
54
+ class RefactorRequest < ::ProtocolBuffers::Message; end
55
+ class RefactorResponse < ::ProtocolBuffers::Message; end
56
+ class StepNameRequest < ::ProtocolBuffers::Message; end
57
+ class StepNameResponse < ::ProtocolBuffers::Message; end
58
+ class Message < ::ProtocolBuffers::Message; end
59
+
60
+ class KillProcessRequest < ::ProtocolBuffers::Message
61
+ set_fully_qualified_name "gauge.messages.KillProcessRequest"
62
+
63
+ end
64
+
65
+ class ExecutionStatusResponse < ::ProtocolBuffers::Message
66
+ set_fully_qualified_name "gauge.messages.ExecutionStatusResponse"
67
+
68
+ required ::Gauge::Messages::ProtoExecutionResult, :executionResult, 1
69
+ end
70
+
71
+ class ExecutionStartingRequest < ::ProtocolBuffers::Message
72
+ set_fully_qualified_name "gauge.messages.ExecutionStartingRequest"
73
+
74
+ optional ::Gauge::Messages::ExecutionInfo, :currentExecutionInfo, 1
75
+ end
76
+
77
+ class SpecExecutionStartingRequest < ::ProtocolBuffers::Message
78
+ set_fully_qualified_name "gauge.messages.SpecExecutionStartingRequest"
79
+
80
+ optional ::Gauge::Messages::ExecutionInfo, :currentExecutionInfo, 1
81
+ end
82
+
83
+ class SpecExecutionEndingRequest < ::ProtocolBuffers::Message
84
+ set_fully_qualified_name "gauge.messages.SpecExecutionEndingRequest"
85
+
86
+ optional ::Gauge::Messages::ExecutionInfo, :currentExecutionInfo, 1
87
+ end
88
+
89
+ class ScenarioExecutionStartingRequest < ::ProtocolBuffers::Message
90
+ set_fully_qualified_name "gauge.messages.ScenarioExecutionStartingRequest"
91
+
92
+ optional ::Gauge::Messages::ExecutionInfo, :currentExecutionInfo, 1
93
+ end
94
+
95
+ class ScenarioExecutionEndingRequest < ::ProtocolBuffers::Message
96
+ set_fully_qualified_name "gauge.messages.ScenarioExecutionEndingRequest"
97
+
98
+ optional ::Gauge::Messages::ExecutionInfo, :currentExecutionInfo, 1
99
+ end
100
+
101
+ class StepExecutionStartingRequest < ::ProtocolBuffers::Message
102
+ set_fully_qualified_name "gauge.messages.StepExecutionStartingRequest"
103
+
104
+ optional ::Gauge::Messages::ExecutionInfo, :currentExecutionInfo, 1
105
+ end
106
+
107
+ class StepExecutionEndingRequest < ::ProtocolBuffers::Message
108
+ set_fully_qualified_name "gauge.messages.StepExecutionEndingRequest"
109
+
110
+ optional ::Gauge::Messages::ExecutionInfo, :currentExecutionInfo, 1
111
+ end
112
+
113
+ class ExecutionInfo < ::ProtocolBuffers::Message
114
+ set_fully_qualified_name "gauge.messages.ExecutionInfo"
115
+
116
+ optional ::Gauge::Messages::SpecInfo, :currentSpec, 1
117
+ optional ::Gauge::Messages::ScenarioInfo, :currentScenario, 2
118
+ optional ::Gauge::Messages::StepInfo, :currentStep, 3
119
+ optional :string, :stacktrace, 4
120
+ end
121
+
122
+ class SpecInfo < ::ProtocolBuffers::Message
123
+ set_fully_qualified_name "gauge.messages.SpecInfo"
124
+
125
+ required :string, :name, 1
126
+ required :string, :fileName, 2
127
+ required :bool, :isFailed, 3
128
+ repeated :string, :tags, 4
129
+ end
130
+
131
+ class ScenarioInfo < ::ProtocolBuffers::Message
132
+ set_fully_qualified_name "gauge.messages.ScenarioInfo"
133
+
134
+ required :string, :name, 1
135
+ required :bool, :isFailed, 2
136
+ repeated :string, :tags, 3
137
+ end
138
+
139
+ class StepInfo < ::ProtocolBuffers::Message
140
+ set_fully_qualified_name "gauge.messages.StepInfo"
141
+
142
+ required ::Gauge::Messages::ExecuteStepRequest, :step, 1
143
+ required :bool, :isFailed, 2
144
+ end
145
+
146
+ class ExecuteStepRequest < ::ProtocolBuffers::Message
147
+ set_fully_qualified_name "gauge.messages.ExecuteStepRequest"
148
+
149
+ required :string, :actualStepText, 1
150
+ required :string, :parsedStepText, 2
151
+ optional :bool, :scenarioFailing, 3
152
+ repeated ::Gauge::Messages::Parameter, :parameters, 4
153
+ end
154
+
155
+ class StepValidateRequest < ::ProtocolBuffers::Message
156
+ set_fully_qualified_name "gauge.messages.StepValidateRequest"
157
+
158
+ required :string, :stepText, 1
159
+ required :int32, :numberOfParameters, 2
160
+ end
161
+
162
+ class StepValidateResponse < ::ProtocolBuffers::Message
163
+ set_fully_qualified_name "gauge.messages.StepValidateResponse"
164
+
165
+ required :bool, :isValid, 1
166
+ optional :string, :errorMessage, 2
167
+ end
168
+
169
+ class ExecutionEndingRequest < ::ProtocolBuffers::Message
170
+ set_fully_qualified_name "gauge.messages.ExecutionEndingRequest"
171
+
172
+ optional ::Gauge::Messages::ExecutionInfo, :currentExecutionInfo, 1
173
+ end
174
+
175
+ class SuiteExecutionResult < ::ProtocolBuffers::Message
176
+ set_fully_qualified_name "gauge.messages.SuiteExecutionResult"
177
+
178
+ required ::Gauge::Messages::ProtoSuiteResult, :suiteResult, 1
179
+ end
180
+
181
+ class StepNamesRequest < ::ProtocolBuffers::Message
182
+ set_fully_qualified_name "gauge.messages.StepNamesRequest"
183
+
184
+ end
185
+
186
+ class StepNamesResponse < ::ProtocolBuffers::Message
187
+ set_fully_qualified_name "gauge.messages.StepNamesResponse"
188
+
189
+ repeated :string, :steps, 1
190
+ end
191
+
192
+ class ScenarioDataStoreInitRequest < ::ProtocolBuffers::Message
193
+ set_fully_qualified_name "gauge.messages.ScenarioDataStoreInitRequest"
194
+
195
+ end
196
+
197
+ class SpecDataStoreInitRequest < ::ProtocolBuffers::Message
198
+ set_fully_qualified_name "gauge.messages.SpecDataStoreInitRequest"
199
+
200
+ end
201
+
202
+ class SuiteDataStoreInitRequest < ::ProtocolBuffers::Message
203
+ set_fully_qualified_name "gauge.messages.SuiteDataStoreInitRequest"
204
+
205
+ end
206
+
207
+ class ParameterPosition < ::ProtocolBuffers::Message
208
+ set_fully_qualified_name "gauge.messages.ParameterPosition"
209
+
210
+ required :int32, :oldPosition, 1
211
+ required :int32, :newPosition, 2
212
+ end
213
+
214
+ class RefactorRequest < ::ProtocolBuffers::Message
215
+ set_fully_qualified_name "gauge.messages.RefactorRequest"
216
+
217
+ required ::Gauge::Messages::ProtoStepValue, :oldStepValue, 1
218
+ required ::Gauge::Messages::ProtoStepValue, :newStepValue, 2
219
+ repeated ::Gauge::Messages::ParameterPosition, :paramPositions, 3
220
+ end
221
+
222
+ class RefactorResponse < ::ProtocolBuffers::Message
223
+ set_fully_qualified_name "gauge.messages.RefactorResponse"
224
+
225
+ required :bool, :success, 1
226
+ optional :string, :error, 2
227
+ repeated :string, :filesChanged, 3
228
+ end
229
+
230
+ class StepNameRequest < ::ProtocolBuffers::Message
231
+ set_fully_qualified_name "gauge.messages.StepNameRequest"
232
+
233
+ required :string, :stepValue, 1
234
+ end
235
+
236
+ class StepNameResponse < ::ProtocolBuffers::Message
237
+ set_fully_qualified_name "gauge.messages.StepNameResponse"
238
+
239
+ required :bool, :isStepPresent, 1
240
+ repeated :string, :stepName, 2
241
+ required :bool, :hasAlias, 3
242
+ end
243
+
244
+ class Message < ::ProtocolBuffers::Message
245
+ # forward declarations
246
+
247
+ # enums
248
+ module MessageType
249
+ include ::ProtocolBuffers::Enum
250
+
251
+ set_fully_qualified_name "gauge.messages.Message.MessageType"
252
+
253
+ ExecutionStarting = 0
254
+ SpecExecutionStarting = 1
255
+ SpecExecutionEnding = 2
256
+ ScenarioExecutionStarting = 3
257
+ ScenarioExecutionEnding = 4
258
+ StepExecutionStarting = 5
259
+ StepExecutionEnding = 6
260
+ ExecuteStep = 7
261
+ ExecutionEnding = 8
262
+ StepValidateRequest = 9
263
+ StepValidateResponse = 10
264
+ ExecutionStatusResponse = 11
265
+ StepNamesRequest = 12
266
+ StepNamesResponse = 13
267
+ KillProcessRequest = 14
268
+ SuiteExecutionResult = 15
269
+ ScenarioDataStoreInit = 16
270
+ SpecDataStoreInit = 17
271
+ SuiteDataStoreInit = 18
272
+ StepNameRequest = 19
273
+ StepNameResponse = 20
274
+ RefactorRequest = 21
275
+ RefactorResponse = 22
276
+ end
277
+
278
+ set_fully_qualified_name "gauge.messages.Message"
279
+
280
+ required ::Gauge::Messages::Message::MessageType, :messageType, 1
281
+ required :int64, :messageId, 2
282
+ optional ::Gauge::Messages::ExecutionStartingRequest, :executionStartingRequest, 3
283
+ optional ::Gauge::Messages::SpecExecutionStartingRequest, :specExecutionStartingRequest, 4
284
+ optional ::Gauge::Messages::SpecExecutionEndingRequest, :specExecutionEndingRequest, 5
285
+ optional ::Gauge::Messages::ScenarioExecutionStartingRequest, :scenarioExecutionStartingRequest, 6
286
+ optional ::Gauge::Messages::ScenarioExecutionEndingRequest, :scenarioExecutionEndingRequest, 7
287
+ optional ::Gauge::Messages::StepExecutionStartingRequest, :stepExecutionStartingRequest, 8
288
+ optional ::Gauge::Messages::StepExecutionEndingRequest, :stepExecutionEndingRequest, 9
289
+ optional ::Gauge::Messages::ExecuteStepRequest, :executeStepRequest, 10
290
+ optional ::Gauge::Messages::ExecutionEndingRequest, :executionEndingRequest, 11
291
+ optional ::Gauge::Messages::StepValidateRequest, :stepValidateRequest, 12
292
+ optional ::Gauge::Messages::StepValidateResponse, :stepValidateResponse, 13
293
+ optional ::Gauge::Messages::ExecutionStatusResponse, :executionStatusResponse, 14
294
+ optional ::Gauge::Messages::StepNamesRequest, :stepNamesRequest, 15
295
+ optional ::Gauge::Messages::StepNamesResponse, :stepNamesResponse, 16
296
+ optional ::Gauge::Messages::SuiteExecutionResult, :suiteExecutionResult, 17
297
+ optional ::Gauge::Messages::KillProcessRequest, :killProcessRequest, 18
298
+ optional ::Gauge::Messages::ScenarioDataStoreInitRequest, :scenarioDataStoreInitRequest, 19
299
+ optional ::Gauge::Messages::SpecDataStoreInitRequest, :specDataStoreInitRequest, 20
300
+ optional ::Gauge::Messages::SuiteDataStoreInitRequest, :suiteDataStoreInitRequest, 21
301
+ optional ::Gauge::Messages::StepNameRequest, :stepNameRequest, 22
302
+ optional ::Gauge::Messages::StepNameResponse, :stepNameResponse, 23
303
+ optional ::Gauge::Messages::RefactorRequest, :refactorRequest, 24
304
+ optional ::Gauge::Messages::RefactorResponse, :refactorResponse, 25
305
+ end
306
+
307
+ end
308
+ end