vx-message 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc2c454e442e628a32526ad5e87242bb09e93fc1
4
- data.tar.gz: b6ce5162044b4ff7ffabff1fee2ad56b9c3401b8
3
+ metadata.gz: 93fc9b03decef64aafb552293a6f25d28a5cbe9a
4
+ data.tar.gz: e981a507e7feac92bc30e6b7ac9a89000430f7d4
5
5
  SHA512:
6
- metadata.gz: 571db7e2f7e41ff5b62e5dce7df592eaf289a5c475d9057215075d3771bd9c5b40b59bedb71ea13b4d5ad19460b97226c89b43e48e5d72398718a3785629b516
7
- data.tar.gz: dffda3acef3e9632d0bd3d574762ec1e0cf1e6c00f2d02a70586db264df66c6530e97e2dd6c32d5d29e4223554498086e88adbea2628e0ee3003bec14b7009f2
6
+ metadata.gz: d82c2e03a12aba791073b0a798154697f94e415cd6220c6be11540d4dfcdc9085731edbc9209c0cb532ba8a7925577dadc8531d33a17ed2a07f14a7d13c28ccf
7
+ data.tar.gz: 277b5367029fa221b42d93ffb98c25104de565aac28c733f612adcc30143984c372ef1a0fe6acaea291293a1b3c104442b66b0d24e6e153234de3e1073d1d0c7
@@ -24,22 +24,13 @@ module Vx
24
24
 
25
25
 
26
26
  required :project_id, :uint64, 1
27
- required :id, :uint64, 2
27
+ required :build_id, :uint64, 2
28
28
  required :name, :string, 3
29
29
  required :job_id, :uint64, 4
30
30
  required :before_script, :string, 5
31
31
  required :script, :string, 6
32
32
  required :after_script, :string, 7
33
-
34
- end
35
-
36
- class BuildLog
37
- include Beefcake::Message
38
-
39
-
40
- required :build_id, :uint64, 1
41
- required :log, :string, 2
42
- required :tm, :uint64, 3
33
+ optional :image, :string, 8
43
34
 
44
35
  end
45
36
 
@@ -54,24 +45,6 @@ module Vx
54
45
 
55
46
  end
56
47
 
57
- class BuildStatus
58
- include Beefcake::Message
59
-
60
- module Status
61
- INITIALIZED = 0
62
- STARTED = 2
63
- FINISHED = 3
64
- BROKEN = 4
65
- FAILED = 5
66
- end
67
-
68
- required :build_id, :uint64, 1
69
- required :status, BuildStatus::Status, 2
70
- required :tm, :uint64, 3
71
- required :jobs_count, :uint32, 5
72
-
73
- end
74
-
75
48
  class JobStatus
76
49
  include Beefcake::Message
77
50
 
@@ -4,24 +4,6 @@ require File.expand_path("../../message", __FILE__)
4
4
  module Vx
5
5
  module Message
6
6
 
7
- class BuildInfo
8
- class << self
9
-
10
- def test_attributes(options = {})
11
- {
12
- build_id: 1,
13
- commit_author: 'Автор по русски',
14
- commit_message: 'Сообщение по русски',
15
- }.merge(options)
16
- end
17
-
18
- def test_message(options = {})
19
- new test_attributes(options)
20
- end
21
-
22
- end
23
- end
24
-
25
7
  class JobStatus
26
8
  class << self
27
9
 
@@ -42,25 +24,6 @@ module Vx
42
24
  end
43
25
  end
44
26
 
45
- class BuildStatus
46
- class << self
47
-
48
- def test_attributes(options = {})
49
- {
50
- build_id: 1,
51
- status: 0,
52
- tm: 1376137604,
53
- jobs_count: 1,
54
- }.merge(options)
55
- end
56
-
57
- def test_message(options = {})
58
- new test_attributes(options)
59
- end
60
-
61
- end
62
- end
63
-
64
27
  class JobLog
65
28
  class << self
66
29
 
@@ -80,31 +43,13 @@ module Vx
80
43
  end
81
44
  end
82
45
 
83
- class BuildLog
84
- class << self
85
-
86
- def test_attributes(options = {})
87
- {
88
- build_id: 1,
89
- log: 'log',
90
- tm: 1376137604,
91
- }.merge(options)
92
- end
93
-
94
- def test_message(options = {})
95
- new test_attributes(options)
96
- end
97
-
98
- end
99
- end
100
-
101
46
  class PerformJob
102
47
  class << self
103
48
 
104
49
  def test_attributes(options = {})
105
50
  options.merge({
106
51
  project_id: options[:project_id] || 1,
107
- id: options[:id] || 1,
52
+ build_id: options[:build_id] || 1,
108
53
  name: options[:name] || 'evrone/test-repo',
109
54
  job_id: options[:job_id] || 2,
110
55
  before_script: options[:before_script] || 'echo before_script',
@@ -1,5 +1,5 @@
1
1
  module Vx
2
2
  module Message
3
- VERSION = "0.4.1"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
data/proto/messages.proto CHANGED
@@ -13,18 +13,13 @@ message PerformBuild {
13
13
 
14
14
  message PerformJob {
15
15
  required uint64 project_id = 1;
16
- required uint64 id = 2;
16
+ required uint64 build_id = 2;
17
17
  required string name = 3;
18
18
  required uint64 job_id = 4;
19
19
  required string before_script = 5;
20
20
  required string script = 6;
21
21
  required string after_script = 7;
22
- }
23
-
24
- message BuildLog {
25
- required uint64 build_id = 1;
26
- required string log = 2;
27
- required uint64 tm = 3;
22
+ optional string image = 8;
28
23
  }
29
24
 
30
25
  message JobLog {
@@ -34,21 +29,6 @@ message JobLog {
34
29
  required uint64 job_id = 5;
35
30
  }
36
31
 
37
- message BuildStatus {
38
- enum Status {
39
- INITIALIZED = 0;
40
- STARTED = 2;
41
- FINISHED = 3;
42
- BROKEN = 4;
43
- FAILED = 5;
44
- }
45
-
46
- required uint64 build_id = 1;
47
- required Status status = 2;
48
- required uint64 tm = 3;
49
- required uint32 jobs_count = 5;
50
- }
51
-
52
32
  message JobStatus {
53
33
  enum Status {
54
34
  INITIALIZED = 0;
@@ -3,7 +3,7 @@ require 'stringio'
3
3
 
4
4
  describe Vx::Message do
5
5
 
6
- %w{ PerformBuild PerformJob BuildLog JobLog BuildStatus JobStatus }.each do |klass|
6
+ %w{ PerformBuild PerformJob JobLog JobStatus }.each do |klass|
7
7
 
8
8
  context "#{klass}" do
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vx-message
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Galinsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-22 00:00:00.000000000 Z
11
+ date: 2014-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: beefcake