1
0
mirror of https://github.com/cmur2/openvpn-status-web.git synced 2025-09-28 21:52:05 +02:00

22 Commits

Author SHA1 Message Date
cn
e4034073a6 release: 3.1.0
- Ruby 3.0
- move from Travis CI to Github Actions
- dependency updates
2021-01-18 20:56:53 +01:00
depfu[bot]
f4d17809a2 gems: update rubocop to version 1.8.1 2021-01-18 20:51:39 +01:00
cn
08b50d5974 docs: update Dockerfile to Alpine 3.13 2021-01-18 15:00:41 +01:00
depfu[bot]
f287906240 gems: update rubocop to version 1.7.0 2020-12-28 21:42:19 +01:00
cn
27306b831f ci: use bundler cache to save resources
- see https://github.com/ruby/setup-ruby#caching-bundle-install-automatically
2020-12-26 15:17:06 +01:00
cn
1e12701fc3 gems: include rubocop-rspec and fix linting 2020-12-25 18:17:01 +01:00
cn
597b619b0b gems: include rubocop-rake and fix linting 2020-12-25 18:16:27 +01:00
cn
61f7cbd76c gem: add Ruby 3.0 support 2020-12-25 17:52:10 +01:00
cn
2628c08975 gems: revert back to upstream solargraph now with rubocop 1.0 compat
See https://github.com/castwide/solargraph/issues/380 and previous commit 0ffe369ef1
2020-12-25 17:51:25 +01:00
depfu[bot]
7343081406 gems: update rubocop to version 1.6.1 2020-12-11 12:15:59 +01:00
cn
ec4d028c03 ci: drop Travis CI
- end of an era
2020-12-10 11:03:44 +01:00
cn
12b5153604 gem: refactor Rakefile solargraph tasks, include in default task 2020-12-04 09:17:11 +01:00
cn
7c0722e875 ci: use Github Actions in parallel to Travis CI
- this adds a new workflow for Github Actions that mirrors what the existing Travis CI workflow tests
- Travis CI might become unfriendly to opensource soonish so migration might be necessary
2020-12-04 09:14:32 +01:00
depfu[bot]
afd7f4fa98 gems: update rubocop to version 1.5.1 2020-12-03 21:23:22 +01:00
depfu[bot]
63272da3e3 gems: update rubocop to version 1.4.1 2020-11-24 20:56:04 +01:00
depfu[bot]
ae7fc1137b gems: update rubocop to version 1.3.0 2020-11-13 13:09:57 +01:00
depfu[bot]
1f69dabf5f gems: update rubocop to version 1.2.0 2020-11-06 12:28:33 +01:00
cn
0e9c9fea68 docs: use travis-ci.com links 2020-10-31 00:05:28 +01:00
cn
0ffe369ef1 gems: use solargraph fork until gem metadata allows rubocop 1.0 compat
See https://github.com/castwide/solargraph/issues/380
2020-10-30 23:59:05 +01:00
depfu[bot]
c2cac319ae gems: update rubocop to version 1.1.0 2020-10-30 22:56:37 +01:00
depfu[bot]
5f343d7873 gems: update rubocop to version 1.0.0 2020-10-22 15:56:12 +02:00
depfu[bot]
0a45726857 gems: update rubocop to version 0.93.0 2020-10-10 16:46:18 +02:00
10 changed files with 71 additions and 30 deletions

32
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
---
name: ci
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
schedule:
- cron: '35 4 * * 4' # weekly on thursday morning
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version:
- '2.5'
- '2.6'
- '2.7'
- '3.0'
steps:
- uses: actions/checkout@v2
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Lint and Test
run: |
bundle exec rake ci

View File

@@ -1,3 +1,7 @@
require:
- rubocop-rake
- rubocop-rspec
AllCops:
TargetRubyVersion: '2.5'
NewCops: enable
@@ -86,3 +90,13 @@ Style/Semicolon:
Style/SymbolArray:
Enabled: false
RSpec/ExampleLength:
Max: 10
RSpec/FilePath:
CustomTransform:
OpenVPNStatusWeb: openvpn-status-web
RSpec/MultipleExpectations:
Max: 5

View File

@@ -1,10 +0,0 @@
---
os: linux
language: ruby
rvm:
- 2.7
- 2.6
- 2.5
script:
- bundle exec rake travis

