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,251 @@
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
+ module Gauge
25
+ # @api private
26
+ module Messages
27
+ # forward declarations
28
+ class ProtoSpec < ::ProtocolBuffers::Message; end
29
+ class ProtoItem < ::ProtocolBuffers::Message; end
30
+ class ProtoScenario < ::ProtocolBuffers::Message; end
31
+ class ProtoTableDrivenScenario < ::ProtocolBuffers::Message; end
32
+ class ProtoStep < ::ProtocolBuffers::Message; end
33
+ class ProtoConcept < ::ProtocolBuffers::Message; end
34
+ class ProtoTags < ::ProtocolBuffers::Message; end
35
+ class Fragment < ::ProtocolBuffers::Message; end
36
+ class Parameter < ::ProtocolBuffers::Message; end
37
+ class ProtoComment < ::ProtocolBuffers::Message; end
38
+ class ProtoTable < ::ProtocolBuffers::Message; end
39
+ class ProtoTableRow < ::ProtocolBuffers::Message; end
40
+ class ProtoStepExecutionResult < ::ProtocolBuffers::Message; end
41
+ class ProtoExecutionResult < ::ProtocolBuffers::Message; end
42
+ class ProtoHookFailure < ::ProtocolBuffers::Message; end
43
+ class ProtoSuiteResult < ::ProtocolBuffers::Message; end
44
+ class ProtoSpecResult < ::ProtocolBuffers::Message; end
45
+ class ProtoStepValue < ::ProtocolBuffers::Message; end
46
+
47
+ class ProtoSpec < ::ProtocolBuffers::Message
48
+ set_fully_qualified_name "gauge.messages.ProtoSpec"
49
+
50
+ required :string, :specHeading, 1
51
+ repeated ::Gauge::Messages::ProtoItem, :items, 2
52
+ required :bool, :isTableDriven, 3
53
+ optional ::Gauge::Messages::ProtoHookFailure, :preHookFailure, 4
54
+ optional ::Gauge::Messages::ProtoHookFailure, :postHookFailure, 5
55
+ required :string, :fileName, 6
56
+ repeated :string, :tags, 7
57
+ end
58
+
59
+ class ProtoItem < ::ProtocolBuffers::Message
60
+ # forward declarations
61
+
62
+ # enums
63
+ module ItemType
64
+ include ::ProtocolBuffers::Enum
65
+
66
+ set_fully_qualified_name "gauge.messages.ProtoItem.ItemType"
67
+
68
+ Step = 1
69
+ Comment = 2
70
+ Concept = 3
71
+ Scenario = 4
72
+ TableDrivenScenario = 5
73
+ Table = 6
74
+ end
75
+
76
+ set_fully_qualified_name "gauge.messages.ProtoItem"
77
+
78
+ required ::Gauge::Messages::ProtoItem::ItemType, :itemType, 1
79
+ optional ::Gauge::Messages::ProtoStep, :step, 2
80
+ optional ::Gauge::Messages::ProtoConcept, :concept, 3
81
+ optional ::Gauge::Messages::ProtoScenario, :scenario, 4
82
+ optional ::Gauge::Messages::ProtoTableDrivenScenario, :tableDrivenScenario, 5
83
+ optional ::Gauge::Messages::ProtoComment, :comment, 6
84
+ optional ::Gauge::Messages::ProtoTable, :table, 7
85
+ end
86
+
87
+ class ProtoScenario < ::ProtocolBuffers::Message
88
+ set_fully_qualified_name "gauge.messages.ProtoScenario"
89
+
90
+ required :string, :scenarioHeading, 1
91
+ required :bool, :failed, 2
92
+ repeated ::Gauge::Messages::ProtoItem, :contexts, 3
93
+ repeated ::Gauge::Messages::ProtoItem, :scenarioItems, 4
94
+ optional ::Gauge::Messages::ProtoHookFailure, :preHookFailure, 5
95
+ optional ::Gauge::Messages::ProtoHookFailure, :postHookFailure, 6
96
+ repeated :string, :tags, 7
97
+ optional :int64, :executionTime, 8
98
+ end
99
+
100
+ class ProtoTableDrivenScenario < ::ProtocolBuffers::Message
101
+ set_fully_qualified_name "gauge.messages.ProtoTableDrivenScenario"
102
+
103
+ repeated ::Gauge::Messages::ProtoScenario, :scenarios, 1
104
+ end
105
+
106
+ class ProtoStep < ::ProtocolBuffers::Message
107
+ set_fully_qualified_name "gauge.messages.ProtoStep"
108
+
109
+ required :string, :actualText, 1
110
+ required :string, :parsedText, 2
111
+ repeated ::Gauge::Messages::Fragment, :fragments, 3
112
+ optional ::Gauge::Messages::ProtoStepExecutionResult, :stepExecutionResult, 4
113
+ end
114
+
115
+ class ProtoConcept < ::ProtocolBuffers::Message
116
+ set_fully_qualified_name "gauge.messages.ProtoConcept"
117
+
118
+ required ::Gauge::Messages::ProtoStep, :conceptStep, 1
119
+ repeated ::Gauge::Messages::ProtoItem, :steps, 2
120
+ optional ::Gauge::Messages::ProtoStepExecutionResult, :conceptExecutionResult, 3
121
+ end
122
+
123
+ class ProtoTags < ::ProtocolBuffers::Message
124
+ set_fully_qualified_name "gauge.messages.ProtoTags"
125
+
126
+ repeated :string, :tags, 1
127
+ end
128
+
129
+ class Fragment < ::ProtocolBuffers::Message
130
+ # forward declarations
131
+
132
+ # enums
133
+ module FragmentType
134
+ include ::ProtocolBuffers::Enum
135
+
136
+ set_fully_qualified_name "gauge.messages.Fragment.FragmentType"
137
+
138
+ Text = 1
139
+ Parameter = 2
140
+ end
141
+
142
+ set_fully_qualified_name "gauge.messages.Fragment"
143
+
144
+ required ::Gauge::Messages::Fragment::FragmentType, :fragmentType, 1
145
+ optional :string, :text, 2
146
+ optional ::Gauge::Messages::Parameter, :parameter, 3
147
+ end
148
+
149
+ class Parameter < ::ProtocolBuffers::Message
150
+ # forward declarations
151
+
152
+ # enums
153
+ module ParameterType
154
+ include ::ProtocolBuffers::Enum
155
+
156
+ set_fully_qualified_name "gauge.messages.Parameter.ParameterType"
157
+
158
+ Static = 1
159
+ Dynamic = 2
160
+ Special_String = 3
161
+ Special_Table = 4
162
+ Table = 5
163
+ end
164
+
165
+ set_fully_qualified_name "gauge.messages.Parameter"
166
+
167
+ required ::Gauge::Messages::Parameter::ParameterType, :parameterType, 1
168
+ optional :string, :value, 2
169
+ optional :string, :name, 3
170
+ optional ::Gauge::Messages::ProtoTable, :table, 4
171
+ end
172
+
173
+ class ProtoComment < ::ProtocolBuffers::Message
174
+ set_fully_qualified_name "gauge.messages.ProtoComment"
175
+
176
+ required :string, :text, 1
177
+ end
178
+
179
+ class ProtoTable < ::ProtocolBuffers::Message
180
+ set_fully_qualified_name "gauge.messages.ProtoTable"
181
+
182
+ required ::Gauge::Messages::ProtoTableRow, :headers, 1
183
+ repeated ::Gauge::Messages::ProtoTableRow, :rows, 2
184
+ end
185
+
186
+ class ProtoTableRow < ::ProtocolBuffers::Message
187
+ set_fully_qualified_name "gauge.messages.ProtoTableRow"
188
+
189
+ repeated :string, :cells, 1
190
+ end
191
+
192
+ class ProtoStepExecutionResult < ::ProtocolBuffers::Message
193
+ set_fully_qualified_name "gauge.messages.ProtoStepExecutionResult"
194
+
195
+ required ::Gauge::Messages::ProtoExecutionResult, :executionResult, 1
196
+ optional ::Gauge::Messages::ProtoHookFailure, :preHookFailure, 2
197
+ optional ::Gauge::Messages::ProtoHookFailure, :postHookFailure, 3
198
+ end
199
+
200
+ class ProtoExecutionResult < ::ProtocolBuffers::Message
201
+ set_fully_qualified_name "gauge.messages.ProtoExecutionResult"
202
+
203
+ required :bool, :failed, 1
204
+ optional :bool, :recoverableError, 2
205
+ optional :string, :errorMessage, 3
206
+ optional :string, :stackTrace, 4
207
+ optional :bytes, :screenShot, 5
208
+ required :int64, :executionTime, 6
209
+ end
210
+
211
+ class ProtoHookFailure < ::ProtocolBuffers::Message
212
+ set_fully_qualified_name "gauge.messages.ProtoHookFailure"
213
+
214
+ required :string, :stackTrace, 1
215
+ required :string, :errorMessage, 2
216
+ optional :bytes, :screenShot, 3
217
+ end
218
+
219
+ class ProtoSuiteResult < ::ProtocolBuffers::Message
220
+ set_fully_qualified_name "gauge.messages.ProtoSuiteResult"
221
+
222
+ repeated ::Gauge::Messages::ProtoSpecResult, :specResults, 1
223
+ optional ::Gauge::Messages::ProtoHookFailure, :preHookFailure, 2
224
+ optional ::Gauge::Messages::ProtoHookFailure, :postHookFailure, 3
225
+ required :bool, :failed, 4
226
+ required :int32, :specsFailedCount, 5
227
+ optional :int64, :executionTime, 6
228
+ required :float, :successRate, 7
229
+ end
230
+
231
+ class ProtoSpecResult < ::ProtocolBuffers::Message
232
+ set_fully_qualified_name "gauge.messages.ProtoSpecResult"
233
+
234
+ required ::Gauge::Messages::ProtoSpec, :protoSpec, 1
235
+ required :int32, :scenarioCount, 2
236
+ required :int32, :scenarioFailedCount, 3
237
+ required :bool, :failed, 4
238
+ repeated :int32, :failedDataTableRows, 5
239
+ optional :int64, :executionTime, 6
240
+ end
241
+
242
+ class ProtoStepValue < ::ProtocolBuffers::Message
243
+ set_fully_qualified_name "gauge.messages.ProtoStepValue"
244
+
245
+ required :string, :stepValue, 1
246
+ required :string, :parameterizedStepValue, 2
247
+ repeated :string, :parameters, 3
248
+ end
249
+
250
+ end
251
+ end
@@ -0,0 +1,43 @@
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
+ # Holds a table definition. This corresponds to a markdown table defined in the .spec files.
20
+ # @api public
21
+ class Table
22
+ # @api private
23
+ def initialize(protoTable)
24
+ @columns = protoTable.headers.cells
25
+ @rows = []
26
+ protoTable.rows.each do |row|
27
+ @rows.push row.cells
28
+ end
29
+ end
30
+
31
+ # Gets the column headers of the table
32
+ # @return [string[]]
33
+ def columns
34
+ @columns
35
+ end
36
+
37
+ # Gets the rows of the table. The rows are two dimensional arrays.
38
+ # @return [string[][]]
39
+ def rows
40
+ @rows
41
+ end
42
+ end
43
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gauge-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4.1
5
+ platform: ruby
6
+ authors:
7
+ - Gauge Team
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ruby-protocol-buffers
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 1.5.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.5.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: os
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 0.9.6
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.9.6
41
+ - !ruby/object:Gem::Dependency
42
+ name: parser
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.2'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: method_source
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.8.2
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.8.2
69
+ description: Adds Ruby support into Gauge tests
70
+ email:
71
+ - gauge@thoughtworks.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - lib/api.pb.rb
77
+ - lib/code_parser.rb
78
+ - lib/configuration.rb
79
+ - lib/connector.rb
80
+ - lib/datastore.rb
81
+ - lib/executor.rb
82
+ - lib/gauge.rb
83
+ - lib/gauge_runtime.rb
84
+ - lib/message_processor.rb
85
+ - lib/messages.pb.rb
86
+ - lib/method_cache.rb
87
+ - lib/processors/datastore_init_processor.rb
88
+ - lib/processors/execute_step_request_processor.rb
89
+ - lib/processors/execution_handler.rb
90
+ - lib/processors/execution_hook_processors.rb
91
+ - lib/processors/kill_request_processor.rb
92
+ - lib/processors/refactor_step_request_processor.rb
93
+ - lib/processors/step_name_request_processor.rb
94
+ - lib/processors/step_names_request_processor.rb
95
+ - lib/processors/step_validation_request_processor.rb
96
+ - lib/spec.pb.rb
97
+ - lib/table.rb
98
+ homepage: http://www.getgauge.io
99
+ licenses:
100
+ - GPLv3
101
+ metadata: {}
102
+ post_install_message:
103
+ rdoc_options: []
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ requirements: []
117
+ rubyforge_project:
118
+ rubygems_version: 2.4.5
119
+ signing_key:
120
+ specification_version: 4
121
+ summary: Ruby support for Gauge
122
+ test_files: []
123
+ has_rdoc: yard