blueprinter 0.16.0 → 0.17.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: e0063edea4645668b9ed423eca8e3ebd926227084216a795f34e4d7c1c4aaf65
4
- data.tar.gz: d0cb833cbc3cae7fd7290560e170dc21825179f2a268a81de216cc8ad2bb42d2
3
+ metadata.gz: 2f9861d74164769103ef0e80689c8685cc1ba1fee08ef296b5dd3c383dec6403
4
+ data.tar.gz: bb5a57d899eae1e5d3cf1bd4deef908ea7e34988d5bfd1284e75e8835a5208bb
5
5
  SHA512:
6
- metadata.gz: 72eca578378f6c66306e48e790332321141b31c07c66d40e3faac6da513ea6e43a19c8b56a062c3b92c320903956ba7211bb97d2fd32fa18c2dd1cd2b302cfef
7
- data.tar.gz: 2946724076faa04dd6a0aabd85c1b2e92ff5f9bba4466c3c06de419ad7c11b50c48591d336e6e5aa19a66c23e9fd791b53aa48fe9aa6c243da6b0402845e0728
6
+ metadata.gz: d40d6f6934605ae6e261af6ddf06161c303f3db1abc816bbdd6fa233a68c9fc9f643e8043f582f4240a0d9498646aba2ce3411dcc22dc8b17b9b6e121b970bcd
7
+ data.tar.gz: e69239f8a8578eee50c6a54ff6e6b733e1c052e60bff7871a1fa3df975f8fe20e30c0589b75e207267c98cf6e709d18a333b84ab24c2b9bf72df5b966296b830
@@ -1,7 +1,12 @@
1
- ## 0.16.0 - 2019/04/3
1
+ ## 0.17.0 - 2019/05/23
2
+ * 🐛 [BUGFIX] Fixing view: :identifier including non-identifier fields. [#154](https://github.com/procore/blueprinter/pull/154). Thanks to [@AllPurposeName](https://github.com/AllPurposeName).
3
+
4
+ * 💅 [ENHANCEMENT] Add ability to override :extractor option for an ::association. [#152](https://github.com/procore/blueprinter/pull/152). Thanks to [@hugopeixoto](https://github.com/hugopeixoto).
5
+
6
+ ## 0.16.0 - 2019/04/03
2
7
  * 🚀 [FEATURE] Add ability to exclude multiple fields inline using `excludes`. [#141](https://github.com/procore/blueprinter/pull/141). Thanks to [@pabhinaya](https://github.com/pabhinaya).
3
8
 
4
- ## 0.15.0 - 2019/04/1
9
+ ## 0.15.0 - 2019/04/01
5
10
  * 🚀 [FEATURE] Add ability to pass in `datetime_format` field option as either a string representing the strftime format, or a Proc which takes in the Date or DateTime object and returns the formatted date. [#145](https://github.com/procore/blueprinter/pull/145). Thanks to [@mcclayton](https://github.com/mcclayton).
6
11
 
7
12
  ## 0.14.0 - 2019/04/01
@@ -157,7 +157,10 @@ module Blueprinter
157
157
 
158
158
  field(
159
159
  method,
160
- options.merge(association: true, extractor: AssociationExtractor.new),
160
+ options.merge(
161
+ association: true,
162
+ extractor: options.fetch(:extractor) { AssociationExtractor.new },
163
+ ),
161
164
  &block
162
165
  )
163
166
  end
@@ -1,3 +1,3 @@
1
1
  module Blueprinter
2
- VERSION = '0.16.0'
2
+ VERSION = '0.17.0'
3
3
  end
@@ -21,6 +21,8 @@ module Blueprinter
21
21
  end
22
22
 
23
23
  def fields_for(view_name)
24
+ return identifier_fields if view_name == :identifier
25
+
24
26
  fields = sortable_fields(view_name).values
25
27
  sorted_fields = sort_by_definition ? fields : fields.sort_by(&:name)
26
28
  identifier_fields + sorted_fields
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.16.0
4
+ version: 0.17.0
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: 2019-04-04 00:00:00.000000000 Z
12
+ date: 2019-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: factory_bot