Sha256: 56869773fea9839f2d9821c7c83eba53ce83843a6574b0bc7f90e05d4175cd73

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 KB

Contents

# encoding: utf-8
#
# This file is part of the lazier gem. Copyright (C) 2013 and above Shogun <shogun@cowtech.it>.
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
#

require "bundler/gem_tasks"
require "rspec/core/rake_task"

# Compatibility layer for Rake 11.0
Rake.application.class.send(:alias_method, :last_comment, :last_description) unless Rake.application.respond_to?(:last_comment)

RSpec::Core::RakeTask.new("spec")

RSpec::Core::RakeTask.new("spec:coverage") do
  ENV["COVERAGE"] = "true"
end

RSpec::Core::RakeTask.new("spec:ci") do
  ENV["COVERAGE"] = "true"
  ENV["NO_COLOR"] = "true"
end

desc "Performs linting of the code using rubocop"
task "lint" do
  Kernel.exec("rubocop -ED lib")
end

desc "Generates the documentation"
task :docs do
  system("yardoc") || raise("Failed Execution of: yardoc")
end

desc "Gets the current release version"
task :version, :with_name do |_, args|
  gem = Bundler::GemHelper.instance.gemspec
  puts [args[:with_name] == "true" ? gem.name : nil, gem.version].compact.join("-")
end

desc "Prepares the release"
task :prerelease => ["spec:coverage", "docs"] do
  ["git add -A", "git commit -am \"Version #{Bundler::GemHelper.instance.gemspec.version}\""].each do |cmd|
    system(cmd) || raise("Failed Execution of: #{cmd}")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lazier-4.2.2 Rakefile
lazier-4.2.1 Rakefile