Skip to content

Commit

Permalink
updating proto messages getgauge/gauge-vscode#85 #47
Browse files Browse the repository at this point in the history
  • Loading branch information
BugDiver committed Jan 11, 2018
1 parent 73583b9 commit 7cacf28
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 21 deletions.
2 changes: 1 addition & 1 deletion gauge-proto
Submodule gauge-proto updated 4 files
+0 −16 api.proto
+0 −118 api_v2.proto
+49 −0 messages.proto
+44 −5 spec.proto
16 changes: 0 additions & 16 deletions lib/api.pb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class GetAllStepsRequest < ::ProtocolBuffers::Message; end
class GetAllStepsResponse < ::ProtocolBuffers::Message; end
class SpecsRequest < ::ProtocolBuffers::Message; end
class SpecsResponse < ::ProtocolBuffers::Message; end
class Error < ::ProtocolBuffers::Message; end
class GetAllConceptsRequest < ::ProtocolBuffers::Message; end
class GetAllConceptsResponse < ::ProtocolBuffers::Message; end
class ConceptInfo < ::ProtocolBuffers::Message; end
Expand All @@ -27,7 +26,6 @@ class GetLanguagePluginLibPathResponse < ::ProtocolBuffers::Message; end
class ErrorResponse < ::ProtocolBuffers::Message; end
class PerformRefactoringRequest < ::ProtocolBuffers::Message; end
class PerformRefactoringResponse < ::ProtocolBuffers::Message; end
class ExtractConceptInfoRequest < ::ProtocolBuffers::Message; end
class ExtractConceptRequest < ::ProtocolBuffers::Message; end
class TextInfo < ::ProtocolBuffers::Message; end
class Step < ::ProtocolBuffers::Message; end
Expand Down Expand Up @@ -93,14 +91,6 @@ class SpecDetail < ::ProtocolBuffers::Message
repeated ::Gauge::Messages::SpecsResponse::SpecDetail, :details, 1
end

class Error < ::ProtocolBuffers::Message
set_fully_qualified_name "gauge.messages.Error"

optional :string, :filename, 1
optional :int32, :lineNumber, 2
optional :string, :message, 3
end

class GetAllConceptsRequest < ::ProtocolBuffers::Message
set_fully_qualified_name "gauge.messages.GetAllConceptsRequest"

Expand Down Expand Up @@ -166,12 +156,6 @@ class PerformRefactoringResponse < ::ProtocolBuffers::Message
repeated :string, :filesChanged, 3
end

class ExtractConceptInfoRequest < ::ProtocolBuffers::Message
set_fully_qualified_name "gauge.messages.ExtractConceptInfoRequest"

optional :string, :text, 1
end

class ExtractConceptRequest < ::ProtocolBuffers::Message
set_fully_qualified_name "gauge.messages.ExtractConceptRequest"

Expand Down
46 changes: 46 additions & 0 deletions lib/messages.pb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class RefactorResponse < ::ProtocolBuffers::Message; end
class StepNameRequest < ::ProtocolBuffers::Message; end
class StepNameResponse < ::ProtocolBuffers::Message; end
class UnsupportedMessageResponse < ::ProtocolBuffers::Message; end
class CacheFileRequest < ::ProtocolBuffers::Message; end
class StepPositionsRequest < ::ProtocolBuffers::Message; end
class StepPositionsResponse < ::ProtocolBuffers::Message; end
class Message < ::ProtocolBuffers::Message; end

class KillProcessRequest < ::ProtocolBuffers::Message
Expand Down Expand Up @@ -129,6 +132,7 @@ class StepInfo < ::ProtocolBuffers::Message

optional ::Gauge::Messages::ExecuteStepRequest, :step, 1
optional :bool, :isFailed, 2
optional :string, :stackTrace, 3
end

class ExecuteStepRequest < ::ProtocolBuffers::Message
Expand All @@ -145,6 +149,7 @@ class StepValidateRequest < ::ProtocolBuffers::Message

optional :string, :stepText, 1
optional :int32, :numberOfParameters, 2
optional ::Gauge::Messages::ProtoStepValue, :stepValue, 3
end

class StepValidateResponse < ::ProtocolBuffers::Message
Expand All @@ -165,6 +170,7 @@ module ErrorType
optional :bool, :isValid, 1
optional :string, :errorMessage, 2
optional ::Gauge::Messages::StepValidateResponse::ErrorType, :errorType, 3
optional :string, :suggestion, 4
end

class SuiteExecutionResult < ::ProtocolBuffers::Message
Expand Down Expand Up @@ -234,6 +240,8 @@ class StepNameResponse < ::ProtocolBuffers::Message
optional :bool, :isStepPresent, 1
repeated :string, :stepName, 2
optional :bool, :hasAlias, 3
optional :string, :fileName, 4
optional ::Gauge::Messages::Span, :span, 5
end

class UnsupportedMessageResponse < ::ProtocolBuffers::Message
Expand All @@ -242,6 +250,38 @@ class UnsupportedMessageResponse < ::ProtocolBuffers::Message
optional :string, :message, 1
end

class CacheFileRequest < ::ProtocolBuffers::Message
set_fully_qualified_name "gauge.messages.CacheFileRequest"

optional :string, :content, 1
optional :string, :filePath, 2
optional :bool, :isClosed, 3
end

class StepPositionsRequest < ::ProtocolBuffers::Message
set_fully_qualified_name "gauge.messages.StepPositionsRequest"

optional :string, :filePath, 1
end

class StepPositionsResponse < ::ProtocolBuffers::Message
# forward declarations
class StepPosition < ::ProtocolBuffers::Message; end

set_fully_qualified_name "gauge.messages.StepPositionsResponse"

