rabl 0.15.0 → 0.16.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +1 -0
- data/lib/rabl/builder.rb +1 -0
- data/lib/rabl/engine.rb +8 -2
- data/lib/rabl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f23e6e6dfa76ee114ce6cc5f5e4c379dae04b7e41ede5bc138ce257f59d3f4ad
|
4
|
+
data.tar.gz: 63c478811756e206cb13362f09533bc5a32e21487c3cdbc2668e001118d8e663
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6f6c31f7cdcc804ca15f1e528e91f377d8b9f4b628332f9893ce53822a740cce700dbbdc56c229c169d65ab98f404aa9f630c3766bb87fb7fb8225ed02327ff
|
7
|
+
data.tar.gz: 8b824ce587f106f5f9f6115275a2c2a0cd23bf5038307591719153d5ad7568f0798452465663564f0b4fd1b8388f558f93c373572142a110dee8f014ee5cd0ce
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 0.16.1 (Oct 10, 2022)
|
4
|
+
|
5
|
+
* Fix ArgumentError when there are no keyword arguments for Ruby < 2.7 (Thanks @sylvain-8422)
|
6
|
+
|
7
|
+
## 0.16.0 (August 21, 2022)
|
8
|
+
|
9
|
+
* Add "except" option to `extends` (Thanks @perryqh)
|
10
|
+
* Fix `ArgumentError` when block given with keyword arguments (Thanks @kyoshidajp)
|
11
|
+
* Add Ruby 3.1 to the CI matrix (Thanks @petergoldstein)
|
12
|
+
* Document Rabl setting `oj`'s mode (Thanks @ghiculescu)
|
13
|
+
|
3
14
|
## 0.15.0 (December 30, 2021)
|
4
15
|
|
5
16
|
* Support for Rails 7 (@tagliala)
|
data/README.md
CHANGED
data/lib/rabl/builder.rb
CHANGED
@@ -153,6 +153,7 @@ module Rabl
|
|
153
153
|
# node(:foo, :if => lambda { |m| m.foo.present? }) { "bar" }
|
154
154
|
def node(name, options = {}, &block)
|
155
155
|
return unless resolve_condition(options)
|
156
|
+
return if @options.has_key?(:except) && [@options[:except]].flatten.include?(name)
|
156
157
|
|
157
158
|
result = block.call(@_object)
|
158
159
|
if name.present?
|
data/lib/rabl/engine.rb
CHANGED
@@ -356,8 +356,14 @@ module Rabl
|
|
356
356
|
end
|
357
357
|
|
358
358
|
# Supports calling helpers defined for the template context_scope using method_missing hook
|
359
|
-
def method_missing(name, *args, &block)
|
360
|
-
context_scope.respond_to?(name, true)
|
359
|
+
def method_missing(name, *args, **kwargs, &block)
|
360
|
+
return super unless context_scope.respond_to?(name, true)
|
361
|
+
|
362
|
+
if kwargs.empty?
|
363
|
+
context_scope.__send__(name, *args, &block)
|
364
|
+
else
|
365
|
+
context_scope.__send__(name, *args, **kwargs, &block)
|
366
|
+
end
|
361
367
|
end
|
362
368
|
|
363
369
|
def copy_instance_variables_from(object, exclude = []) #:nodoc:
|
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.
|
4
|
+
version: 0.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Esquenazi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|