Skip to content

Commit

Permalink
Merge 4f7c114 into f4c9525
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhacaz committed Aug 2, 2019
2 parents f4c9525 + 4f7c114 commit df8c4ab
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

* Your contribution here.
* [#1893](https://github.com/ruby-grape/grape/pull/1893): Allows `Grape::API` to behave like a Rack::app in some instances where it was misbehaving - [@myxoh](https://github.com/myxoh).
* [#1898](https://github.com/ruby-grape/grape/pull/1898): Refactor ValidatorFactory to improve memory allocation - [@Bhacaz](https://github.com/Bhacaz).
* [#1898](https://github.com/ruby-grape/grape/pull/1898): Refactor `ValidatorFactory` to improve memory allocation - [@Bhacaz](https://github.com/Bhacaz).
* [#1900](https://github.com/ruby-grape/grape/pull/1900): Define boolean for `Grape::Api::Instance` - [@Bhacaz](https://github.com/Bhacaz).

### 1.2.4 (2019/06/13)

Expand Down
1 change: 1 addition & 0 deletions lib/grape/api/instance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class API
# The API Instance class, is the engine behind Grape::API. Each class that inherits
# from this will represent a different API instance
class Instance
Boolean = Virtus::Attribute::Boolean
include Grape::DSL::API

class << self
Expand Down
10 changes: 10 additions & 0 deletions spec/grape/api/instance_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require 'spec_helper'

describe Grape::API::Instance do
describe 'Boolean constant' do
subject { Class.new(described_class)::Boolean }
it 'sets Boolean as a Virtus::Attribute::Boolean' do
is_expected.to eq Virtus::Attribute::Boolean
end
end
end

0 comments on commit df8c4ab

Please sign in to comment.