Skip to content

Commit b8638bb

Browse files
ericproulxCopilot
andcommitted
Update spec/grape/dsl/inside_route_spec.rb
Co-authored-by: Copilot <[email protected]>
1 parent fd16eda commit b8638bb

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#### Features
44

5+
* [#2574](https://github.com/ruby-grape/grape/pull/2574): Reduce `ActiveSupport::Concern` usage - [@ericproulx](https://github.com/ericproulx).
56
* Your contribution here.
67

78
#### Fixes

lib/grape/dsl/routing.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ def do_not_route_head!
7272
namespace_inheritable(:do_not_route_head, true)
7373
end
7474

75-
# Do not automatically route OPTIONS.
76-
def do_not_route_options!
77-
namespace_inheritable(:do_not_route_options, true)
78-
end
75+
# Do not automatically route OPTIONS.
76+
def do_not_route_options!
77+
namespace_inheritable(:do_not_route_options, true)
78+
end
7979

80-
def lint!
81-
namespace_inheritable(:lint, true)
82-
end
80+
def lint!
81+
namespace_inheritable(:lint, true)
82+
end
8383

8484
def do_not_document!
8585
namespace_inheritable(:do_not_document, true)

lib/grape/middleware/auth/dsl.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ def auth(type = nil, options = {}, &block)
1313
end
1414
end
1515

16-
# Add HTTP Basic authorization to the API.
17-
#
18-
# @param [Hash] options A hash of options.
19-
# @option options [String] :realm "API Authorization" The HTTP Basic realm.
20-
def http_basic(options = {}, &block)
21-
options[:realm] ||= 'API Authorization'
22-
auth :http_basic, options, &block
23-
end
2416
# Add HTTP Basic authorization to the API.
2517
#
2618
# @param [Hash] options A hash of options.
@@ -30,8 +22,6 @@ def http_basic(options = {}, &block)
3022
auth :http_basic, options, &block
3123
end
3224

33-
def http_digest(options = {}, &block)
34-
options[:realm] ||= 'API Authorization'
3525
def http_digest(options = {}, &block)
3626
options[:realm] ||= 'API Authorization'
3727

spec/grape/dsl/inside_route_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def namespace_inheritable_hash
5454
end
5555

5656
def namespace_stackable_hash
57-
@namespace_stackable_hash ||= Hash.new { [] }
57+
@namespace_stackable_hash ||= Hash.new { |h, k| h[k] = [] }
5858
end
5959

6060
def namespace_stackable_with_hash_hash

0 commit comments

Comments
 (0)