Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make edge workflows only run on demand. #2325

Merged
merged 2 commits into from
May 9, 2023
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
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