rabl 0.11.2 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MmEyODQ2MGU5MWRhYzc1YjU2YWI2YWMxMTQ2ZGJhYTBhYWJiYTgzNg==
4
+ MzdjNWZkZTE2ZWVkZTI2N2NkMzgxZjI3OWQxMDdiYTQ5NWY4NjQwNA==
5
5
  data.tar.gz: !binary |-
6
- OWI4ZWQwNDZiOGIyZWMzOTQ5ZGFhNDAwMjQ3ZjRlNTg5YTViNjM2OA==
6
+ NGYyZDRjY2NjMDdjYWExOGYyM2RlMDlkMzI5MTMzNjY3NmYyN2Y1Nw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NDk5OTc0ZjU5ZDM4OTBiYWJhOWNmMzg0MjdlYjk2NTdiNjc0MzdkODhmMTNi
10
- YTQyNmE1NDczYjU5N2VlMzU1NjQwYWY4ZWU4NGJhNjljNzhiNzY0MzQ3MzI1
11
- MjVjMGViNzE2NTNhOWIzNjE1Y2RlOWNmYzFiYTM3NzA5OGEyZGQ=
9
+ YWIzNmM2ZTY2OTVjNjgwYjZmMzc0OWZlZTIzZjZmZTcyZWExOTkyYjdiMjMw
10
+ N2MwMWRkOTY0OGQ0MDUzMTIwYTQ4YTVkZmUzYzNhYzZiZmMzZDI3MDliN2Nj
11
+ MTczMTA3MTRhNmQ3ZDZhNzg3YTY2MzU3M2UzZmNlOTM2Y2Q1NzI=
12
12
  data.tar.gz: !binary |-
13
- MWJmZGNkMWIyZGZiYmE0ZGE1NDhlZTRkNDJiNzQwN2YwNGQwNmU2NjQ5OTAx
14
- NzE4ZmQ5NDcxZDE0YzIyZDFkYjViOGEzNGVlY2VjYmFhYjEyNmM3OGFlMDY0
15
- M2RmMmZmMjI1ZDY4NDEzNzRkN2EyMjFkMzliYjE5Yzc3MTBlNTk=
13
+ OWI5MzE3OTM5ZWQ4YTBkZTM3MGUwYWFmNmIyYmZhY2VmYmY2YjI1NTIyYzVm
14
+ YWQwMjYxZmNlMzJhODM2YzRiY2Q3Y2U4MDI5NzVkNzc3MGEyOGRhN2VlM2Qy
15
+ OWNiZmFmMjYxNGUyNzY1NDZiMWUwNzRiNmRhMjI2YWExZDJmMzY=
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.11.3 (November 3rd)
4
+
5
+ * FIX error when attempting to cache empty child collections (@DouweM)
6
+ * FIX bug causing Rails 4 cache digests never to be appended (@DouweM)
7
+
3
8
  ## 0.11.2 (October 26th)
4
9
 
5
10
  * FIX Don't put nil into builder engines when glueing nil object (@DouweM)
data/lib/rabl/engine.rb CHANGED
@@ -55,7 +55,7 @@ module Rabl
55
55
  @_full_cache_key ||= begin
56
56
  cache_key = Array(@_cache_key) + [@_options[:root_name], @_options[:format]]
57
57
 
58
- if digestor_available? && defined?(lookup_context)
58
+ if digestor_available? && respond_to?(:lookup_context) && lookup_context
59
59
  template = @_options[:template] || @virtual_path
60
60
 
61
61
  digest = \
data/lib/rabl/helpers.rb CHANGED
@@ -118,16 +118,14 @@ module Rabl
118
118
  end
119
119
 
120
120
  # Returns an Engine based representation of any data object given ejs template block
121
- # object_to_hash(@user) { attribute :full_name } => { ... }
122
- # object_to_hash(@user, :source => "...") { attribute :full_name } => { ... }
123
- # object_to_hash([@user], :source => "...") { attribute :full_name } => { ... }
121
+ # object_to_engine(@user) { attribute :full_name } => { ... }
122
+ # object_to_engine(@user, :source => "...") { attribute :full_name } => { ... }
123
+ # object_to_engine([@user], :source => "...") { attribute :full_name } => { ... }
124
124
  # options must have :source (rabl file contents)
125
125
  # options can have :source_location (source filename)
126
126
  def object_to_engine(object, options = {}, &block)
127
127
  return if object.nil?
128
128
 
129
- return [] if is_collection?(object) && object.blank? # empty collection
130
-
131
129
  options = {
132
130
  :format => "hash",
133
131
  :view_path => view_path,
data/lib/rabl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rabl
2
- VERSION = "0.11.2"
2
+ VERSION = "0.11.3"
3
3
  end
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.2
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Esquenazi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-26 00:00:00.000000000 Z
11
+ date: 2014-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport