Skip to content

Commit

Permalink
Merge pull request #2325 from dblock/remove-edge
Browse files Browse the repository at this point in the history
Make edge workflows only run on demand.
  • Loading branch information
ericproulx committed May 9, 2023
2 parents 1f876b2 + 0e5c824 commit 6145cd4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/edge.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: edge
on: pull_request
on: workflow_dispatch
jobs:
test:
strategy:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* [#2310](https://github.com/ruby-grape/grape/pull/2310): Fix YARD docs markdown rendering - [@duffn](https://github.com/duffn).
* [#2317](https://github.com/ruby-grape/grape/pull/2317): Remove maruku and rubocop-ast as direct development/testing dependencies - [@ericproulx](https://github.com/ericproulx).
* [#2292](https://github.com/ruby-grape/grape/pull/2292): Introduce Docker to local development - [@ericproulx](https://github.com/ericproulx).
* [#2325](https://github.com/ruby-grape/grape/pull/2325): Change edge test workflows only run on demand - [@dblock](https://github.com/dblock).
* Your contribution here.

#### Fixes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ params do
end
```

Note endless ranges are also supported but they require that the type be provided.
Note endless ranges are also supported with ActiveSupport >= 6.0, but they require that the type be provided.

```ruby
params do
Expand Down
4 changes: 2 additions & 2 deletions spec/grape/validations/validators/values_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,13 @@ def include?(value)
expect(last_response.body).to eq({ error: 'type does not have a valid value' }.to_json)
end

it 'validates against values in an endless range' do
it 'validates against values in an endless range', if: ActiveSupport::VERSION::MAJOR >= 6 do
get('/endless', type: 10)
expect(last_response.status).to eq 200
expect(last_response.body).to eq({ type: 10 }.to_json)
end

it 'does not allow an invalid value for a parameter using an endless range' do
it 'does not allow an invalid value for a parameter using an endless range', if: ActiveSupport::VERSION::MAJOR >= 6 do
get('/endless', type: 0)
expect(last_response.status).to eq 400
expect(last_response.body).to eq({ error: 'type does not have a valid value' }.to_json)
Expand Down

0 comments on commit 6145cd4

Please sign in to comment.