grpc_required_annotator 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1137b3d27d1b455478c786c6df2da4a33b513afdfe7d78840fec1e04a94ebc6c
4
- data.tar.gz: d7cdc0d1040b518741bc9dc05093b8451f4f3edfc44bb81f0f0d61748d178653
3
+ metadata.gz: fd1246c98165921dbf652addda169f842407a316e8214b3477f35a64bcc0b68a
4
+ data.tar.gz: 88e617dec060ade60eb6cab2255d61548296d438bc60c6339f1940ed6861522f
5
5
  SHA512:
6
- metadata.gz: bc0d9bc0b179d0c211b36d09aec429bb80e8bbc9e6cd1e480bfd582a7173d462b895327dfb39788d430b689a6cc7f5d183268a976d7263776889a8c1d1e8edc3
7
- data.tar.gz: 3e4ba2ff99650cf8ff003c9ac5c278919d9fe6834943fced118abf428bc8d755110b1777b5213a655d3523b180e66233a3f35b82c5e90260b2250dc08ba61789
6
+ metadata.gz: f52ce00aa26b0af1eb7aaca19124366b291cc934bfd3860fe9ea02884af11994797ac1b115990704b887030b5e81a9aaff16c09f478cfb20b181cf9158c42d37
7
+ data.tar.gz: 1a312099330e8dea9c8e38c65e40f47bc00b21368b3f28d5134fd156259c3a6449be4e901aa5dc7c59768e53c203dcc9e592473a5e5fd22b0278ac25dad0cc85
@@ -1,3 +1,7 @@
1
+ ## 0.1.2
2
+
3
+ - Fix repeated field validation
4
+
1
5
  ## 0.1.1
2
6
 
3
7
  - update README
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # GrpcRequiredAnnotator [![Gem Version](https://badge.fury.io/rb/grpc_required_annotator.svg)](https://badge.fury.io/rb/grpc_required_annotator) [![Build Status](https://travis-ci.com/euglena1215/grpc_required_annotator.svg?branch=master)](https://travis-ci.com/euglena1215/grpc_required_annotator) [![codecov](https://codecov.io/gh/euglena1215/grpc_required_annotator/branch/master/graph/badge.svg)](https://codecov.io/gh/euglena1215/grpc_required_annotator)
2
2
 
3
- GrpcRequiredAnnotator is a annotator for null validation of gRPC requests using `required`.
3
+ GrpcRequiredAnnotator is an annotator for null validation of gRPC requests using `required`.
4
4
 
5
5
  ### Supported Types
6
6
 
7
7
  - Integer (int64, int32, etc...)
8
8
  - String (string)
9
9
  - Google::Protobuf::FieldMask (field_mask)
10
- - Array (repeated fields)
10
+ - Google::Protobuf::RepeatedField (repeated fields)
11
11
  - Symbol (enum)
12
12
 
13
13
  ### Unsupported Types
@@ -26,7 +26,7 @@ module GrpcRequiredAnnotator
26
26
  raise GRPC::InvalidArgument.new("`#{field}` is required") if value == ""
27
27
  when Google::Protobuf::FieldMask
28
28
  raise GRPC::InvalidArgument.new("`#{field}` is required") if value.paths.empty?
29
- when Array
29
+ when Google::Protobuf::RepeatedField
30
30
  raise GRPC::InvalidArgument.new("`#{field}` is required") if value.empty?
31
31
  when Symbol
32
32
  raise GRPC::InvalidArgument.new("`#{field}` is required") if value.to_s.include?("UNSPECIFIED") # https://developers.google.com/protocol-buffers/docs/style#enums
@@ -1,3 +1,3 @@
1
1
  module GrpcRequiredAnnotator
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grpc_required_annotator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shintani Teppei
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-10 00:00:00.000000000 Z
11
+ date: 2019-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc