Class: WayOfWorking::CodeOfConduct::ContributorCovenant::Generators::Init

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/way_of_working/code_of_conduct/contributor_covenant/generators/init.rb

Overview

This class fetches the CODE_OF_CONDUCT.md and inserts the contact method

Instance Method Summary collapse

Instance Method Details

#add_code_of_conduct_to_projectObject

get 'https://www.contributor-covenant.org/version/2/1/code_of_conduct/code_of_conduct.md', code_of_conduct_file gsub_file code_of_conduct_file, '[INSERT CONTACT METHOD]', "<<%= options %>>" end



28
29
30
# File 'lib/way_of_working/code_of_conduct/contributor_covenant/generators/init.rb', line 28

def add_code_of_conduct_to_project
  template 'CODE_OF_CONDUCT.md'
end

#add_way_of_working_documentationObject



32
33
34
# File 'lib/way_of_working/code_of_conduct/contributor_covenant/generators/init.rb', line 32

def add_way_of_working_documentation
  copy_file 'docs/way_of_working/code-of-conduct.md'
end