Sha256: d188e36563b336ca1a456ff76f39a287a1367570be17c01384e771f4d5a0ab3b

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

unless defined?(SKIP_ECHOE)
  
#
# GEM settings
#
GEM_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..")

if gem_config = YAML.load(File.read("#{GEM_ROOT}/config/gem.yml"))
  require 'echoe'  

  #
  # a dependency reader
  module Dependency
    @@dependencies = []

    def self.require(file)
      @@dependencies << file
    end

    def self.load
      eval File.read("#{GEM_ROOT}/config/dependencies.rb"), binding
      @@dependencies
    end
  end

  Echoe.new(File.basename(GEM_ROOT), File.read("#{GEM_ROOT}/VERSION")) do |p|  
    gem_config.each do |k,v|
      p.send "#{k}=",v
    end
    
    p.runtime_dependencies = Dependency.load
  end

  desc "Rebuild and install the gem"
  task :rebuild => %w(manifest default build_gemspec package) do
    gem = Dir.glob("pkg/*.gem").sort_by do |filename|
      File.new(filename).mtime
    end.last

    puts "============================================="
    puts "Installing gem..."

    system "sudo gem install #{gem} --no-test --no-ri --no-rdoc > /dev/null 2>&1"

    puts ""
    puts "I built and installed the gem for you. To upload, run "
    puts
    puts "    gem push #{gem}"
  end
end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vex-0.4.4 tasks/echoe.rake