rabl 0.6.9 → 0.6.10

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -1,9 +1,10 @@
1
1
  # http://about.travis-ci.org/docs/user/build-configuration/
2
2
  before_script: "git submodule update --init"
3
3
  rvm:
4
+ - 1.8.7
4
5
  - 1.9.2
5
6
  - 1.9.3
6
- - rbx-18mode
7
+ - rbx
7
8
  notifications:
8
9
  recipients:
9
10
  - nesquena@gmail.com
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.6.10
4
+
5
+ * Fixes expected behavior with nil and collection keyword
6
+ * Fixes multi_json to support newer form syntax (Thanks @rajatvig)
7
+
3
8
  ## 0.6.9
4
9
 
5
10
  * Adds support for generic template rendering (Thanks @ivanvanderbyl)
data/README.md CHANGED
@@ -37,19 +37,17 @@ and run `bundle install` to install the dependency.
37
37
  If you are using **Rails 2.X, Rails 3.X or Padrino**, RABL works without configuration.
38
38
 
39
39
  **Important:** With Padrino, be sure that **the rabl gem is listed after the padrino gem in your Gemfile**, otherwise
40
- Rabl will not register as a template engine.
40
+ Rabl will not register properly as a template engine.
41
41
 
42
42
  With Sinatra, or any other tilt-based framework, simply register:
43
43
 
44
- Rabl.register!
44
+ ```ruby
45
+ Rabl.register!
46
+ ```
45
47
 
46
48
  and RABL will be initialized and ready for use. For usage with Sinatra, check out
