rabl 0.11.6 → 0.11.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -2
- data/lib/rabl/engine.rb +1 -1
- data/lib/rabl/helpers.rb +2 -2
- data/lib/rabl/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5364500887b2b3da7ed0bb4d68dd5ebd0948fc27
|
4
|
+
data.tar.gz: 3854ce5f9c6dc02937bebfde51d8dd3dc96d4134
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af825d57438c23e1e19427eb665098a077c9c7183578d597fad01a70fe75d7503519377ce5fab8f9d2b5558b6b4536df7e416ae9d9f7409ca82cb0508df8987d
|
7
|
+
data.tar.gz: 343dd2bc3856274826aaaaa81bfb93ffff77ee88dbf6777de0a95e4e61ade920167d64130e408a44c01951ffbf71772b3998c06d3a39788c1ea70a98ec83065f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -170,7 +170,7 @@ If `cache_all_output` is set to `true`, every template including each individual
|
|
170
170
|
Additionally, anything within child, glue and partial will also be cached separately.
|
171
171
|
To cache just a single template, see the section titled 'Caching' below.
|
172
172
|
|
173
|
-
If `escape_all_output` is set to `true` and ActiveSupport is available, attribute output will be escaped using [ERB::Util.html_escape](http://
|
173
|
+
If `escape_all_output` is set to `true` and ActiveSupport is available, attribute output will be escaped using [ERB::Util.html_escape](http://api.rubyonrails.org/classes/ERB/Util.html).
|
174
174
|
|
175
175
|
If `view_paths` is set to a path, this view path will be checked for every rabl template within your application.
|
176
176
|
Add to this path especially when including Rabl in an engine and using view paths within a another Rails app.
|
@@ -628,7 +628,6 @@ Tutorials can always be helpful when first getting started:
|
|
628
628
|
* http://blog.joshsoftware.com/2011/12/23/designing-rails-api-using-rabl-and-devise/
|
629
629
|
* http://engineering.gomiso.com/2011/06/27/building-a-platform-api-on-rails/
|
630
630
|
* http://blog.lawrencenorton.com/better-json-requests-with-rabl
|
631
|
-
* http://www.rodrigoalvesvieira.com/developing-json-api-rails-rabl/
|
632
631
|
* http://tech.favoritemedium.com/2011/06/using-rabl-in-rails-json-web-api.html
|
633
632
|
* http://seesparkbox.com/foundry/better_rails_apis_with_rabl
|
634
633
|
* http://blog.dcxn.com/2011/06/22/rails-json-templates-through-rabl
|
data/lib/rabl/engine.rb
CHANGED
@@ -213,7 +213,7 @@ module Rabl
|
|
213
213
|
# cache # uses the current item within a collection
|
214
214
|
# cache 'user', expires_in: 1.hour
|
215
215
|
# options is passed through to the cache store
|
216
|
-
def cache(key = nil, options =
|
216
|
+
def cache(key = nil, options = {})
|
217
217
|
key ||= root_object # if called but missing, use object
|
218
218
|
@_cache_key = key
|
219
219
|
@_cache_options = options
|
data/lib/rabl/helpers.rb
CHANGED
@@ -138,12 +138,12 @@ module Rabl
|
|
138
138
|
|
139
139
|
# Fetches a key from the cache and stores rabl template result otherwise
|
140
140
|
# fetch_from_cache('some_key') { ...rabl template result... }
|
141
|
-
def fetch_result_from_cache(cache_key, cache_options =
|
141
|
+
def fetch_result_from_cache(cache_key, cache_options = {}, &block)
|
142
142
|
expanded_cache_key = ActiveSupport::Cache.expand_cache_key(cache_key, :rabl)
|
143
143
|
Rabl.configuration.cache_engine.fetch(expanded_cache_key, cache_options, &block)
|
144
144
|
end
|
145
145
|
|
146
|
-
def write_result_to_cache(cache_key, cache_options =
|
146
|
+
def write_result_to_cache(cache_key, cache_options = {}, &block)
|
147
147
|
expanded_cache_key = ActiveSupport::Cache.expand_cache_key(cache_key, :rabl)
|
148
148
|
result = yield
|
149
149
|
Rabl.configuration.cache_engine.write(expanded_cache_key, result, cache_options)
|
data/lib/rabl/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Esquenazi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -468,7 +468,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
468
468
|
version: '0'
|
469
469
|
requirements: []
|
470
470
|
rubyforge_project: rabl
|
471
|
-
rubygems_version: 2.
|
471
|
+
rubygems_version: 2.4.8
|
472
472
|
signing_key:
|
473
473
|
specification_version: 4
|
474
474
|
summary: General ruby templating with json, bson, xml and msgpack support
|