Sha256: 094c8d7c05ce0bbca816a288575180497b9594b30e48cb32b36750808911b364

Contents?: true

Size: 1.58 KB

Versions: 10

Compression:

Stored size: 1.58 KB

Contents

#!/usr/bin/env rake
#
require 'rake/testtask'
require 'fedux_org/stdlib/rake'
require 'proxy_pac_rb/version'

def software
  'proxy_pac_rb'
end

def version
  ProxyPacRb::VERSION
end

def root_directory
  ::File.expand_path('../', __FILE__)
end

def tar_file
  ::File.join(pkg_directory, "#{software}-#{version}.tar.gz")
end

def tmp_directory
  ::File.join(root_directory, 'tmp', "#{software}-#{version}")
end

def gem_file
  ::File.join(root_directory, 'pkg', "#{software}-#{version}.gem")
end

def pkg_directory
  ::File.join(root_directory, 'pkg')
end

def gem_directory
  ::File.join(root_directory, 'vendor', 'cache')
end

task :default => 'gem:build'

file gem_file => 'gem:build'

file tmp_directory do
  FileUtils.mkdir_p tmp_directory
end

namespace :gem do
  desc 'build tar file'
  task :package => [gem_file, tmp_directory] do
    FileUtils.mv ::File.join(pkg_directory, "#{software}-#{version}.gem"), tmp_directory

    Dir.chdir('tmp') do
      sh "tar -czf #{tar_file} #{::File.basename tmp_directory}"
    end
  end
end

namespace 'test' do
  require 'bundler'

  desc 'Run tests with the rubyracer runtime'
  task 'rubyracer' do
    Bundler.require :default, :test, :development, :therubyracer
    Rake::Task['test:rspec'].invoke
  end

  desc 'Run tests with the therubyrhino runtime'
  task 'rubyrhino' do
    Bundler.require :default, :test, :development, :therubyrhino
    Rake::Task['test:rspec'].invoke
  end
end


require 'coveralls/rake/task'
Coveralls::RakeTask.new

namespace :test do
  desc 'Test with coveralls'
  task :coveralls => ['test:rspec', 'test:cucumber', 'coveralls:push']
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
proxy_pac_rb-0.3.0 Rakefile
proxy_pac_rb-0.2.6 Rakefile
proxy_pac_rb-0.2.5 Rakefile
proxy_pac_rb-0.2.4 Rakefile
proxy_pac_rb-0.2.3 Rakefile
proxy_pac_rb-0.2.2 Rakefile
proxy_pac_rb-0.2.1 Rakefile
proxy_pac_rb-0.2.0 Rakefile
proxy_pac_rb-0.0.3 Rakefile
proxy_pac_rb-0.0.2 Rakefile