Sha256: 6e2a067f44cbdb7b9406949496cbdcb11ee96cab00d5056b4bbbff548c15d922

Contents?: true

Size: 1.32 KB

Versions: 41

Compression:

Stored size: 1.32 KB

Contents

# encoding: utf-8
$:.unshift File.expand_path('../lib', __FILE__)

require 'bundler'
require 'thor/rake_compat'

class Gem < Thor
  include Thor::RakeCompat
  Bundler::GemHelper.install_tasks

  desc 'build', "Build berkshelf-#{Berkshelf::VERSION}.gem into the pkg directory"
  def build
    Rake::Task['build'].execute
  end

  desc 'install', "Build and install berkshelf-#{Berkshelf::VERSION}.gem into system gems"
  def install
    Rake::Task['install'].execute
  end

  desc 'release', "Create tag v#{Berkshelf::VERSION} and build and push berkshelf-#{Berkshelf::VERSION}.gem to Rubygems"
  def release
    Rake::Task['release'].execute
  end
end

class Spec < Thor
  include Thor::Actions
  default_task :all

  desc 'all', 'Run all specs and features'
  def all
    exit(units_command && acceptance_command)
  end

  desc 'ci', 'Run tests on Travis'
  def ci
    ENV['CI'] = 'true' # Travis-CI also sets this, but set it here for local testing
    all
  end

  desc 'unit', 'Run unit tests'
  def unit
    exit(units_command)
  end

  desc 'acceptance', 'Run acceptance tests'
  def acceptance
    exit(acceptance_command)
  end

  no_tasks do
    def units_command
      run('rspec --color --format progress spec/unit')
    end

    def acceptance_command
      run('cucumber --color --format progress --tags ~@no_run --strict')
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
berkshelf-5.5.0 Thorfile
berkshelf-5.4.0 Thorfile
berkshelf-5.3.0 Thorfile
berkshelf-5.2.0 Thorfile
berkshelf-5.1.0 Thorfile
berkshelf-5.0.0 Thorfile
berkshelf-4.3.5 Thorfile
berkshelf-4.3.3 Thorfile
berkshelf-4.3.2 Thorfile
berkshelf-4.3.1 Thorfile
berkshelf-4.3.0 Thorfile
berkshelf-4.2.3 Thorfile
berkshelf-4.2.2 Thorfile
berkshelf-4.2.1 Thorfile
berkshelf-4.2.0 Thorfile
berkshelf-4.1.1 Thorfile
berkshelf-4.1.0 Thorfile
berkshelf-4.0.1 Thorfile
berkshelf-4.0.0 Thorfile
berkshelf-3.3.0 Thorfile