jbuilder-schema 2.0.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59f54a84c849a2b5575b89b9cfd959976d2fdd61224ccb12aad01a1bb2acfa2c
4
- data.tar.gz: a927e3272a2dee69f3ead47da2d47470e99ff911a54cbde13f807f9ba32036ef
3
+ metadata.gz: 475aa6226a8439f15059d59b79e0e2b0fad03e725c75f462be7aea3b070f5b27
4
+ data.tar.gz: c93e583024e7ad2af6208b3913f7e1c74b8166740c3ca3c3d2a4b8d4105ed2a6
5
5
  SHA512:
6
- metadata.gz: 035745d04230e753d8df7a1811c139b9ab5b49eb7c3d7606485a086208c0150c9b4123ecc52d3f69a41432af497dc3973cd70db3f0b722e5162c0147f84a3289
7
- data.tar.gz: 20f2caceef04841ce35529b00bfac43a7aa29518102626a76f5d61763a72b0dffa04756f80fe2167592a7e91534c0e65efb17e315bd57aa117d43f80751eb018
6
+ metadata.gz: e286e0531d82ba6b3031925b0a82bd70b66e11497a086bd90abe47aeceff1d6c5d8438b82e98f632058a3953a16c1355638143732a97ef2bc36235071ff92270
7
+ data.tar.gz: ea53e46e9a812b5345a4df0ff92df7fa91c2263de5e636c5afac16becad88febf445fdd0ee37d062a270a0b80f341c69e6302c1a53c2108cded1b1089374cd5f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jbuilder-schema (2.0.0)
4
+ jbuilder-schema (2.0.2)
5
5
  jbuilder
6
6
  rails (>= 5.0.0)
7
7
 
@@ -18,7 +18,8 @@ class Jbuilder::Schema::Renderer
18
18
  end
19
19
 
20
20
  def render(object = nil, title: nil, description: nil, assigns: nil, **options)
21
- options.merge! partial: object.to_partial_path, object: object if object
21
+ partial_path = object.respond_to?(:to_partial_path_for_jbuilder_schema) ? object.to_partial_path_for_jbuilder_schema : object.to_partial_path
22
+ options.merge! partial: partial_path, object: object if object
22
23
 
23
24
  options[:locals] ||= {}
24
25
  options[:locals].merge! @default_locals if @default_locals
@@ -1,4 +1,4 @@
1
1
  # We can't use the standard `Jbuilder::Schema::VERSION =` because
2
2
  # `Jbuilder` isn't a regular module namespace, but a class …which also loads Active Support.
3
3
  # So we use trickery, and assign the proper version once `jbuilder/schema.rb` is loaded.
4
- JBUILDER_SCHEMA_VERSION = "2.0.0"
4
+ JBUILDER_SCHEMA_VERSION = "2.0.2"
@@ -1,9 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "active_support/core_ext/module/delegation"
4
+ require "jbuilder/schema/version"
4
5
 
5
6
  class Jbuilder::Schema
6
- VERSION = JBUILDER_SCHEMA_VERSION # See `jbuilder/schema/version.rb`
7
+ VERSION = "2.0.2" # TODO Fix this. It's throwing errors when including the Ruby gem in downstream projects.
7
8
 
8
9
  module IgnoreSchemaMeta
9
10
  ::Jbuilder.prepend self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jbuilder-schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuri Sidorov