Module: TargetSystemCheck
- Defined in:
- lib/capistrano/ext/windows_server/target_system_check.rb
Class Method Summary collapse
- .recipe_disables_windows?(file) ⇒ Boolean
-
.stage_argument ⇒ Object
Current stage name.
-
.stage_file ⇒ File
The stage configuration file.
- .windows? ⇒ Boolean
Class Method Details
.recipe_disables_windows?(file) ⇒ Boolean
17 18 19 |
# File 'lib/capistrano/ext/windows_server/target_system_check.rb', line 17 def recipe_disables_windows?(file) file.to_a.grep(/^\s*not_windows!(\(\s*\))?\s*(#.*)?$/).any? end |
.stage_argument ⇒ Object
Returns current stage name.
8 9 10 |
# File 'lib/capistrano/ext/windows_server/target_system_check.rb', line 8 def stage_argument ARGV.first end |
.stage_file ⇒ File
Returns the stage configuration file.
13 14 15 |
# File 'lib/capistrano/ext/windows_server/target_system_check.rb', line 13 def stage_file File.open "config/deploy/#{stage_argument}.rb" end |
.windows? ⇒ Boolean
3 4 5 |
# File 'lib/capistrano/ext/windows_server/target_system_check.rb', line 3 def windows? not recipe_disables_windows? stage_file end |