protosum 0.1.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 +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +35 -0
- data/README.md +35 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/go/user/user.pb.go +142 -0
- data/go.mod +5 -0
- data/go.sum +8 -0
- data/lib/protosum/version.rb +3 -0
- data/lib/protosum.rb +6 -0
- data/proto/user.proto +10 -0
- data/protosum.gemspec +40 -0
- data/ruby/proto/user_pb.rb +16 -0
- data/ruby/protosum.rb +9 -0
- metadata +105 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1f9120453176a8a1840012f369f9ec223fef7ae6fd819f2bc0e79fbe21855e2f
|
4
|
+
data.tar.gz: be260736b15cc1af9570678b4615bcaf85a4a5ac8f19bd8e9b8ae7e1d1e27b56
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7cd1b592b6a58064fdfa99bcb67f8297c0152f425b827f727aaf4c49eece8965ef6cd2fdb0121a27cecfda3504d6ddff8acb49442a99c9f849a358fcbd2bd10b
|
7
|
+
data.tar.gz: 6c17825e0a5624d83fa1e4ce95c95612fd24b6f74d18610d9728b83a84b24a4416c277b2988a4978824f78cf16991d0bdfb861de3bef61f4bb9efb7923464c6e
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
protosum (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
diff-lcs (1.5.0)
|
10
|
+
rake (10.5.0)
|
11
|
+
rspec (3.11.0)
|
12
|
+
rspec-core (~> 3.11.0)
|
13
|
+
rspec-expectations (~> 3.11.0)
|
14
|
+
rspec-mocks (~> 3.11.0)
|
15
|
+
rspec-core (3.11.0)
|
16
|
+
rspec-support (~> 3.11.0)
|
17
|
+
rspec-expectations (3.11.0)
|
18
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
19
|
+
rspec-support (~> 3.11.0)
|
20
|
+
rspec-mocks (3.11.0)
|
21
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
22
|
+
rspec-support (~> 3.11.0)
|
23
|
+
rspec-support (3.11.0)
|
24
|
+
|
25
|
+
PLATFORMS
|
26
|
+
ruby
|
27
|
+
|
28
|
+
DEPENDENCIES
|
29
|
+
bundler (~> 1.17)
|
30
|
+
protosum!
|
31
|
+
rake (~> 10.0)
|
32
|
+
rspec (~> 3.0)
|
33
|
+
|
34
|
+
BUNDLED WITH
|
35
|
+
1.17.2
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Protosum
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/protosum`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'protosum'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install protosum
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/protosum.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "protosum"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/go/user/user.pb.go
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2
|
+
// versions:
|
3
|
+
// protoc-gen-go v1.27.1
|
4
|
+
// protoc v3.17.3
|
5
|
+
// source: proto/user.proto
|
6
|
+
|
7
|
+
package userpb
|
8
|
+
|
9
|
+
import (
|
10
|
+
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
11
|
+
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
12
|
+
reflect "reflect"
|
13
|
+
sync "sync"
|
14
|
+
)
|
15
|
+
|
16
|
+
const (
|
17
|
+
// Verify that this generated code is sufficiently up-to-date.
|
18
|
+
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
19
|
+
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
20
|
+
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
21
|
+
)
|
22
|
+
|
23
|
+
type User struct {
|
24
|
+
state protoimpl.MessageState
|
25
|
+
sizeCache protoimpl.SizeCache
|
26
|
+
unknownFields protoimpl.UnknownFields
|
27
|
+
|
28
|
+
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
29
|
+
}
|
30
|
+
|
31
|
+
func (x *User) Reset() {
|
32
|
+
*x = User{}
|
33
|
+
if protoimpl.UnsafeEnabled {
|
34
|
+
mi := &file_proto_user_proto_msgTypes[0]
|
35
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
36
|
+
ms.StoreMessageInfo(mi)
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
func (x *User) String() string {
|
41
|
+
return protoimpl.X.MessageStringOf(x)
|
42
|
+
}
|
43
|
+
|
44
|
+
func (*User) ProtoMessage() {}
|
45
|
+
|
46
|
+
func (x *User) ProtoReflect() protoreflect.Message {
|
47
|
+
mi := &file_proto_user_proto_msgTypes[0]
|
48
|
+
if protoimpl.UnsafeEnabled && x != nil {
|
49
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
50
|
+
if ms.LoadMessageInfo() == nil {
|
51
|
+
ms.StoreMessageInfo(mi)
|
52
|
+
}
|
53
|
+
return ms
|
54
|
+
}
|
55
|
+
return mi.MessageOf(x)
|
56
|
+
}
|
57
|
+
|
58
|
+
// Deprecated: Use User.ProtoReflect.Descriptor instead.
|
59
|
+
func (*User) Descriptor() ([]byte, []int) {
|
60
|
+
return file_proto_user_proto_rawDescGZIP(), []int{0}
|
61
|
+
}
|
62
|
+
|
63
|
+
func (x *User) GetName() string {
|
64
|
+
if x != nil {
|
65
|
+
return x.Name
|
66
|
+
}
|
67
|
+
return ""
|
68
|
+
}
|
69
|
+
|
70
|
+
var File_proto_user_proto protoreflect.FileDescriptor
|
71
|
+
|
72
|
+
var file_proto_user_proto_rawDesc = []byte{
|
73
|
+
0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f,
|
74
|
+
0x74, 0x6f, 0x12, 0x06, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x22, 0x1a, 0x0a, 0x04, 0x55, 0x73,
|
75
|
+
0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
76
|
+
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x19, 0x5a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x3b,
|
77
|
+
0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0xea, 0x02, 0x08, 0x55, 0x73, 0x65, 0x72, 0x50, 0x62, 0x3a,
|
78
|
+
0x3a, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
79
|
+
}
|
80
|
+
|
81
|
+
var (
|
82
|
+
file_proto_user_proto_rawDescOnce sync.Once
|
83
|
+
file_proto_user_proto_rawDescData = file_proto_user_proto_rawDesc
|
84
|
+
)
|
85
|
+
|
86
|
+
func file_proto_user_proto_rawDescGZIP() []byte {
|
87
|
+
file_proto_user_proto_rawDescOnce.Do(func() {
|
88
|
+
file_proto_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_user_proto_rawDescData)
|
89
|
+
})
|
90
|
+
return file_proto_user_proto_rawDescData
|
91
|
+
}
|
92
|
+
|
93
|
+
var file_proto_user_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
94
|
+
var file_proto_user_proto_goTypes = []interface{}{
|
95
|
+
(*User)(nil), // 0: userpb.User
|
96
|
+
}
|
97
|
+
var file_proto_user_proto_depIdxs = []int32{
|
98
|
+
0, // [0:0] is the sub-list for method output_type
|
99
|
+
0, // [0:0] is the sub-list for method input_type
|
100
|
+
0, // [0:0] is the sub-list for extension type_name
|
101
|
+
0, // [0:0] is the sub-list for extension extendee
|
102
|
+
0, // [0:0] is the sub-list for field type_name
|
103
|
+
}
|
104
|
+
|
105
|
+
func init() { file_proto_user_proto_init() }
|
106
|
+
func file_proto_user_proto_init() {
|
107
|
+
if File_proto_user_proto != nil {
|
108
|
+
return
|
109
|
+
}
|
110
|
+
if !protoimpl.UnsafeEnabled {
|
111
|
+
file_proto_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
112
|
+
switch v := v.(*User); i {
|
113
|
+
case 0:
|
114
|
+
return &v.state
|
115
|
+
case 1:
|
116
|
+
return &v.sizeCache
|
117
|
+
case 2:
|
118
|
+
return &v.unknownFields
|
119
|
+
default:
|
120
|
+
return nil
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
type x struct{}
|
125
|
+
out := protoimpl.TypeBuilder{
|
126
|
+
File: protoimpl.DescBuilder{
|
127
|
+
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
128
|
+
RawDescriptor: file_proto_user_proto_rawDesc,
|
129
|
+
NumEnums: 0,
|
130
|
+
NumMessages: 1,
|
131
|
+
NumExtensions: 0,
|
132
|
+
NumServices: 0,
|
133
|
+
},
|
134
|
+
GoTypes: file_proto_user_proto_goTypes,
|
135
|
+
DependencyIndexes: file_proto_user_proto_depIdxs,
|
136
|
+
MessageInfos: file_proto_user_proto_msgTypes,
|
137
|
+
}.Build()
|
138
|
+
File_proto_user_proto = out.File
|
139
|
+
file_proto_user_proto_rawDesc = nil
|
140
|
+
file_proto_user_proto_goTypes = nil
|
141
|
+
file_proto_user_proto_depIdxs = nil
|
142
|
+
}
|
data/go.mod
ADDED
data/go.sum
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
2
|
+
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
3
|
+
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
4
|
+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
5
|
+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
6
|
+
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
7
|
+
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
|
8
|
+
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
data/lib/protosum.rb
ADDED
data/proto/user.proto
ADDED
data/protosum.gemspec
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "protosum/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "protosum"
|
8
|
+
spec.version = Protosum::VERSION
|
9
|
+
spec.authors = ["igsr5"]
|
10
|
+
spec.email = ["i@gsr5.dev"]
|
11
|
+
|
12
|
+
spec.summary = %q{igsr5's test package.}
|
13
|
+
spec.description = %q{igsr5's test package for proto buf}
|
14
|
+
spec.homepage = "https://github.com/igsr5/protosum"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
if spec.respond_to?(:metadata)
|
19
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
20
|
+
|
21
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
22
|
+
spec.metadata["source_code_uri"] = "https://github.com/igsr5/protosum"
|
23
|
+
else
|
24
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
25
|
+
"public gem pushes."
|
26
|
+
end
|
27
|
+
|
28
|
+
# Specify which files should be added to the gem when it is released.
|
29
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
30
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
31
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
32
|
+
end
|
33
|
+
spec.bindir = "exe"
|
34
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
|
+
spec.require_paths = ["ruby"]
|
36
|
+
|
37
|
+
spec.add_development_dependency "bundler", "~> 1.17"
|
38
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
39
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
40
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: proto/user.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("proto/user.proto", :syntax => :proto3) do
|
8
|
+
add_message "userpb.User" do
|
9
|
+
optional :name, :string, 1
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
module UserPb
|
15
|
+
User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("userpb.User").msgclass
|
16
|
+
end
|
data/ruby/protosum.rb
ADDED
metadata
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: protosum
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- igsr5
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-03-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.17'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.17'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description: igsr5's test package for proto buf
|
56
|
+
email:
|
57
|
+
- i@gsr5.dev
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".rspec"
|
64
|
+
- ".travis.yml"
|
65
|
+
- Gemfile
|
66
|
+
- Gemfile.lock
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- bin/console
|
70
|
+
- bin/setup
|
71
|
+
- go.mod
|
72
|
+
- go.sum
|
73
|
+
- go/user/user.pb.go
|
74
|
+
- lib/protosum.rb
|
75
|
+
- lib/protosum/version.rb
|
76
|
+
- proto/user.proto
|
77
|
+
- protosum.gemspec
|
78
|
+
- ruby/proto/user_pb.rb
|
79
|
+
- ruby/protosum.rb
|
80
|
+
homepage: https://github.com/igsr5/protosum
|
81
|
+
licenses: []
|
82
|
+
metadata:
|
83
|
+
allowed_push_host: https://rubygems.org
|
84
|
+
homepage_uri: https://github.com/igsr5/protosum
|
85
|
+
source_code_uri: https://github.com/igsr5/protosum
|
86
|
+
post_install_message:
|
87
|
+
rdoc_options: []
|
88
|
+
require_paths:
|
89
|
+
- ruby
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
requirements: []
|
101
|
+
rubygems_version: 3.0.3.1
|
102
|
+
signing_key:
|
103
|
+
specification_version: 4
|
104
|
+
summary: igsr5's test package.
|
105
|
+
test_files: []
|