vx-builder 0.6.1 → 0.6.2

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: 5eaaf487acad50dc8c616d760ed325170492061d
4
- data.tar.gz: f317d311216f6bfb8a289792439f1745efabf063
3
+ metadata.gz: 854113ca611fe901b98e1687bf2c5785e99cfae7
4
+ data.tar.gz: b029abf417eee984ed25138cbdd7e3be80449bba
5
5
  SHA512:
6
- metadata.gz: 0bb1117eeed192aa0fa61c594aed41507cf2bb966dedbf22c6e2c0f5c741fdd608c655ac28975c4acda207295415bdff5f82d40b9d456d7dd5d92c2e3adcbb60
7
- data.tar.gz: 563ff1f61f7a520e460e00afceeeb94fee9894a40a2e0acbe09de5fada9c820b845690881b0d0472ce253a06b77ffb7da2e48dfec8e9348b82c1ba6ac5b4a254
6
+ metadata.gz: 16012ee643268da656ed034422a8d3b399930ad0f625b8af50ab3a4466ccbb8d9eeab6e891b9db1201e4531c1caf7e315c1547803de4205ff5a7c247382462e9
7
+ data.tar.gz: b99fb162e766a033e7ffed578072be402694fd41412fd63b1912498bf76c864dbbd8287847f28753e0f4b9918cc663ca03c43082c69b96db4b4a7361fcba1351
@@ -5,8 +5,8 @@ module Vx
5
5
  class Python < Base
6
6
 
7
7
  DEFAULT_PYTHON = '2.7'
8
- PIP_DOWNLOADS = "~/.pip-downloads"
9
- PIP_OPTS = " --download-cache=#{PIP_DOWNLOADS}"
8
+ PIP_DOWNLOADS = "~/.pip-downloads"
9
+ PIP_OPTS = " --download-cache=#{PIP_DOWNLOADS}"
10
10
 
11
11
  def call(env)
12
12
  if enabled?(env)
@@ -26,7 +26,7 @@ module Vx
26
26
  end
27
27
 
28
28
  env.stage("install").tap do |i|
29
- i.add_task "python", "action" => "install", "python" => DEFAULT_PYTHON
29
+ i.add_task "python", "action" => "install", "python" => py_version
30
30
  i.add_task "python", "virtualenv"
31
31
  i.add_task "python", "announce"
32
32
 
@@ -64,7 +64,7 @@ module Vx
64
64
 
65
65
  def python_version(env)
66
66
  v = env.source.python.first
67
- v || DEFAULT_PYTHON
67
+ (v || DEFAULT_PYTHON).to_s
68
68
  end
69
69
 
70
70
  end
@@ -1,5 +1,5 @@
1
1
  module Vx
2
2
  module Builder
3
- VERSION = "0.6.1"
3
+ VERSION = "0.6.2"
4
4
  end
5
5
  end
@@ -18,8 +18,27 @@ describe "(integration v2) python" do
18
18
  config = Vx::Builder::BuildConfiguration.from_yaml(file)
19
19
  matrix = Vx::Builder.matrix config
20
20
  options[:task] ||= create(:task)
21
- script = Vx::Builder.script_v2(options[:task], matrix.build.first)
22
- OpenStruct.new script: script, matrix: matrix
21
+ scripts = matrix.build.map do |b|
22
+ Vx::Builder.script_v2(options[:task], b)
23
+ end
24
+ OpenStruct.new scripts: scripts, matrix: matrix
25
+ end
26
+
27
+ it "should successfuly generate scripts" do
28
+ file =<<-EOF
29
+ python:
30
+ - 2.7
31
+ - 3.4
32
+ install: pip install flake8
33
+ script:
34
+ - flake8 --max-line-length=120 .
35
+ - py.test -v
36
+ EOF
37
+ task = create(:task, sha: "HEAD")
38
+ b = build(file, task: task)
39
+ one_script, two_script = b.scripts
40
+ expect(one_script.to_yaml).to match(/python: '2\.7'/)
41
+ expect(two_script.to_yaml).to match(/python: '3\.4'/)
23
42
  end
24
43
 
25
44
  it "should succesfuly run lang/python", real: true do
@@ -34,7 +53,7 @@ describe "(integration v2) python" do
34
53
  Dir.chdir(path) do
35
54
  File.open("script.sh", "w") do |io|
36
55
  io.write "set -e\n"
37
- io.write b.script.to_script
56
+ io.write b.scripts.first.to_script
38
57
  end
39
58
  system("env", "-", "USER=$USER", "HOME=#{path}", "bash", "script.sh" )
40
59
  expect($?.to_i).to eq 0
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.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Galinsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-11 00:00:00.000000000 Z
11
+ date: 2015-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vx-common