blueprinter 0.25.2 → 0.25.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -13
- data/lib/blueprinter/version.rb +1 -1
- data/lib/blueprinter/view_collection.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: c73ede4fa027d590c7a520d8dd04d3a81309402c1d0b02995d4170020f835d6d
|
4
|
+
data.tar.gz: 200760f033f25b31f170c97b98a274689209d921ab6f59f2f9069f06415abd90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97c8e428e09a65b3b44201201734441b84593932b4eda0ae3a30f081c0154802f9c808137df3c9ee8d5df2bb9d24cd06b2b327d45b8a24c59511e36905f1a307
|
7
|
+
data.tar.gz: 60c6456f14b0b3fc41e0539997b569ff80b376f8c4534b82151acfe0b010b04b2db28bfb3ec1ed5c0818008688b68e2b1e63d3fe802ed281f50e7d7db77d42c7
|
data/CHANGELOG.md
CHANGED
@@ -1,28 +1,31 @@
|
|
1
|
+
## 0.25.3 - 2021/03/03
|
2
|
+
* 🐛 [BUGFIX] Fixes issue where fields and associations that are redefined by later views were not properly overwritten. See [#201](https://github.com/procore/blueprinter/pull/201) thanks to [@Berardpi](https://github.com/Berardpi).
|
3
|
+
|
1
4
|
## 0.25.2 - 2020/11/19
|
2
|
-
* 🚀 [FEATURE] Make deprecation behavior configurable (`:silence`, `:stderror`, `:raise`). See [#248](https://github.com/procore/blueprinter/pull/248) thanks to [@mcclayton](https://github.com/mcclayton)
|
5
|
+
* 🚀 [FEATURE] Make deprecation behavior configurable (`:silence`, `:stderror`, `:raise`). See [#248](https://github.com/procore/blueprinter/pull/248) thanks to [@mcclayton](https://github.com/mcclayton).
|
3
6
|
|
4
|
-
## 0.25.1 - 2020/
|
5
|
-
* 🐛 [BUGFIX] Raise Blueprinter::BlueprinterError if Blueprint given is not of class Blueprinter::Base. Before it just raised a generic `undefined method 'prepare'`. See [#233](https://github.com/procore/blueprinter/pull/233) thanks to [@caws](https://github.com/caws)
|
7
|
+
## 0.25.1 - 2020/08/18
|
8
|
+
* 🐛 [BUGFIX] Raise Blueprinter::BlueprinterError if Blueprint given is not of class Blueprinter::Base. Before it just raised a generic `undefined method 'prepare'`. See [#233](https://github.com/procore/blueprinter/pull/233) thanks to [@caws](https://github.com/caws).
|
6
9
|
|
7
|
-
## 0.25.0 - 2020/
|
10
|
+
## 0.25.0 - 2020/07/06
|
8
11
|
* 🚀 [FEATURE] Enable default `Blueprinter::Transformer`s to be set in the global configuration. [#222](https://github.com/procore/blueprinter/pull/222). Thanks to [@supremebeing7](https://github.com/supremebeing7).
|
9
12
|
|
10
|
-
## 0.24.0 - 2020/
|
13
|
+
## 0.24.0 - 2020/06/22
|
11
14
|
* 🚀 [FEATURE] Add an `options` option to associations to facilitate passing options from one blueprint to another. [#220](https://github.com/procore/blueprinter/pull/220). Thanks to [@mcclayton](https://github.com/mcclayton).
|
12
15
|
|
13
|
-
## 0.23.4 - 2020/
|
16
|
+
## 0.23.4 - 2020/04/28
|
14
17
|
* 🚀 [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).
|
15
18
|
|
16
|
-
## 0.23.3 - 2020/
|
19
|
+
## 0.23.3 - 2020/04/07
|
17
20
|
* 🐛 [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).
|
18
21
|
|
19
|
-
## 0.23.2 - 2020/
|
22
|
+
## 0.23.2 - 2020/03/16
|
20
23
|
* 🐛 [BUGFIX] Fixes issue where fields "bled" into other views due to merge side-effects. Resolved issue [205](https://github.com/procore/blueprinter/issues/205) in [#204](https://github.com/procore/blueprinter/pull/204) by [@trevorrjohn](https://github.com/trevorrjohn).
|
21
24
|
|
22
|
-
## 0.23.1 - 2020/
|
25
|
+
## 0.23.1 - 2020/03/13
|
23
26
|
* 🐛 [BUGFIX] Fixes #172 where views would unintentionally ignore `sort_fields_by: :definition` configuration. Resolved in [#197](https://github.com/procore/blueprinter/pull/197) by [@wlkrw](https://github.com/wlkrw).
|
24
27
|
|
25
|
-
## 0.23.0 - 2020/
|
28
|
+
## 0.23.0 - 2020/01/31
|
26
29
|
* 🚀 [FEATURE] Configurable default extractor introduced in [#198](https://github.com/procore/blueprinter/pull/198) by [@wlkrw](https://github.com/wlkrw). You can now set a default extractor like so:
|
27
30
|
```
|
28
31
|
Blueprinter.configure do |config|
|
@@ -78,15 +81,15 @@ end
|
|
78
81
|
* 🚀 [FEATURE] Added an option to render with a root key. [#135](https://github.com/procore/blueprinter/pull/135). Thanks to [@ritikesh](https://github.com/ritikesh).
|
79
82
|
* 🚀 [FEATURE] Added an option to render with a top-level meta attribute. [#135](https://github.com/procore/blueprinter/pull/135). Thanks to [@ritikesh](https://github.com/ritikesh).
|
80
83
|
|
81
|
-
## 0.12.1 - 2019/
|
84
|
+
## 0.12.1 - 2019/01/24
|
82
85
|
|
83
86
|
* 🐛 [BUGFIX] Fix boolean `false` values getting serialized as `null`. Please see PR [#132](https://github.com/procore/blueprinter/pull/132). Thanks to [@samsongz](https://github.com/samsongz).
|
84
87
|
|
85
|
-
## 0.12.0 - 2019/
|
88
|
+
## 0.12.0 - 2019/01/16
|
86
89
|
|
87
90
|
* 🚀 [FEATURE] Enables the setting of global `:field_default` and `:association_default` option value in the Blueprinter Configuration that will be used as default values for fields and associations that evaluate to nil. [#128](https://github.com/procore/blueprinter/pull/128). Thanks to [@mcclayton](https://github.com/mcclayton).
|
88
91
|
|
89
|
-
## 0.11.0 - 2019/
|
92
|
+
## 0.11.0 - 2019/01/15
|
90
93
|
|
91
94
|
* 🚀 [FEATURE] Enables the setting of a global `:if`/`:unless` proc in the Blueprinter Configuration that will be used to evaluate the conditional render of all fields. [#127](https://github.com/procore/blueprinter/pull/127). Thanks to [@mcclayton](https://github.com/mcclayton).
|
92
95
|
|
data/lib/blueprinter/version.rb
CHANGED
@@ -48,7 +48,6 @@ module Blueprinter
|
|
48
48
|
def sortable_fields(view_name)
|
49
49
|
excluded_fields = {}
|
50
50
|
fields = views[:default].fields
|
51
|
-
fields = merge_fields(fields, views[view_name].fields)
|
52
51
|
views[view_name].included_view_names.each do |included_view_name|
|
53
52
|
next if view_name == included_view_name
|
54
53
|
|
@@ -56,6 +55,7 @@ module Blueprinter
|
|
56
55
|
fields = merge_fields(fields, view_fields)
|
57
56
|
excluded_fields.merge!(view_excluded_fields)
|
58
57
|
end
|
58
|
+
fields = merge_fields(fields, views[view_name].fields)
|
59
59
|
|
60
60
|
views[view_name].excluded_field_names.each { |name| excluded_fields[name] = nil }
|
61
61
|
|
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.25.
|
4
|
+
version: 0.25.3
|
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:
|
12
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: factory_bot
|