Goal is to have a project managing that just works on many Ruby versions as possible and is easy to extend. Feel free to dislike it. ;)
Since rim version 3.0.0 it is necessary to create a gemspec file with the basic configuration of the project. See online documentation for more information. The rest is done in Rakefile.
Example of a minimal Rakefile:
require 'rim'
require 'rim/gem'
# require 'rim/...'
Rim.setup do
# set up things of necessary
end
For advanced usage have a look at the Rakefile of rim.
In rim before 3.0.0 the gemspec file was generated by rim from values defined
in Rim.setup
in Rakefile. Now it is the other way around: all
values which could be defined in the gemspec file must be defined there.
Therefore all according accessor methods are no longer relevant. Rim emits a
warning when such a method is called and does not use these values any
longer. It is necessary to set those in the gemspec file.
- Extend the class Rim with
attr_accessors
for new attributes if needed. - Set default values use
Rim.defaults
. - Define tasks with
Rim.after_setup
.
A very simple example extension:
# require other extensions if necessary
require 'rim/another_extension'
# Extend the class
class Rim
# Attribute for somewhat (default: 42)
attr_accessor :my_attr
end
# Setting default values
Rim.defaults do
my_attr 42
end
# Stuff to execute after setting the defaults and calling Rim.setup in Rakefile.
# Usual for defining tasks.
Rim.after_setup do
task :my_task => :another_task do
# stuff
end
end
For more examples have a look at the tasks coming with rim in lib/rim/*.rb
Jim Weirich For written the great Rake. (Sad that he is already gone.)
Ryan Davis and Evan Weaver For their inspirations in Hoe respectively Echoe.
The code is also hosted in a git repository at github and bitbucket
Feel free to contribute!
Rim follows Semantic Versioning, both SemVer and SemVerTag.
Jan Friedrich janfri26@gmail.com
MIT-style license, see file LICENSE.