Sha256: 1317c9bf6058b7221dfab1deedb3aceb2be92bbc9d7208d15086ead17ffb6954

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

require 'rake/testtask'

Rake::TestTask.new do |t|
    t.libs << 'test'
    t.libs << 'lib'
end

desc "Run tests"
task :default => :test

task :cleanup_test do
    sh "rm -rf test/test"
end

task :build => :doc do
    sh "gem build como.gemspec"
end

task :doc do
    sh "yardoc lib/* - README.rdoc CHANGELOG.rdoc"
end

task :publish do
    if Dir.glob('como-*gem').length == 1
        sh "gem push como*.gem"
    else
        raise "Multiple gems in the directory..."
    end
end


# Create como.gemspec with current version and date fields.
file 'como.gemspec' => [:version, 'como.rx.gemspec'] do
    sh "mucgly -i como.rx.gemspec -o como.gemspec"
    sh "ruvermgr -f .version -i build"
    # sh "ruvermgr -f .version"
end


# Create 'lib/version.rb' file including 'Como.version' method.
# :version task is usually executed indirectly by 'como.gemspec'.
task :version do
    version = %x{ruvermgr -f .version -o ruby}.chomp
    File.open( "lib/version.rb", 'w' ) do |fh|
        fh.puts "\
module Como

    def Como.version
        ComoCommon::VERSION
    end

    class ComoCommon
        VERSION=\"#{version}\"
    end

end
"
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
como-0.1.3 Rakefile