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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '04947d283f28536a499f609e8e25bb4f4ced350b75756b04dcbeb2de71100dc0'
4
- data.tar.gz: ea71156a7134b1378fd829b0b1fd9712ab96b2b7c17d305ef5523e4872424038
3
+ metadata.gz: e1aa1bcfca382045f6226af9a0aea0881253b822068f4ca6f27104f49730b924
4
+ data.tar.gz: 686dbfe541a79021b3a46f9aa81057bd300711b4d5981471da32211286799ebd
5
5
  SHA512:
6
- metadata.gz: 18148f52cda6a721e1b4c99d6b3d41d05bad040339d8c175ffd13f18cbd26dbde193541ebc7b42ce5a5cb6e421489741a1b6b780af3009ee850e87192f3edcea
7
- data.tar.gz: a1b0a95d9a61be97eaffe45f39bb5347840c8dc8b48e553262e34039f79fced01454b6e867d13a2eb2709ad1f7f21915bd23143d77978404c5b382a914b1532f
6
+ metadata.gz: 406e68381c243752a35ca3e3c09b8f86b1d3bd0abb1538b2b9b564c14a9057978efef7f62f35ca8f6a6f329c6c7157cf58a5e02b61323a66120200d7123a37cc
7
+ data.tar.gz: 653cbd876c86a506f437474b6e8b23902122ea1bb1fb12b7f584aaabfe39beeb5e27cd57cd7adad1fcc1d4dc38780ac4684c987ed8f91abf82fc1a7bc34c0e71
@@ -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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Blueprinter
2
- VERSION = '0.23.3'.freeze
2
+ VERSION = '0.23.4'.freeze
3
3
  end
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.3
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-07 00:00:00.000000000 Z
12
+ date: 2020-04-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: factory_bot