Class: Gemsmith::Builders::Specification

Inherits:
Rubysmith::Builders::Abstract
  • Object
show all
Defined in:
lib/gemsmith/builders/specification.rb

Overview

Builds project skeleton gem specification for use by RubyGems.

Instance Method Summary collapse

Instance Method Details

#callObject



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/gemsmith/builders/specification.rb', line 11

def call
  config = settings.merge template_path: "%project_name%/%project_name%.gemspec.erb"

  builder.call(config)
         .render
         .replace("    \n", "")
         .replace("      ", "    ")
         .replace("  \n", "")
         .replace("    spec", "  spec")
         .replace(/\}\s+s/m, "}\n\n  s")

  true
end