Create a GEM Package task library. Automatically define the gem if a block is given. If no block is supplied, then define needs to be called to define the task.
# File lib/bones/gem_package_task.rb, line 19
19: def initialize(gem_spec)
20: init(gem_spec)
21: yield self if block_given?
22: define if block_given?
23: end
Create the Rake tasks and actions specified by this GemPackageTask. (define is automatically called if a block is given to new).
# File lib/bones/gem_package_task.rb, line 38
38: def define
39: super
40: task :prereqs
41: task :package => ['gem:prereqs', "#{package_dir_path}/#{gem_file}"]
42:
43: file "#{package_dir_path}/#{gem_file}" => [package_dir_path] + package_files do
44: when_writing("Creating GEM") {
45: chdir(package_dir_path) do
46: Gem::Builder.new(gem_spec).build
47: verbose(true) {
48: mv gem_file, "../#{gem_file}"
49: }
50: end
51: }
52: end
53:
54: file package_dir_path do
55: mkdir_p package_dir rescue nil
56: end
57: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.