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
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
require:
- rubocop-performance

inherit_mode:
merge:
- Exclude
Expand Down Expand Up @@ -36,5 +39,8 @@ Security:
Style/FrozenStringLiteralComment:
Enabled: true

Style/HashSyntax:
Enabled: true

Style/RedundantFreeze:
Enabled: true
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ sudo: false
language: ruby
cache: bundler

os:
- linux
- osx

rvm:
- ruby-head
- 2.7.0-preview1
Expand All @@ -17,7 +21,9 @@ gemfile:
- gemfiles/openssl_2_0.gemfile
- gemfiles/openssl_default.gemfile

before_install: gem install bundler -v '~> 1.17'
before_install:
- gem install bundler -v '~> 1.17'
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./script/setup-osx; else sudo ./script/setup-linux; fi

matrix:
fast_finish: true
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [v0.8.0] - 2019-08-17

### Added

- Support `COSE::Key` instantiation based on an `OpenSSL::PKey` object with `COSE::Key.from_pkey`
- Provide writer methods for `COSE::Key` Common Parameters (`#base_iv=`, `#key_ops=`, `#alg=` and `#kid=`)

## [v0.7.0] - 2019-05-02

### Fixed
Expand Down Expand Up @@ -79,6 +86,7 @@
- EC2 key object
- Works with ruby 2.5

[v0.8.0]: https://github.com/cedarcode/cose-ruby/compare/v0.7.0...v0.8.0/
[v0.7.0]: https://github.com/cedarcode/cose-ruby/compare/v0.6.1...v0.7.0/
[v0.6.1]: https://github.com/cedarcode/cose-ruby/compare/v0.6.0...v0.6.1/
[v0.6.0]: https://github.com/cedarcode/cose-ruby/compare/v0.5.0...v0.6.0/
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
# cose

CBOR Object Signing and Encryption (COSE) ruby library
Ruby implementation of RFC 8152 CBOR Object Signing and Encryption (COSE)

[![Gem](https://img.shields.io/gem/v/cose.svg?style=flat-square)](https://rubygems.org/gems/cose)
[![Travis](https://img.shields.io/travis/cedarcode/cose-ruby.svg?style=flat-square)](https://travis-ci.org/cedarcode/cose-ruby)

## Prerequisites

### OSX

```
brew tap pjk/libcbor
brew install libcbor
```

### Linux (APT)

```
apt-get install libcbor-dev
```

## Installation

Add this line to your application's Gemfile:
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ require "rubocop/rake_task"
RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new

task :default => [:rubocop, :spec]
task default: [:rubocop, :spec]
7 changes: 4 additions & 3 deletions cose.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
spec.authors = ["Gonzalo Rodriguez", "Braulio Martinez"]
spec.email = ["gonzalo@cedarcode.com", "braulio@cedarcode.com"]

spec.summary = "CBOR Object Signing and Encryption (COSE) ruby library"
spec.summary = "Ruby implementation of RFC 8152 CBOR Object Signing and Encryption (COSE)"
spec.homepage = "https://github.com/cedarcode/cose-ruby"
spec.license = "MIT"

Expand All @@ -31,12 +31,13 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = ">= 2.2"

spec.add_dependency "cbor", "~> 0.5.9"
spec.add_dependency "libcbor", "~> 0.1.0"

spec.add_development_dependency "appraisal", "~> 2.2.0"
spec.add_development_dependency "bundler", ">= 1.17", "< 3"
spec.add_development_dependency "byebug", ">= 10.0"
spec.add_development_dependency "rake", "~> 12.3"
spec.add_development_dependency "rspec", "~> 3.8"
spec.add_development_dependency "rubocop", "0.66.0"
spec.add_development_dependency "rubocop", "0.68.0"
spec.add_development_dependency "rubocop-performance", "~> 1.3"
end
1 change: 1 addition & 0 deletions lib/cbor.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require "libcbor/all"
2 changes: 1 addition & 1 deletion lib/cose/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module COSE
VERSION = "0.7.0"
VERSION = "0.8.0"
end
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