Module: Appleseed::Generator::GithubMixin
- Defined in:
- lib/appleseed/generator/github_mixin.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(generator) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/appleseed/generator/github_mixin.rb', line 4 def self.extended(generator) attr_accessor :github_username, :github_token generator.github_username = generator.[:github_username] generator.github_token = generator.[:github_token] generator.should_create_github_repository = !generator.[:no_github] unless generator.github_username raise NoGitHubUser end if generator.should_create_github_repository unless generator.github_token raise NoGitHubToken end end end |
Instance Method Details
#git_remote ⇒ Object
22 23 24 |
# File 'lib/appleseed/generator/github_mixin.rb', line 22 def git_remote @git_remote ||= "[email protected]:#{github_username}/#{project_name}.git" end |
#homepage ⇒ Object
26 27 28 |
# File 'lib/appleseed/generator/github_mixin.rb', line 26 def homepage @homepage ||= "http://github.com/#{github_username}/#{project_name}" end |