Skip to content

Commit

Permalink
Merge branch 'main' into release-please--branches--main--components--…
Browse files Browse the repository at this point in the history
…busser-bats
  • Loading branch information
damacus authored Nov 30, 2023
2 parents 3bb2029 + 1bf1bda commit 1243c86
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
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

0 comments on commit 1243c86

Please sign in to comment.