Class: Railshoster::Command

Inherits:
Object
  • Object
show all
Includes:
GeneralCapistranoHelpers
Defined in:
lib/railshoster/command.rb

Overview

This action class helps to setup a new rails applicaton

Direct Known Subclasses

AppUrlCommand, DeployCommand, InitCommand

Instance Method Summary collapse

Methods included from GeneralCapistranoHelpers

#capistrano_greater_than_2?, #installed_capistrano_version

Constructor Details

#initialize(project_dir) ⇒ Command

Returns a new instance of Command.



10
11
12
13
14
15
16
17
18
# File 'lib/railshoster/command.rb', line 10

def initialize(project_dir)      
  @project_dir = project_dir
  
  begin      
    @git = Git.open(project_dir)
  rescue ArgumentError => e
    raise PossiblyNotAGitRepoError.new("WARNING: Please verify that your app is a valid Git repository and that there is a 'remote origin' given.")
  end
end