Sha256: 89dc60aa605092fea7c31852c7b1498ffd5dd28472c83512da8f52034443ea6b

Contents?: true

Size: 1.96 KB

Versions: 23

Compression:

Stored size: 1.96 KB

Contents

=begin
    Copyright 2020 Alex Douckas <alexdouckas@gmail.com>, Tasos Laskos <tasos.laskos@gmail.com>

    This file is part of the Engine Framework project and is subject to
    redistribution and commercial restrictions. Please see the Engine Framework
    web site for more information on licensing and terms of use.
=end

require File.expand_path(File.dirname(__FILE__)) + '/lib/cuboid'

begin
    require 'rspec'
    require 'rspec/core/rake_task'

    namespace :spec do

        desc 'Run core library tests.'
        RSpec::Core::RakeTask.new( :core ) do |t|
            t.pattern = FileList[ 'spec/cuboid/**/*_spec.rb' ]
        end

        desc 'Run plugin tests.'
        RSpec::Core::RakeTask.new( :plugins ) do |t|
            t.pattern = FileList[ 'spec/components/plugins/**/*_spec.rb' ]
        end
    end

    RSpec::Core::RakeTask.new
rescue LoadError
    puts 'If you want to run the tests please install rspec first:'
    puts '  gem install rspec'
end

desc 'Generate docs.'
task :docs do
    outdir = "../cuboid-docs"
    sh "rm -rf #{outdir}"
    sh "mkdir -p #{outdir}"

    sh "yardoc -o #{outdir}"

    sh "rm -rf .yardoc"
end

desc 'Remove reporter and log files.'
task :clean do
    files = %w(error.log *.crf *.csf *.yaml *.json *.marshal *.gem pkg/*.gem
        reports/*.crf snapshots/*.csf logs/*.log spec/support/logs/*.log
        spec/support/reports/*.crf spec/support/snapshots/*.csf
    ).map { |file| Dir.glob( file ) }.flatten

    next if files.empty?

    puts 'Removing:'
    files.each { |file| puts "  * #{file}" }
    FileUtils.rm files
end

desc 'Build the gem.'
task build: [ :clean ] do
    sh "gem build cuboid.gemspec"
end

desc 'Build and install the gem.'
task install: [ :build ] do
    sh "gem install cuboid-#{Cuboid::VERSION}.gem"
end

desc 'Push a new version to Rubygems'
task publish: [ :build ] do
    sh "git tag -a v#{Cuboid::VERSION} -m 'Version #{Cuboid::VERSION}'"
    sh "gem push cuboid-#{Cuboid::VERSION}.gem"
end
task release: [ :publish ]

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
cuboid-0.2.13 Rakefile
cuboid-0.2.12 Rakefile
cuboid-0.2.11 Rakefile
cuboid-0.2.10 Rakefile
cuboid-0.2.9 Rakefile
cuboid-0.2.8 Rakefile
cuboid-0.2.7 Rakefile
cuboid-0.2.6 Rakefile
cuboid-0.2.5 Rakefile
cuboid-0.2.4.2 Rakefile
cuboid-0.2.4.1 Rakefile
cuboid-0.2.4 Rakefile
cuboid-0.2.3 Rakefile
cuboid-0.2.2 Rakefile
cuboid-0.2.1 Rakefile
cuboid-0.2 Rakefile
cuboid-0.1.9.1 Rakefile
cuboid-0.1.9 Rakefile
cuboid-0.1.8 Rakefile
cuboid-0.1.7 Rakefile