Sha256: 6ff54dc5d7ab69bd591cbba7a2081ce4072ea9df2bc24277d22215d194da586c

Contents?: true

Size: 853 Bytes

Versions: 1

Compression:

Stored size: 853 Bytes

Contents

require 'rake'
require 'rake/clean'
require 'rspec/core/rake_task'

CLEAN.include("**/*.gem", "**/*.rbc")

namespace :gem do
  desc "Create the getopt gem"
  task :create => [:clean] do
    require 'rubygems/package'
    spec = eval(IO.read('getopt.gemspec'))
    spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
    Gem::Package.build(spec)
  end

  desc "Install the getopt gem"
  task :install => [:create] do
    file = Dir["*.gem"].first
    sh "gem install -l #{file}"
  end
end

namespace :spec do
  RSpec::Core::RakeTask.new(:all) do |t|
    t.pattern = FileList['spec/*_spec.rb']
  end

  RSpec::Core::RakeTask.new(:getopt_long) do |t|
    t.pattern = FileList['spec/*long_spec.rb']
  end

  RSpec::Core::RakeTask.new(:getopt_std) do |t|
    t.pattern = FileList['spec/*std_spec.rb']
  end
end

task :default => 'spec:all'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
getopt-1.6.0 Rakefile