lib/gemstrapper.rb
def template_files_for_gem(options)
		files = []

		Dir.chdir(TEMPLATES_DIRECTORY) do
			files += Dir.glob('project_name/lib/**/*.erb') # library files
			files << 'project_name/Gemfile.erb' # adding Gemfile
			files << 'project_name/project_name.gemspec.erb' # adding Gemspec

			if options[:executable]
				files += Dir.glob('project_name/bin/*.erb') # executable files
			end
		end

		files
	end
##
# returns a list of template files to be processed and created for the new gem
# @param [Hash] options a list of the current execution options
# @return [Array] a list of template files
returns a list of template files to be processed and created for the new gem
returns a list of template files to be processed and created for the new gem
def template_files_for_gem(options)
		files = []
		Dir.chdir(TEMPLATES_DIRECTORY) do
			files += Dir.glob('project_name/lib/**/*.erb') 
			files << 'project_name/Gemfile.erb' 
			files << 'project_name/project_name.gemspec.erb' 
			if options[:executable]
				files += Dir.glob('project_name/bin/*.erb') 
			end
		end
		files
	end
def template_files_for_gem ( options ) files = [ ] Dir . chdir ( TEMPLATES_DIRECTORY ) do files += Dir . glob ( 'project_name/lib/**/*.erb' ) files << 'project_name/Gemfile.erb' files << 'project_name/project_name.gemspec.erb' if options [ :executable ] files += Dir . glob ( 'project_name/bin/*.erb' ) end end files end
returns a list of template files to be processed and created for the new gem
returns a list of template files to be processed and created for the new gem
# library files # adding Gemfile # adding Gemspec # executable files
a list of template files
a list of template files
Array
options
options a list of the current execution options
options a list of the current execution options