gmsc 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +25 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +3 -3
- data/README.md +2 -2
- data/gmsc.gemspec +2 -2
- data/lib/gmsc/version.rb +1 -1
- data/lib/gmsc.rb +4 -4
- data/renovate.json +5 -0
- metadata +12 -10
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d04592b055dbbb67d6913ff4fa4107975d05c60b51fd5c4e8b15c8dc30d832d
|
4
|
+
data.tar.gz: d593661cd92bf2be3a53d969cf4730abe2cbdf9246475f45d605e229d31bcfb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca9e36ec4fcb8f7387e9a41e32bbc57bae2efd004fafe231c4a9987ee35a649cb31b5d45591bee4835bf778fda158fcf8c56452f349673ba0bc1b6376f7e3966
|
7
|
+
data.tar.gz: 2f435ef74ffff2f58e7ea65091e082e6182f6676fe0b9de9bb56840230083e482bcb164053bd0b3d1866eddb6484412d6a58e0d752a3108758b6ae03af85f44c
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
pull_request:
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
|
11
|
+
strategy:
|
12
|
+
matrix:
|
13
|
+
ruby: ["3.2"]
|
14
|
+
gemfile: ["Gemfile"]
|
15
|
+
|
16
|
+
env:
|
17
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v3
|
21
|
+
- uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: ${{ matrix.ruby }}
|
24
|
+
bundler-cache: true
|
25
|
+
- run: bundle exec rake
|
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gmsc (0.0.
|
4
|
+
gmsc (0.0.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
pry-doc (1.0.0)
|
16
16
|
pry (~> 0.11)
|
17
17
|
yard (~> 0.9.11)
|
18
|
-
rake (
|
18
|
+
rake (13.0.3)
|
19
19
|
rspec (3.9.0)
|
20
20
|
rspec-core (~> 3.9.0)
|
21
21
|
rspec-expectations (~> 3.9.0)
|
@@ -39,7 +39,7 @@ DEPENDENCIES
|
|
39
39
|
gmsc!
|
40
40
|
pry
|
41
41
|
pry-doc
|
42
|
-
rake (~>
|
42
|
+
rake (~> 13.0)
|
43
43
|
rspec (~> 3.0)
|
44
44
|
|
45
45
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -59,7 +59,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
59
59
|
|
60
60
|
## Contributing
|
61
61
|
|
62
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
62
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/wantedly/gmsc. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/wantedly/gmsc/blob/master/CODE_OF_CONDUCT.md).
|
63
63
|
|
64
64
|
|
65
65
|
## License
|
@@ -68,4 +68,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
68
68
|
|
69
69
|
## Code of Conduct
|
70
70
|
|
71
|
-
Everyone interacting in the gmsc project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
71
|
+
Everyone interacting in the gmsc project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/wantedly/gmsc/blob/master/CODE_OF_CONDUCT.md).
|
data/gmsc.gemspec
CHANGED
@@ -8,12 +8,12 @@ Gem::Specification.new do |spec|
|
|
8
8
|
|
9
9
|
spec.summary = %q{Converts a gRPC metadata to a Hash which can be safely converted to JSON.}
|
10
10
|
spec.description = %q{Converts a gRPC metadata to a Hash which can be safely converted to JSON.}
|
11
|
-
spec.homepage = "https://github.com/
|
11
|
+
spec.homepage = "https://github.com/wantedly/gmsc"
|
12
12
|
spec.license = "MIT"
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
14
14
|
|
15
15
|
spec.metadata["homepage_uri"] = spec.homepage
|
16
|
-
spec.metadata["source_code_uri"] = "https://github.com/
|
16
|
+
spec.metadata["source_code_uri"] = "https://github.com/wantedly/gmsc"
|
17
17
|
|
18
18
|
# Specify which files should be added to the gem when it is released.
|
19
19
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
data/lib/gmsc/version.rb
CHANGED
data/lib/gmsc.rb
CHANGED
@@ -3,16 +3,16 @@ require "gmsc/version"
|
|
3
3
|
|
4
4
|
module GMSC
|
5
5
|
class << self
|
6
|
-
# @param [{ String => String }] metadata
|
7
|
-
# @return [{ String => String }]
|
6
|
+
# @param [{ String => String, Array<String> }] metadata
|
7
|
+
# @return [{ String => String, Array<String> }]
|
8
8
|
def safe_convert(metadata)
|
9
9
|
h = {}
|
10
10
|
metadata.each do |k, v|
|
11
11
|
if k.match?(/-bin$/)
|
12
12
|
# If the value is binary, encode with Base64
|
13
|
-
h[k] = Base64.strict_encode64(v)
|
13
|
+
h[k] = v.is_a?(Array) ? v.map { |e| Base64.strict_encode64(e) } : Base64.strict_encode64(v)
|
14
14
|
else
|
15
|
-
h[k] = v.encode(Encoding::UTF_8)
|
15
|
+
h[k] = v.is_a?(Array) ? v.map { |e| e.encode(Encoding::UTF_8) } : v.encode(Encoding::UTF_8)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
h
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmsc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nao Minami
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -87,9 +87,10 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
+
- ".github/workflows/test.yml"
|
90
91
|
- ".gitignore"
|
91
92
|
- ".rspec"
|
92
|
-
-
|
93
|
+
- CHANGELOG.md
|
93
94
|
- CODE_OF_CONDUCT.md
|
94
95
|
- Gemfile
|
95
96
|
- Gemfile.lock
|
@@ -101,13 +102,14 @@ files:
|
|
101
102
|
- gmsc.gemspec
|
102
103
|
- lib/gmsc.rb
|
103
104
|
- lib/gmsc/version.rb
|
104
|
-
|
105
|
+
- renovate.json
|
106
|
+
homepage: https://github.com/wantedly/gmsc
|
105
107
|
licenses:
|
106
108
|
- MIT
|
107
109
|
metadata:
|
108
|
-
homepage_uri: https://github.com/
|
109
|
-
source_code_uri: https://github.com/
|
110
|
-
post_install_message:
|
110
|
+
homepage_uri: https://github.com/wantedly/gmsc
|
111
|
+
source_code_uri: https://github.com/wantedly/gmsc
|
112
|
+
post_install_message:
|
111
113
|
rdoc_options: []
|
112
114
|
require_paths:
|
113
115
|
- lib
|
@@ -122,8 +124,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
124
|
- !ruby/object:Gem::Version
|
123
125
|
version: '0'
|
124
126
|
requirements: []
|
125
|
-
rubygems_version: 3.
|
126
|
-
signing_key:
|
127
|
+
rubygems_version: 3.4.10
|
128
|
+
signing_key:
|
127
129
|
specification_version: 4
|
128
130
|
summary: Converts a gRPC metadata to a Hash which can be safely converted to JSON.
|
129
131
|
test_files: []
|