Class: ORS::Commands::Changes
- Inherits:
-
Base
- Object
- Base
- ORS::Commands::Changes
show all
- Defined in:
- lib/ors/commands/changes.rb
Instance Method Summary
collapse
Methods inherited from Base
#help, #help_options
#run, #run_without_setup
Methods included from Helpers
#build_command, #execute_command, #execute_in_parallel, #fatal, #info
#bundle_install, #restart_server, #run_migrations, #setup_repo, #setup_ruby, #start_server, #stop_server, #update_code
#prepare_environment, #prepare_environment_with_rvm, #prepare_initial_environment
#parse_remote_and_or_branch
Instance Method Details
#description ⇒ Object
22
23
24
|
# File 'lib/ors/commands/changes.rb', line 22
def description
"Detects changes between local commits and what is deployed"
end
|
#execute ⇒ Object
9
10
11
12
13
14
15
16
|
# File 'lib/ors/commands/changes.rb', line 9
def execute
results = execute_command(ORS.config[:console_server],
prepare_environment_with_rvm,
%(git show | head -1),
:capture => true)
system('git', 'log', [@local_ref, "remotes/#{ORS.config[:remote]}/#{ORS.config[:branch]}"].join("..")) if results =~ /commit (.*)/
end
|
#setup ⇒ Object
4
5
6
7
|
# File 'lib/ors/commands/changes.rb', line 4
def setup
@local_ref = ORS.config[:args].shift
parse_remote_and_or_branch
end
|
#usage ⇒ Object
18
19
20
|
# File 'lib/ors/commands/changes.rb', line 18
def usage
"./ors changes local_ref [remote|remote/branch] [options]"
end
|