47
49
  the [Sinatra Usage](https://github.com/nesquena/rabl/wiki/Setup-for-Sinatra) guide.
48
50
 
49
- **Note:** Users have reported a few rendering issues with Rails 3.2.
50
- The [template handler](https://github.com/nesquena/rabl/blob/master/lib/rabl/template.rb) probably needs
51
- a patch to properly support Rails 3.2. Hopefully I can get to it soon but patches are welcome.
52
-
53
51
  ## Overview ##
54
52
 
55
53
  You can use RABL to generate JSON and XML based APIs from any ruby object.
@@ -139,93 +137,10 @@ gem 'yajl-ruby', :require => "yajl"
139
137
 
140
138
  and RABL will automatically start using that engine for encoding your JSON responses!
141
139
 
142
- ### Message Pack ###
143
-
144
- Rabl also includes optional support for [Message Pack](http://www.msgpack.org/) serialization format using the [msgpack gem](https://rubygems.org/gems/msgpack).
145
- To enable, include the msgpack gem in your project's Gemfile. Then use Rabl as normal with the `msgpack` format (akin to json and xml formats).
146
-
147
- ```ruby
148
- # Gemfile
149
- gem 'msgpack', '~> 0.4.5'
150
- ```
151
-
152
- One can additionally use a custom Message Pack implementation by setting the Rabl `msgpack_engine` configuration attribute. This custom message pack engine must conform to the MessagePack#pack method signature.
153
-
154
- ```ruby
155
- class CustomEncodeEngine
156
- def self.pack string
157
- # Custom Encoding by your own engine.
158
- end
159
- end
160
-
161
- Rabl.configure do |config|
162
- config.msgpack_engine = CustomEncodeEngine
163
- end
164
- ```
165
-
166
- *NOTE*: Attempting to render the msgpack format without either including the msgpack gem
167
- or setting a `msgpack_engine` will cause an exception to be raised.
168
-
169
- ### BSON ###
170
-
171
- Rabl also includes optional support for [BSON](http://bsonspec.org/) serialization format using the [bson gem](https://rubygems.org/gems/bson).
172
- To enable, include the bson gem in your project's Gemfile. Then use Rabl as normal with the `bson` format (akin to json and xml formats).
173
-
174
- ```ruby
175
- # Gemfile
176
- gem 'bson', '~> 1.5.2'
177
- ```
178
-
179
- To use it with Rails, also register the bson mime type format:
180
-
181
- ```ruby
182
- # config/initializers/mime_types.rb
183
- Mime::Type.register "application/bson", :bson
184
- ```
185
-
186
- One can additionally use a custom BSON implementation by setting the Rabl `bson_engine` configuration attribute.
187
- This custom BSON engine must conform to the BSON#serialize method signature.
188
-
189
- ```ruby
190
- class CustomEncodeEngine
191
- def self.serialize string
192
- # Custom Encoding by your own engine.
193
- end
194
- end
195
-
196
- Rabl.configure do |config|
197
- config.bson_engine = CustomEncodeEngine
198
- end
199
- ```
200
-
201
- *NOTE*: Attempting to render the bson format without either including the bson gem or
202
- setting a `bson_engine` will cause an exception to be raised.
203
-
204
- ### Plist ###
205
-
206
- Rabl also includes optional support for [Plist](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/Introduction/Introduction.html]) serialization format using the [plist gem](http://plist.rubyforge.org/).
207
- To enable, include the plist gem in your project's Gemfile. Then use Rabl as normal with the `plist` format (akin to other formats).
208
-
209
- ```ruby
210
- # Gemfile
211
- gem 'plist'
212
- ```
213
-
214
- There is also an option for a custom Plist implementation by setting the Rabl `plist_engine` configuration attribute.
215
-
216
- ```ruby
217
- class CustomEncodeEngine
218
- def self.dump string
219
- # Custom Encoding by your own engine.
220
- end
221
- end
222
-
223
- Rabl.configure do |config|
224
- config.plist_engine = CustomEncodeEngine
225
- end
226
- ```
140
+ ### Format Configuration ###
227
141
 
228
- *NOTE*: Attempting to render the plist format without either including the plist gem or setting a `plist_engine` will cause an exception to be raised.
142
+ RABL supports configuration for MessagePack, BSON, and Plist. Check the
143
+ [Format Configuration](https://github.com/nesquena/rabl/wiki/Configuring-Formats) page for more details.
229
144
 
230
145
  ## Usage ##
231
146
 
@@ -465,10 +380,7 @@ Note that RABL can be nested arbitrarily deep within child nodes to allow for th
465
380
 
466
381
  ### Caching ###
467
382
 
468
- Caching works by saving the entire template output to the configured cache_store in your application. Note that caching is currently **only available** for
469
- Rails but support for other frameworks is planned in a future release.
470
-
471
- For Rails, requires `action_controller.perform_caching` to be set to true in your environment, and for `cache` to be set to a key (object that responds to cache_key method, array or string).
383
+ RABL has built-in caching support for templates leveraging fragment caching strategies. Note that caching is currently **only available** for but support for other frameworks is planned in a future release. Simplest caching usage is:
472
384
 
473
385
  ```ruby
474
386
  # app/views/users/show.json.rabl
@@ -477,62 +389,7 @@ cache @quiz # key = rabl/quiz/[cache_key]
477
389
  attribute :title
478
390
  ```
479
391
 
480
- The `cache` keyword accepts the same parameters as fragment caching for Rails.
481
-
482
- ```ruby
483
- cache @user # calls @user.cache_key
484
- cache ['keel', @user] # calls @user.cache_key and prefixes with kewl/
485
- cache 'lists' # explicit key of 'lists'
486
- cache 'lists', expires_in: 1.hour
487
- ```
488
-
489
- The cache keyword can be used from within the base template or any extended template including partials.
490
-
491
- ```ruby
492
- # app/views/users/index.json.rabl
493
- collection @users
494
- cache @users # key = rabl/users/[cache_key]/users/[cache_key]/...
495
-
496
- extends "users/show"
497
- ```
498
-
499
- And within the extended template:
500
-
501
- ```ruby
502
- # app/views/users/show.json.rabl
503
- object @user
504
- cache @user # key = rabl/user/[cache_key]/...
505
-
506
- attributes :name, :email
507
- ```
508
-
509
- Another example of extending your object templates.
510
-
511
- ```ruby
512
- # app/views/users/show.json.rabl
513
- object @user
514
-
515
- extends "users/user"
516
- ```
517
-
518
- ```ruby
519
- # app/views/users/user.json.rabl
520
- cache # key = rabl/user/[cache_key]/...
521
-
522
- attributes :name, :email
523
- ```
524
-
525
- Caching can significantly speed up the rendering of RABL templates in production and is strongly recommended when possible.
526
-
527
- ### Content Type Assignment ###
528
-
529
- Currently in RABL, the content-type of your response is not set automatically. This is because RABL is intended
530
- to work for any Rack-based framework and as agostic to format as possible.
531
- Check [this issue](https://github.com/nesquena/rabl/issues/185#issuecomment-4501232) for more
532
- details, and if you have any ideas or patches please let me know.
533
-
534
- In the meantime, be sure to set the proper content-types if needed. This is usually pretty simple in both
535
- Rails and Padrino. I recommend a before_filter on that controller or directly specified in an action.
392
+ Caching can significantly speed up the rendering of RABL templates in production and is strongly recommended when possible. For more a more detailed look at caching, check out the [Caching](https://github.com/nesquena/rabl/wiki/Caching-in-RABL) guide on the wiki.
536
393
 
537
394
  ### Rendering Templates Directly ###
538
395
 
@@ -554,6 +411,16 @@ Rabl::Renderer.xml(@post, 'posts/show')
554
411
 
555
412
  These methods allow RABL to be used for arbitrary conversions of an object into a desired format.
556
413
 
414
+ ### Content Type Headers ###
415
+
416
+ Currently in RABL, the content-type of your response is not set automatically. This is because RABL is intended
417
+ to work for any Rack-based framework and as agostic to format as possible.
418
+ Check [this issue](https://github.com/nesquena/rabl/issues/185#issuecomment-4501232) for more
419
+ details, and if you have any ideas or patches please let me know.
420
+
421
+ In the meantime, be sure to set the proper content-types if needed. This is usually pretty simple in both
422
+ Rails and Padrino. I recommend a before_filter on that controller or directly specified in an action.
423
+
557
424
  ## Resources ##
558
425
 
559
426
  There are many resources available relating to RABL including the [RABL Wiki](https://github.com/nesquena/rabl/wiki),
@@ -563,6 +430,7 @@ and many tutorials and guides detailed below.
563
430
 
564
431
  Links to resources for advanced usage:
565
432
 
433
+ * Grape Integration: https://github.com/nesquena/rabl/wiki/Using-Rabl-with-Grape
566
434
  * Rendering JSON for a tree structure using RABL: https://github.com/nesquena/rabl/issues/70
567
435
  * Layouts (erb, haml and rabl) in RABL: https://github.com/nesquena/rabl/wiki/Using-Layouts
568
436
  * Backbone or [Ember.js](http://www.emberjs.com) Integration: https://github.com/nesquena/rabl/wiki/Backbone-Integration
@@ -588,9 +456,8 @@ Let me know if there's any other useful resources not listed here.
588
456
 
589
457
  ### Related Libraries ###
590
458
 
591
- There are several libraries that either complement or extend the functionality of RABL:
459
+ There are other libraries that can either complement or extend the functionality of RABL:
592
460
 
593
- * [grape-rabl](https://github.com/LTe/grape-rabl) - Allows rabl templates to be used with [grape](https://github.com/intridea/grape)
594
461
  * [gon](https://github.com/gazay/gon) - Exposes your Rails variables in JS with RABL support integrated.
595
462
 
596
463
  Let me know if there's any other related libraries not listed here.
@@ -61,7 +61,10 @@ module Rabl
61
61
  # or class that responds to `encode`, to use to encode Rabl templates
62
62
  # into JSON. For more details, see the MultiJson gem.
63
63
  def json_engine=(engine_name_or_class)
64
- MultiJson.engine = @engine_name = engine_name_or_class
64
+ @engine_name = engine_name_or_class
65
+ # multi_json compatibility TODO
66
+ MultiJson.respond_to?(:use) ? MultiJson.use(@engine_name) :
67
+ MultiJson.engine = @engine_name
65
68
  end
66
69
 
67
70
  # @return The JSON engine used to encode Rabl templates into JSON
@@ -104,8 +107,9 @@ module Rabl
104
107
  def get_json_engine
105
108
  if !defined?(@engine_name) && defined?(Rails)
106
109
  ActiveSupport::JSON
107
- else
108
- MultiJson.engine
110
+ else # use multi_json
111
+ # multi_json compatibility TODO
112
+ MultiJson.respond_to?(:adapter) ? MultiJson.adapter : MultiJson.engine
109
113
  end
110
114
  end
111
115
  end
data/lib/rabl/engine.rb CHANGED
@@ -118,7 +118,7 @@ module Rabl
118
118
  @_collection_name = options[:root] if options[:root]
119
119
  @_collection_name ||= data.values.first if data.respond_to?(:each_pair)
120
120
  @_object_root_name = options[:object_root] if options.has_key?(:object_root)
121
- self.object(data_object(data).to_a) if data
121
+ self.object(data_object(data).to_a)
122
122
  end
123
123
 
124
124
  # Sets the cache key to be used by ActiveSupport::Cache.expand_cache_key
@@ -211,7 +211,9 @@ module Rabl
211
211
  # format_json({ :foo => "bar" }) => "test({ foo : 'bar' })"
212
212
  # format_json("{ foo : "bar" }") => "test({ foo : 'bar' })"
213
213
  def format_json(json_output)
214
- json_output = Rabl.configuration.json_engine.encode(json_output) unless json_output.is_a?(String)
214
+ json_engine = Rabl.configuration.json_engine
215
+ json_method = json_engine.respond_to?(:dump) ? 'dump' : 'encode' # multi_json compatibility TODO
216
+ json_output = json_engine.send(json_method, json_output) unless json_output.is_a?(String)
215
217
  use_callback = Rabl.configuration.enable_json_callbacks && request_params[:callback].present?
216
218
  use_callback ? "#{request_params[:callback]}(#{json_output})" : json_output
217
219
  end
data/lib/rabl/renderer.rb CHANGED
@@ -44,7 +44,8 @@ module Rabl
44
44
  def render(context_scope = nil)
45
45
  context_scope = context_scope ? context_scope : options.delete(:scope) || self
46
46
  set_instance_variable(object) if context_scope == self
47
- engine.render(context_scope, options.fetch(:locals, {}))
47
+ locals = options.fetch(:locals, {}).reverse_merge(:object => object)
48
+ engine.render(context_scope, locals)
48
49
  end
49
50
 
50
51
  protected
data/lib/rabl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rabl
2
- VERSION = "0.6.9"
2
+ VERSION = "0.6.10"
3
3
  end
@@ -3,12 +3,14 @@ require File.expand_path('../../lib/rabl', __FILE__)
3
3
 
4
4
  context 'Rabl::Configuration' do
5
5
  context 'defaults' do
6
+ # multi_json compatibility TODO
7
+ helper(:json_engine) { MultiJson.respond_to?(:adapter) ? MultiJson.adapter : MultiJson.engine }
6
8
  setup { Rabl.configuration }
7
9
 
8
10
  asserts(:include_json_root).equals true
9
11
  asserts(:include_xml_root).equals false
10
12
  asserts(:enable_json_callbacks).equals false
11
- asserts(:json_engine).equals MultiJson.engine
13
+ asserts(:json_engine).equals { json_engine }
12
14
  end
13
15
 
14
16
  context 'custom JSON engine' do
@@ -18,6 +20,6 @@ context 'Rabl::Configuration' do
18
20
  end
19
21
  end
20
22
 
21
- asserts('uses a custom JSON engine') { topic.json_engine == MultiJson::Engines::Yajl }
23
+ asserts('uses a custom JSON engine') { topic.json_engine.to_s =~ /MultiJson.*::Yajl/ }
22
24
  end
23
25
  end
data/test/engine_test.rb CHANGED
@@ -111,6 +111,14 @@ context "Rabl::Engine" do
111
111
  end
112
112
 
113
113
  context "#collection" do
114
+ asserts "that it sets object to be blank array" do
115
+ template = rabl %{
116
+ collection []
117
+ }
118
+ scope = Object.new
119
+ template.render(scope)
120
+ end.equals "[]"
121
+
114
122
  asserts "that it sets object to be casted as a simple array" do
115
123
  template = rabl %{
116
124
  collection @users
@@ -4,6 +4,19 @@ require 'pathname'
4
4
  context "Rabl::Renderer" do
5
5
  helper(:tmp_path) { @tmp_path ||= Pathname.new(Dir.mktmpdir) }
6
6
  context "#render" do
7
+ asserts 'renders empty array' do
8
+ source = %q{
9
+ collection @users
10
+ attribute :name, :as => 'city'
11
+ }
12
+
13
+ scope = Object.new
14
+ scope.instance_variable_set :@users, []
15
+
16
+ renderer = Rabl::Renderer.new(source, [], { :format => 'json', :root => true, :view_path => '/path/to/views', :scope => scope })
17
+ renderer.render
18
+ end.equals "[]"
19
+
7
20
  asserts 'renders string as source' do
8
21
  source = %q{
9
22
  object @user
@@ -51,8 +64,8 @@ context "Rabl::Renderer" do
51
64
  user = User.new(:name => 'irvine')
52
65
 
53
66
  renderer = Rabl::Renderer.new(source, nil, { :format => 'json', :locals => {:object => user} })
54
- renderer.render
55
- end.equals "{\"user\":{\"city\":\"irvine\"}}"
67
+ renderer.render.split("").sort
68
+ end.equals "{\"user\":{\"city\":\"irvine\"}}".split("").sort
56
69
 
57
70
 
58
71
  asserts 'loads source from file' do
@@ -66,8 +79,8 @@ context "Rabl::Renderer" do
66
79
  user = User.new(:name => 'irvine')
67
80
 
68
81
  renderer = Rabl::Renderer.new('test', user, :view_path => tmp_path)
69
- renderer.render
70
- end.equals "{\"user\":{\"age\":24,\"name\":\"irvine\"}}"
82
+ renderer.render.split("").sort
83
+ end.equals "{\"user\":{\"age\":24,\"name\":\"irvine\"}}".split("").sort
71
84
 
72
85
 
73
86
  asserts 'handles paths for extends' do
@@ -88,8 +101,8 @@ context "Rabl::Renderer" do
88
101
  user = User.new(:name => 'irvine')
89
102
 
90
103
  renderer = Rabl::Renderer.new('user', user, :view_path => tmp_path)
91
- renderer.render
92
- end.equals "{\"user\":{\"age\":24,\"name\":\"irvine\"}}"
104
+ renderer.render.split("").sort
105
+ end.equals "{\"user\":{\"age\":24,\"name\":\"irvine\"}}".split("").sort
93
106
 
94
107
  asserts 'Rabl.render calls Renderer' do
95
108
  File.open(tmp_path + "test.json.rabl", "w") do |f|
@@ -101,8 +114,34 @@ context "Rabl::Renderer" do
101
114
 
102
115
  user = User.new(:name => 'irvine')
103
116
 
104
- Rabl.render(user, 'test', :view_path => tmp_path)
105
- end.equals "{\"user\":{\"age\":24,\"name\":\"irvine\"}}"
117
+ Rabl.render(user, 'test', :view_path => tmp_path).split("").sort
118
+ end.equals "{\"user\":{\"age\":24,\"name\":\"irvine\"}}".split("").sort
119
+
120
+ asserts 'it renders collections' do
121
+ File.open(tmp_path + "test.json.rabl", "w") do |f|
122
+ f.puts %q{
123
+ collection @users => :users
124
+ attributes :age, :name
125
+ }
126
+ end
127
+
128
+ scope = Object.new
129
+ scope.instance_variable_set :@users, nil
130
+ Rabl.render([], 'test', :view_path => tmp_path, :scope => scope).split("").sort
131
+ end.equals "{\"users\":[]}".split("").sort
132
+
133
+ asserts 'it renders an array when given an empty collection' do
134
+ File.open(tmp_path + "test.json.rabl", "w") do |f|
135
+ f.puts %q{
136
+ collection @users
137
+ attribute :name, :age
138
+ }
139
+ end
140
+
141
+ scope = Object.new
142
+ scope.instance_variable_set :@users, nil
143
+ Rabl.render([], 'test', :view_path => tmp_path, :root => false, :scope => scope)
144
+ end.equals "[]"
106
145
  end
107
146
 
108
147
  context '.json' do
@@ -115,8 +154,8 @@ context "Rabl::Renderer" do
115
154
  end
116
155
 
117
156
  user = User.new(:name => 'ivan')
118
- Rabl::Renderer.json(user, 'test', :view_path => tmp_path)
119
- end.equals "{\"user\":{\"age\":24,\"name\":\"ivan\"}}"
157
+ Rabl::Renderer.json(user, 'test', :view_path => tmp_path).split("").sort
158
+ end.equals "{\"user\":{\"age\":24,\"name\":\"ivan\"}}".split("").sort
120
159
  end
121
160
 
122
161
  context '.msgpack' do
@@ -129,8 +168,8 @@ context "Rabl::Renderer" do
129
168
  end
130
169
 
131
170
  user = User.new(:name => 'ivan')
132
- Rabl::Renderer.msgpack(user, 'test', :view_path => tmp_path).split
133
- end.equals "\x81\xA4user\x82\xA3age\x18\xA4name\xA4ivan".split
171
+ Rabl::Renderer.msgpack(user, 'test', :view_path => tmp_path).split("").sort
172
+ end.equals "\x81\xA4user\x82\xA3age\x18\xA4name\xA4ivan".split("").sort
134
173
  end
135
174
 
136
175
  context '.plist' do
metadata CHANGED
@@ -1,183 +1,137 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rabl
3
- version: !ruby/object:Gem::Version
4
- version: 0.6.9
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.6.10
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Nathan Esquenazi
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-14 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+
13
+ date: 2012-04-19 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
15
16
  name: activesupport
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: 2.3.14
22
- type: :runtime
23
17
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
18
+ requirement: &id001 !ruby/object:Gem::Requirement
25
19
  none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
29
23
  version: 2.3.14
30
- - !ruby/object:Gem::Dependency
31
- name: multi_json
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: '1.0'
38
24
  type: :runtime
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
+ name: multi_json
39
28
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
29
+ requirement: &id002 !ruby/object:Gem::Requirement
41
30
  none: false
42
- requirements:
31
+ requirements:
43
32
  - - ~>
44
- - !ruby/object:Gem::Version
45
- version: '1.0'
46
- - !ruby/object:Gem::Dependency
33
+ - !ruby/object:Gem::Version
34
+ version: "1.0"
35
+ type: :runtime
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
47
38
  name: riot
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: 0.12.3
54
- type: :development
55
39
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
40
+ requirement: &id003 !ruby/object:Gem::Requirement
57
41
  none: false
58
- requirements:
42
+ requirements:
59
43
  - - ~>
60
- - !ruby/object:Gem::Version
44
+ - !ruby/object:Gem::Version
61
45
  version: 0.12.3
62
- - !ruby/object:Gem::Dependency
63
- name: rr
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ~>
68
- - !ruby/object:Gem::Version
69
- version: 1.0.2
70
46
  type: :development
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
49
+ name: rr
71
50
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
51
+ requirement: &id004 !ruby/object:Gem::Requirement
73
52
  none: false
74
- requirements:
53
+ requirements:
75
54
  - - ~>
76
- - !ruby/object:Gem::Version
55
+ - !ruby/object:Gem::Version
77
56
  version: 1.0.2
78
- - !ruby/object:Gem::Dependency
79
- name: rake
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
86
57
  type: :development
58
+ version_requirements: *id004
59
+ - !ruby/object:Gem::Dependency
60
+ name: rake
87
61
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
62
+ requirement: &id005 !ruby/object:Gem::Requirement
89
63
  none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
- - !ruby/object:Gem::Dependency
95
- name: tilt
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: "0"
102
68
  type: :development
69
+ version_requirements: *id005
70
+ - !ruby/object:Gem::Dependency
71
+ name: tilt
103
72
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- - !ruby/object:Gem::Dependency
111
- name: yajl-ruby
112
- requirement: !ruby/object:Gem::Requirement
73
+ requirement: &id006 !ruby/object:Gem::Requirement
113
74
  none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: "0"
118
79
  type: :development
80
+ version_requirements: *id006
81
+ - !ruby/object:Gem::Dependency
82
+ name: yajl-ruby
119
83
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
- - !ruby/object:Gem::Dependency
127
- name: msgpack
128
- requirement: !ruby/object:Gem::Requirement
84
+ requirement: &id007 !ruby/object:Gem::Requirement
129
85
  none: false
130
- requirements:
131
- - - ~>
132
- - !ruby/object:Gem::Version
133
- version: 0.4.5
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: "0"
134
90
  type: :development
91
+ version_requirements: *id007
92
+ - !ruby/object:Gem::Dependency
93
+ name: msgpack
135
94
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
95
+ requirement: &id008 !ruby/object:Gem::Requirement
137
96
  none: false
138
- requirements:
97
+ requirements:
139
98
  - - ~>
140
- - !ruby/object:Gem::Version
99
+ - !ruby/object:Gem::Version
141
100
  version: 0.4.5
142
- - !ruby/object:Gem::Dependency
143
- name: bson
144
- requirement: !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ~>
148
- - !ruby/object:Gem::Version
149
- version: 1.5.2
150
101
  type: :development
102
+ version_requirements: *id008
103
+ - !ruby/object:Gem::Dependency
104
+ name: bson
151
105
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
106
+ requirement: &id009 !ruby/object:Gem::Requirement
153
107
  none: false
154
- requirements:
108
+ requirements:
155
109
  - - ~>
156
- - !ruby/object:Gem::Version
110
+ - !ruby/object:Gem::Version
157
111
  version: 1.5.2
158
- - !ruby/object:Gem::Dependency
159
- name: plist
160
- requirement: !ruby/object:Gem::Requirement
161
- none: false
162
- requirements:
163
- - - ! '>='
164
- - !ruby/object:Gem::Version
165
- version: '0'
166
112
  type: :development
113
+ version_requirements: *id009
114
+ - !ruby/object:Gem::Dependency
115
+ name: plist
167
116
  prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
117
+ requirement: &id010 !ruby/object:Gem::Requirement
169
118
  none: false
170
- requirements:
171
- - - ! '>='
172
- - !ruby/object:Gem::Version
173
- version: '0'
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: "0"
123
+ type: :development
124
+ version_requirements: *id010
174
125
  description: General ruby templating with json, bson, xml and msgpack support
175
- email:
126
+ email:
176
127
  - nesquena@gmail.com
177
128
  executables: []
129
+
178
130
  extensions: []
131
+
179
132
  extra_rdoc_files: []
180
- files:
133
+
134
+ files:
181
135
  - .gitignore
182
136
  - .travis.yml
183
137
  - CHANGELOG.md
@@ -418,29 +372,32 @@ files:
418
372
  - test/teststrap.rb
419
373
  homepage: https://github.com/nesquena/rabl
420
374
  licenses: []
375
+
421
376
  post_install_message:
422
377
  rdoc_options: []
423
- require_paths:
378
+
379
+ require_paths:
424
380
  - lib
425
- required_ruby_version: !ruby/object:Gem::Requirement
381
+ required_ruby_version: !ruby/object:Gem::Requirement
426
382
  none: false
427
- requirements:
428
- - - ! '>='
429
- - !ruby/object:Gem::Version
430
- version: '0'
431
- required_rubygems_version: !ruby/object:Gem::Requirement
383
+ requirements:
384
+ - - ">="
385
+ - !ruby/object:Gem::Version
386
+ version: "0"
387
+ required_rubygems_version: !ruby/object:Gem::Requirement
432
388
  none: false
433
- requirements:
434
- - - ! '>='
435
- - !ruby/object:Gem::Version
436
- version: '0'
389
+ requirements:
390
+ - - ">="
391
+ - !ruby/object:Gem::Version
392
+ version: "0"
437
393
  requirements: []
394
+
438
395
  rubyforge_project: rabl
439
- rubygems_version: 1.8.21
396
+ rubygems_version: 1.8.19
440
397
  signing_key:
441
398
  specification_version: 3
442
399
  summary: General ruby templating with json, bson, xml and msgpack support
443
- test_files:
400
+ test_files:
444
401
  - test/bson_engine_test.rb
445
402
  - test/builder_test.rb
446
403
  - test/configuration_test.rb