acme-client 2.0.8 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rubocop.yml +23 -0
- data/.github/workflows/test.yml +26 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +4 -0
- data/acme-client.gemspec +1 -0
- data/lib/acme/client/faraday_middleware.rb +3 -3
- data/lib/acme/client/resources/directory.rb +6 -2
- data/lib/acme/client/version.rb +1 -1
- metadata +18 -3
- data/.travis.yml +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1fcaf1206f38a9ded860ad3685de94d3c2743a04222d63a6d5a14ca35146daa
|
4
|
+
data.tar.gz: 766a3bf59e3877a3a4ab457e369f9d09626204afacc8e1b8cb23015cde9ccf12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 814205156a08f49d3481545f35306f63e1f342267f126edc528b22c78ce477b4696fd4a9f401a501bb8ffe33c57f42e8e6826de830e5321289555972d841bcb3
|
7
|
+
data.tar.gz: 493a4a2ebe8803b3949797bd74061d500bb66e7a79c5d62e9dfb98af7b995a46d3a2847c88d14ad7585f8b25567ccdabdf5bdaa25eafdb045a1f3aaed7b05f13
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Lint
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
rubocop:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version: ['3.0']
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby-version }}
|
21
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
22
|
+
- name: Run tests
|
23
|
+
run: bundle exec rake rubocop
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version: ['2.6', '2.7', '3.0']
|
15
|
+
faraday-version: ['~> 0.17.3', '~> 1.7']
|
16
|
+
env:
|
17
|
+
FARADAY_VERSION: ${{ matrix.faraday-version }}
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- name: Set up Ruby
|
21
|
+
uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: ${{ matrix.ruby-version }}
|
24
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
25
|
+
- name: Run tests
|
26
|
+
run: bundle exec rake spec
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/acme-client.gemspec
CHANGED
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency 'rspec', '~> 3.9'
|
26
26
|
spec.add_development_dependency 'vcr', '~> 2.9'
|
27
27
|
spec.add_development_dependency 'webmock', '~> 3.8'
|
28
|
+
spec.add_development_dependency 'webrick'
|
28
29
|
|
29
30
|
spec.add_runtime_dependency 'faraday', '>= 0.17', '< 2.0.0'
|
30
31
|
end
|
@@ -5,10 +5,10 @@ class Acme::Client::FaradayMiddleware < Faraday::Middleware
|
|
5
5
|
|
6
6
|
CONTENT_TYPE = 'application/jose+json'
|
7
7
|
|
8
|
-
def initialize(app,
|
8
|
+
def initialize(app, options)
|
9
9
|
super(app)
|
10
|
-
@client = client
|
11
|
-
@mode = mode
|
10
|
+
@client = options.fetch(:client)
|
11
|
+
@mode = options.fetch(:mode)
|
12
12
|
end
|
13
13
|
|
14
14
|
def call(env)
|
@@ -68,9 +68,13 @@ class Acme::Client::Resources::Directory
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def fetch_directory
|
71
|
-
connection = Faraday.new(url: @directory, **@connection_options)
|
71
|
+
connection = Faraday.new(url: @directory, **@connection_options) do |configuration|
|
72
|
+
configuration.use Acme::Client::FaradayMiddleware, client: nil, mode: nil
|
73
|
+
|
74
|
+
configuration.adapter Faraday.default_adapter
|
75
|
+
end
|
72
76
|
connection.headers[:user_agent] = Acme::Client::USER_AGENT
|
73
77
|
response = connection.get(@url)
|
74
|
-
|
78
|
+
response.body
|
75
79
|
end
|
76
80
|
end
|
data/lib/acme/client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acme-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Barbier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.8'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: webrick
|
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'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: faraday
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,10 +121,11 @@ executables: []
|
|
107
121
|
extensions: []
|
108
122
|
extra_rdoc_files: []
|
109
123
|
files:
|
124
|
+
- ".github/workflows/rubocop.yml"
|
125
|
+
- ".github/workflows/test.yml"
|
110
126
|
- ".gitignore"
|
111
127
|
- ".rspec"
|
112
128
|
- ".rubocop.yml"
|
113
|
-
- ".travis.yml"
|
114
129
|
- CHANGELOG.md
|
115
130
|
- Gemfile
|
116
131
|
- LICENSE.txt
|