Class: Sprout::ToolGenerator

Inherits:
Generator::Base show all
Defined in:
sprout/lib/sprout/generators/tool/tool_generator.rb

Constant Summary

Constants included from Executable

DEFAULT_FILE_EXPRESSION, DEFAULT_PREFIX, DEFAULT_SHORT_PREFIX

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Generator::Base

#create_template_paths, #default_search_paths, #directory, #do_show_template_paths, #execute, #file, #generator, inherited, #prepare_command, #resolve_template, #say, #template, #template_paths, #unexecute, #validate

Methods inherited from Executable::Base

add_param, add_param_alias, #binary_path, #binary_path=, #create_outer_task, #default_file_expression, #execute, #execute_delegate, #from_hash, #initialize, #library_added, #parse!, #parse_extra_options!, #parse_rake_task_arg, #prepare, set, static_default_value_collection, static_parameter_collection, #stderr, #stderr=, #stdout, #stdout=, #system_execute, #to_hash, #to_help, #to_rake, #to_shell, #update_rake_task_name_from_args

Methods included from Concern

#append_features, extended, #included

Constructor Details

This class inherits a constructor from Sprout::Executable::Base

Instance Attribute Details

- (String) author

An instance of String

Returns:

  • (String)

    An instance of String



# File ''

add_param :author, String, { :default => 'Unknown' }

- (String) description

An instance of String

Returns:

  • (String)

    An instance of String



# File ''

add_param :description, String, { :default => 'This is an unconfigured Sprout Tool' }

- (String) email

An instance of String

Returns:

  • (String)

    An instance of String



# File ''

add_param :email, String, { :default => 'projectsprout@googlegroups.com' }

- (String) exe

An instance of String

Returns:

  • (String)

    An instance of String



# File ''

add_param :exe, String, { :default => 'executable_name' }

- (String) homepage

An instance of String

Returns:

  • (String)

    An instance of String



# File ''

add_param :homepage, String, { :default => 'http://projectsprouts.org' }

- (String) md5

An instance of String

Returns:

  • (String)

    An instance of String



# File ''

add_param :md5, String, { :default => 'd6939117f1df58e216f365a12fec64f9' }

- (String) summary

An instance of String

Returns:

  • (String)

    An instance of String



# File ''

add_param :summary, String, { :default => 'Sprout Tool' }

- (String) url

An instance of String

Returns:

  • (String)

    An instance of String



# File ''

add_param :url, String, { :default => 'http://github.com/downloads/lukebayes/project-sprouts/echochamber-test.zip' }

Instance Method Details

- (Object) manifest



21
22
23
24
25
26
27
# File 'sprout/lib/sprout/generators/tool/tool_generator.rb', line 21

def manifest
  directory snake_input do
    template 'Gemfile'
    template "#{snake_input}.gemspec", 'tool.gemspec'
    template "#{snake_input}.rb", 'tool.rb'
  end
end

- (Object) snake_input (protected)



31
32
33
# File 'sprout/lib/sprout/generators/tool/tool_generator.rb', line 31

def snake_input
  input.snake_case
end