blueprinter 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -2
- data/lib/blueprinter/base.rb +4 -1
- data/lib/blueprinter/version.rb +1 -1
- data/lib/blueprinter/view_collection.rb +2 -0
- 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: 2f9861d74164769103ef0e80689c8685cc1ba1fee08ef296b5dd3c383dec6403
|
4
|
+
data.tar.gz: bb5a57d899eae1e5d3cf1bd4deef908ea7e34988d5bfd1284e75e8835a5208bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d40d6f6934605ae6e261af6ddf06161c303f3db1abc816bbdd6fa233a68c9fc9f643e8043f582f4240a0d9498646aba2ce3411dcc22dc8b17b9b6e121b970bcd
|
7
|
+
data.tar.gz: e69239f8a8578eee50c6a54ff6e6b733e1c052e60bff7871a1fa3df975f8fe20e30c0589b75e207267c98cf6e709d18a333b84ab24c2b9bf72df5b966296b830
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
-
## 0.
|
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/
|
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
|
data/lib/blueprinter/base.rb
CHANGED
@@ -157,7 +157,10 @@ module Blueprinter
|
|
157
157
|
|
158
158
|
field(
|
159
159
|
method,
|
160
|
-
options.merge(
|
160
|
+
options.merge(
|
161
|
+
association: true,
|
162
|
+
extractor: options.fetch(:extractor) { AssociationExtractor.new },
|
163
|
+
),
|
161
164
|
&block
|
162
165
|
)
|
163
166
|
end
|
data/lib/blueprinter/version.rb
CHANGED
@@ -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.
|
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-
|
12
|
+
date: 2019-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: factory_bot
|