View File

@@ -1,6 +1,6 @@
# openvpn-status-web
[![Build Status](https://travis-ci.org/cmur2/openvpn-status-web.svg?branch=master)](https://travis-ci.org/cmur2/openvpn-status-web) [![Depfu](https://badges.depfu.com/badges/c264e2f70f2a19c43f880ddcb4a12ba8/overview.svg)](https://depfu.com/github/cmur2/openvpn-status-web?project_id=6194)
![ci](https://github.com/cmur2/openvpn-status-web/workflows/ci/badge.svg) [![Depfu](https://badges.depfu.com/badges/c264e2f70f2a19c43f880ddcb4a12ba8/overview.svg)](https://depfu.com/github/cmur2/openvpn-status-web?project_id=6194)
## Description

View File

@@ -9,16 +9,19 @@ RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new
Bundler::Audit::Task.new
desc 'Should be run by developer once to prepare initial solargraph usage (fill caches etc.)'
task :'solargraph:init' do
sh 'solargraph download-core'
end
desc 'Run experimental solargraph type checker'
task :'solargraph:tc' do
task :solargraph do
sh 'solargraph typecheck'
end
task default: [:rubocop, :spec, 'bundle:audit']
namespace :solargraph do
desc 'Should be run by developer once to prepare initial solargraph usage (fill caches etc.)'
task :init do
sh 'solargraph download-core'
end
end
task travis: [:default, :'solargraph:init', :'solargraph:tc']
task default: [:rubocop, :spec, 'bundle:audit', :solargraph]
desc 'Run all tasks desired for CI'
task ci: ['solargraph:init', :default]

View File

@@ -1,8 +1,8 @@
FROM alpine:3.12
FROM alpine:3.13
EXPOSE 8080
ENV VERSION=3.0.1
ENV VERSION=3.1.0
RUN apk --no-cache add openssl ca-certificates && \
apk --no-cache add ruby ruby-etc ruby-webrick && \

View File

@@ -1,5 +1,5 @@
# frozen_string_literal: true
module OpenVPNStatusWeb
VERSION = '3.0.1'
VERSION = '3.1.0'
end

View File

@@ -37,6 +37,8 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rack-test'
s.add_development_dependency 'rake'
s.add_development_dependency 'rspec'
s.add_development_dependency 'rubocop', '~> 0.92.0'
s.add_development_dependency 'solargraph'
s.add_development_dependency 'rubocop', '~> 1.8.1'
s.add_development_dependency 'rubocop-rake', '~> 0.5.1'
s.add_development_dependency 'rubocop-rspec', '~> 2.1.0'
s.add_development_dependency 'solargraph', ' ~> 0.40.0'
end

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
require_relative '../spec_helper'
require_relative '../../spec_helper'
describe OpenVPNStatusWeb::Parser::ModernStateless do
{
@@ -8,7 +8,7 @@ describe OpenVPNStatusWeb::Parser::ModernStateless do
3 => status_v3
}.each do |version, status|
context "for status-version #{version}" do
context 'for client list' do
context 'with client list' do
it 'parses common names' do
expect(status.client_list.map { |client| client[0] }).to eq(%w[foo bar])
end
@@ -34,7 +34,7 @@ describe OpenVPNStatusWeb::Parser::ModernStateless do
end
end
context 'for routing table' do
context 'with routing table' do
it 'parses virtual addresses' do
expect(status.routing_table.map { |route| route[0] }).to eq(['192.168.0.0/24', '192.168.66.2', '192.168.66.3', '2001:db8:0:0::1000'])
end

View File

@@ -1,13 +1,13 @@
# frozen_string_literal: true
require_relative '../spec_helper'
require_relative '../../spec_helper'
describe OpenVPNStatusWeb::Parser::V1 do
def status
status_v1
end
context 'for client list' do
context 'with client list' do
it 'parses common names' do
expect(status.client_list.map { |client| client[0] }).to eq(%w[foo bar])
end
@@ -33,7 +33,7 @@ describe OpenVPNStatusWeb::Parser::V1 do
end
end
context 'for routing table' do
context 'with routing table' do
it 'parses virtual addresses' do
expect(status.routing_table.map { |route| route[0] }).to eq(['192.168.0.0/24', '192.168.66.2', '192.168.66.3', '2001:db8:0:0::1000'])
end