Class: Bridgetown::Commands::Apply
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Bridgetown::Commands::Apply
show all
- Extended by:
- Summarizable
- Includes:
- Actions, Thor::Actions
- Defined in:
- lib/bridgetown-core/commands/apply.rb
Constant Summary
Constants included
from Actions
Bridgetown::Commands::Actions::GITHUB_BLOB_REGEX, Bridgetown::Commands::Actions::GITHUB_REGEX, Bridgetown::Commands::Actions::GITHUB_REPO_REGEX, Bridgetown::Commands::Actions::GITHUB_TREE_REGEX
Class Method Summary
collapse
Instance Method Summary
collapse
summary
Methods included from Actions
#add_gem, #add_initializer, #add_npm_for_gem, #add_npm_package, #apply_from_url, #create_builder, #javascript_import, #remove_npm_package, #ruby_configure
Class Method Details
.banner ⇒ Object
14
15
16
|
# File 'lib/bridgetown-core/commands/apply.rb', line 14
def self.banner
"bridgetown apply PATH or URL"
end
|
.exit_on_failure? ⇒ Boolean
23
24
25
|
# File 'lib/bridgetown-core/commands/apply.rb', line 23
def self.exit_on_failure?
true
end
|
.source_root ⇒ Object
19
20
21
|
# File 'lib/bridgetown-core/commands/apply.rb', line 19
def self.source_root
Dir.pwd
end
|
Instance Method Details
#apply_automation ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/bridgetown-core/commands/apply.rb', line 27
def apply_automation
@source_paths = [Dir.pwd]
@logger = Bridgetown.logger
if options[:apply]
apply_after_new_command
else
apply_in_pwd
end
rescue SystemExit => e
@logger.error "Problem occurred while running automation:"
e.backtrace[0..3].each do |backtrace_line|
@logger.info backtrace_line if backtrace_line.include?(":in `apply'")
end
raise e
end
|