Class: ReleaseCeremony::Project::GemspecFacts

Inherits:
Object
  • Object
show all
Defined in:
lib/release_ceremony/project.rb

Overview

Lazily extracts facts from the repository's gemspec, so a fully configured project never needs to load it.

Instance Method Summary collapse

Constructor Details

#initialize(root) ⇒ GemspecFacts

Returns a new instance of GemspecFacts.



141
142
143
# File 'lib/release_ceremony/project.rb', line 141

def initialize(root)
  @root = root
end

Instance Method Details

#nameObject



145
146
147
# File 'lib/release_ceremony/project.rb', line 145

def name
  specification.name
end

#repo_urlObject



149
150
151
152
# File 'lib/release_ceremony/project.rb', line 149

def repo_url
  url = specification.['source_code_uri'] || specification.homepage
  url.to_s.chomp('/')
end