File: Thorfile

package info (click to toggle)
ruby-buff-shell-out 0.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 164 kB
  • ctags: 18
  • sloc: ruby: 136; makefile: 3
file content (43 lines) | stat: -rw-r--r-- 1,049 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# encoding: utf-8
$:.push File.expand_path("../lib", __FILE__)

require 'bundler'
require 'bundler/setup'
require 'buff/shell_out/version'
require 'buff/ruby_engine'

class Default < Thor
  extend Buff::RubyEngine

  unless jruby?
    require 'thor/rake_compat'

    include Thor::RakeCompat
    Bundler::GemHelper.install_tasks

    desc "build", "Build buff-shell_out-#{Buff::ShellOut::VERSION}.gem into the pkg directory"
    def build
      Rake::Task["build"].execute
    end

    desc "install", "Build and install buff-shell_out-#{Buff::ShellOut::VERSION}.gem into system gems"
    def install
      Rake::Task["install"].execute
    end

    desc "release", "Create tag v#{Buff::ShellOut::VERSION} and build and push buff-shell_out-#{Buff::ShellOut::VERSION}.gem to Rubygems"
    def release
      Rake::Task["release"].execute
    end
  end

  class Spec < Thor
    namespace :spec
    default_task :unit

    desc "unit", "run the project's unit tests"
    def unit
      exec "rspec --color --format=documentation spec"
    end
  end
end