# nested messages
class StepPosition < ::ProtocolBuffers::Message
set_fully_qualified_name "gauge.messages.StepPositionsResponse.StepPosition"

optional :string, :stepValue, 1
optional ::Gauge::Messages::Span, :span, 2
end

repeated ::Gauge::Messages::StepPositionsResponse::StepPosition, :stepPositions, 1
optional :string, :error, 2
end

class Message < ::ProtocolBuffers::Message
# forward declarations

Expand Down Expand Up @@ -275,6 +315,9 @@ module MessageType
RefactorRequest = 21
RefactorResponse = 22
UnsupportedMessageResponse = 23
CacheFileRequest = 24
StepPositionsRequest = 25
StepPositionsResponse = 26
end

set_fully_qualified_name "gauge.messages.Message"
Expand Down Expand Up @@ -305,6 +348,9 @@ module MessageType
optional ::Gauge::Messages::RefactorRequest, :refactorRequest, 24
optional ::Gauge::Messages::RefactorResponse, :refactorResponse, 25
optional ::Gauge::Messages::UnsupportedMessageResponse, :unsupportedMessageResponse, 26
optional ::Gauge::Messages::CacheFileRequest, :cacheFileRequest, 27
optional ::Gauge::Messages::StepPositionsRequest, :stepPositionsRequest, 28
optional ::Gauge::Messages::StepPositionsResponse, :stepPositionsResponse, 29
end

end
Expand Down
42 changes: 38 additions & 4 deletions lib/spec.pb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class ProtoExecutionResult < ::ProtocolBuffers::Message; end
class ProtoHookFailure < ::ProtocolBuffers::Message; end
class ProtoSuiteResult < ::ProtocolBuffers::Message; end
class ProtoSpecResult < ::ProtocolBuffers::Message; end
class Error < ::ProtocolBuffers::Message; end
class ProtoStepValue < ::ProtocolBuffers::Message; end

# enums
Expand All @@ -44,10 +45,12 @@ class ProtoSpec < ::ProtocolBuffers::Message
optional :string, :specHeading, 1
repeated ::Gauge::Messages::ProtoItem, :items, 2
optional :bool, :isTableDriven, 3
optional ::Gauge::Messages::ProtoHookFailure, :preHookFailure, 4
optional ::Gauge::Messages::ProtoHookFailure, :postHookFailure, 5
repeated ::Gauge::Messages::ProtoHookFailure, :preHookFailures, 4
repeated ::Gauge::Messages::ProtoHookFailure, :postHookFailures, 5
optional :string, :fileName, 6
repeated :string, :tags, 7
repeated :string, :preHookMessages, 8
repeated :string, :postHookMessages, 9
end

class ProtoItem < ::ProtocolBuffers::Message
Expand Down Expand Up @@ -97,13 +100,17 @@ class ProtoScenario < ::ProtocolBuffers::Message
repeated ::Gauge::Messages::ProtoItem, :tearDownSteps, 12
optional ::Gauge::Messages::Span, :span, 13
optional ::Gauge::Messages::ExecutionStatus, :executionStatus, 14
repeated :string, :preHookMessages, 15
repeated :string, :postHookMessages, 16
end

class Span < ::ProtocolBuffers::Message
set_fully_qualified_name "gauge.messages.Span"

optional :int64, :start, 1
optional :int64, :end, 2
optional :int64, :startChar, 3
optional :int64, :endChar, 4
end

class ProtoTableDrivenScenario < ::ProtocolBuffers::Message
Expand All @@ -120,6 +127,8 @@ class ProtoStep < ::ProtocolBuffers::Message
optional :string, :parsedText, 2
repeated ::Gauge::Messages::Fragment, :fragments, 3
optional ::Gauge::Messages::ProtoStepExecutionResult, :stepExecutionResult, 4
repeated :string, :preHookMessages, 5
repeated :string, :postHookMessages, 6
end

class ProtoConcept < ::ProtocolBuffers::Message
Expand Down Expand Up @@ -240,6 +249,7 @@ class ProtoHookFailure < ::ProtocolBuffers::Message
optional :string, :stackTrace, 1
optional :string, :errorMessage, 2
optional :bytes, :screenShot, 3
optional :int32, :tableRowIndex, 4
end

class ProtoSuiteResult < ::ProtocolBuffers::Message
Expand All @@ -257,6 +267,8 @@ class ProtoSuiteResult < ::ProtocolBuffers::Message
optional :string, :projectName, 10
optional :string, :timestamp, 11
optional :int32, :specsSkippedCount, 12
repeated :string, :preHookMessages, 13
repeated :string, :postHookMessages, 14
end

class ProtoSpecResult < ::ProtocolBuffers::Message
Expand All @@ -269,8 +281,30 @@ class ProtoSpecResult < ::ProtocolBuffers::Message
repeated :int32, :failedDataTableRows, 5
optional :int64, :executionTime, 6
optional :bool, :skipped, 7
optional :int32, :scenarioSkippedCount, 9
repeated :int32, :skippedDataTableRows, 10
optional :int32, :scenarioSkippedCount, 8
repeated :int32, :skippedDataTableRows, 9
repeated ::Gauge::Messages::Error, :errors, 10
end

class Error < ::ProtocolBuffers::Message
# forward declarations

# enums
module ErrorType
include ::ProtocolBuffers::Enum

set_fully_qualified_name "gauge.messages.Error.ErrorType"

PARSE_ERROR = 0
VALIDATION_ERROR = 1
end

set_fully_qualified_name "gauge.messages.Error"

optional ::Gauge::Messages::Error::ErrorType, :type, 1
optional :string, :filename, 2
optional :int32, :lineNumber, 3
optional :string, :message, 4
end

class ProtoStepValue < ::ProtocolBuffers::Message
Expand Down

0 comments on commit 7cacf28

Please sign in to comment.