Class: GemRelease::Gemspec
- Defined in:
- lib/gem_release/gemspec.rb
Instance Attribute Summary collapse
-
#authors ⇒ Object
readonly
Returns the value of attribute authors.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#homepage ⇒ Object
readonly
Returns the value of attribute homepage.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
Attributes inherited from Template
#module_name, #module_path, #name, #options
Instance Method Summary collapse
- #exists? ⇒ Boolean
- #filename ⇒ Object
- #files ⇒ Object
-
#initialize(options = {}) ⇒ Gemspec
constructor
A new instance of Gemspec.
- #template_name ⇒ Object
Methods inherited from Template
Methods included from Helpers
#gem_filename, #gem_module_name, #gem_module_path, #gem_name, #gem_name_from_directory, #gem_version, #gemspec, #gemspec_filename, #github_token, #github_user, #user_email, #user_name
Constructor Details
#initialize(options = {}) ⇒ Gemspec
Returns a new instance of Gemspec.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/gem_release/gemspec.rb', line 5 def initialize( = {}) super @authors ||= [user_name] @email ||= user_email @homepage ||= "http://github.com/#{github_user}/#{name}" || "[your github name]" @summary ||= '[summary]' @description ||= '[description]' @strategy = [:strategy] end |
Instance Attribute Details
#authors ⇒ Object (readonly)
Returns the value of attribute authors.
3 4 5 |
# File 'lib/gem_release/gemspec.rb', line 3 def @authors end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/gem_release/gemspec.rb', line 3 def description @description end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
3 4 5 |
# File 'lib/gem_release/gemspec.rb', line 3 def email @email end |
#homepage ⇒ Object (readonly)
Returns the value of attribute homepage.
3 4 5 |
# File 'lib/gem_release/gemspec.rb', line 3 def homepage @homepage end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
3 4 5 |
# File 'lib/gem_release/gemspec.rb', line 3 def summary @summary end |
Instance Method Details
#exists? ⇒ Boolean
26 27 28 |
# File 'lib/gem_release/gemspec.rb', line 26 def exists? File.exists?(filename) end |
#filename ⇒ Object
30 31 32 |
# File 'lib/gem_release/gemspec.rb', line 30 def filename "#{name}.gemspec" end |
#files ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/gem_release/gemspec.rb', line 17 def files case @strategy when 'git' '`git ls-files app lib`.split("\n")' else 'Dir.glob("lib/**/**")' end end |
#template_name ⇒ Object
34 35 36 |
# File 'lib/gem_release/gemspec.rb', line 34 def template_name 'gemspec.erb' end |