This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eliminate all duplicate occurrences of the RDoc version that Hanna us…
…es, which will make it very easy to change this version in the future. Now, Hanna's RDoc version can be changed simply by altering RDOC_VERSION in lib/hanna/rdoc_version.rb.
- Loading branch information
1 parent
d6ae5d0
commit 017a4d7
Showing
4 changed files
with
35 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Hanna | ||
# | ||
# The version of RDoc that Hanna should use. | ||
# | ||
RDOC_VERSION = '2.1.0' | ||
RDOC_VERSION_REQUIREMENT = "~> #{RDOC_VERSION}" | ||
|
||
# | ||
# This method loads the correct version of RDoc. If the correct | ||
# version of RDoc is not present, this method will terminate the | ||
# program with a helpful error message. | ||
# | ||
def self.require_rdoc | ||
begin | ||
gem 'rdoc', RDOC_VERSION_REQUIREMENT | ||
rescue Gem::LoadError | ||
$stderr.puts "Error: hanna requires the RDoc #{RDOC_VERSION} gem!" | ||
exit 1 | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 comments
on commit 017a4d7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using echoe, and a task to generate a github-safe gemspec. That’s what I do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s a really annoying github restriction, although understandable. Thanks for the echoe suggestion; that seems very reasonable to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I committed the changes. Hanna now uses the echoe gem to generate a gemspec.
GitHub doesn’t allow this in gemspecs, you’ll just have to hardcode it.