Class: Opsk::Commit
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Opsk::Commit
show all
- Includes:
- Thorable, Thor::Actions
- Defined in:
- lib/opskeleton/commit.rb
Instance Method Summary
collapse
Methods included from Thorable
#artifact, #artifact_path, #check_root, included, #machines, #meta, #name, #type_of
Instance Method Details
#commit ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/opskeleton/commit.rb', line 15
def commit
Dir["modules/*"].reject{|o| not File.directory?(o)}.each do |d|
if File.exists?("#{d}/.git")
begin
git = Opsk::Git.new(d,self)
if git.changed?
say "Listing changes for #{d}:\n\n"
git.report
git.master_commit(options)
end
rescue => e
say "Failed to commit #{d} due to #{e}"
end
end
end
end
|
#validate ⇒ Object
11
12
13
|
# File 'lib/opskeleton/commit.rb', line 11
def validate
check_root
end
|