Skip to content

Commit

Permalink
Introduce issue templates (#22)
Browse files Browse the repository at this point in the history
Based on #21 from @choosen
  • Loading branch information
iMacTia authored Jan 30, 2023
1 parent e475fb3 commit 8d9b692
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

### Basic Version Info
Faraday Version: X.Y.Z
Ruby Version: X.Y.Z

### Issue description
<!-- Tell us what's wrong -->

### Actual behavior
<!-- Tell us what should happen -->

### Expected behavior
<!-- Tell us what should happen -->

### Steps to reproduce

```ruby
#!/usr/bin/env ruby
# frozen_string_literal: true

require "bundler/inline"

gemfile do
source "https://rubygems.org"

gem "faraday"
gem "faraday-retry"
end

count = 0
expected = 5
retry_options = {
max: expected,
interval: 0.1,
retry_statuses: [503],
retry_block: proc { count += 1 }
}

faraday = Faraday.new do |conn|
conn.request :retry, **retry_options
end

faraday.get("https://httpbin.org/status/503")

exit 0 if count == expected

warn "Retried #{count} times, expected #{expected}"
exit 1
```

0 comments on commit 8d9b692

Please sign in to comment.