lib/rubysmith/builders/rake.rb in rubysmith-0.11.0 vs lib/rubysmith/builders/rake.rb in rubysmith-0.12.0
- old
+ new
@@ -2,17 +2,19 @@
module Rubysmith
module Builders
# Builds project skeleton Rake support.
class Rake
- def self.call(configuration, builder: Builder) = new(configuration, builder: builder).call
+ def self.call(...) = new(...).call
def initialize configuration, builder: Builder
@configuration = configuration
@builder = builder
end
def call
+ return unless configuration.build_rake
+
builder.call(configuration.with(template_path: "%project_name%/Rakefile.erb"))
.render
.replace(/\[\s+/, "[")
.replace(/\s+\]/, "]")
.replace(" ", "")