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

Returns a new instance of RakeHelper.



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

def initialize(basedir)
  @basedir = basedir
end

Instance Attribute Details

#basedirObject (readonly)

Returns the value of attribute basedir.



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

def basedir
  @basedir
end

Class Method Details

.install_tasks(opts = {}) ⇒ Object



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

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

Instance Method Details

#installObject



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

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