Class: Scatter::Commands::Receive
- Inherits:
-
Scatter::Command
- Object
- Scatter::Command
- Scatter::Commands::Receive
- Defined in:
- lib/scatter/commands/receive.rb
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(out, gemfile) ⇒ Receive
constructor
A new instance of Receive.
Methods inherited from Scatter::Command
command_name, help, inherited, usage
Constructor Details
#initialize(out, gemfile) ⇒ Receive
Returns a new instance of Receive.
6 7 8 9 |
# File 'lib/scatter/commands/receive.rb', line 6 def initialize(out, gemfile) super(out) @gemfile = gemfile end |
Instance Method Details
#execute! ⇒ Object
11 12 13 14 15 16 |
# File 'lib/scatter/commands/receive.rb', line 11 def execute! if File.executable?("#{ENV['HOME']}/.scatter/post-receive") Scatter::Logger.log("Executing post receive hook") Scatter::Shell.execute "#{ENV['HOME']}/.scatter/post-receive #{@gemfile}" end end |