jsonorama 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/jsonorama.gemspec CHANGED
@@ -16,7 +16,8 @@ Gem::Specification.new do |s|
16
16
 
17
17
  s.add_dependency 'blobject'
18
18
  s.add_dependency 'rack'
19
- s.add_dependency 'wirble'
19
+ s.add_dependency 'wirble'
20
+ s.add_dependency 'active_support'
20
21
 
21
22
  s.files = `git ls-files`.split("\n")
22
23
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -2,7 +2,7 @@ module Jsonorama
2
2
  module ControllerSupport
3
3
 
4
4
  protected
5
- # 'status': HTTP Response Status Code, response is an optional Blobject
5
+ # 'status': HTTP Response Status Code, response is an optional Jsonorama::JsonResponse
6
6
  def json_api_response(status, response=Jsonorama.json_response)
7
7
  response.status_code = Rack::Utils.status_code status
8
8
  yield response if block_given?
@@ -0,0 +1,9 @@
1
+ require 'active_support'
2
+
3
+ module Jsonorama
4
+ module Helper
5
+ def json object
6
+ ActiveSupport::JSON.encode(object)
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Jsonorama
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: jsonorama
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.3
5
+ version: 0.1.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sam Taylor
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-12 00:00:00 +01:00
13
+ date: 2011-05-16 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -46,6 +46,17 @@ dependencies:
46
46
  version: "0"
47
47
  type: :runtime
48
48
  version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: active_support
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
58
+ type: :runtime
59
+ version_requirements: *id004
49
60
  description:
50
61
  email:
51
62
  - sjltaylor@gmail.com
@@ -63,6 +74,7 @@ files:
63
74
  - lib/jsonorama.rb
64
75
  - lib/jsonorama/controller_support.rb
65
76
  - lib/jsonorama/exception.rb
77
+ - lib/jsonorama/helper.rb
66
78
  - lib/jsonorama/json_client.rb
67
79
  - lib/jsonorama/json_response.rb
68
80
  - lib/jsonorama/version.rb