mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
merge #96
This commit is contained in:
commit
cdc3338f08
3 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
require 'sinatra/base'
|
||||
|
||||
require 'multi_json'
|
||||
module Sinatra
|
||||
|
||||
# = Sinatra::JSON
|
||||
|
@ -32,7 +32,6 @@ module Sinatra
|
|||
# require "sinatra/json"
|
||||
#
|
||||
# class MyApp < Sinatra::Base
|
||||
# helpers Sinatra::JSON
|
||||
#
|
||||
# # define a route that uses the helper
|
||||
# get '/' do
|
||||
|
@ -126,5 +125,7 @@ module Sinatra
|
|||
end
|
||||
|
||||
Base.set :json_content_type, :json
|
||||
helpers JSON
|
||||
|
||||
# Load the JSON helpers in modular style automatically
|
||||
Base.helpers JSON
|
||||
end
|
||||
|
|
|
@ -121,6 +121,8 @@ Gem::Specification.new do |s|
|
|||
s.add_dependency "tilt", "~> 1.3"
|
||||
s.add_dependency "rack-test"
|
||||
s.add_dependency "rack-protection"
|
||||
s.add_dependency "eventmachine"
|
||||
s.add_dependency "multi_json"
|
||||
|
||||
s.add_development_dependency "eventmachine"
|
||||
s.add_development_dependency "rspec", "~> 2.3"
|
||||
|
@ -128,4 +130,5 @@ Gem::Specification.new do |s|
|
|||
s.add_development_dependency "erubis"
|
||||
s.add_development_dependency "slim"
|
||||
s.add_development_dependency "rake"
|
||||
s.add_development_dependency "yajl-ruby"
|
||||
end
|
||||
|
|
|
@ -33,7 +33,6 @@ end
|
|||
describe Sinatra::JSON do
|
||||
def mock_app(&block)
|
||||
super do
|
||||
helpers Sinatra::JSON
|
||||
class_eval(&block)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue