vx-builder 0.1.8 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/lib/vx/builder/build_configuration.rb +9 -6
  4. data/lib/vx/builder/build_configuration/deploy.rb +22 -13
  5. data/lib/vx/builder/build_configuration/deploy/provider.rb +58 -0
  6. data/lib/vx/builder/configuration.rb +1 -1
  7. data/lib/vx/builder/matrix.rb +14 -0
  8. data/lib/vx/builder/script.rb +32 -7
  9. data/lib/vx/builder/script/artifacts.rb +1 -3
  10. data/lib/vx/builder/script/base.rb +56 -0
  11. data/lib/vx/builder/script/clojure.rb +5 -9
  12. data/lib/vx/builder/script/deploy.rb +40 -0
  13. data/lib/vx/builder/script/env.rb +1 -3
  14. data/lib/vx/builder/script/java.rb +5 -5
  15. data/lib/vx/builder/script/ruby.rb +20 -15
  16. data/lib/vx/builder/script/scala.rb +11 -13
  17. data/lib/vx/builder/script/script.rb +19 -8
  18. data/lib/vx/builder/script/services.rb +1 -3
  19. data/lib/vx/builder/task.rb +5 -0
  20. data/lib/vx/builder/version.rb +1 -1
  21. data/spec/fixtures/integration/ruby/deploy/config.yml +12 -0
  22. data/spec/fixtures/integration/ruby/deploy/d.after_script.sh +10 -0
  23. data/spec/fixtures/integration/ruby/deploy/d.before_script.sh +61 -0
  24. data/spec/fixtures/integration/ruby/deploy/d.script.sh +4 -0
  25. data/spec/fixtures/integration/ruby/language/after_script.sh +10 -0
  26. data/spec/fixtures/integration/ruby/language/before_script.sh +59 -0
  27. data/spec/fixtures/integration/ruby/language/config.yml +1 -0
  28. data/spec/fixtures/integration/ruby/language/script.sh +8 -0
  29. data/spec/fixtures/integration/ruby/matrix/0.after_script.sh +10 -0
  30. data/spec/fixtures/integration/ruby/matrix/0.before_script.sh +61 -0
  31. data/spec/fixtures/integration/ruby/matrix/0.script.sh +6 -0
  32. data/spec/fixtures/integration/ruby/matrix/1.after_script.sh +10 -0
  33. data/spec/fixtures/integration/ruby/matrix/1.before_script.sh +61 -0
  34. data/spec/fixtures/integration/ruby/matrix/1.script.sh +6 -0
  35. data/spec/fixtures/integration/ruby/matrix/config.yml +11 -0
  36. data/spec/fixtures/integration/ruby/matrix/d.after_script.sh +10 -0
  37. data/spec/fixtures/integration/ruby/matrix/d.before_script.sh +59 -0
  38. data/spec/fixtures/integration/ruby/matrix/d.script.sh +4 -0
  39. data/spec/fixtures/travis.yml +3 -0
  40. data/spec/integration/ruby_spec.rb +159 -0
  41. data/spec/lib/builder/build_configuration_spec.rb +31 -0
  42. data/spec/lib/builder/matrix_spec.rb +59 -0
  43. data/spec/lib/builder/task_spec.rb +2 -1
  44. data/spec/support/create.rb +14 -11
  45. data/vx-builder.gemspec +1 -1
  46. metadata +48 -7
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  require 'vx/common'
3
3
 
4
4
  describe Vx::Builder::Task do
5
- let(:task) { create :task, pull_request_id: 1 }
5
+ let(:task) { create :task, pull_request_id: 1, deploy: true }
6
6
  subject { task }
7
7
 
8
8
  context "just created" do
@@ -14,6 +14,7 @@ describe Vx::Builder::Task do
14
14
  its(:job_id) { should eq 1 }
15
15
  its(:build_id) { should eq 12 }
16
16
  its(:pull_request_id) { should eq 1 }
17
+ its(:deploy?) { should be_true }
17
18
  end
18
19
 
19
20
  end
@@ -8,16 +8,17 @@ def create(name, options = {})
8
8
  when :task
9
9
  msg = create(:message)
10
10
  Vx::Builder::Task.new(
11
- job_id: 1,
12
- build_id: 12,
13
- name: 'name',
14
- src: msg.src,
15
- sha: msg.sha,
16
- deploy_key: msg.deploy_key,
17
- branch: msg.branch,
18
- cache_url_prefix: "http://example.com",
19
- artifacts_url_prefix: "http://example.com",
20
- pull_request_id: options[:pull_request_id]
11
+ job_id: 1,
12
+ build_id: 12,
13
+ name: 'name',
14
+ src: msg.src,
15
+ sha: msg.sha,
16
+ deploy_key: msg.deploy_key,
17
+ branch: msg.branch,
18
+ cache_url_prefix: "http://example.com",
19
+ artifacts_url_prefix: "http://example.com",
20
+ pull_request_id: options[:pull_request_id],
21
+ deploy: options[:deploy]
21
22
  )
22
23
 
23
24
  when :source
@@ -38,7 +39,9 @@ def create(name, options = {})
38
39
  after_success: [],
39
40
  task: options[:task] || create(:task),
40
41
  cache_key: [],
41
- cached_directories: []
42
+ cached_directories: [],
43
+ before_deploy: [],
44
+ deploy: [],
42
45
  )
43
46
 
44
47
  when :command_from_env
data/vx-builder.gemspec CHANGED
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.3"
26
26
  spec.add_development_dependency "rake"
