Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,16 +445,8 @@ just lint
# or: bundle exec rubocop
```

Update bundled CA certificates from the [Mozilla cURL release][curl]:

```sh
just update-certs
# or: bundle exec rake update_certs
```

[api-keys]: https://dashboard.stripe.com/account/apikeys
[connect]: https://stripe.com/connect
[curl]: http://curl.haxx.se/docs/caextract.html
[workload-identity]: https://stripe.com/docs/api?lang=ruby
[idempotency-keys]: https://stripe.com/docs/api/idempotent_requests?lang=ruby
[stripe-mock]: https://github.com/stripe/stripe-mock
Expand Down
25 changes: 0 additions & 25 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,3 @@ task default: %i[test rubocop]
Rake::TestTask.new do |t|
t.pattern = "./test/**/*_test.rb"
end

desc "Update bundled certs"
task :update_certs do
require "net/http"
require "uri"

fetch_file "https://curl.se/ca/cacert.pem",
File.expand_path("lib/data/ca-certificates.crt", __dir__)
end

#
# helpers
#

def fetch_file(uri, dest)
File.open(dest, "w") do |file|
resp = Net::HTTP.get_response(URI.parse(uri))
unless resp.code.to_i == 200
abort("bad response when fetching: #{uri}\n" \
"Status #{resp.code}: #{resp.body}")
end
file.write(resp.body)
puts "Successfully fetched: #{uri}"
end
end
3 changes: 0 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ lint: (format-check "--autocorrect")
# offenses and only shows uncorrectable ones.
format: (format-check "--autocorrect --display-only-fail-level-offenses")

update-certs: install
bundle exec rake update_certs

# run the workload identity adapter gem's own, isolated test suite
test-adapter:
cd workload-identity && bundle install --quiet && bundle exec rake test
Expand Down
Loading