Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Commit 725a23e

Browse files
author
Jon Worek
authored
Merge pull request #15 from usertesting/resolve_bsdthread_register_error
bump upstream version to 0.1.4
2 parents a819e3e + beb6011 commit 725a23e

5 files changed

Lines changed: 18 additions & 10 deletions

File tree

CHANGELOG.markdown

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 0.2.0
2+
- [FIX] Resolve File.exists? deprecation removal in latest Ruby.
3+
- Bump upstream biscuit binary dependency to latest 0.1.4 release.
4+
- Adds diagnostic logging to install task.
5+
16
# 0.1.4
27
- [FIX] `open()` is deprecated for URIs. Uses `URI.open()`
38
- Bumps bundler version

Rakefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
require 'open-uri'
22
require 'bundler/gem_tasks'
33

4-
UPSTREAM_VERSION = '0.1.3'
4+
UPSTREAM_VERSION = '0.1.4'
55

66
def fetch(release_url)
7+
puts "Fetching native biscuit executable: #{release_url}"
78
tgz_path = download_file(release_url)
89

910
system("tar -xzf #{tgz_path} -C #{File.dirname(tgz_path)}") || raise
1011
system("mv #{File.dirname(tgz_path)}/biscuit #{__dir__}/bin/_biscuit") || raise
12+
puts "Successfully fetched native biscuit executable"
1113
end
1214

1315
def download_file(url)
@@ -20,12 +22,13 @@ end
2022

2123
task :default do
2224
platform = Gem::Platform.local
23-
base_release_url = "https://github.com/dcoker/biscuit/releases/download/v#{UPSTREAM_VERSION}/biscuit"
25+
base_release_url =
26+
"https://github.com/dcoker/biscuit/releases/download/v#{UPSTREAM_VERSION}/biscuit_#{UPSTREAM_VERSION}_"
2427

25-
if platform.os == 'darwin' && platform.cpu == 'x86_64'
26-
fetch("#{base_release_url}-darwin_amd64.tgz")
28+
if platform.os == 'darwin'
29+
fetch("#{base_release_url}MacOS-all.tar.gz")
2730
elsif platform.os == 'linux' && platform.cpu == 'x86_64'
28-
fetch("#{base_release_url}-linux_amd64.tgz")
31+
fetch("#{base_release_url}Linux-64bit.tar.gz")
2932
else
3033
puts "Unsupported platform #{platform}"
3134
end

lib/biscuit/secrets_decrypter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class SecretsDecrypter
55
attr_reader :secrets_file
66

77
def initialize(secrets_file)
8-
fail "#{secrets_file} is not found" unless File.exists? secrets_file
8+
fail "#{secrets_file} is not found" unless File.exist? secrets_file
99

1010
@secrets_file = secrets_file
1111
end

lib/biscuit/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Biscuit
2-
VERSION = "0.1.4"
2+
VERSION = "0.2.0"
33
end

spec/lib/secrets_decrypter_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99
subject(:decrypter) { -> { described_class.new(secret_file) } }
1010

1111
context "when the file exists" do
12-
before { allow(File).to receive(:exists?).and_return(true) }
12+
before { allow(File).to receive(:exist?).and_return(true) }
1313
it { is_expected.not_to raise_error }
1414
end
1515

1616
context "when the file doesn't exist" do
17-
before { allow(File).to receive(:exists?).and_return(false) }
17+
before { allow(File).to receive(:exist?).and_return(false) }
1818
it { is_expected.to raise_error(StandardError, /is not found/) }
1919
end
2020
end
2121

2222
describe ".load" do
2323
shared_examples "translates exported data correctly" do
2424
let(:decrypter) { described_class.new(secret_file) }
25-
before { allow(File).to receive(:exists?).and_return(true) }
25+
before { allow(File).to receive(:exist?).and_return(true) }
2626
before { allow(Biscuit).to receive(:run!).and_return(exported_data) }
2727

2828
it "executes the correct biscuit command" do

0 commit comments

Comments
 (0)