-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1543 from ruby-grape/support-ruby-2.4
Support ruby 2.4
- Loading branch information
Showing
14 changed files
with
146 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
def encode_basic_auth(username, password) | ||
'Basic ' + Base64.encode64("#{username}:#{password}") | ||
module Spec | ||
module Support | ||
module Helpers | ||
def encode_basic_auth(username, password) | ||
'Basic ' + Base64.encode64("#{username}:#{password}") | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
module ContentTypeHelpers | ||
%w(put patch post delete).each do |method| | ||
define_method :"#{method}_with_json" do |uri, params = {}, env = {}, &block| | ||
params = params.to_json | ||
env['CONTENT_TYPE'] ||= 'application/json' | ||
send(method, uri, params, env, &block) | ||
module Spec | ||
module Support | ||
module Helpers | ||
%w(put patch post delete).each do |method| | ||
define_method :"#{method}_with_json" do |uri, params = {}, env = {}, &block| | ||
params = params.to_json | ||
env['CONTENT_TYPE'] ||= 'application/json' | ||
send(method, uri, params, env, &block) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
|
||
include(ContentTypeHelpers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Spec | ||
module Support | ||
module Helpers | ||
INTEGER_CLASS_NAME = 0.to_i.class.to_s.freeze | ||
|
||
def integer_class_name | ||
INTEGER_CLASS_NAME | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.