Skip to content

Commit a7bc0c5

Browse files
author
Michael Bleigh
committed
Updating things.
1 parent 0c639b7 commit a7bc0c5

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ gem 'rack'
22
gem 'rack-mount'
33
gem 'rack-jsonp'
44

5-
gem 'json'
6-
gem 'multi_json'
5+
gem 'activesupport', '>= 3.0.0.rc2'
76

87
group :test do
98
gem 'rspec', '>= 2.0.0.beta.19'

Gemfile.lock

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
GEM
22
specs:
3+
activesupport (3.0.0.rc2)
34
builder (2.1.2)
45
cucumber (0.8.5)
56
builder (~> 2.1.2)
@@ -10,9 +11,7 @@ GEM
1011
diff-lcs (1.1.2)
1112
gherkin (2.1.5)
1213
trollop (~> 1.16.2)
13-
json (1.4.3)
1414
json_pure (1.4.3)
15-
multi_json (0.0.4)
1615
rack (1.2.1)
1716
rack-jsonp (1.0.0)
1817
rack-mount (0.6.9)
@@ -34,9 +33,8 @@ PLATFORMS
3433
ruby
3534

3635
DEPENDENCIES
36+
activesupport (>= 3.0.0.rc2)
3737
cucumber (>= 0.8.5)
38-
json
39-
multi_json
4038
rack
4139
rack-jsonp
4240
rack-mount

README.rdoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
= UNDER CONSTRUCTION. DO NOT USE
2+
13
= Grape
24

35
Grape is a REST-like API micro-framework for Ruby. It is built to complement existing web application frameworks such as Rails and Sinatra by providing a simple DSL to easily provide APIs. It has built-in support for common conventions such as multiple formats, subdomain/prefix restriction, and versioning.

lib/grape/middleware/formatter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require 'grape/middleware/base'
2-
require 'multi_json'
2+
require 'active_support/json'
33

44
module Grape
55
module Middleware
@@ -50,7 +50,7 @@ def format_from_header
5050
def after
5151
status, headers, bodies = *@app_response
5252
bodies.map! do |body|
53-
MultiJson.encode(body)
53+
ActiveSupport::JSON.encode(body)
5454
end
5555
[status, headers, bodies]
5656
end

spec/grape/middleware/formatter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
it 'should look at the bodies for possibly serializable data' do
1111
@body = {"abc" => "def"}
1212
status, headers, bodies = *subject.call({'PATH_INFO' => '/somewhere'})
13-
bodies.first.should == MultiJson.encode(@body)
13+
bodies.first.should == ActiveSupport::JSON.encode(@body)
1414
end
1515
end
1616

0 commit comments

Comments
 (0)