Class: Makit::Cli::Generators::Templates::Ruby::Rakefile

Inherits:
Object
  • Object
show all
Defined in:
lib/makit/cli/generators/templates/ruby/rakefile.rb

Overview

Template for Ruby gem Rakefile

Instance Method Summary collapse

Constructor Details

#initialize(project_name) ⇒ Rakefile

Returns a new instance of Rakefile.



10
11
12
# File 'lib/makit/cli/generators/templates/ruby/rakefile.rb', line 10

def initialize(project_name)
  @project_name = project_name
end

Instance Method Details

#renderObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/makit/cli/generators/templates/ruby/rakefile.rb', line 14

def render
  "    # frozen_string_literal: true\n\n    require \"bundler/gem_tasks\"\n    require \"rake/testtask\"\n\n    Rake::TestTask.new(:test) do |t|\n      t.libs << \"test\"\n      t.libs << \"lib\"\n      t.test_files = FileList[\"test/**/*_test.rb\"]\n    end\n\n    task default: :test\n  RAKEFILE\nend\n"