Class: Rubysmith::Builders::Bundler
- Inherits:
-
Object
- Object
- Rubysmith::Builders::Bundler
- Defined in:
- lib/rubysmith/builders/bundler.rb
Overview
Builds Bundler Gemfile configuration for project skeleton.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configuration, builder: Builder) ⇒ Bundler
constructor
A new instance of Bundler.
Constructor Details
Class Method Details
.call ⇒ Object
11 |
# File 'lib/rubysmith/builders/bundler.rb', line 11 def self.call(...) = new(...).call |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rubysmith/builders/bundler.rb', line 18 def call builder.call(configuration.merge(template_path: "%project_name%/Gemfile.erb")) .render .replace(/\n\s+group/, "\n\ngroup") .replace(/\n\s+gem/, "\n gem") .replace(/ (?=.+(refinements|zeitwerk))/, "") .replace(/(\n+|\s+)end/, "\nend") .replace(/\n\ngroup :(code_quality|development|test|tools) do\nend/, "") .replace(/org"\n+/, "org\"\n\n") configuration end |