rspec-protobuf 0.2.1 → 0.2.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 +7 -0
- data/Gemfile.lock +48 -0
- data/lib/rspec/protobuf/refinements.rb +6 -3
- data/lib/rspec/protobuf/version.rb +1 -1
- data/lib/rspec/protobuf.rb +1 -1
- data/rspec-protobuf.gemspec +2 -1
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 329f818e153685d7b3c9295ca051543fe6915f9277478576892152359ebd6498
|
4
|
+
data.tar.gz: 8b79e6616adac2977f473aac8e7dab6f12efd343b2e2f9af987e597a2ee166dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6597c162046f769e115efbfe4f1a83b027e1d27bf850873c97df598073707156773cd05a61ff771e6e4c626eac182403a21b8c47878adb53663b1da042599de5
|
7
|
+
data.tar.gz: 83458a56e5694c6766c99b4f86ab1eb63b2871adb2c9e559cc1bd045c85855f6fd1629aca670089dd11dbf5b0462bae27da2d000248d0f8ff9c2f7d56570e387
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rspec-protobuf (0.2.3)
|
5
|
+
google-protobuf (>= 3)
|
6
|
+
rspec-expectations (>= 3)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
byebug (11.1.3)
|
12
|
+
codecov (0.6.0)
|
13
|
+
simplecov (>= 0.15, < 0.22)
|
14
|
+
diff-lcs (1.5.0)
|
15
|
+
docile (1.4.0)
|
16
|
+
google-protobuf (3.22.2)
|
17
|
+
rspec (3.12.0)
|
18
|
+
rspec-core (~> 3.12.0)
|
19
|
+
rspec-expectations (~> 3.12.0)
|
20
|
+
rspec-mocks (~> 3.12.0)
|
21
|
+
rspec-core (3.12.0)
|
22
|
+
rspec-support (~> 3.12.0)
|
23
|
+
rspec-expectations (3.12.0)
|
24
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
25
|
+
rspec-support (~> 3.12.0)
|
26
|
+
rspec-mocks (3.12.1)
|
27
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
+
rspec-support (~> 3.12.0)
|
29
|
+
rspec-support (3.12.0)
|
30
|
+
simplecov (0.21.2)
|
31
|
+
docile (~> 1.1)
|
32
|
+
simplecov-html (~> 0.11)
|
33
|
+
simplecov_json_formatter (~> 0.1)
|
34
|
+
simplecov-html (0.12.3)
|
35
|
+
simplecov_json_formatter (0.1.4)
|
36
|
+
|
37
|
+
PLATFORMS
|
38
|
+
ruby
|
39
|
+
|
40
|
+
DEPENDENCIES
|
41
|
+
byebug
|
42
|
+
codecov
|
43
|
+
rspec (>= 3)
|
44
|
+
rspec-protobuf!
|
45
|
+
simplecov
|
46
|
+
|
47
|
+
BUNDLED WITH
|
48
|
+
2.3.17
|
@@ -50,8 +50,10 @@ module RSpec
|
|
50
50
|
if actual_value.is_a?(Google::Protobuf::MessageExts) && expected_value.is_a?(Hash)
|
51
51
|
actual_value.match?(**expected_value)
|
52
52
|
else
|
53
|
-
|
54
|
-
|
53
|
+
unless attrs.key?(field.name.to_sym)
|
54
|
+
# fall back to default value
|
55
|
+
expected_value = field.label == :repeated ? [] : field.default
|
56
|
+
end
|
55
57
|
|
56
58
|
# convert enum to int value to match input type
|
57
59
|
if field.type == :enum && expected_value.is_a?(Integer)
|
@@ -74,7 +76,8 @@ module RSpec
|
|
74
76
|
value = value.normalized_hash
|
75
77
|
end
|
76
78
|
|
77
|
-
|
79
|
+
default = field.label == :repeated ? [] : field.default
|
80
|
+
res[field.name.to_sym] = value unless default == value
|
78
81
|
end
|
79
82
|
|
80
83
|
res
|
data/lib/rspec/protobuf.rb
CHANGED
data/rspec-protobuf.gemspec
CHANGED
@@ -15,9 +15,10 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.files = `git ls-files * ':!:spec'`.split("\n")
|
16
16
|
|
17
17
|
s.add_dependency "google-protobuf", ">= 3"
|
18
|
-
s.add_dependency "rspec", ">= 3"
|
18
|
+
s.add_dependency "rspec-expectations", ">= 3"
|
19
19
|
|
20
20
|
s.add_development_dependency "byebug"
|
21
21
|
s.add_development_dependency "codecov"
|
22
|
+
s.add_development_dependency "rspec", ">= 3"
|
22
23
|
s.add_development_dependency "simplecov"
|
23
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-protobuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Pepper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: rspec
|
28
|
+
name: rspec-expectations
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: simplecov
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,6 +102,7 @@ extra_rdoc_files: []
|
|
88
102
|
files:
|
89
103
|
- CHANGELOG.md
|
90
104
|
- Gemfile
|
105
|
+
- Gemfile.lock
|
91
106
|
- LICENSE.txt
|
92
107
|
- README.md
|
93
108
|
- lib/rspec-protobuf.rb
|