Class: PrLog::Project
- Inherits:
-
Struct
- Object
- Struct
- PrLog::Project
- Defined in:
- lib/pr_log/project.rb
Overview
Parse files from the local project directory
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #github_repository_name ⇒ Object
- #issue_numbers_mentioned_in_changelog ⇒ Object
- #milestone ⇒ Object
- #pull_requests_for_current_milestone ⇒ Object
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config
3 4 5 |
# File 'lib/pr_log/project.rb', line 3 def config @config end |
Instance Method Details
#github_repository_name ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/pr_log/project.rb', line 12 def github_repository_name config.github_repository || gemspec.github_repository rescue GemspecNotFound raise(GithubRepositoryRequired, 'Could not derive github repository from gemspec.') rescue NonGithubHomepage raise(GithubRepositoryRequired, 'Homepage attribute in gemspec is not a GitHub URL.') end |
#issue_numbers_mentioned_in_changelog ⇒ Object
4 5 6 |
# File 'lib/pr_log/project.rb', line 4 def issue_numbers_mentioned_in_changelog parsed_changelog.mentioned_issue_numbers end |
#milestone ⇒ Object
8 9 10 |
# File 'lib/pr_log/project.rb', line 8 def milestone config.milestone || gemspec.version_milestone end |
#pull_requests_for_current_milestone ⇒ Object
23 24 25 |
# File 'lib/pr_log/project.rb', line 23 def pull_requests_for_current_milestone github_repository.pull_requests_with_milestone(milestone) end |