certificate-checker 1.2.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +52 -0
- data/.rubocop.yml +25 -0
- data/CHANGELOG.md +22 -8
- data/Gemfile +0 -14
- data/HISTORY.md +20 -0
- data/README.md +2 -2
- data/Rakefile +19 -0
- data/certificate-checker.gemspec +9 -4
- data/exe/certificate-checker +2 -1
- data/lib/{certificate-checker → certificate_checker}/certificate_checker.rb +0 -0
- data/lib/{certificate-checker → certificate_checker}/certificate_checker_factory.rb +0 -0
- data/lib/{certificate-checker → certificate_checker}/certificate_finder.rb +0 -0
- data/lib/{certificate-checker → certificate_checker}/certificate_parser.rb +0 -0
- data/lib/{certificate-checker → certificate_checker}/version.rb +1 -1
- data/lib/certificate_checker.rb +6 -0
- metadata +79 -21
- data/lib/certificate-checker.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d88533ad907bc4370a046a6710b539a4a0cee0552cc3cef962255928a96f54f1
|
4
|
+
data.tar.gz: 60c96de0b94a03ba2e602add4eeba9b1aa7bcbf09ca8da4c1654f11fb359a200
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a051d1f9f6a7bf99d87c51279d97155661b1e779f08a40bc2bbfeea5ac96acf17d5cff8f01591e026aa65031e489fc57bad5ff3eb6183e0aa88e618a60901be
|
7
|
+
data.tar.gz: 2e5c56c1af4b0ccc8fd3bc52b4cfc772b2dd7d3264b2819f08f1be6f2c0ec454132d3a10549ab7a72b4cb34248dd66ce45b739a07f3e1db19a4875dbc13f6445
|
@@ -0,0 +1,52 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- main
|
10
|
+
schedule:
|
11
|
+
- cron: "0 17 * * *"
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
rubocop:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v2
|
18
|
+
- name: Setup ruby
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: 3.0
|
22
|
+
bundler-cache: true
|
23
|
+
- name: Run static code analysis
|
24
|
+
run: bundle exec rubocop
|
25
|
+
unit:
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
needs: rubocop
|
28
|
+
strategy:
|
29
|
+
matrix:
|
30
|
+
ruby:
|
31
|
+
- "2.6"
|
32
|
+
- "2.7"
|
33
|
+
- "3.0"
|
34
|
+
- "3.1"
|
35
|
+
name: Ruby ${{ matrix.ruby }}
|
36
|
+
steps:
|
37
|
+
- uses: actions/checkout@v2
|
38
|
+
- name: Setup ruby
|
39
|
+
uses: ruby/setup-ruby@v1
|
40
|
+
with:
|
41
|
+
ruby-version: ${{ matrix.ruby }}
|
42
|
+
bundler-cache: true
|
43
|
+
- name: Run tests without uploading code coverage
|
44
|
+
if: ${{ matrix.ruby != '3.0' }}
|
45
|
+
run: bundle exec rake
|
46
|
+
- name: Run tests and upload coverage to Code Climate
|
47
|
+
if: ${{ matrix.ruby == '3.0' }}
|
48
|
+
uses: paambaati/codeclimate-action@v3.0.0
|
49
|
+
env:
|
50
|
+
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }}
|
51
|
+
with:
|
52
|
+
coverageCommand: bundle exec rake
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
AllCops:
|
2
|
+
AllowSymlinksInCacheRootDirectory: true
|
3
|
+
|
4
|
+
require:
|
5
|
+
- rubocop-rake
|
6
|
+
- rubocop-rspec
|
7
|
+
|
8
|
+
Layout/HashAlignment:
|
9
|
+
EnforcedColonStyle: table
|
10
|
+
EnforcedHashRocketStyle: table
|
11
|
+
|
12
|
+
Metrics/LineLength:
|
13
|
+
Max: 160
|
14
|
+
|
15
|
+
Style/Documentation:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Style/TrailingCommaInArrayLiteral:
|
19
|
+
EnforcedStyleForMultiline: comma
|
20
|
+
|
21
|
+
Style/TrailingCommaInHashLiteral:
|
22
|
+
EnforcedStyleForMultiline: comma
|
23
|
+
|
24
|
+
Style/TrailingCommaInArguments:
|
25
|
+
EnforcedStyleForMultiline: comma
|
data/CHANGELOG.md
CHANGED
@@ -2,27 +2,41 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
-
## [
|
8
|
+
## [v2.0.0](https://github.com/smortex/certificate-checker/tree/v2.0.0) (2022-07-16)
|
9
|
+
|
10
|
+
[Full Changelog](https://github.com/smortex/certificate-checker/compare/v1.2.0...v2.0.0)
|
11
|
+
|
12
|
+
**Breaking changes:**
|
13
|
+
|
14
|
+
- Bump internet\_security\_event dependency [\#1](https://github.com/smortex/certificate-checker/pull/1) ([smortex](https://github.com/smortex))
|
15
|
+
|
16
|
+
**Merged pull requests:**
|
17
|
+
|
18
|
+
- Integrate github\_changelog\_generator [\#2](https://github.com/smortex/certificate-checker/pull/2) ([smortex](https://github.com/smortex))
|
19
|
+
|
20
|
+
## [v1.2.0]
|
9
21
|
### Added
|
10
22
|
|
11
23
|
- Add `--ignore-nonexistent` argument to not emit diagnostic message when the
|
12
24
|
passed filename does not exist.
|
13
25
|
|
14
|
-
## [
|
26
|
+
## [v1.1.0]
|
15
27
|
### Changed
|
16
28
|
|
17
29
|
- Use certificate issuer and subject rather than file line to identify a
|
18
30
|
certificate in a certificate file.
|
19
31
|
|
20
|
-
## [
|
32
|
+
## [v1.0.1]
|
21
33
|
### Fixed
|
22
34
|
|
23
35
|
- Fix on Debian Stretch.
|
24
36
|
|
25
|
-
[
|
26
|
-
[1.
|
27
|
-
[
|
28
|
-
|
37
|
+
[v1.2.0]: https://github.com/smortex/tls-checker/compare/v1.1.0...v1.2.0
|
38
|
+
[v1.1.0]: https://github.com/smortex/tls-checker/compare/v1.0.1...v1.1.0
|
39
|
+
[v1.0.1]: https://github.com/smortex/tls-checker/compare/v1.0.0...v1.0.1
|
40
|
+
|
41
|
+
|
42
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/Gemfile
CHANGED
@@ -2,19 +2,5 @@
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
-
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
6
|
-
|
7
5
|
# Specify your gem's dependencies in certificate-checker.gemspec
|
8
6
|
gemspec
|
9
|
-
|
10
|
-
# rubocop:disable Security/Eval
|
11
|
-
#
|
12
|
-
# Gemfile.local is ignored in .gitignore. When hacking this gem, it might be
|
13
|
-
# useful to use a pre-release version of some dependency, in this case add them
|
14
|
-
# to Gemfile.local:
|
15
|
-
#
|
16
|
-
# ------------------------------------- 8< -------------------------------------
|
17
|
-
# gem 'internet_security_event', path: '../internet_security_event'
|
18
|
-
# ------------------------------------- 8< -------------------------------------
|
19
|
-
eval(File.read('Gemfile.local'), binding) if File.exist? 'Gemfile.local'
|
20
|
-
# rubocop:enable Security/Eval
|
data/HISTORY.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
## [v1.2.0]
|
2
|
+
### Added
|
3
|
+
|
4
|
+
- Add `--ignore-nonexistent` argument to not emit diagnostic message when the
|
5
|
+
passed filename does not exist.
|
6
|
+
|
7
|
+
## [v1.1.0]
|
8
|
+
### Changed
|
9
|
+
|
10
|
+
- Use certificate issuer and subject rather than file line to identify a
|
11
|
+
certificate in a certificate file.
|
12
|
+
|
13
|
+
## [v1.0.1]
|
14
|
+
### Fixed
|
15
|
+
|
16
|
+
- Fix on Debian Stretch.
|
17
|
+
|
18
|
+
[v1.2.0]: https://github.com/smortex/tls-checker/compare/v1.1.0...v1.2.0
|
19
|
+
[v1.1.0]: https://github.com/smortex/tls-checker/compare/v1.0.1...v1.1.0
|
20
|
+
[v1.0.1]: https://github.com/smortex/tls-checker/compare/v1.0.0...v1.0.1
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# certificate-checker
|
2
2
|
|
3
|
-
[![Build Status](https://
|
3
|
+
[![Build Status](https://github.com/smortex/certificate-checker/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/smortex/certificate-checker/actions/workflows/ci.yml)
|
4
4
|
[![Maintainability](https://api.codeclimate.com/v1/badges/183f536f05771eca87f2/maintainability)](https://codeclimate.com/github/smortex/certificate-checker/maintainability)
|
5
5
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/183f536f05771eca87f2/test_coverage)](https://codeclimate.com/github/smortex/certificate-checker/test_coverage)
|
6
6
|
|
@@ -54,4 +54,4 @@ License](https://opensource.org/licenses/MIT).
|
|
54
54
|
|
55
55
|
Everyone interacting in the certificate-checker project’s codebases, issue
|
56
56
|
trackers, chat rooms and mailing lists is expected to follow the [code of
|
57
|
-
conduct](https://github.com/smortex/certificate-checker/blob/
|
57
|
+
conduct](https://github.com/smortex/certificate-checker/blob/main/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
@@ -1,8 +1,27 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'bundler/gem_tasks'
|
4
|
+
require 'github_changelog_generator/task'
|
4
5
|
require 'rspec/core/rake_task'
|
5
6
|
|
6
7
|
RSpec::Core::RakeTask.new(:spec)
|
7
8
|
|
9
|
+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
10
|
+
config.header = <<~HEADER.chomp
|
11
|
+
# Changelog
|
12
|
+
|
13
|
+
All notable changes to this project will be documented in this file.
|
14
|
+
|
15
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
16
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
17
|
+
HEADER
|
18
|
+
config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog ignore]
|
19
|
+
config.user = 'smortex'
|
20
|
+
config.project = 'certificate-checker'
|
21
|
+
config.since_tag = 'v1.2.0'
|
22
|
+
config.issues = false
|
23
|
+
require 'certificate_checker/version'
|
24
|
+
config.future_release = "v#{CertificateChecker::VERSION}"
|
25
|
+
end
|
26
|
+
|
8
27
|
task default: :spec
|
data/certificate-checker.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
lib = File.expand_path('lib', __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require '
|
5
|
+
require 'certificate_checker/version'
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = 'certificate-checker'
|
@@ -13,20 +13,25 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.summary = 'Report expired/about to expires certificates in a directory tree.'
|
14
14
|
spec.homepage = 'https://github.com/smortex/certificate-checker'
|
15
15
|
spec.license = 'MIT'
|
16
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
|
16
17
|
|
17
18
|
# Specify which files should be added to the gem when it is released.
|
18
19
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
-
spec.files
|
20
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
21
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
22
|
end
|
22
23
|
spec.bindir = 'exe'
|
23
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
25
|
spec.require_paths = ['lib']
|
25
26
|
|
26
|
-
spec.add_dependency 'internet_security_event', '~>
|
27
|
+
spec.add_dependency 'internet_security_event', '~> 2.0'
|
27
28
|
|
28
|
-
spec.add_development_dependency 'bundler'
|
29
|
+
spec.add_development_dependency 'bundler'
|
30
|
+
spec.add_development_dependency 'github_changelog_generator'
|
29
31
|
spec.add_development_dependency 'rake'
|
30
32
|
spec.add_development_dependency 'rspec'
|
33
|
+
spec.add_development_dependency 'rubocop'
|
34
|
+
spec.add_development_dependency 'rubocop-rake'
|
35
|
+
spec.add_development_dependency 'rubocop-rspec'
|
31
36
|
spec.add_development_dependency 'simplecov'
|
32
37
|
end
|
data/exe/certificate-checker
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
require 'json'
|
5
5
|
require 'optparse'
|
6
|
-
require '
|
6
|
+
require 'certificate_checker'
|
7
7
|
|
8
8
|
options = {
|
9
9
|
output: $stdout,
|
@@ -11,6 +11,7 @@ options = {
|
|
11
11
|
|
12
12
|
OptionParser.new do |opts|
|
13
13
|
opts.banner = 'Usage: tls-checker [options] specification...'
|
14
|
+
opts.version = CertificateChecker::VERSION
|
14
15
|
|
15
16
|
opts.on('-o', '--output=FILE', 'Write to FILE') do |f|
|
16
17
|
options[:output] = File.open(f, File::CREAT | File::APPEND | File::LOCK_EX)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: certificate-checker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Romain Tartière
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: internet_security_event
|
@@ -16,28 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: github_changelog_generator
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +80,48 @@ dependencies:
|
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop-rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
69
125
|
- !ruby/object:Gem::Dependency
|
70
126
|
name: simplecov
|
71
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,7 +136,7 @@ dependencies:
|
|
80
136
|
- - ">="
|
81
137
|
- !ruby/object:Gem::Version
|
82
138
|
version: '0'
|
83
|
-
description:
|
139
|
+
description:
|
84
140
|
email:
|
85
141
|
- romain@blogreen.org
|
86
142
|
executables:
|
@@ -88,12 +144,15 @@ executables:
|
|
88
144
|
extensions: []
|
89
145
|
extra_rdoc_files: []
|
90
146
|
files:
|
147
|
+
- ".github/workflows/ci.yml"
|
91
148
|
- ".gitignore"
|
92
149
|
- ".rspec"
|
150
|
+
- ".rubocop.yml"
|
93
151
|
- ".travis.yml"
|
94
152
|
- CHANGELOG.md
|
95
153
|
- CODE_OF_CONDUCT.md
|
96
154
|
- Gemfile
|
155
|
+
- HISTORY.md
|
97
156
|
- LICENSE.txt
|
98
157
|
- README.md
|
99
158
|
- Rakefile
|
@@ -101,17 +160,17 @@ files:
|
|
101
160
|
- bin/setup
|
102
161
|
- certificate-checker.gemspec
|
103
162
|
- exe/certificate-checker
|
104
|
-
- lib/
|
105
|
-
- lib/
|
106
|
-
- lib/
|
107
|
-
- lib/
|
108
|
-
- lib/
|
109
|
-
- lib/
|
163
|
+
- lib/certificate_checker.rb
|
164
|
+
- lib/certificate_checker/certificate_checker.rb
|
165
|
+
- lib/certificate_checker/certificate_checker_factory.rb
|
166
|
+
- lib/certificate_checker/certificate_finder.rb
|
167
|
+
- lib/certificate_checker/certificate_parser.rb
|
168
|
+
- lib/certificate_checker/version.rb
|
110
169
|
homepage: https://github.com/smortex/certificate-checker
|
111
170
|
licenses:
|
112
171
|
- MIT
|
113
172
|
metadata: {}
|
114
|
-
post_install_message:
|
173
|
+
post_install_message:
|
115
174
|
rdoc_options: []
|
116
175
|
require_paths:
|
117
176
|
- lib
|
@@ -119,16 +178,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
178
|
requirements:
|
120
179
|
- - ">="
|
121
180
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
181
|
+
version: 2.6.0
|
123
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
183
|
requirements:
|
125
184
|
- - ">="
|
126
185
|
- !ruby/object:Gem::Version
|
127
186
|
version: '0'
|
128
187
|
requirements: []
|
129
|
-
|
130
|
-
|
131
|
-
signing_key:
|
188
|
+
rubygems_version: 3.3.17
|
189
|
+
signing_key:
|
132
190
|
specification_version: 4
|
133
191
|
summary: Report expired/about to expires certificates in a directory tree.
|
134
192
|
test_files: []
|
data/lib/certificate-checker.rb
DELETED