json_builder 1.0.2 → 1.1

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.
@@ -64,7 +64,7 @@ module JsonBuilder
64
64
  _end_tag
65
65
  end
66
66
 
67
- @target.gsub(/,(\}+)$/, '\1')
67
+ @target.gsub(/,(\}|\}+)$/, '\1')
68
68
  end
69
69
 
70
70
  # Append text to the output target. Escape any markup. May be
data/lib/test.rb CHANGED
@@ -17,6 +17,19 @@ string = @json.user do
17
17
  end
18
18
  end
19
19
 
20
- user = JSON.parse(string)
21
- puts user['user']['name']
22
- # puts string
20
+ puts string
21
+
22
+ @json2 = JsonBuilder::JsonMarkup.new
23
+ @json2.id 1
24
+ @json2.name "Client End"
25
+ @json2.slug "client-end"
26
+ @json2.subdomain "clientend"
27
+ @json2.hosted_domain "127.0.0.1"
28
+ @json2.clients_count 15
29
+ @json2.total_file_size 13123123
30
+ @json2.last_billed_on Time.now.getutc.iso8601
31
+ @json2.logo_url "http://google.com/logo.gif"
32
+ @json2.created_at Time.now.getutc.iso8601
33
+ @json2.updated_at Time.now.getutc.iso8601
34
+
35
+ puts @json2.target!
metadata CHANGED
@@ -4,9 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
- - 0
8
- - 2
9
- version: 1.0.2
7
+ - 1
8
+ version: "1.1"
10
9
  platform: ruby
11
10
  authors:
12
11
  - Garrett Bjerkhoel