protobuf_nested_struct 1.0.0 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: bae6c6d57359ec2a06c717c132da705bec0f569e
4
- data.tar.gz: 0d11b7bc9dc5ef4a4a10808c33bfc56ba7405e91
2
+ SHA256:
3
+ metadata.gz: 0bad03d31b55acab52ef71a547b313174cca03257d0bbd878143e9042ed28192
4
+ data.tar.gz: 6f91acdb024228400f5cebd586853e0f31d9ca93b18e77b5301529006559506e
5
5
  SHA512:
6
- metadata.gz: 9d506d70254b800a612076f2f5bfd12b12980bd58f479963fe51315e321b1e6e31177a372fe358ea291339900b85f8147f5dc76d46eb75e5bcf9141b9f4eabaf
7
- data.tar.gz: 817930eb2167b5d9f37c1e205b59292cc18b199383ecd0006aa1135ac064b56db27229fec5c33ca8264931ed86b813cf0ae3bc18b1301d8279a4e6327a54f7fb
6
+ metadata.gz: 3ff811c9bf9f8f5208f6f65e86de32222228840f375ae61fa15ca9d251592f89912d553d13049ec4378630f0610df858b805a5996ff34a83271b27e7ca8c912a
7
+ data.tar.gz: 4d93809489f1ae48ecb292c3111766fc314ffbfb13b29ccc89e31721b0f5f1ce0fc64bd9ed88c7a2928a2cd4a56233e5880b94adfdae9693df708e122b7c1915
data/README.md CHANGED
@@ -47,6 +47,13 @@ expect(copy).to eql(obj)
47
47
 
48
48
  where `obj` can be an instance of one of the supported types.
49
49
 
50
+ ## Protobuf schema definition
51
+
52
+ You can use it to generate code for serialization and deserialization in any programming language supported
53
+ by Protobuf.
54
+
55
+ * https://github.com/arkency/protobuf-nested-struct/blob/master/lib/protobuf_nested_struct/struct.proto
56
+
50
57
  ## Development
51
58
 
52
59
  * `bundle install`
@@ -1,18 +1,38 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: date.proto
3
+ # source: google/type/date.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_message "google.type.Date" do
8
- optional :year, :int32, 1
9
- optional :month, :int32, 2
10
- optional :day, :int32, 3
7
+
8
+ descriptor_data = "\n\x16google/type/date.proto\x12\x0bgoogle.type\"0\n\x04\x44\x61te\x12\x0c\n\x04year\x18\x01 \x01(\x05\x12\r\n\x05month\x18\x02 \x01(\x05\x12\x0b\n\x03\x64\x61y\x18\x03 \x01(\x05\x42]\n\x0f\x63om.google.typeB\tDateProtoP\x01Z4google.golang.org/genproto/googleapis/type/date;date\xf8\x01\x01\xa2\x02\x03GTPb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
+ end
11
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
12
32
  end
13
33
 
14
34
  module Google
15
35
  module Type
16
- Date = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.type.Date").msgclass
36
+ Date = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.type.Date").msgclass
17
37
  end
18
38
  end
@@ -1,38 +1,44 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: struct.proto
3
+ # source: protobuf_nested_struct/struct.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
7
  require 'google/protobuf/timestamp_pb'
