Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Remove cane #32

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ end
group :development do
gem "countloc"
gem "simplecov"

# gem "finstyle", "1.2.0"
gem "cane", "2.6.2"
end

group :chefstyle do
Expand Down
24 changes: 9 additions & 15 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,24 @@ require "bundler/gem_tasks"
require "open-uri"

namespace :bats do

version = ENV.fetch("BATS_VERSION", "v0.4.0")
url = "https://github.com/sstephenson/bats/archive/#{version}.tar.gz"
tarball = "tmp/bats-#{version}.tar.gz"
vendor = "vendor/bats"

desc "Vendors bats #{version} source code into gem codebase"
task :vendor => "#{vendor}/VERSION.txt"
task vendor: "#{vendor}/VERSION.txt"

directory File.dirname(tarball)
directory vendor

file tarball => File.dirname(tarball) do |t|
begin
src = open(url).binmode
dst = open(t.name, "wb")
IO.copy_stream(src, dst)
ensure
src.close
dst.close
end
src = open(url).binmode
dst = open(t.name, "wb")
IO.copy_stream(src, dst)
ensure
src.close
dst.close
end

file "#{vendor}/VERSION.txt" => [vendor, tarball] do |t|
Expand All @@ -44,7 +41,7 @@ Cucumber::Rake::Task.new(:features) do |t|
end

desc "Run all test suites"
task :test => [:features]
task test: [:features]

desc "Display LOC stats"
task :stats do
Expand All @@ -54,7 +51,4 @@ task :stats do
sh "countloc -r features"
end

desc "Run all quality tasks"
# task :quality => [:cane, :style, :stats]

task :default => [:test, :quality]
task default: %i{test quality}
3 changes: 1 addition & 2 deletions busser-bats.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# coding: utf-8
lib = File.expand_path("../lib", __FILE__)
lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "busser/bats/version"
require "English"
Expand Down
Loading