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-0.1.70 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.69 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.68 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.67 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.66 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.65 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.64 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.63 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.62 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.61 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.60 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.59 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.58 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.57 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.56 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.55 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.54 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.53 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.52 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile
harbr-0.1.50 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/Rakefile