1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
This commit is contained in:
Zachary Scott 2013-08-16 11:24:04 -04:00
commit cdc3338f08
3 changed files with 7 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -33,7 +33,6 @@ end
describe Sinatra::JSON do
def mock_app(&block)
super do
helpers Sinatra::JSON
class_eval(&block)
end
end