kitchen-salt 0.2.5 → 0.3.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
  SHA256:
3
- metadata.gz: 2705b18a77b28466f7d7b0ce71394df7adacbe1c154b4e7546cc6715959361d6
4
- data.tar.gz: 23a54da0a0e46259d16d2709bc3409f4c4e9a2517c97aaf87344c9502b580f7a
3
+ metadata.gz: 98e5f85a0f6b0ef285eea5ed462d8eec5cbc4c1e0db93504a10173c8057e1bcd
4
+ data.tar.gz: 9bb26ffea232183ae190378d62f9e4fab695cf06a12de3c0d991312dcfc53054
5
5
  SHA512:
6
- metadata.gz: f26b17694f0b59e1ee61a25104052a4cbf000bd9b2ea67989908e637ddb963e0b41912fbaed159348448fe38b17400dcc197c0b53f35428355cccf2656f6fa1b
7
- data.tar.gz: 471b011efc2b2d3bbdba5c25aeab840c271b2daa9e08d6facb3f3f740cb70351ce711ba06ec1f7869c8c9cf16e10d315a961ca91b0df9e47d3811c03568ef36d
6
+ metadata.gz: d97bc767c493b113070ee56d184c97821341d5102971e470befb2feb9eed66ef08a4dcf0bb5cbb98bea83209338d6461c42472abfe74d3036ad4b3df3e038390
7
+ data.tar.gz: 736e3441b408ff03818f35c3df0b081d2ddce68c1f45cecba5573bbc872e9c68fc6788451d26285c854a37e2a771d2720d80fae6b39cb465256ce49ad1041b3b
@@ -1,5 +1,5 @@
1
1
  module Kitchen
2
2
  module Salt
3
- VERSION = '0.2.5'.freeze
3
+ VERSION = '0.3.0'.freeze
4
4
  end
5
5
  end
@@ -20,6 +20,8 @@ module Kitchen
20
20
  default_config :transport, false
21
21
  default_config :save, {}
22
22
  default_config :windows, false
23
+ default_config :enable_filenames, false
24
+ default_config :from_filenames, ''
23
25
 
24
26
  def call(state)
25
27
  info("[#{name}] Verify on instance #{instance.name} with state=#{state}")
@@ -27,6 +29,11 @@ module Kitchen
27
29
  if ENV['KITCHEN_TESTS']
28
30
  ENV['KITCHEN_TESTS'].split(' ').each{|test| config[:tests].push(test)}
29
31
  end
32
+ if ENV['CHANGE_TARGET'] and ENV['BRANCH_NAME']
33
+ require 'git'
34
+ repo = Git.open('.')
35
+ config[:from_filenames] = '--from-filenames ' + repo.diff("origin/#{ENV['CHANGE_TARGET']}", "origin/#{ENV['BRANCH_NAME']}").name_status.keys.join(',')
36
+ end
30
37
  command = [
31
38
  (config[:windows] ? 'python.exe' : config[:python_bin]),
32
39
  File.join(root_path, config[:testingdir], '/tests/runtests.py'),
@@ -40,6 +47,7 @@ module Kitchen
40
47
  (config[:xml] ? "--xml=#{config[:xml]}" : ''),
41
48
  config[:types].collect{|type| "--#{type}"}.join(' '),
42
49
  config[:tests].collect{|test| "-n #{test}"}.join(' '),
50
+ (config[:enable_filenames] ? config[:from_filenames] : ''),
43
51
  '2>&1',
44
52
  ].join(' ')
45
53
  if config[:windows]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-salt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SaltStack Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-28 00:00:00.000000000 Z
11
+ date: 2018-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie