Class: Mattock::BundleCommandTask

Inherits:
Rake::CommandTask show all
Defined in:
lib/mattock/bundle-command-task.rb

Constant Summary

Constants included from Configurable

Configurable::RequiredField

Instance Attribute Summary

Attributes included from ConfigurableTask

#base_task

Instance Method Summary collapse

Methods included from CommandTaskMixin

#action, #check_verification_command, included, #needed?, #resolve_runtime_configuration, #verify_command

Methods included from CommandLineDSL

#cmd, #escaped_command

Methods included from ConfigurableTask

#action, included, #inspect, #resolve_configuration

Methods included from Configurable::DirectoryStructure

included, #resolve_paths

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

Methods included from Configurable

#check_required, #copy_settings, #copy_settings_to, #fail_unless_set, #field_unset?, #proxy_settings, #proxy_settings_to, #proxy_value, #setup_defaults, #to_hash, #unset?, #unset_defaults_guard, unset_defaults_guard

Methods included from Configurable::ClassMethods

#default_value_for, #default_values, #field_metadata, #field_names, #included, #inspect_instance, #missing_required_fields_on, #nested, #nil_fields, #required_fields, #runtime_required_fields, #runtime_setting, #set_defaults_on, #setting, #settings, #to_hash

Instance Method Details

#cleaned_envObject



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
# File 'lib/mattock/bundle-command-task.rb', line 5

def cleaned_env
  env = {}
  if defined? Bundler
    %w{
        BUNDLER_EDITOR
        BUNDLE_APP_CONFIG
        BUNDLE_BIN_PATH
        BUNDLE_CONFIG
        BUNDLE_PATH
        BUNDLE_SPEC_RUN
        DEBUG
        DEBUG_RESOLVER
        EDITOR
        GEM_HOME
        GEM_PATH
        MANPAGER
        PAGER
        PATH
        RB_USER_INSTALL
        RUBYOPT
        VISUAL
    }.each do |bundler_varname|
      env[bundler_varname] = Bundler::ORIGINAL_ENV[bundler_varname]
    end
  end
  env["BUNDLE_GEMFILE"] = nil
  env
end

#decorated(command) ⇒ Object



34
35
36
37
# File 'lib/mattock/bundle-command-task.rb', line 34

def decorated(command)
  command.command_environment.merge!(cleaned_env)
  command
end