Sha256: 2edf9c5ea6876c53534521790d84220823d417282738e4c37203f0e1587907ee

Contents?: true

Size: 1.17 KB

Versions: 68

Compression:

Stored size: 1.17 KB

Contents

require 'fileutils'
require 'rspec/core/rake_task'

desc "Run spec suite (uses Rspec2)"
RSpec::Core::RakeTask.new(:spec) { |t|}

namespace :spec do
  desc "Clean up rbx compiled files and run spec suite"
  RSpec::Core::RakeTask.new(:ci) { |t| Dir.glob("**/*.rbc").each {|f| FileUtils.rm_f(f) } }
end

desc "Run specs with RCov"
RSpec::Core::RakeTask.new(:rcov) do |t|
  t.rcov = true
  t.rcov_opts = ['--exclude', 'spec']
end

desc "Generate AMQP specification classes"
task :codegen do
  sh 'ruby protocol/codegen.rb > lib/amqp/spec.rb'
  sh 'ruby lib/amqp/spec.rb'
end

desc "Build the gem"
task :gem do
  sh 'gem build *.gemspec'
end

desc "Synonym for gem"
task :pkg => :gem
desc "Synonym for gem"
task :package => :gem


desc "Regenerate contributors file."
task :contributors do
  authors = %x{git log | grep ^Author:}.split("\n")
  results = authors.reduce(Hash.new) do |results, line|
    name = line.sub(/^Author: (.+) <.+>$/, '\1')
    results[name] ||= 0
    results[name] += 1
    results
  end
  results = results.sort_by { |_, count| count }.reverse
  File.open("CONTRIBUTORS", "w") do |file|
    results.each do |name, count|
      file.puts "#{name}: #{count}"
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
amqp-1.8.0 Rakefile
amqp-1.7.0 Rakefile
amqp-1.6.0 Rakefile
amqp-1.5.3 Rakefile
amqp-1.5.2 Rakefile
amqp-1.5.1 Rakefile
amqp-1.5.0 Rakefile
amqp-1.4.2 Rakefile
amqp-1.4.1 Rakefile
amqp-1.4.0 Rakefile
amqp-1.3.0 Rakefile
amqp-1.2.1 Rakefile
amqp-1.2.0 Rakefile
amqp-1.1.8 Rakefile
amqp-1.1.7 Rakefile
amqp-1.1.6 Rakefile
amqp-1.1.5 Rakefile
amqp-1.1.4 Rakefile
amqp-1.1.3 Rakefile
amqp-1.0.4 Rakefile