rabl 0.15.0 → 0.16.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fb8310726d92ea377d5be433f173207997ea6cc7e3a4a3faefe71b7de5b5df2
4
- data.tar.gz: e75ceb99863c03bff3093983da87c83e79a02c8f1d74cc2ca6dd6c4755fd8404
3
+ metadata.gz: 91c470d38efde97412e3291ae2445165daecbd06410818ad0043c8398acff5c6
4
+ data.tar.gz: 6dd9d32a042987020e50a05d4e164ab6d616345e0696e2d411fc74acf0b65781
5
5
  SHA512:
6
- metadata.gz: 2fc9988668325cc4dd12e75a774d14f6be984a83d2ed043712536d3753d6ae70b71d09d6784120f82b2c75809ed8d446c1965e56fcac1ddbc9c4bace259fc342
7
- data.tar.gz: 58a0105a9fdf9e016ddee845ca3a4fde7fb0944a1792230f878ce380d2b9778e8d82da3722ba89d1702442e3d539c4db071ff56e201f596625d12f9ffaa90585
6
+ metadata.gz: 4ecb3137c900dcf729baec44e89e9d626d108f7ac3d6ae476c64586e26aaee6b27f0a3a08a0a7232f87fe243292802c0f3c96fc9d51fb8c1faa0df5608ff2627
7
+ data.tar.gz: 51f138ada14f33aa10ddddf10f488a8042d9fe43a5cf3e2ab472f1c8b7487e28034ebac9953c6c33de81586464e6610b430f3cdb90d92772c3b05152300e7dbd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.16.0 (August 21, 2022)
4
+
5
+ * Add "except" option to `extends` (Thanks @perryqh)
6
+ * Fix `ArgumentError` when block given with keyword arguments (Thanks @kyoshidajp)
7
+ * Add Ruby 3.1 to the CI matrix (Thanks @petergoldstein)
8
+ * Document Rabl setting `oj`'s mode (Thanks @ghiculescu)
9
+
3
10
  ## 0.15.0 (December 30, 2021)
4
11
 
5
12
  * Support for Rails 7 (@tagliala)
data/README.md CHANGED
@@ -51,6 +51,7 @@ or add to your Gemfile:
51
51
  # Gemfile
52
52
  gem 'rabl'
53
53
  # Also add either `oj` or `yajl-ruby` as the JSON parser
54
+ # If using `oj`, Rabl will set the mode to :compat
54
55
  gem 'oj'
55
56
  ```
56
57
 
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,8 @@ 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) ? context_scope.__send__(name, *args, &block) : super
359
+ def method_missing(name, *args, **kwargs, &block)
360
+ context_scope.respond_to?(name, true) ? context_scope.__send__(name, *args, **kwargs, &block) : super
361
361
  end
362
362
 
363
363
  def copy_instance_variables_from(object, exclude = []) #:nodoc:
data/lib/rabl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rabl
2
- VERSION = "0.15.0"
2
+ VERSION = "0.16.0"
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.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Esquenazi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-30 00:00:00.000000000 Z
11
+ date: 2022-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport