Sha256: 1f34c49f6251d08fd3693ba5d90c8f73793220b36004d7df736f82470e054110

Contents?: true

Size: 1.57 KB

Versions: 76

Compression:

Stored size: 1.57 KB

Contents

require 'rake/clean'
require 'rake/testtask'

task :default => :test

# TESTS #######################################################################

Rake::TestTask.new(:test) do |t|
  t.test_files = FileList['test/**/*_test.rb']
end

# DOCS ########################################################################

desc "Generate API documentation"
task :api => 'lib/citrus.rb' do |t|
  output_dir = ENV['OUTPUT_DIR'] || 'api'
  rm_rf output_dir
  sh((<<-SH).gsub(/\s+/, ' ').strip)
  hanna
    --op #{output_dir}
    --promiscuous
    --charset utf8
    --fmt html
    --inline-source
    --line-numbers
    --accessor option_accessor=RW
    --main Citrus
    --title 'Citrus API Documentation'
    #{t.prerequisites.join(' ')}
  SH
end

CLEAN.include 'api'

# PACKAGING & INSTALLATION ####################################################

if defined?(Gem)
  $spec = eval("#{File.read('citrus.gemspec')}")

  directory 'dist'

  def package(ext='')
    "dist/#{$spec.name}-#{$spec.version}" + ext
  end

  file package('.gem') => %w< dist > + $spec.files do |f|
    sh "gem build citrus.gemspec"
    mv File.basename(f.name), f.name
  end

  file package('.tar.gz') => %w< dist > + $spec.files do |f|
    sh "git archive --format=tar HEAD | gzip > #{f.name}"
  end

  desc "Build packages"
  task :package => %w< .gem .tar.gz >.map {|e| package(e) }

  desc "Build and install as local gem"
  task :install => package('.gem') do |t|
    sh "gem install #{package('.gem')}"
  end

  desc "Upload gem to rubygems.org"
  task :release => package('.gem') do |t|
    sh "gem push #{package('.gem')}"
  end
end

Version data entries

76 entries across 76 versions & 2 rubygems

Version Path
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.2.6 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.2.5 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.2.4 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.2.3 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.2.2 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.2.1 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.2.0 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.99 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.98 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.97 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.96 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.95 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.94 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.93 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.91 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile