Class: Mattock::BundleCommandTask
- Inherits:
-
Rake::CommandTask
- Object
- Rake::Task
- Rake::Task
- Rake::CommandTask
- Mattock::BundleCommandTask
- Defined in:
- lib/mattock/bundle-command-task.rb
Instance Attribute Summary
Attributes included from ConfigurableTask
Instance Method Summary collapse
Methods included from CommandTaskMixin
#action, #check_verification_command, included, #needed?, #resolve_runtime_configuration, shell, #shell, #verify_command
Methods included from ConfigurableTask
#action, included, #inspect, #resolve_configuration
Methods included from DeferredDefinition
add_settings, #finalize_configuration, #resolve_runtime_configuration, #runtime?, #runtime_definition, #setup_deferred
Methods included from CascadingDefinition
#confirm_configuration, #confirm_step, #confirm_steps, #default_configuration, #define, #resolve_configuration, #setup_cascade
Instance Method Details
#cleaned_env ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/mattock/bundle-command-task.rb', line 5 def cleaned_env env = {} if defined? Bundler %w{ BUNDLER_EDITOR BUNDLE_APP_CONFIG BUNDLE_CONFIG BUNDLE_PATH BUNDLE_SPEC_RUN DEBUG DEBUG_RESOLVER EDITOR GEM_HOME GEM_PATH MANPAGER PAGER PATH RB_USER_INSTALL RUBYOPT VISUAL bundle_bin bundle_dir }.each do |bundler_varname| next if ENV[bundler_varname] == Bundler::ORIGINAL_ENV[bundler_varname] env[bundler_varname] = Bundler::ORIGINAL_ENV[bundler_varname] end %w{ bundle_bin bundle_dir BUNDLE_BIN_PATH BUNDLE_GEMFILE }.each do |bundler_varname| env[bundler_varname] = nil end end env end |
#decorated(command) ⇒ Object
43 44 45 46 |
# File 'lib/mattock/bundle-command-task.rb', line 43 def decorated(command) command.command_environment.merge!(cleaned_env) command end |