7
8
  require 'google/type/date_pb'
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_message "protobuf_nested_struct.HashMapStringValue" do
10
- map :fields, :string, :message, 1, "protobuf_nested_struct.Value"
11
- end
12
- add_message "protobuf_nested_struct.Value" do
13
- oneof :kind do
14
- optional :null_value, :enum, 1, "protobuf_nested_struct.NullValue"
15
- optional :double_value, :double, 2
16
- optional :int_value, :int64, 3
17
- optional :string_value, :string, 4
18
- optional :bool_value, :bool, 5
19
- optional :date_value, :message, 6, "google.type.Date"
20
- optional :timestamp_value, :message, 7, "google.protobuf.Timestamp"
21
- optional :string_map_value, :message, 20, "protobuf_nested_struct.HashMapStringValue"
22
- optional :list_value, :message, 21, "protobuf_nested_struct.ListValue"
9
+
10
+
11
+ descriptor_data = "\n#protobuf_nested_struct/struct.proto\x12\x16protobuf_nested_struct\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\"\xaa\x01\n\x12HashMapStringValue\x12\x46\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x36.protobuf_nested_struct.HashMapStringValue.FieldsEntry\x1aL\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.protobuf_nested_struct.Value:\x02\x38\x01\"\x84\x03\n\x05Value\x12\x37\n\nnull_value\x18\x01 \x01(\x0e\x32!.protobuf_nested_struct.NullValueH\x00\x12\x16\n\x0c\x64ouble_value\x18\x02 \x01(\x01H\x00\x12\x13\n\tint_value\x18\x03 \x01(\x03H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x05 \x01(\x08H\x00\x12\'\n\ndate_value\x18\x06 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x35\n\x0ftimestamp_value\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x46\n\x10string_map_value\x18\x14 \x01(\x0b\x32*.protobuf_nested_struct.HashMapStringValueH\x00\x12\x37\n\nlist_value\x18\x15 \x01(\x0b\x32!.protobuf_nested_struct.ListValueH\x00\x42\x06\n\x04kind\":\n\tListValue\x12-\n\x06values\x18\x01 \x03(\x0b\x32\x1d.protobuf_nested_struct.Value*\x1b\n\tNullValue\x12\x0e\n\nNULL_VALUE\x10\x00\x62\x06proto3"
12
+
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError
18
+ # Compatibility code: will be removed in the next major version.
19
+ require 'google/protobuf/descriptor_pb'
20
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
21
+ parsed.clear_dependency
22
+ serialized = parsed.class.encode(parsed)
23
+ file = pool.add_serialized_file(serialized)
24
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
+ imports = [
26
+ ["google.type.Date", "google/type/date.proto"],
27
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
28
+ ]
29
+ imports.each do |type_name, expected_filename|
30
+ import_file = pool.lookup(type_name).file_descriptor
31
+ if import_file.name != expected_filename
32
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
23
33
  end
24
34
  end
25
- add_message "protobuf_nested_struct.ListValue" do
26
- repeated :values, :message, 1, "protobuf_nested_struct.Value"
27
- end
28
- add_enum "protobuf_nested_struct.NullValue" do
29
- value :NULL_VALUE, 0
30
- end
35
+ warn "Each proto file must use a consistent fully-qualified name."
36
+ warn "This will become an error in the next major version."
31
37
  end
32
38
 
33
39
  module ProtobufNestedStruct
34
- HashMapStringValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("protobuf_nested_struct.HashMapStringValue").msgclass
35
- Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("protobuf_nested_struct.Value").msgclass
36
- ListValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("protobuf_nested_struct.ListValue").msgclass
37
- NullValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("protobuf_nested_struct.NullValue").enummodule
40
+ HashMapStringValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protobuf_nested_struct.HashMapStringValue").msgclass
41
+ Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protobuf_nested_struct.Value").msgclass
42
+ ListValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protobuf_nested_struct.ListValue").msgclass
43
+ NullValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protobuf_nested_struct.NullValue").enummodule
38
44
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ProtobufNestedStruct
2
- VERSION = "1.0.0"
4
+ VERSION = "1.2.0"
3
5
  end
@@ -1,65 +1,91 @@
1
- require 'date'
2
- require 'google/protobuf'
3
- require 'google/protobuf/well_known_types'
1
+ # frozen_string_literal: true
4
2
 
5
- require 'protobuf_nested_struct/version'
6
- require 'protobuf_nested_struct/struct_pb'
3
+ require "date"
4
+ require "google/protobuf"
5
+ require "google/protobuf/well_known_types"
6
+
7
+ require "protobuf_nested_struct/version"
8
+ require "protobuf_nested_struct/struct_pb"
7
9
 
