protobug_well_known_protos 0.1.0 → 0.2.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c2e12698a08e502fcadd6c11533c55993e75fd2a2f859727a0656545cc94718
|
|
4
|
+
data.tar.gz: bd6946a45157f87f80dc27f099ae1fe5ff95feaf0301c1d17a0f96be87199f3c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8cb42f9f55d0e90a87db11aa629453fe6bbf865f6be2a2315acdb90c7ffe1ee094b87b5ed9208c8b0886b0c190a83163e1f42fc519c4e931ff805ba235e0d992
|
|
7
|
+
data.tar.gz: 204e98f50883f8fc8fb60c386a3a3679cd9f73785521f175f49588174e221ad25f623c023169fb0ce3b17bf69751fbf585737f83992e094eedc177bc9913f6ae
|
|
@@ -31,8 +31,8 @@ Google::Protobuf::Duration.class_eval do
|
|
|
31
31
|
|
|
32
32
|
self.class.validate_json_range(Protobug::EncodeError, seconds, nanos)
|
|
33
33
|
|
|
34
|
-
sign = seconds
|
|
35
|
-
sign = "-" if seconds
|
|
34
|
+
sign = seconds < 0 ? "-" : ""
|
|
35
|
+
sign = "-" if seconds == 0 && nanos < 0
|
|
36
36
|
seconds = seconds.abs
|
|
37
37
|
nanos = nanos.abs
|
|
38
38
|
if nanos.nonzero?
|
|
@@ -43,8 +43,9 @@ Google::Protobuf::Duration.class_eval do
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def self.validate_json_range(err, seconds, nanos)
|
|
46
|
-
if seconds != 0 && nanos != 0 && (seconds
|
|
47
|
-
raise err,
|
|
46
|
+
if seconds != 0 && nanos != 0 && ((seconds < 0) ^ (nanos < 0))
|
|
47
|
+
raise err,
|
|
48
|
+
"seconds and nanos must have the same sign"
|
|
48
49
|
end
|
|
49
50
|
|
|
50
51
|
raise err, "seconds out of range for json duration" if seconds < -315_576_000_000 || seconds > +315_576_000_000
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "date"
|
|
4
|
+
|
|
3
5
|
Google::Protobuf::Timestamp.class_eval do
|
|
4
6
|
def to_time
|
|
5
7
|
Time.at(seconds, nanos, :nanosecond, in: 0)
|
|
@@ -52,7 +54,7 @@ Google::Protobuf::Timestamp.class_eval do
|
|
|
52
54
|
|
|
53
55
|
nanosecs = time.nsec
|
|
54
56
|
|
|
55
|
-
if nanosecs
|
|
57
|
+
if nanosecs > 0
|
|
56
58
|
nanosecs = nanosecs.to_s.rjust(9, "0")
|
|
57
59
|
nil while nanosecs.delete_suffix!("000")
|
|
58
60
|
digits = nanosecs.size
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: protobug_well_known_protos
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Giddins
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-06-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: protobug
|
|
@@ -16,15 +16,15 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.
|
|
19
|
+
version: 0.2.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - '='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0.
|
|
27
|
-
description:
|
|
26
|
+
version: 0.2.0
|
|
27
|
+
description:
|
|
28
28
|
email:
|
|
29
29
|
- segiddins@segiddins.me
|
|
30
30
|
executables: []
|
|
@@ -49,12 +49,12 @@ files:
|
|
|
49
49
|
- lib/google/protobuf/wrappers_pb.rb
|
|
50
50
|
- lib/google/protobuf/wrappers_well_known.rb
|
|
51
51
|
- lib/protobug_well_known_protos.rb
|
|
52
|
-
homepage: https://github.com/segiddins/protobug/blob/v0.
|
|
52
|
+
homepage: https://github.com/segiddins/protobug/blob/v0.2.0/gen/protobug_well_known_protos
|
|
53
53
|
licenses:
|
|
54
54
|
- Unlicense
|
|
55
55
|
metadata:
|
|
56
56
|
rubygems_mfa_required: 'true'
|
|
57
|
-
post_install_message:
|
|
57
|
+
post_install_message:
|
|
58
58
|
rdoc_options: []
|
|
59
59
|
require_paths:
|
|
60
60
|
- lib
|
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
70
70
|
version: '0'
|
|
71
71
|
requirements: []
|
|
72
72
|
rubygems_version: 3.5.9
|
|
73
|
-
signing_key:
|
|
73
|
+
signing_key:
|
|
74
74
|
specification_version: 4
|
|
75
75
|
summary: Compiled protos for protobug from https://github.com/protocolbuffers/protobuf
|
|
76
76
|
(well_known_protos)
|