Top Level Namespace

Defined Under Namespace

Modules: TVDinner

Instance Method Summary collapse

Instance Method Details

#dev(nm_gem, workarea = "git") ⇒ Object



1
2
3
4
5
6
7
# File 'lib/development.rb', line 1

def dev(nm_gem, workarea="git")
  gem nm_gem, (
    File.exists?(File.expand_path("../#{workarea}/#{nm_gem}", __FILE__)) ? 
      (ENV["EDIT_#{nm_gem.gsub(/[-]/, "_")}"] = "true"; { :path => "#{workarea}/#{nm_gem}" }) : 
      Dir["vendor/cache/#{nm_gem}-*.gem"].collect {|x| [x.gsub(/\d+/) {|num| sprintf("%011d", num) }, x] }.sort[0][1].split(/-/)[-1].gsub(/\.gem$/,"")
  )
end