Class: Confluence::Application

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/confluence.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#project_authorObject

Returns the value of attribute project_author.



11
12
13
# File 'lib/confluence.rb', line 11

def project_author
  @project_author
end

#project_emailObject

Returns the value of attribute project_email.



11
12
13
# File 'lib/confluence.rb', line 11

def project_email
  @project_email
end

#project_github_userObject

Returns the value of attribute project_github_user.



11
12
13
# File 'lib/confluence.rb', line 11

def project_github_user
  @project_github_user
end

#project_nameObject

Returns the value of attribute project_name.



11
12
13
# File 'lib/confluence.rb', line 11

def project_name
  @project_name
end

Class Method Details

.source_rootObject



24
25
26
# File 'lib/confluence.rb', line 24

def self.source_root
  File.join File.dirname(__FILE__), "confluence", "templates"
end

Instance Method Details

#new(project_name) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/confluence.rb', line 14

def new(project_name)
  @project_name = project_name
  @project_author = Git.global_config["user.name"]
  @project_email = Git.global_config["user.email"]
  @project_github_user = Git.global_config["github.email"]
  source_path = File.join File.dirname(__FILE__), "confluence", "templates"
  destination_path = project_name
  directory( source_path, destination_path )
end