gmsc 0.0.1 → 0.0.2

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: 958c265acfc8fc6d3e6432a8fba5c0b476c0630c02dc0fe080a4b00082c022bd
4
- data.tar.gz: f68ca9f824f28238c89a1f8c4b99182a84fefbd1a7e271dfa2dc12d0838d34d9
3
+ metadata.gz: 3d04592b055dbbb67d6913ff4fa4107975d05c60b51fd5c4e8b15c8dc30d832d
4
+ data.tar.gz: d593661cd92bf2be3a53d969cf4730abe2cbdf9246475f45d605e229d31bcfb6
5
5
  SHA512:
6
- metadata.gz: c79c1a27d5b6e6ee6f431b1738e8fadb5298db57075408d2504b8a47487909f41d0eb534624c4775aa931d03b19d3297292c8bf5ea11bb02e3703b16b45fa1f3
7
- data.tar.gz: 15cb15cf99a6d41dc6f32db1a2e3d0b22670e4a15d13492dc1438ca204c8662c5c014084b27bf326adcacb17900ad252fb9774bfd3e913eeff436e464f3043d3
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
@@ -0,0 +1,8 @@
1
+ ## 0.0.2
2
+
3
+ - Support Array
4
+
5
+ ## 0.0.1
6
+
7
+ Initial release
8
+
data/Gemfile CHANGED
@@ -3,5 +3,5 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in gmsc.gemspec
4
4
  gemspec
5
5
 
6
- gem "rake", "~> 12.0"
6
+ gem "rake", "~> 13.0"
7
7
  gem "rspec", "~> 3.0"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gmsc (0.0.1)
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 (12.3.3)
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 (~> 12.0)
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/south37/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/south37/gmsc/blob/master/CODE_OF_CONDUCT.md).
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/south37/gmsc/blob/master/CODE_OF_CONDUCT.md).
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/south37/gmsc"
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/south37/gmsc"
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
@@ -1,3 +1,3 @@
1
1
  module GMSC
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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
data/renovate.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": [
3
+ "config:base"
4
+ ]
5
+ }
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.1
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: 2019-12-09 00:00:00.000000000 Z
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
- - ".travis.yml"
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
- homepage: https://github.com/south37/gmsc
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/south37/gmsc
109
- source_code_uri: https://github.com/south37/gmsc
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.1.0.pre3
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: []
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.6.3
6
- before_install: gem install bundler -v 2.1.0.pre.3