-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f292aff
commit 2abf423
Showing
5 changed files
with
105 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "administrate-field-image" | ||
gem "autoprefixer-rails" | ||
gem "bourbon", "~> 5.0.0.beta.7" | ||
gem "faker" | ||
gem "pg" | ||
gem "redcarpet" | ||
gem "sentry-raven" | ||
gem "unicorn" | ||
gem "actionpack", "~> 5.1.0" | ||
gem "actionview", "~> 5.1.0" | ||
gem "activerecord", "~> 5.1.0" | ||
gem "rails-controller-testing" | ||
|
||
group :development, :test do | ||
gem "appraisal" | ||
gem "awesome_print" | ||
gem "bundler-audit", :require => false | ||
gem "byebug" | ||
gem "dotenv-rails" | ||
gem "factory_girl_rails" | ||
gem "i18n-tasks" | ||
gem "pry-rails" | ||
gem "rspec-rails", "~> 3.5.0" | ||
end | ||
|
||
group :test do | ||
gem "ammeter" | ||
gem "database_cleaner" | ||
gem "formulaic" | ||
gem "launchy" | ||
gem "poltergeist" | ||
gem "shoulda-matchers", "~> 2.8.0", :require => false | ||
gem "timecop" | ||
gem "webmock" | ||
end | ||
|
||
group :staging, :production do | ||
gem "rack-timeout" | ||
gem "rails_stdout_logging" | ||
gem "uglifier" | ||
end | ||
|
||
gemspec :path => "../" |
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,27 +1,57 @@ | ||
module HTTPMethodShim | ||
def get(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
end | ||
module Rails50 | ||
def get(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
end | ||
|
||
def post(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
end | ||
def post(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
end | ||
|
||
def put(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
end | ||
|
||
def put(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
def patch(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
end | ||
|
||
def delete(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
end | ||
end | ||
|
||
def patch(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
module Rails51 | ||
def get(path, params = nil) | ||
super(path, params: params.to_h) | ||
end | ||
|
||
def post(path, params = nil) | ||
super(path, params: params.to_h) | ||
end | ||
|
||
def put(path, params = nil) | ||
super(path, params: params.to_h) | ||
end | ||
|
||
def patch(path, params = nil) | ||
super(path, params: params.to_h) | ||
end | ||
|
||
def delete(path, params = nil) | ||
super(path, params: params.to_h) | ||
end | ||
end | ||
end | ||
|
||
def delete(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
if Gem::Dependency.new('rails', '~> 5.1.0').match?('rails', Rails::VERSION::STRING) | ||
RSpec.configure do |config| | ||
config.include HTTPMethodShim::Rails51, type: :controller | ||
end | ||
end | ||
|
||
if Rails::VERSION::MAJOR >= 5 | ||
if Gem::Dependency.new('rails', '~> 5.0.0').match?('rails', Rails::VERSION::STRING) | ||
RSpec.configure do |config| | ||
config.include HTTPMethodShim, type: :controller | ||
config.include HTTPMethodShim::Rails50, type: :controller | ||
end | ||
end |