blueprinter 0.23.3 → 0.23.4
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 +3 -0
- data/lib/blueprinter/base.rb +21 -0
- data/lib/blueprinter/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: e1aa1bcfca382045f6226af9a0aea0881253b822068f4ca6f27104f49730b924
|
4
|
+
data.tar.gz: 686dbfe541a79021b3a46f9aa81057bd300711b4d5981471da32211286799ebd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 406e68381c243752a35ca3e3c09b8f86b1d3bd0abb1538b2b9b564c14a9057978efef7f62f35ca8f6a6f329c6c7157cf58a5e02b61323a66120200d7123a37cc
|
7
|
+
data.tar.gz: 653cbd876c86a506f437474b6e8b23902122ea1bb1fb12b7f584aaabfe39beeb5e27cd57cd7adad1fcc1d4dc38780ac4684c987ed8f91abf82fc1a7bc34c0e71
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 0.23.4 - 2020/4/28
|
2
|
+
* 🚀 [FEATURE] Public class method `has_view?` on Blueprinter::Base subclasses introduced in [#213](https://github.com/procore/blueprinter/pull/213). Thanks to [@spencerneste](https://github.com/spencerneste).
|
3
|
+
|
1
4
|
## 0.23.3 - 2019/4/7
|
2
5
|
* 🐛 [BUGFIX] Fixes issue where `exclude` fields in deeply nested views were not respected. Resolved issue [207](https://github.com/procore/blueprinter/issues/207) in [#208](https://github.com/procore/blueprinter/pull/208) by [@tpltn](https://github.com/tpltn).
|
3
6
|
|
data/lib/blueprinter/base.rb
CHANGED
@@ -431,5 +431,26 @@ module Blueprinter
|
|
431
431
|
yield
|
432
432
|
@current_view = view_collection[:default]
|
433
433
|
end
|
434
|
+
|
435
|
+
# Check whether or not a Blueprint supports the supplied view.
|
436
|
+
# It accepts a view name.
|
437
|
+
#
|
438
|
+
# @param view_name [Symbol] the view name
|
439
|
+
#
|
440
|
+
# @example With the following Blueprint
|
441
|
+
#
|
442
|
+
# class ExampleBlueprint < Blueprinter::Base
|
443
|
+
# view :custom do
|
444
|
+
# end
|
445
|
+
# end
|
446
|
+
#
|
447
|
+
# ExampleBlueprint.has_view?(:custom) => true
|
448
|
+
# ExampleBlueprint.has_view?(:doesnt_exist) => false
|
449
|
+
#
|
450
|
+
# @return [Boolean] a boolean value indicating if the view is
|
451
|
+
# supported by this Blueprint.
|
452
|
+
def self.has_view?(view_name)
|
453
|
+
view_collection.has_view? view_name
|
454
|
+
end
|
434
455
|
end
|
435
456
|
end
|
data/lib/blueprinter/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blueprinter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.23.
|
4
|
+
version: 0.23.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Hess
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-04-
|
12
|
+
date: 2020-04-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: factory_bot
|