8
10
  module ProtobufNestedStruct
9
11
  class Value
12
+ def self.dump(obj)
13
+ v = new
14
+ v.from_ruby(obj)
15
+ encode(v)
16
+ end
17
+
18
+ def self.load(string)
19
+ v = decode(string)
20
+ v.to_ruby
21
+ end
22
+
10
23
  def from_ruby(obj)
11
24
  case obj
12
- when nil
13
- self.null_value = 0
14
- when Integer
15
- self.int_value = obj
16
- when Float
17
- self.double_value = obj
18
- when String
19
- self.string_value = obj
20
- when TrueClass, FalseClass
21
- self.bool_value = obj
22
- when Date
23
- self.date_value = Google::Type::Date.new(day: obj.day, month: obj.month, year: obj.year)
24
- when Time
25
- self.timestamp_value = Google::Protobuf::Timestamp.new.tap{|gpt| gpt.from_time(obj) }
26
- when Hash
27
- self.string_map_value = HashMapStringValue.new.tap{|ps| ps.from_ruby(obj) }
28
- when Array
29
- self.list_value = ListValue.new.tap{|ps| ps.from_ruby(obj) }
30
- else
31
- raise ArgumentError, "not allowed: #{obj.inspect}"
25
+ when nil
26
+ self.null_value = 0
27
+ when Integer
28
+ self.int_value = obj
29
+ when Float
30
+ self.double_value = obj
31
+ when String
32
+ self.string_value = obj
33
+ when TrueClass, FalseClass
34
+ self.bool_value = obj
35
+ when Date
36
+ self.date_value =
37
+ Google::Type::Date.new(day: obj.day, month: obj.month, year: obj.year)
38
+ when Time
39
+ self.timestamp_value =
40
+ Google::Protobuf::Timestamp.new.tap { |gpt| gpt.from_time(obj) }
41
+ when Hash
42
+ self.string_map_value =
43
+ HashMapStringValue.new.tap { |ps| ps.from_ruby(obj) }
44
+ when Array
45
+ self.list_value = ListValue.new.tap { |ps| ps.from_ruby(obj) }
46
+ else
47
+ raise ArgumentError, "not allowed: #{obj.inspect}"
32
48
  end
33
49
  end
34
50
 
35
51
  def to_ruby
36
52
  case kind
37
- when :null_value
38
- nil
39
- when :int_value
40
- int_value
41
- when :double_value
42
- double_value
43
- when :string_value
44
- string_value
45
- when :bool_value
46
- bool_value
47
- when :date_value
48
- Date.new(date_value.year, date_value.month, date_value.day)
49
- when :timestamp_value
50
- timestamp_value.to_time
51
- when :string_map_value
52
- string_map_value.to_ruby
53
- when :list_value
54
- list_value.to_ruby
55
- else
56
- raise ArgumentError
53
+ when :null_value
54
+ nil
55
+ when :int_value
56
+ int_value
57
+ when :double_value
58
+ double_value
59
+ when :string_value
60
+ string_value
61
+ when :bool_value
62
+ bool_value
63
+ when :date_value
64
+ Date.new(date_value.year, date_value.month, date_value.day)
65
+ when :timestamp_value
66
+ timestamp_value.to_time
67
+ when :string_map_value
68
+ string_map_value.to_ruby
69
+ when :list_value
70
+ list_value.to_ruby
71
+ else
72
+ raise ArgumentError
57
73
  end
58
74
  end
59
-
60
75
  end
61
76
 
62
77
  class HashMapStringValue
78
+ def self.dump(obj)
79
+ v = new
80
+ v.from_ruby(obj)
81
+ encode(v)
82
+ end
83
+
84
+ def self.load(string)
85
+ v = decode(string)
86
+ v.to_ruby
87
+ end
88
+
63
89
  def from_ruby(obj)
