35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/app-deploy/utils.rb', line 35
def each *with
with = [:gem, :github] if with.empty?
cwd = Dir.pwd
with.map{ |kind| AppDeploy.send(kind) }.flatten.uniq.each{ |opts|
puts
if opts[:github_project]
if File.directory?(opts[:git_path])
begin
Dir.chdir(opts[:git_path])
yield(opts)
rescue RuntimeError => e
puts e
ensure
Dir.chdir(cwd)
end
else
puts "Skip #{opts[:github_project]}, because it was not found"
end
else
yield(opts)
end
}
end
|