Sha256: 92e675c6f2425246b7faa038e9fdf6e9795ae686b534290965d88177bbabcee4
Contents?: true
Size: 1.51 KB
Versions: 3
Compression:
Stored size: 1.51 KB
Contents
require 'rubygems/package_task' # Redefine rake:ci:metrics to disable rubocop, will tackle that laundry list # some other time # namespace :ci do # desc 'Run metrics (except mutant, rubocop) and spec' # task travis: %w[ # metrics:coverage # spec:integration # metrics:yardstick:verify # metrics:flog # metrics:flay # ] # # metrics:reek # # metrics:rubocop # end spec = Gem::Specification.load(File.expand_path('../hexp.gemspec', __FILE__)) gem = Gem::PackageTask.new(spec) gem.define desc "Push gem to rubygems.org" task :push => :gem do sh "git tag v#{Hexp::VERSION}" sh "git push --tags" sh "gem push pkg/hexp-#{Hexp::VERSION}.gem" end desc "update gh-pages" task :doc2gh do sh "git diff-files --quiet || exit 1" sh "git diff-index --quiet --cached HEAD || exit 1" sh "yardoc" sh "[ -d /tmp/doc ] && rm -rf /tmp/doc" sh "mv doc /tmp" sh "git co gh-pages" sh "rm -rf *" sh "cp -r /tmp/doc/* ." sh "git add ." sh "git commit -m 'Update gh-pages with YARD docs'" sh "git push origin gh-pages" sh "git co master" end require 'mutant' task :default => :mutant desc "run mutant" task :mutant do pattern = ENV.fetch('PATTERN', 'Hexp*') opts = ENV.fetch('MUTANT_OPTS', '').split(' ') result = Mutant::CLI.run(%w[-Ilib -rhexp --use rspec --score 100] + opts + [pattern]) fail unless result == Mutant::CLI::EXIT_SUCCESS end require 'rspec/core/rake_task' desc "run rspec" RSpec::Core::RakeTask.new(:rspec) do |t, task_args| t.rspec_opts = "-Ispec" t.pattern = "spec" end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hexp-0.4.6 | Rakefile |
hexp-0.4.5 | Rakefile |
hexp-0.4.4 | Rakefile |