Skip to content

Commit cb9b511

Browse files
authored
Run CI on GitHub Actions (#27)
* Github actions * Add missing files * Don't fail fast to allow different version to complete * Drop code climate (at least temporarily) * Development dependencies to gemfile * Correct default branch
1 parent 03afe33 commit cb9b511

File tree

9 files changed

+153
-41
lines changed

9 files changed

+153
-41
lines changed

.codeclimate.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: test
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
jobs:
12+
lint:
13+
name: RuboCop
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Ruby
18+
uses: ruby/setup-ruby@v1
19+
with:
20+
ruby-version: "ruby"
21+
bundler-cache: true
22+
- name: Run RuboCop
23+
run: bundle exec rubocop
24+
25+
test:
26+
name: Ruby ${{ matrix.ruby }}
27+
runs-on: ubuntu-latest
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
ruby:
32+
- "2.5"
33+
- "2.6"
34+
- "2.7"
35+
- "3.0"
36+
- "3.1"
37+
- "3.2"
38+
- "3.3"
39+
- "3.4"
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- name: Set up Ruby
45+
uses: ruby/setup-ruby@v1
46+
with:
47+
ruby-version: ${{ matrix.ruby }}
48+
bundler-cache: true
49+
50+
- name: Run tests
51+
run: bundle exec rspec

.rubocop.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
Metrics/LineLength:
1+
inherit_from: .rubocop_todo.yml
2+
3+
AllCops:
4+
TargetRubyVersion: 2.5
5+
NewCops: enable
6+
SuggestExtensions: false
7+
8+
Layout/LineLength:
29
Enabled: false
10+
311
Style/RaiseArgs:
412
Enabled: false
13+
514
Metrics/BlockLength:
615
Enabled: false
16+
717
Style/PercentLiteralDelimiters:
818
PreferredDelimiters:
919
"%w": "[]"

.rubocop_todo.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2025-02-15 17:10:47 UTC using RuboCop version 1.72.1.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 1
10+
# This cop supports safe autocorrection (--autocorrect).
11+
Lint/AmbiguousOperatorPrecedence:
12+
Exclude:
13+
- 'spec/jwe/alg_spec.rb'
14+
15+
# Offense count: 6
16+
Lint/DuplicateMethods:
17+
Exclude:
18+
- 'lib/jwe/enc/aes_cbc_hs.rb'
19+
- 'lib/jwe/enc/aes_gcm.rb'
20+
21+
# Offense count: 15
22+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
23+
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
24+
Naming/MethodParameterName:
25+
Exclude:
26+
- 'lib/jwe/alg/aes_kw.rb'
27+
- 'lib/jwe/enc.rb'
28+
- 'lib/jwe/enc/aes_cbc_hs.rb'
29+
- 'lib/jwe/enc/aes_gcm.rb'
30+
- 'lib/jwe/serialization/compact.rb'
31+
32+
# Offense count: 8
33+
# This cop supports safe autocorrection (--autocorrect).
34+
# Configuration parameters: EnforcedStyle.
35+
# SupportedStyles: separated, grouped
36+
Style/AccessorGrouping:
37+
Exclude:
38+
- 'lib/jwe/alg/aes_kw.rb'
39+
- 'lib/jwe/enc/aes_cbc_hs.rb'
40+
- 'lib/jwe/enc/aes_gcm.rb'
41+
42+
# Offense count: 1
43+
# This cop supports safe autocorrection (--autocorrect).
44+
Style/ExpandPathArguments:
45+
Exclude:
46+
- 'jwe.gemspec'
47+
48+
# Offense count: 34
49+
# This cop supports unsafe autocorrection (--autocorrect-all).
50+
# Configuration parameters: EnforcedStyle.
51+
# SupportedStyles: always, always_true, never
52+
Style/FrozenStringLiteralComment:
53+
Enabled: false
54+
55+
# Offense count: 2
56+
# This cop supports safe autocorrection (--autocorrect).
57+
Style/IfUnlessModifier:
58+
Exclude:
59+
- 'lib/jwe/alg/aes_kw.rb'
60+
- 'lib/jwe/enc/aes_cbc_hs.rb'
61+
62+
# Offense count: 1
63+
# This cop supports safe autocorrection (--autocorrect).
64+
Style/PerlBackrefs:
65+
Exclude:
66+
- 'lib/jwe.rb'
67+
68+
# Offense count: 8
69+
# This cop supports unsafe autocorrection (--autocorrect-all).
70+
# Configuration parameters: Mode.
71+
Style/StringConcatenation:
72+
Exclude:
73+
- 'spec/jwe/alg_spec.rb'
74+
- 'spec/jwe_spec.rb'
75+
76+
# Offense count: 1
77+
# This cop supports safe autocorrection (--autocorrect).
78+
# Configuration parameters: WordRegex.
79+
# SupportedStyles: percent, brackets
80+
Style/WordArray:
81+
EnforcedStyle: percent
82+
MinSize: 7

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
source 'https://rubygems.org'
22

33
gemspec
4+
5+
gem 'rake'
6+
gem 'rspec'
7+
gem 'rubocop'
8+
gem 'simplecov'

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# JWE
22

3-
[![Build Status](https://travis-ci.org/jwt/ruby-jwe.svg)](https://travis-ci.org/jwt/ruby-jwe)
4-
[![Code Climate](https://codeclimate.com/github/jwt/ruby-jwe/badges/gpa.svg)](https://codeclimate.com/github/jwt/ruby-jwe)
5-
[![Test Coverage](https://codeclimate.com/github/jwt/ruby-jwe/badges/coverage.svg)](https://codeclimate.com/github/aomega08/jwe/coverage)
6-
3+
[![Build Status](https://github.com/jwt/ruby-jwe/workflows/test/badge.svg?branch=master)](https://github.com/jwt/ruby-jwe/actions)
74
A ruby implementation of the [RFC 7516 JSON Web Encryption (JWE)](https://tools.ietf.org/html/rfc7516) standard.
85

96
## Installing

jwe.gemspec

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ Gem::Specification.new do |s|
1515
s.files = `git ls-files`.split("\n")
1616
s.require_paths = %w[lib]
1717

18-
s.required_ruby_version = '>= 2.0.0'
19-
20-
s.add_development_dependency 'rspec'
21-
s.add_development_dependency 'rake'
22-
s.add_development_dependency 'simplecov'
23-
s.add_development_dependency 'codeclimate-test-reporter'
18+
s.required_ruby_version = '>= 2.5.0'
19+
s.metadata['rubygems_mfa_required'] = 'true'
2420
end

lib/jwe/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module JWE
2-
VERSION = '0.4.0'.freeze
2+
VERSION = '1.0.0'.freeze
33
end

0 commit comments

Comments
 (0)