Skip to content
Merged
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
15 changes: 0 additions & 15 deletions .codeclimate.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: test
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"

jobs:
lint:
name: RuboCop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "ruby"
bundler-cache: true
- name: Run RuboCop
run: bundle exec rubocop

test:
name: Ruby ${{ matrix.ruby }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- "2.5"
- "2.6"
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
- "3.4"

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run tests
run: bundle exec rspec
12 changes: 11 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
Metrics/LineLength:
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.5
NewCops: enable
SuggestExtensions: false

Layout/LineLength:
Enabled: false

Style/RaiseArgs:
Enabled: false

Metrics/BlockLength:
Enabled: false

Style/PercentLiteralDelimiters:
PreferredDelimiters:
"%w": "[]"
82 changes: 82 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2025-02-15 17:10:47 UTC using RuboCop version 1.72.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Lint/AmbiguousOperatorPrecedence:
Exclude:
- 'spec/jwe/alg_spec.rb'

# Offense count: 6
Lint/DuplicateMethods:
Exclude:
- 'lib/jwe/enc/aes_cbc_hs.rb'
- 'lib/jwe/enc/aes_gcm.rb'

# Offense count: 15
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
Naming/MethodParameterName:
Exclude:
- 'lib/jwe/alg/aes_kw.rb'
- 'lib/jwe/enc.rb'
- 'lib/jwe/enc/aes_cbc_hs.rb'
- 'lib/jwe/enc/aes_gcm.rb'
- 'lib/jwe/serialization/compact.rb'

# Offense count: 8
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: separated, grouped
Style/AccessorGrouping:
Exclude:
- 'lib/jwe/alg/aes_kw.rb'
- 'lib/jwe/enc/aes_cbc_hs.rb'
- 'lib/jwe/enc/aes_gcm.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/ExpandPathArguments:
Exclude:
- 'jwe.gemspec'

# Offense count: 34
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, always_true, never
Style/FrozenStringLiteralComment:
Enabled: false

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Style/IfUnlessModifier:
Exclude:
- 'lib/jwe/alg/aes_kw.rb'
- 'lib/jwe/enc/aes_cbc_hs.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/PerlBackrefs:
Exclude:
- 'lib/jwe.rb'

# Offense count: 8
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Mode.
Style/StringConcatenation:
Exclude:
- 'spec/jwe/alg_spec.rb'
- 'spec/jwe_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: WordRegex.
# SupportedStyles: percent, brackets
Style/WordArray:
EnforcedStyle: percent
MinSize: 7
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
source 'https://rubygems.org'

gemspec

gem 'rake'
gem 'rspec'
gem 'rubocop'
gem 'simplecov'
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# JWE

[![Build Status](https://travis-ci.org/jwt/ruby-jwe.svg)](https://travis-ci.org/jwt/ruby-jwe)
[![Code Climate](https://codeclimate.com/github/jwt/ruby-jwe/badges/gpa.svg)](https://codeclimate.com/github/jwt/ruby-jwe)
[![Test Coverage](https://codeclimate.com/github/jwt/ruby-jwe/badges/coverage.svg)](https://codeclimate.com/github/aomega08/jwe/coverage)

[![Build Status](https://github.com/jwt/ruby-jwe/workflows/test/badge.svg?branch=master)](https://github.com/jwt/ruby-jwe/actions)
A ruby implementation of the [RFC 7516 JSON Web Encryption (JWE)](https://tools.ietf.org/html/rfc7516) standard.

## Installing
Expand Down
8 changes: 2 additions & 6 deletions jwe.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ Gem::Specification.new do |s|
s.files = `git ls-files`.split("\n")
s.require_paths = %w[lib]

s.required_ruby_version = '>= 2.0.0'

s.add_development_dependency 'rspec'
s.add_development_dependency 'rake'
s.add_development_dependency 'simplecov'
s.add_development_dependency 'codeclimate-test-reporter'
s.required_ruby_version = '>= 2.5.0'
s.metadata['rubygems_mfa_required'] = 'true'
end
2 changes: 1 addition & 1 deletion lib/jwe/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module JWE
VERSION = '0.4.0'.freeze
VERSION = '1.0.0'.freeze
end