hu 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/hu/collab.rb +13 -1
- data/lib/hu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d3e7d5397ca1407be4e8e0a651d65e10fb6f733
|
4
|
+
data.tar.gz: 7c1b1be7cba228576e3403d8259ec654b4aa8861
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffafe29f5abba66540fee1a76b27f01b3b8a99ce0b03b8aa32ad35f1bacf854279eed320618a787dba9176b1715d7771b472da628f4afda527c4b2acf8a75f30
|
7
|
+
data.tar.gz: ee98357ee12c80f4ab4920647b10be3891e4e7a352f0ea0bc78a83b4970a2571e74c85cdabffc078274175f77fd9950825c128bac9182d83174ef79cb660464d
|
data/lib/hu/collab.rb
CHANGED
@@ -22,6 +22,10 @@ module Hu
|
|
22
22
|
text "Start by exporting the current mapping,"
|
23
23
|
text "edit to taste, then diff and import."
|
24
24
|
text ""
|
25
|
+
text "The environment variable HU_IGNORE_APPS"
|
26
|
+
text "may contain space delimited glob(7) patterns"
|
27
|
+
text "of apps to be ignored."
|
28
|
+
text ""
|
25
29
|
text "WARNING: If you remove yourself from an application"
|
26
30
|
text " then hu won't be able to see it anymore."
|
27
31
|
def collab; end
|
@@ -182,6 +186,7 @@ module Hu
|
|
182
186
|
unless parsed.include? 'apps'
|
183
187
|
raise ArgumentError, "Malformed input, key 'apps' not found."
|
184
188
|
end
|
189
|
+
parsed['apps'].reject!{ |e| ignored_app?(e) }
|
185
190
|
parsed['apps'].each do |app_name, v|
|
186
191
|
unless heroku_state['apps'].include? app_name
|
187
192
|
raise ArgumentError, "Unknown application: #{app_name}"
|
@@ -193,11 +198,18 @@ module Hu
|
|
193
198
|
parsed
|
194
199
|
end
|
195
200
|
|
201
|
+
def ignored_app?(app_name)
|
202
|
+
ENV.fetch('HU_IGNORE_APPS','').split(' ').each do |p|
|
203
|
+
return true if File.fnmatch(p, app_name)
|
204
|
+
end
|
205
|
+
false
|
206
|
+
end
|
207
|
+
|
196
208
|
def heroku_state(force_refresh=false)
|
197
209
|
return @heroku_state unless force_refresh or @heroku_state.nil?
|
198
210
|
all_collaborators = Set.new
|
199
211
|
data = { 'apps' => {} }
|
200
|
-
app_names = h.app.list.map{|e| e['name']}
|
212
|
+
app_names = h.app.list.map{|e| e['name']}.reject{ |e| ignored_app?(e) }
|
201
213
|
threads = []
|
202
214
|
app_names.each_with_index do |app_name,i|
|
203
215
|
threads << Thread.new do
|
data/lib/hu/version.rb
CHANGED