64
90
  Hash === obj or raise ArgumentError
65
91
  obj.each do |key, value|
@@ -76,27 +102,33 @@ module ProtobufNestedStruct
76
102
  end
77
103
 
78
104
  class ListValue
105
+ def self.dump(obj)
106
+ v = new
107
+ v.from_ruby(obj)
108
+ encode(v)
109
+ end
110
+
111
+ def self.load(string)
112
+ v = decode(string)
113
+ v.to_ruby
114
+ end
115
+
79
116
  def from_ruby(obj)
80
117
  Array === obj or raise ArgumentError
81
118
  values.clear
82
- obj.each do |value|
83
- values << Value.new.tap{|v| v.from_ruby(value) }
84
- end
119
+ obj.each { |value| values << Value.new.tap { |v| v.from_ruby(value) } }
85
120
  end
86
121
 
87
122
  def to_ruby
88
- values.map{|v| v.to_ruby }
123
+ values.map { |v| v.to_ruby }
89
124
  end
90
125
  end
91
126
 
92
127
  def self.dump(obj)
93
- v = Value.new
94
- v.from_ruby(obj)
95
- Value.encode(v)
128
+ Value.dump(obj)
96
129
  end
97
130
 
98
131
  def self.load(string)
99
- v = Value.decode(string)
100
- v.to_ruby
132
+ Value.load(string)
101
133
  end
102
- end
134
+ end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf_nested_struct
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Pankowecki
8
8
  - Arkency
9
- autorequire:
10
- bindir: exe
9
+ bindir: bin
11
10
  cert_chain: []
12
- date: 2018-04-19 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: google-protobuf
@@ -17,115 +16,45 @@ dependencies:
17
16
  requirements:
18
17
  - - ">="
19
18
  - !ruby/object:Gem::Version
20
- version: '0'
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- version: '0'
28
- - !ruby/object:Gem::Dependency
29
- name: bundler
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - "~>"
33
- - !ruby/object:Gem::Version
34
- version: '1.16'
35
- type: :development
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - "~>"
40
- - !ruby/object:Gem::Version
41
- version: '1.16'
42
- - !ruby/object:Gem::Dependency
43
- name: rake
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: '10.0'
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: '10.0'
56
- - !ruby/object:Gem::Dependency
57
- name: rspec
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - "~>"
19
+ version: 3.25.7
20
+ - - "<"
61
21
  - !ruby/object:Gem::Version
62
- version: '3.0'
63
- type: :development
22
+ version: '4'
23
+ type: :runtime
64
24
  prerelease: false
65
25
  version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: '3.0'
70
- - !ruby/object:Gem::Dependency
71
- name: pry
72
- requirement: !ruby/object:Gem::Requirement
73
26
  requirements:
74
27
  - - ">="
75
28
  - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
29
+ version: 3.25.7
30
+ - - "<"
82
31
  - !ruby/object:Gem::Version
83
- version: '0'
84
- - !ruby/object:Gem::Dependency
85
- name: mutant-rspec
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
- description: Serialize primitives and deep structures (array, hash) to protobuf
32
+ version: '4'
33
+ description: 'Serialize primitives and deep structures (array, hash) to protobuf
34
+
35
+ '
99
36
  email:
100
37
  - dev@arkency.com
101
38
  executables: []
102
39
  extensions: []
103
- extra_rdoc_files: []
40
+ extra_rdoc_files:
41
+ - README.md
104
42
  files:
105
- - ".circleci/config.yml"
106
- - ".gitignore"
107
- - ".rspec"
108
- - ".travis.yml"
109
- - Gemfile
110
43
  - README.md
111
- - Rakefile
112
- - bin/console
113
- - bin/setup
114
44
  - lib/google/type/date.proto
115
45
  - lib/google/type/date_pb.rb
116
46
  - lib/protobuf_nested_struct.rb
117
47
  - lib/protobuf_nested_struct/struct.proto
