Skip to content
Closed
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
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@ dist: xenial
sudo: false
language: ruby
cache: bundler

os:
- linux
- osx

rvm:
- ruby-head
- 2.6.0
- 2.5.3
- 2.4.5
- 2.3.8

matrix:
fast_finish: true
allow_failures:
- rvm: ruby-head

before_install:
- gem install bundler -v "~> 2.0"
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./script/setup-osx; else sudo ./script/setup-linux; fi
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

# Specify your gem's dependencies in webauthn.gemspec
gemspec

# TODO: Remove this after cose is released
gem "cose", github: "cedarcode/cose-ruby", branch: "libcbor"
2 changes: 1 addition & 1 deletion lib/webauthn/authenticator_attestation_response.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require "cbor"
require "libcbor/all"
require "uri"
require "openssl"

Expand Down
2 changes: 1 addition & 1 deletion lib/webauthn/fake_authenticator.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require "cbor"
require "libcbor/all"
require "openssl"
require "securerandom"

Expand Down
10 changes: 10 additions & 0 deletions script/setup-linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

set -x

if ! apt-cache show libcbor-dev >> /dev/null; then
add-apt-repository ppa:yubico/stable -y
apt-get update -q
fi

apt-get install libcbor-dev -y
6 changes: 6 additions & 0 deletions script/setup-osx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

set -x

brew tap pjk/libcbor
brew install libcbor
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "bundler/setup"
require "webauthn"
require "cbor"
require "libcbor/all"

require "byebug"
require "webauthn/fake_authenticator"
Expand Down
2 changes: 1 addition & 1 deletion webauthn.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = ">= 2.3"

spec.add_dependency "cbor", "~> 0.5.9.2"
spec.add_dependency "cose", "~> 0.1.0"
spec.add_dependency "jwt", [">= 1.5", "< 3.0"]
spec.add_dependency "libcbor", "~> 0.1.0"
spec.add_dependency "openssl", "~> 2.0"

spec.add_development_dependency "bundler", ">= 1.17", "< 3.0"
Expand Down