pbbuilder 0.13.2 → 0.14.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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/lib/pbbuilder/errors.rb +2 -0
- data/lib/pbbuilder/handler.rb +2 -0
- data/lib/pbbuilder/pbbuilder.rb +2 -0
- data/lib/pbbuilder/protobuf_extension.rb +2 -0
- data/lib/pbbuilder/railtie.rb +2 -0
- data/lib/pbbuilder/template.rb +7 -5
- data/lib/pbbuilder.rb +2 -0
- data/pbbuilder.gemspec +3 -1
- data/test/pbbuilder_template_test.rb +2 -0
- data/test/pbbuilder_test.rb +2 -0
- data/test/protobuf_extension_test.rb +2 -0
- data/test/test_helper.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: 8d829e7e9831b4b7190db4aa3d426a68b6073156895479d243321692bd653fea
|
4
|
+
data.tar.gz: 72498247f4a3ee30e403e01ed01be4cd68b17c369e5c10ca83a6be97b0397b6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbe8929f56b70421a55902c8b30248740e5bfb68b2f14f1017b384a2a5ce9202ed0bed89ae3c4e8aea011e83e2d7ef36856f1d069f3179cad5e71c5b572b1a1e
|
7
|
+
data.tar.gz: 04dd8c8f46b1f1120e5d3e964cd28efd101dbf44f7f2f08381d7e3e614270b5dc042ff365d944239c9776cdd040ac7add6511c58ab738499f76f9d4e6df2f533
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
|
4
4
|
This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
5
5
|
|
6
|
+
## 0.14.0
|
7
|
+
### Added
|
8
|
+
- Adding `frozen_string_literal: true` to all files.
|
9
|
+
|
6
10
|
## 0.13.2 2023.02.3
|
7
11
|
### Fixed
|
8
12
|
- In case ActiveSupport::Cache::FileStore in Rails is used as a cache, File.atomic_write can have a race condition and fail to rename temporary file. We're attempting to recover from that, by catching this specific error and returning a value.
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/lib/pbbuilder/errors.rb
CHANGED
data/lib/pbbuilder/handler.rb
CHANGED
data/lib/pbbuilder/pbbuilder.rb
CHANGED
data/lib/pbbuilder/railtie.rb
CHANGED
data/lib/pbbuilder/template.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# PbbuilderTemplate is an extension of Pbbuilder to be used as a Rails template
|
2
4
|
# It adds support for partials.
|
3
5
|
class PbbuilderTemplate < Pbbuilder
|
@@ -114,13 +116,13 @@ class PbbuilderTemplate < Pbbuilder
|
|
114
116
|
yield.tap do |value|
|
115
117
|
begin
|
116
118
|
::Rails.cache.write(key, value, options)
|
117
|
-
rescue SystemCallError
|
118
|
-
# In case ActiveSupport::Cache::FileStore in Rails is used as a cache,
|
119
|
-
# File.atomic_write can have a race condition and fail to rename temporary
|
120
|
-
# file. We're attempting to recover from that, by catching this specific
|
119
|
+
rescue ::SystemCallError
|
120
|
+
# In case ActiveSupport::Cache::FileStore in Rails is used as a cache,
|
121
|
+
# File.atomic_write can have a race condition and fail to rename temporary
|
122
|
+
# file. We're attempting to recover from that, by catching this specific
|
121
123
|
# error and returning a value.
|
122
124
|
#
|
123
|
-
# @see https://github.com/rails/rails/pull/44151
|
125
|
+
# @see https://github.com/rails/rails/pull/44151
|
124
126
|
# @see https://github.com/rails/rails/blob/main/activesupport/lib/active_support/core_ext/file/atomic.rb#L50
|
125
127
|
value
|
126
128
|
end
|
data/lib/pbbuilder.rb
CHANGED
data/pbbuilder.gemspec
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
Gem::Specification.new do |spec|
|
2
4
|
spec.name = "pbbuilder"
|
3
|
-
spec.version = "0.
|
5
|
+
spec.version = "0.14.0"
|
4
6
|
spec.authors = ["Bouke van der Bijl"]
|
5
7
|
spec.email = ["bouke@cheddar.me"]
|
6
8
|
spec.homepage = "https://github.com/cheddar-me/pbbuilder"
|
data/test/pbbuilder_test.rb
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pbbuilder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bouke van der Bijl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|