bourdain 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/bourdain/resources/checks/cookbooks.rb +14 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b004a03b3490c700e0e0347b3516a4bbc2059c5d
|
4
|
+
data.tar.gz: a635f4b84631e3bee09582de76c818f6a1c5eda5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7ee9939a1072a1dfbde59fcae34fa87a674653c233d4ae590bcac8852cffa6f09daaaf83439191616e033bd64f39d59c632751b34f4fde16890d3bda150b553
|
7
|
+
data.tar.gz: 51613421ecb5af2dcda569a3361d12acdc8bf1830b681452294d8c2bcc3d52091f1e20853882f62a79c0f8c7c2c525c001ce9517c742dfd7b185024ba7d85e81
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.1
|
@@ -21,6 +21,7 @@ module Bourdain
|
|
21
21
|
def check_cookbook_freshness cookbook
|
22
22
|
notifications = []
|
23
23
|
path = cookbook[:path]
|
24
|
+
stale = []
|
24
25
|
|
25
26
|
if Dir.exists? path
|
26
27
|
if youre_dirty? path
|
@@ -28,14 +29,15 @@ module Bourdain
|
|
28
29
|
elsif youre_ahead? path
|
29
30
|
notifications.push [ path, :warn, "Your cookbook %{path} is ahead of %{repo}." % cookbook ]
|
30
31
|
elsif youre_behind? path
|
31
|
-
notifications.push [ path, :
|
32
|
-
|
32
|
+
notifications.push [ path, :warn, "Looks like your cookbook %{path} is behind %{repo}. Will try pulling for you in a moment..." % cookbook ]
|
33
|
+
stale.push path
|
33
34
|
else
|
34
35
|
notifications.push [ path, :info, "Your cookbook %{path} looks up-to-date." % cookbook ]
|
35
36
|
end
|
36
37
|
end
|
37
38
|
|
38
|
-
notifications
|
39
|
+
log_notifications [ notifications ]
|
40
|
+
stale
|
39
41
|
end
|
40
42
|
|
41
43
|
def check_cookbook_exists cookbook
|
@@ -55,29 +57,26 @@ module Bourdain
|
|
55
57
|
end
|
56
58
|
end
|
57
59
|
|
58
|
-
def
|
59
|
-
|
60
|
-
|
61
|
-
|
60
|
+
def ensure_cookbook_up_to_date cookbook_path
|
61
|
+
log.warn "Pulling in remote changes to existing cookbook %s" % cookbook_path
|
62
|
+
%x| git -C #{cookbook_path} pull |
|
63
|
+
log.info "Your cookbook %s is now up-to-date." % cookbook_path
|
62
64
|
end
|
63
65
|
|
64
66
|
|
65
67
|
|
66
68
|
def check_gitlab_cookbooks! cookbook_configs
|
67
|
-
|
69
|
+
stale_cookbooks = cookbook_configs.pmap do |cookbook|
|
68
70
|
check_cookbook_freshness cookbook
|
69
|
-
end
|
70
|
-
|
71
|
-
|
71
|
+
end.flatten.compact
|
72
|
+
|
73
|
+
stale_cookbooks.sort.each do |cookbook_path|
|
74
|
+
ensure_cookbook_up_to_date cookbook_path
|
72
75
|
end
|
73
76
|
|
74
77
|
cookbook_configs.sort_by { |cc| cc[:path] }.each do |cookbook|
|
75
78
|
check_cookbook_exists cookbook
|
76
79
|
end
|
77
|
-
|
78
|
-
cookbook_configs.each do |cookbook|
|
79
|
-
ensure_pre_commit_installed cookbook
|
80
|
-
end
|
81
80
|
end
|
82
81
|
|
83
82
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bourdain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Clemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pmap
|