json-response 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/json_response.rb +3 -4
- metadata +4 -4
data/lib/json_response.rb
CHANGED
@@ -2,7 +2,7 @@ require "ostruct"
|
|
2
2
|
require "json"
|
3
3
|
|
4
4
|
module JSONResponse
|
5
|
-
VERSION = "0.0.
|
5
|
+
VERSION = "0.0.3"
|
6
6
|
extend self
|
7
7
|
|
8
8
|
def counters
|
@@ -13,9 +13,8 @@ module JSONResponse
|
|
13
13
|
counters[name] += 1
|
14
14
|
end
|
15
15
|
|
16
|
-
class JSONStruct
|
16
|
+
class JSONStruct
|
17
17
|
def initialize(&block)
|
18
|
-
super
|
19
18
|
@block = block
|
20
19
|
end
|
21
20
|
|
@@ -24,7 +23,7 @@ module JSONResponse
|
|
24
23
|
end
|
25
24
|
|
26
25
|
def build
|
27
|
-
|
26
|
+
OpenStruct.new.tap { |o| @block.call(o) }.marshal_dump
|
28
27
|
end
|
29
28
|
end
|
30
29
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json-response
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-12-07 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &2153280040 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 2.6.0
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2153280040
|
25
25
|
description: Define factories to be built as JSON.
|
26
26
|
email:
|
27
27
|
- me@mattenoble.com
|