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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9cb714bd4f0321181c50087f976122251233340d09f4ed612cf91070e0986d70
4
- data.tar.gz: db7df58ad9a1e4794bef25dfbc309efad73b9b1cbb6100f77d9552cbb734fb5d
3
+ metadata.gz: d1fcaf1206f38a9ded860ad3685de94d3c2743a04222d63a6d5a14ca35146daa
4
+ data.tar.gz: 766a3bf59e3877a3a4ab457e369f9d09626204afacc8e1b8cb23015cde9ccf12
5
5
  SHA512:
6
- metadata.gz: 8d7eb7d76ea95ab724810af93ad4e79af03fe62752509a793b5310b01b670b7c57f737bbb3a68de72ab4e84f01f9d613e45937a50119ddfe3b0f5d0aa628f45e
7
- data.tar.gz: 38b349fdcdb68f5ec493951ec4a480966256e591f6d9cffc4266116bff6d2aed6e8f0e5493acf985f6a81c0cad7c20a69e4d7bd1cedb95357b297cdcfb1b494c
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
@@ -1,3 +1,8 @@
1
+ ## `2.0.9`
2
+
3
+ * Support for Ruby 3.0 and Faraday 0.17.x
4
+ * Raise when directory is rate limited
5
+
1
6
  ## `2.0.8`
2
7
 
3
8
  * Add support for the keyChange endpoint
data/Gemfile CHANGED
@@ -2,6 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
+ if faraday_version = ENV['FARADAY_VERSION']
6
+ gem 'faraday', faraday_version
7
+ end
8
+
5
9
  group :development, :test do
6
10
  gem 'pry'
7
11
  gem 'rubocop', '~> 0.49.0'
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, client:, mode:)
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
- JSON.parse(response.body)
78
+ response.body
75
79
  end
76
80
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Acme
4
4
  class Client
5
- VERSION = '2.0.8'.freeze
5
+ VERSION = '2.0.9'.freeze
6
6
  end
7
7
  end
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.8
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-04-27 00:00:00.000000000 Z
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
data/.travis.yml DELETED
@@ -1,10 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- rvm:
4
- - 2.5
5
- - 2.6
6
- - 2.7
7
-
8
- before_install:
9
- - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
10
- - gem install bundler -v '< 2'