27
- spec.add_development_dependency "rspec"
27
+ spec.add_development_dependency "rspec", '2.14.1'
28
28
  spec.add_development_dependency "rr"
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vx-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.2.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-05-19 00:00:00.000000000 Z
11
+ date: 2014-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vx-common
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 2.14.1
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 2.14.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rr
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -127,6 +127,7 @@ files:
127
127
  - lib/vx/builder/build_configuration/artifacts.rb
128
128
  - lib/vx/builder/build_configuration/cache.rb
129
129
  - lib/vx/builder/build_configuration/deploy.rb
130
+ - lib/vx/builder/build_configuration/deploy/provider.rb
130
131
  - lib/vx/builder/build_configuration/env.rb
131
132
  - lib/vx/builder/configuration.rb
132
133
  - lib/vx/builder/helper/config.rb
@@ -134,8 +135,10 @@ files:
134
135
  - lib/vx/builder/matrix.rb
135
136
  - lib/vx/builder/script.rb
136
137
  - lib/vx/builder/script/artifacts.rb
138
+ - lib/vx/builder/script/base.rb
137
139
  - lib/vx/builder/script/cache.rb
138
140
  - lib/vx/builder/script/clojure.rb
141
+ - lib/vx/builder/script/deploy.rb
139
142
  - lib/vx/builder/script/env.rb
140
143
  - lib/vx/builder/script/java.rb
141
144
  - lib/vx/builder/script/prepare.rb
@@ -146,10 +149,29 @@ files:
146
149
  - lib/vx/builder/task.rb
147
150
  - lib/vx/builder/version.rb
148
151
  - spec/fixtures/clojure.yml
152
+ - spec/fixtures/integration/ruby/deploy/config.yml
153
+ - spec/fixtures/integration/ruby/deploy/d.after_script.sh
154
+ - spec/fixtures/integration/ruby/deploy/d.before_script.sh
155
+ - spec/fixtures/integration/ruby/deploy/d.script.sh
156
+ - spec/fixtures/integration/ruby/language/after_script.sh
157
+ - spec/fixtures/integration/ruby/language/before_script.sh
158
+ - spec/fixtures/integration/ruby/language/config.yml
159
+ - spec/fixtures/integration/ruby/language/script.sh
160
+ - spec/fixtures/integration/ruby/matrix/0.after_script.sh
161
+ - spec/fixtures/integration/ruby/matrix/0.before_script.sh
162
+ - spec/fixtures/integration/ruby/matrix/0.script.sh
163
+ - spec/fixtures/integration/ruby/matrix/1.after_script.sh
164
+ - spec/fixtures/integration/ruby/matrix/1.before_script.sh
165
+ - spec/fixtures/integration/ruby/matrix/1.script.sh
166
+ - spec/fixtures/integration/ruby/matrix/config.yml
167
+ - spec/fixtures/integration/ruby/matrix/d.after_script.sh
168
+ - spec/fixtures/integration/ruby/matrix/d.before_script.sh
169
+ - spec/fixtures/integration/ruby/matrix/d.script.sh
149
170
  - spec/fixtures/scala.yml
150
171
  - spec/fixtures/travis.yml
151
172
  - spec/fixtures/travis_bug_1.yml
152
173
  - spec/fixtures/travis_bug_2.yml
174
+ - spec/integration/ruby_spec.rb
153
175
  - spec/lib/builder/build_configuration_spec.rb
154
176
  - spec/lib/builder/configuration_spec.rb
155
177
  - spec/lib/builder/matrix_spec.rb
@@ -188,16 +210,35 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
210
  version: '0'
189
211
  requirements: []
190
212
  rubyforge_project:
191
- rubygems_version: 2.0.14
213
+ rubygems_version: 2.2.2
192
214
  signing_key:
193
215
  specification_version: 4
194
216
  summary: Write a gem summary
195
217
  test_files:
196
218
  - spec/fixtures/clojure.yml
219
+ - spec/fixtures/integration/ruby/deploy/config.yml
220
+ - spec/fixtures/integration/ruby/deploy/d.after_script.sh
221
+ - spec/fixtures/integration/ruby/deploy/d.before_script.sh
222
+ - spec/fixtures/integration/ruby/deploy/d.script.sh
223
+ - spec/fixtures/integration/ruby/language/after_script.sh
224
+ - spec/fixtures/integration/ruby/language/before_script.sh
225
+ - spec/fixtures/integration/ruby/language/config.yml
226
+ - spec/fixtures/integration/ruby/language/script.sh
227
+ - spec/fixtures/integration/ruby/matrix/0.after_script.sh
228
+ - spec/fixtures/integration/ruby/matrix/0.before_script.sh
229
+ - spec/fixtures/integration/ruby/matrix/0.script.sh
230
+ - spec/fixtures/integration/ruby/matrix/1.after_script.sh
231
+ - spec/fixtures/integration/ruby/matrix/1.before_script.sh
232
+ - spec/fixtures/integration/ruby/matrix/1.script.sh
233
+ - spec/fixtures/integration/ruby/matrix/config.yml
234
+ - spec/fixtures/integration/ruby/matrix/d.after_script.sh
235
+ - spec/fixtures/integration/ruby/matrix/d.before_script.sh
236
+ - spec/fixtures/integration/ruby/matrix/d.script.sh
197
237
  - spec/fixtures/scala.yml
198
238
  - spec/fixtures/travis.yml
199
239
  - spec/fixtures/travis_bug_1.yml
200
240
  - spec/fixtures/travis_bug_2.yml
241
+ - spec/integration/ruby_spec.rb
201
242
  - spec/lib/builder/build_configuration_spec.rb
202
243
  - spec/lib/builder/configuration_spec.rb
203
244
  - spec/lib/builder/matrix_spec.rb