Skip to content

Commit

Permalink
Swapping around the description/attribute order.
Browse files Browse the repository at this point in the history
  • Loading branch information
TwP committed Nov 8, 2009
1 parent 0469529 commit d197a8e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 48 deletions.
33 changes: 11 additions & 22 deletions lib/bones/plugins/ann.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,19 @@ def initialize_ann
::Bones.config {
desc 'Configuration for creating and mailing an announcement message.'
ann {
desc <<-__
file 'announcement.txt', :desc => <<-__
When announcing a release of your project the announcement text will
be written to this file.
__
file 'announcement.txt'

desc 'Extra text to be appended to the announcement.'
text nil
text nil, :desc => 'Extra text to be appended to the announcement.'

desc <<-__
paragraphs Array.new, :desc => <<-__
Array of paragraphs from the README file to include in the
announcement. The paragraphs are identified by their heading name in
the README, but when listed here they can be given as lowercase or
uppercase.
__
paragraphs []

desc <<-__
Configuration for e-mailing the announcement.
Expand All @@ -50,40 +47,32 @@ def initialize_ann
different then the project's e-mail address.
__
email {
desc <<-__
from nil, :desc => <<-__
The name to show on the 'from' line of the annoucement e-mail.
This will default to the author name or the project e-mail if an
author is not specified.
__
from nil

desc 'An array of e-mail recipients.'
to %w(ruby-talk@ruby-lang.org)
to %w(ruby-talk@ruby-lang.org), :desc => 'An array of e-mail recipients.'

desc 'The server used to send the announcement e-mail.'
server 'localhost'
server 'localhost', :desc => 'The server used to send the announcement e-mail.'

desc 'The server port number to connect to.'
port 25
port 25, :desc => 'The server port number to connect to.'

desc <<-__
domain ENV['HOSTNAME'], :desc => <<-__
The originating domain of the e-mail. This safely deafaults to the
local hostname.
__
domain ENV['HOSTNAME']

desc 'The e-mail account name used to log into the e-mail server.'
username nil
username nil, :desc => 'The e-mail account name used to log into the e-mail server.'

desc 'The e-mail password used to log into the e-mail server.'
password nil
password nil, :desc => 'The e-mail password used to log into the e-mail server.'

desc <<-__
authtype :plain, :desc => <<-__
The authentication type used by the e-mail server. This should be
one of :plain, :login, or :cram_md5. See the documentation on the
Net::SMTP class for more information.
__
authtype :plain
}
}
}
Expand Down
24 changes: 8 additions & 16 deletions lib/bones/plugins/gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def initialize_gem
::Bones.config {
desc 'Configuration settings for gem packaging.'
gem {
desc <<-__
dependencies Array.new, :desc => <<-__
Array of gem dependencies.
A convenience method is provided to add gem dependencies, and so you
Expand All @@ -41,9 +41,8 @@ def initialize_gem
| depend_on 'rspec', '1.2.8' # expands to '>= 1.2.8'
| depend_on 'main', '~> 2.0'
__
dependencies Array.new

desc <<-__
development_dependencies Array.new, :desc => <<-__
Array of development gem dependencies.
A convenience method is provided to add gem dependencies, and so you
Expand All @@ -52,49 +51,42 @@ def initialize_gem
| depend_on 'bones', :deveopment => true
| depend_on 'mocah', :version => '0.9.8', :development => true
__
development_dependencies Array.new

desc <<-__
executables nil, :desc => <<-__
Array of executables provided by your project. All files in the 'bin'
folder will be included by default. However, if you are using a
non-standard location for your executables then you will need to
include them explicitly here as an Array.
__
executables nil

desc <<-__
extensions FileList['ext/**/extconf.rb'], :desc => <<-__
Array of gem extensions. This is the list of 'extconf.rb' files
provided by your project. Rubygems uses this list of files to
compile extensions when installing your gem.
__
extensions FileList['ext/**/extconf.rb']

desc <<-__
files nil, :desc => <<-__
The list of files to include when packaging up your gem. This
defaults to all files in the current directory excluding those
matched by the 'exclude' option and the 'ignore_file'. You can
supply your Array of files if you desire.
__
files nil

desc <<-__
need_tar true, :desc => <<-__
When set to true a tar-gzip file will be produced along with your
gem. The default is true.
__
need_tar true

desc <<-__
need_zip false, :desc => <<-__
When set to true a zip file will be produced along with your gem.
The default is false.
__
need_zip false

desc <<-__
extras Hash.new, :desc => <<-__
A hash of extra Gem::Specification settings that are otherwise not
provided for by Mr Bones. You will need to refer to the rubygems
documentation for a complete list of specification settings.
__
extras Hash.new
}
}

Expand Down
15 changes: 5 additions & 10 deletions lib/bones/plugins/rdoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,26 @@ def initialize_rdoc
desc 'Configuration settings for rdoc and ri'
rdoc {

desc 'Array of rdoc options to use when generating documentation.'
opts []
opts [], :desc => 'Array of rdoc options to use when generating documentation.'

desc <<-__
include %w(^lib/ ^bin/ ^ext/ \.txt$ \.rdoc$), :desc => <<-__
An array of patterns that will be used to find the files for which
documentation should be generated. This is an array of strings that
will be converted in regular expressions.
__
include %w(^lib/ ^bin/ ^ext/ \.txt$ \.rdoc$)

desc <<-__
exclude %w(extconf\.rb$), :desc => <<-__
An array of patterns that will be used to exclude files from rdoc
processing. This is an array of strings that will be converted in
regular expressions.
__
exclude %w(extconf\.rb$)

desc <<-__
main nil, :desc => <<-__
The main rdoc file for the project. This defaults to the project's
README file.
__
main nil

desc 'Output directory for generated documentation.'
dir 'doc'
dir 'doc', :desc => 'Output directory for generated documentation.'
}
}

Expand Down

0 comments on commit d197a8e

Please sign in to comment.