Sha256: 00d03711ae89a07ef3f5b9f8ce34e6c942caddf1d235b0203e4ffb22eb6a849d

Contents?: true

Size: 586 Bytes

Versions: 3

Compression:

Stored size: 586 Bytes

Contents

class TaskGenerator < Templater::Generator

  def self.source_root
    File.join %W| #{File.dirname(__FILE__)} .. .. .. templates task |
  end

  first_argument :name, :required => true

  directory :tasks, File.join(%w|tasks|)
  template :task do |t|
    t.source      = File.join(%w|tasks task.rake|)
    t.destination = File.join(%w|tasks %underscore%.rake|)
  end

  directory :test_tasks, File.join(%w|test tasks|)
  template :test_task do |t|
    t.source      = File.join(%w|test tasks test_task.rb|)
    t.destination = File.join(%w|test tasks test_%underscore%.rb|)
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
michaelbarton-gigantron-0.1.6 lib/gigantron/generators/task_generator.rb
michaelbarton-gigantron-0.1.7 lib/gigantron/generators/task_generator.rb
michaelbarton-gigantron-0.1.8 lib/gigantron/generators/task_generator.rb