Class: Tebako::ScenarioManager
- Inherits:
-
ScenarioManagerBase
- Object
- ScenarioManagerBase
- Tebako::ScenarioManager
- Defined in:
- lib/tebako/scenario_manager.rb
Overview
Manages packaging scenario based on input files (gemfile, gemspec, etc)
Direct Known Subclasses
Instance Attribute Summary collapse
-
#fs_entrance ⇒ Object
readonly
Returns the value of attribute fs_entrance.
-
#fs_entry_point ⇒ Object
readonly
Returns the value of attribute fs_entry_point.
-
#gemfile_path ⇒ Object
readonly
Returns the value of attribute gemfile_path.
-
#needs_bundler ⇒ Object
readonly
Returns the value of attribute needs_bundler.
-
#with_gemfile ⇒ Object
readonly
Returns the value of attribute with_gemfile.
Attributes inherited from ScenarioManagerBase
Instance Method Summary collapse
- #bundler_reference ⇒ Object
- #configure_scenario ⇒ Object
-
#initialize(fs_root, fs_entrance) ⇒ ScenarioManager
constructor
A new instance of ScenarioManager.
Methods inherited from ScenarioManagerBase
#b_env, #linux?, #linux_gnu?, #linux_musl?, #m_files, #macos?, #msys?, #musl?, #ncores
Constructor Details
#initialize(fs_root, fs_entrance) ⇒ ScenarioManager
Returns a new instance of ScenarioManager.
119 120 121 122 123 124 125 |
# File 'lib/tebako/scenario_manager.rb', line 119 def initialize(fs_root, fs_entrance) super() @with_gemfile = @with_lockfile = @needs_bundler = false @bundler_version = BUNDLER_VERSION initialize_root(fs_root) initialize_entry_point(fs_entrance || "stub.rb") end |
Instance Attribute Details
#fs_entrance ⇒ Object (readonly)
Returns the value of attribute fs_entrance.
127 128 129 |
# File 'lib/tebako/scenario_manager.rb', line 127 def fs_entrance @fs_entrance end |
#fs_entry_point ⇒ Object (readonly)
Returns the value of attribute fs_entry_point.
127 128 129 |
# File 'lib/tebako/scenario_manager.rb', line 127 def fs_entry_point @fs_entry_point end |
#gemfile_path ⇒ Object (readonly)
Returns the value of attribute gemfile_path.
127 128 129 |
# File 'lib/tebako/scenario_manager.rb', line 127 def gemfile_path @gemfile_path end |
#needs_bundler ⇒ Object (readonly)
Returns the value of attribute needs_bundler.
127 128 129 |
# File 'lib/tebako/scenario_manager.rb', line 127 def needs_bundler @needs_bundler end |
#with_gemfile ⇒ Object (readonly)
Returns the value of attribute with_gemfile.
127 128 129 |
# File 'lib/tebako/scenario_manager.rb', line 127 def with_gemfile @with_gemfile end |
Instance Method Details
#bundler_reference ⇒ Object
129 130 131 |
# File 'lib/tebako/scenario_manager.rb', line 129 def bundler_reference @needs_bundler ? "_#{@bundler_version}_" : nil end |
#configure_scenario ⇒ Object
133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/tebako/scenario_manager.rb', line 133 def configure_scenario lookup_files case @gs_length when 0 configure_scenario_no_gemspec when 1 @scenario = @with_gemfile ? :gemspec_and_gemfile : :gemspec else raise Tebako::Error, "Multiple Ruby gemspecs found in #{@fs_root}" end end |