Class: MidwireCommon::RakeHelper

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/midwire_common/rake_helper.rb

Overview

RakeHelper helps to automate gem release and versioning tasks

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(basedir) ⇒ RakeHelper



16
17
18
# File 'lib/midwire_common/rake_helper.rb', line 16

def initialize(basedir)
  @basedir = basedir
end

Instance Attribute Details

#basedirObject (readonly)

Returns the value of attribute basedir.



14
15
16
# File 'lib/midwire_common/rake_helper.rb', line 14

def basedir
  @basedir
end

Class Method Details

.install_tasks(opts = {}) ⇒ Object



9
10
11
12
# File 'lib/midwire_common/rake_helper.rb', line 9

def self.install_tasks(opts = {})
  dir = opts[:dir] || Dir.pwd
  new(dir).install
end

Instance Method Details

#installObject



20
21
22
23
# File 'lib/midwire_common/rake_helper.rb', line 20

def install
  task_dir = File.expand_path('../tasks', File.dirname(__FILE__))
  Dir["#{task_dir}/*.rake"].sort.each { |ext| load ext }
end