Class: RightConf::BundlerConfigurator
- Inherits:
-
Object
- Object
- RightConf::BundlerConfigurator
- Includes:
- Configurator
- Defined in:
- lib/rconf/configurators/bundler_configurator.rb
Constant Summary collapse
- DEFAULT_GEM_PATH =
'vendor/system_gems/cache'
Instance Method Summary collapse
-
#check_linux ⇒ Object
(also: #check_darwin)
Check whether bundler is already installed.
-
#check_windows ⇒ Object
Not implemented on windows.
-
#run_linux ⇒ Object
(also: #run_darwin)
Install bundler if needed and run bundle install.
-
#run_windows ⇒ Object
Not implemented on windows.
Methods included from Configurator
#[], #check, included, #post_process, #run, #signature, #validate
Methods included from ProgressReporter
included, report_to_file, report_to_stdout
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RightConf::Configurator
Instance Method Details
#check_linux ⇒ Object Also known as: check_darwin
Check whether bundler is already installed
Return
- true
-
If bundler is already installed
- false
-
Otherwise
36 37 38 39 40 41 42 |
# File 'lib/rconf/configurators/bundler_configurator.rb', line 36 def check_linux report_check("Checking for bundler #{version}") res = Command.execute_in_ruby('bundle', '--version') success = (res.output =~ /#{version}/) report_result(success) success end |
#check_windows ⇒ Object
Not implemented on windows
Raise
- (Exception)
-
Always raise
49 50 51 |
# File 'lib/rconf/configurators/bundler_configurator.rb', line 49 def check_windows raise "Bundler is not supported on Windows!" end |
#run_linux ⇒ Object Also known as: run_darwin
Install bundler if needed and run bundle install
Return
- true
-
Always return true
57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/rconf/configurators/bundler_configurator.rb', line 57 def run_linux install_bundler report_check('Installing gems') = [ "_#{version}_", 'install' ] << "--without=#{exclusions.delete(' ')}" unless exclusions.nil? += [ '--path', bundle_path ] unless bundle_path.nil? << { :abort_on_failure => 'Failed to install gems' } res = Command.execute_in_ruby('bundle', *) report_success true end |
#run_windows ⇒ Object
Not implemented on windows
Raise
- (Exception)
-
Always raise
74 75 76 |
# File 'lib/rconf/configurators/bundler_configurator.rb', line 74 def run_windows raise "Bundler is not supported on Windows!" end |