118
48
  - lib/protobuf_nested_struct/struct_pb.rb
119
49
  - lib/protobuf_nested_struct/version.rb
120
- - protobuf_nested_struct.gemspec
121
50
  homepage: https://github.com/arkency/protobuf-nested-struct
122
- licenses: []
51
+ licenses:
52
+ - MIT
123
53
  metadata:
124
- homepage_uri: https://github.com/arkency/protobuf-nested-struct
125
54
  changelog_uri: https://github.com/arkency/protobuf-nested-struct/releases
126
55
  source_code_uri: https://github.com/arkency/protobuf-nested-struct
127
56
  bug_tracker_uri: https://github.com/arkency/protobuf-nested-struct/issues
128
- post_install_message:
57
+ rubygems_mfa_required: 'true'
129
58
  rdoc_options: []
130
59
  require_paths:
131
60
  - lib
@@ -133,16 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
133
62
  requirements:
134
63
  - - ">="
135
64
  - !ruby/object:Gem::Version
136
- version: '0'
65
+ version: '2.7'
137
66
  required_rubygems_version: !ruby/object:Gem::Requirement
138
67
  requirements:
139
68
  - - ">="
140
69
  - !ruby/object:Gem::Version
141
70
  version: '0'
142
71
  requirements: []
143
- rubyforge_project:
144
- rubygems_version: 2.6.13
145
- signing_key:
72
+ rubygems_version: 3.6.7
146
73
  specification_version: 4
147
74
  summary: Serialize primitives and deep structures (array, hash) to protobuf
148
75
  test_files: []
data/.circleci/config.yml DELETED
@@ -1,12 +0,0 @@
1
- version: 2
2
- jobs:
3
- build:
4
- macos:
5
- xcode: "9.3.0"
6
- steps:
7
- - checkout
8
- - run:
9
- name: install+mutate
10
- command: bundle install && bundle exec mutant --include lib --require protobuf_nested_struct --use rspec ProtobufNestedStruct*
11
- environment:
12
- ARCHFLAGS: "-arch x86_64"
data/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
12
- Gemfile.lock
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.5.1
5
- - 2.4.3
6
- - 2.3.7
7
- before_install: gem install bundler -v 1.16.1
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in protobuf-nested-struct.gemspec
6
- gemspec
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "protobuf_nested_struct"
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 DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,35 +0,0 @@
1
-
2
- lib = File.expand_path("../lib", __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "protobuf_nested_struct/version"
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "protobuf_nested_struct"
8
- spec.version = ProtobufNestedStruct::VERSION
9
- spec.authors = ["Robert Pankowecki", "Arkency"]
10
- spec.email = ["dev@arkency.com"]
11
-
12
- spec.summary = %q{Serialize primitives and deep structures (array, hash) to protobuf}
13
- spec.description = %q{Serialize primitives and deep structures (array, hash) to protobuf}
14
- spec.homepage = "https://github.com/arkency/protobuf-nested-struct"
15
- spec.metadata = {
16
- "homepage_uri" => "https://github.com/arkency/protobuf-nested-struct",
17
- "changelog_uri" => "https://github.com/arkency/protobuf-nested-struct/releases",
18
- "source_code_uri" => "https://github.com/arkency/protobuf-nested-struct",
19
- "bug_tracker_uri" => "https://github.com/arkency/protobuf-nested-struct/issues",
20
- }
21
-
22
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
23
- f.match(%r{^(test|spec|features)/})
24
- end
25
- spec.bindir = "exe"
26
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
- spec.require_paths = ["lib"]
28
- spec.add_dependency "google-protobuf"
29
-
30
- spec.add_development_dependency "bundler", "~> 1.16"
31
- spec.add_development_dependency "rake", "~> 10.0"
32
- spec.add_development_dependency "rspec", "~> 3.0"
33
- spec.add_development_dependency "pry"
34
- spec.add_development_dependency "mutant-rspec"
35
- end