dh-proteus 0.3.1 → 0.3.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
  SHA256:
3
- metadata.gz: 8fb5e638db16f99a0788b308916d6788599591155e71f0b3112ba14efa899c03
4
- data.tar.gz: 5b76029b2b37a7db6c28ffef458514f84eee2a3a08f05376d7f5e199de2ce96d
3
+ metadata.gz: db62c1bb1740497f53c9a44f65f17caa5f9f87e4ae4a9de7c01feab1b5caec23
4
+ data.tar.gz: fabed14cd58cf6072f7743525c016f8c117cd83b86265e568852ba6f766a41ef
5
5
  SHA512:
6
- metadata.gz: 27daef8b98d42b544611c2f411cd7b454b4e4706b4acbf263e0cd716c6d46ce37927ec86aa61acba8aa8923dc6e5eea9d382ddc812737e49d393c4c212faa7de
7
- data.tar.gz: aca86a828d979fff964167e593a74d1e0eb416feeb10a8391b1c4fe6e340cd57d4c32fc3e7f0a6a50eb8e352ff9606599dad228440b3770215b94fc969ed159f
6
+ metadata.gz: '0487e5755a6407b3911004992422c40c769c9aef39aeab266bdd09a5a3c4b26d74ba5986159ff05248247595339f23545ee87891cc90ee3261c85c405742d763'
7
+ data.tar.gz: ddbb13d16550d53bafc1256408d588ffef72e691f2f863e55bfcb07c0c59f440172d588c07ea97d9148e93dde35158f369b33e017491e0e5ed0a1426e1264754
@@ -20,14 +20,18 @@ module Proteus
20
20
  # case 2: no changes in root => run contexts only
21
21
  status = `git --no-pager diff origin/master --stat --name-only`.split("\n")
22
22
 
23
- run_full_validation = if status.map {|l| !l.include?('/') }.any? || !options[:selective]
23
+ run_full_validation = if status.map { |l| !l.include?('/') }.any? || !options[:selective]
24
24
  say "Found changes in the root of the repository or --selective is not set. Running full validation.", :green
25
25
  true
26
26
  else
27
27
  say "Running selective validation.", :green
28
28
  false
29
29
  end
30
- selected_contexts = status.map { |s| s.scan(/contexts\/([a-zA-Z0-9_]+)\/((.+)\/)?/).flatten.first }.reject { |s| s.nil? }.uniq!
30
+
31
+ selected_contexts = status.collect do |s|
32
+ parts = s.split("/")
33
+ parts.size > 1 ? parts[1] : nil
34
+ end.reject { |s| s.nil? }.uniq
31
35
 
32
36
  self.class.contexts.each do |context|
33
37
  unless run_full_validation
@@ -1,5 +1,5 @@
1
1
  module Proteus
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
4
4
 
5
5
  if $0 == __FILE__
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dh-proteus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Albrecht