-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ platforms :rbx do | |
gem 'rubinius-developer_tools' | ||
gem 'racc' | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
require 'hashie' | ||
require 'set' | ||
require 'active_support/core_ext/hash/indifferent_access' | ||
require 'active_support/core_ext/object/deep_dup' | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dspaeth-faber
Contributor
|
||
require 'active_support/ordered_hash' | ||
require 'active_support/core_ext/object/conversions' | ||
require 'active_support/core_ext/array/extract_options' | ||
|
@@ -92,11 +93,16 @@ module Versioner | |
end | ||
|
||
module Util | ||
autoload :HashStack, 'grape/util/hash_stack' | ||
autoload :LoggingValue, 'grape/util/logging_value' | ||
autoload :InheritableValues, 'grape/util/inheritable_values' | ||
autoload :StackableValues, 'grape/util/stackable_values' | ||
autoload :InheritableSetting, 'grape/util/inheritable_setting' | ||
end | ||
|
||
module DSL | ||
autoload :API, 'grape/dsl/api' | ||
autoload :Callbacks, 'grape/dsl/callbacks' | ||
autoload :Settings, 'grape/dsl/settings' | ||
autoload :Configuration, 'grape/dsl/configuration' | ||
autoload :InsideRoute, 'grape/dsl/inside_route' | ||
autoload :Helpers, 'grape/dsl/helpers' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'active_support/concern' | ||
|
||
module Grape | ||
module DSL | ||
module API | ||
extend ActiveSupport::Concern | ||
|
||
include Grape::Middleware::Auth::DSL | ||
|
||
include Grape::DSL::Validations | ||
include Grape::DSL::Callbacks | ||
include Grape::DSL::Configuration | ||
include Grape::DSL::Helpers | ||
include Grape::DSL::Middleware | ||
include Grape::DSL::RequestResponse | ||
include Grape::DSL::Routing | ||
end | ||
end | ||
end |
3 comments
on commit f859682
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't want to be grumpy, but this is hard to upgrade to new version without any migration guide or documentation.
There is no more settings/set
methods, but route_setting
(is it right method?) has different behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's actually quite a bit of documentation in https://github.com/intridea/grape/blob/master/UPGRADING.md, but generally none of this stuff was an API, it was really Grape's internals that people started hacking on. I'd like to turn that into a documented API, and this refactoring was definitely a step towards that. A good example was getting rid of @last_description
, hardly an API ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed it, sorry.
Got excited by the refactoring so I checked out the 'master' branch but unfortunately this require breaks compatibility with pre-Rails 4.0 apps as ActiveSupport had deep_dup in the hash namespace...