biscuit 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9d55cb873d9a420bce70989d2463e389a14ae834e168bf8f105b1a5bf182f42
4
- data.tar.gz: 61188e6d68cc7c24d50a20a567e4266408ec3cd097c07e3cd450e49e0503f756
3
+ metadata.gz: c0ae8dd43c9d7b9cf11433ec6f56f8417d9df0a237396162f85a9a54eecb14af
4
+ data.tar.gz: ade9a35a78ea2e62c0ae1786b98a1f1c41f4e02186b6a4ccb9a246ffecc60ae4
5
5
  SHA512:
6
- metadata.gz: 44c2897ae14a681bf090b21ada81c70ba77acb436e586eca6456da4d9400fa21afdf4a844d27dee2b30f018071904f542fe57eb799727cd06c402d1332e93cec
7
- data.tar.gz: 603f4e54503779d12433ddcb2edd1af17a94a1d9aa17f0b24e63538b3f0668448dbf82fa93bdd760edecd5566c13fd4ab1902a3d34c6882a3aa6cb1ad5d1a930
6
+ metadata.gz: 6a50e6cb9da879f6537aa10768bd2821d69771df478ec86ece1e88a918a54bc2e9ad0f06055f6cb9a4bfbfb4cfc03689d82925c80ef7245ad0778541ae04ab1a
7
+ data.tar.gz: 6ba191f9c910089ca2a92f6545a3cd46149d2d9e3071cc0fb0166831808eb855aaac1b9cb09a09e9086595fd1c05b871445d6c915b632bfe17e9d6416a9430e7
@@ -1,21 +1,17 @@
1
1
  name: Publish Gem
2
2
 
3
3
  on:
4
- push:
5
- branches:
6
- - "master"
7
- - "github-workflow-publish-gem"
4
+ release:
5
+ types:
6
+ - published
8
7
 
9
8
  jobs:
10
9
  build:
11
10
  runs-on: ubuntu-latest
12
-
13
11
  steps:
14
12
  - uses: actions/checkout@v1
15
-
16
13
  - name: Release Gem
17
14
  uses: cadwallion/publish-rubygems-action@master
18
15
  env:
19
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
16
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20
17
  RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
21
- RELEASE_COMMAND: rake release
@@ -0,0 +1,21 @@
1
+ name: Ruby CI
2
+
3
+ on: [push, pull_request]
4
+ jobs:
5
+ build:
6
+ name: build (${{ matrix.ruby }} / ${{ matrix.os }})
7
+ strategy:
8
+ matrix:
9
+ ruby: [ "3.0", "2.7", "2.6", "2.5", "2.4", "2.3", head ]
10
+ os: [ ubuntu-latest ]
11
+ runs-on: ${{ matrix.os }}
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Set up Ruby
15
+ uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ - name: Install dependencies
19
+ run: bundle install
20
+ - name: Run test
21
+ run: bundle exec rspec spec
data/CHANGELOG.markdown CHANGED
@@ -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
+
1
6
  # 0.1.4
2
7
  - [FIX] `open()` is deprecated for URIs. Uses `URI.open()`
3
8
  - Bumps bundler version
data/README.md CHANGED
@@ -110,6 +110,11 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
110
110
 
111
111
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
112
112
 
113
+ ## Performing a release
114
+
115
+ First, go to `lib/biscuit/version.rb` and update the gem to the version you'd like. We follow semantic versioning, if you have questions about this please consult this [document](https://semver.org/).
116
+ After merging the change into the default branch you can go [here](https://github.com/usertesting/biscuit/releases/new) and publish a new release. Which will automatically push the new version to rubygems.org
117
+
113
118
  ## License
114
119
 
115
120
  [MIT](LICENSE).
data/Rakefile CHANGED
@@ -1,12 +1,15 @@
1
1
  require 'open-uri'
2
+ require 'bundler/gem_tasks'
2
3
 
3
- UPSTREAM_VERSION = '0.1.3'
4
+ UPSTREAM_VERSION = '0.1.4'
4
5
 
5
6
  def fetch(release_url)
7
+ puts "Fetching native biscuit executable: #{release_url}"
6
8
  tgz_path = download_file(release_url)
7
9
 
8
10
  system("tar -xzf #{tgz_path} -C #{File.dirname(tgz_path)}") || raise
9
11
  system("mv #{File.dirname(tgz_path)}/biscuit #{__dir__}/bin/_biscuit") || raise
12
+ puts "Successfully fetched native biscuit executable"
10
13
  end
11
14
 
12
15
  def download_file(url)
@@ -19,12 +22,13 @@ end
19
22
 
20
23
  task :default do
21
24
  platform = Gem::Platform.local
22
- 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}_"
23
27
 
24
- if platform.os == 'darwin' && platform.cpu == 'x86_64'
25
- fetch("#{base_release_url}-darwin_amd64.tgz")
28
+ if platform.os == 'darwin'
29
+ fetch("#{base_release_url}MacOS-all.tar.gz")
26
30
  elsif platform.os == 'linux' && platform.cpu == 'x86_64'
27
- fetch("#{base_release_url}-linux_amd64.tgz")
31
+ fetch("#{base_release_url}Linux-64bit.tar.gz")
28
32
  else
29
33
  puts "Unsupported platform #{platform}"
30
34
  end
@@ -5,7 +5,7 @@ module Biscuit
5
5
  attr_reader :secrets_file
6
6
 
7
7
  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
9
9
 
10
10
  @secrets_file = secrets_file
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module Biscuit
2
- VERSION = "0.1.4"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biscuit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suan-Aik Yeo
8
8
  - Justin Aiken
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-06-02 00:00:00.000000000 Z
12
+ date: 2022-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -64,9 +64,9 @@ extensions:
64
64
  extra_rdoc_files: []
65
65
  files:
66
66
  - ".github/workflows/publish_gem.yml"
67
+ - ".github/workflows/ruby.yml"
67
68
  - ".gitignore"
68
69
  - ".rspec"
69
- - ".travis.yml"
70
70
  - CHANGELOG.markdown
71
71
  - Gemfile
72
72
  - LICENSE
@@ -84,7 +84,7 @@ homepage: https://github.com/usertesting/biscuit
84
84
  licenses:
85
85
  - MIT
86
86
  metadata: {}
87
- post_install_message:
87
+ post_install_message:
88
88
  rdoc_options: []
89
89
  require_paths:
90
90
  - lib
@@ -99,8 +99,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubygems_version: 3.2.3
103
- signing_key:
102
+ rubygems_version: 3.3.7
103
+ signing_key:
104
104
  specification_version: 4
105
105
  summary: Ruby wrapper for biscuit (https://github.com/dcoker/biscuit).
106
106
  test_files: []
data/.travis.yml DELETED
@@ -1,13 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3
4
- - 2.4
5
- - 2.5
6
- - 2.6
7
-
8
- before_script:
9
- # Installs the _biscuit executable:
10
- - rake
11
-
12
- script:
13
- - bundle exec rspec spec/ --format=doc