protobuf 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +9 -0
- data/README.md +3 -1
- data/Rakefile +5 -5
- data/lib/protobuf/enum_value.rb +9 -2
- data/lib/protobuf/version.rb +1 -1
- data/protobuf.gemspec +2 -2
- data/spec/benchmark/tasks.rb +7 -1
- data/spec/lib/protobuf/enum_value_spec.rb +1 -0
- metadata +4 -35
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# protobuf
|
2
2
|
|
3
|
-
|
3
|
+
[![Build Status](https://secure.travis-ci.org/localshred/protobuf.png?branch=master)](https://travis-ci.org/localshred/protobuf)
|
4
|
+
|
5
|
+
***IMPORTANT: Those upgrading from version 1.4.2 to 2.X should read the [UPGRADING.md](https://github.com/localshred/protobuf/blob/master/UPGRADING.md) notes***
|
4
6
|
|
5
7
|
Protobuf is an implementation of [Google's protocol buffers][google-pb] in ruby. We currently support version 2.4.0. It's a gem for managing 3 things:
|
6
8
|
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ $:.push File.expand_path("./", File.dirname(__FILE__))
|
|
2
2
|
$:.push File.expand_path("./spec", File.dirname(__FILE__))
|
3
3
|
|
4
4
|
require "bundler/gem_tasks"
|
5
|
-
require "benchmark/tasks"
|
5
|
+
# require "benchmark/tasks"
|
6
6
|
|
7
7
|
require 'rspec/core/rake_task'
|
8
8
|
|
@@ -12,9 +12,9 @@ task :default => :spec
|
|
12
12
|
desc "Run specs"
|
13
13
|
RSpec::Core::RakeTask.new(:spec)
|
14
14
|
|
15
|
-
##
|
15
|
+
##
|
16
16
|
# Rake-compiler
|
17
17
|
#
|
18
|
-
require 'rake/extensiontask'
|
19
|
-
|
20
|
-
Rake::ExtensionTask.new("ruby_generator")
|
18
|
+
# require 'rake/extensiontask'
|
19
|
+
#
|
20
|
+
# Rake::ExtensionTask.new("ruby_generator")
|
data/lib/protobuf/enum_value.rb
CHANGED
@@ -26,8 +26,15 @@ module Protobuf
|
|
26
26
|
self.to_i
|
27
27
|
end
|
28
28
|
|
29
|
-
def to_s
|
30
|
-
|
29
|
+
def to_s(format = :value_string)
|
30
|
+
case format
|
31
|
+
when :value_string then
|
32
|
+
self.to_i.to_s
|
33
|
+
when :name then
|
34
|
+
name.to_s
|
35
|
+
else
|
36
|
+
self.to_i.to_s
|
37
|
+
end
|
31
38
|
end
|
32
39
|
end
|
33
40
|
end
|
data/lib/protobuf/version.rb
CHANGED
data/protobuf.gemspec
CHANGED
@@ -29,11 +29,11 @@ Gem::Specification.new do |s|
|
|
29
29
|
|
30
30
|
s.add_development_dependency 'eventmachine'
|
31
31
|
s.add_development_dependency 'ffi-rzmq'
|
32
|
-
s.add_development_dependency 'perftools.rb'
|
32
|
+
# s.add_development_dependency 'perftools.rb'
|
33
33
|
s.add_development_dependency 'pry'
|
34
34
|
s.add_development_dependency 'pry-nav'
|
35
35
|
s.add_development_dependency 'rake'
|
36
|
-
s.add_development_dependency 'rake-compiler'
|
36
|
+
# s.add_development_dependency 'rake-compiler'
|
37
37
|
s.add_development_dependency 'rspec'
|
38
38
|
s.add_development_dependency 'simplecov'
|
39
39
|
s.add_development_dependency 'yard'
|
data/spec/benchmark/tasks.rb
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
require 'benchmark'
|
2
2
|
require 'support/all'
|
3
3
|
require 'support/test/resource_service'
|
4
|
-
|
4
|
+
|
5
|
+
begin
|
6
|
+
require 'perftools'
|
7
|
+
rescue LoadError
|
8
|
+
$stderr.puts 'perftools must be uncommented in the gemspec before you can run this benchmark task'
|
9
|
+
exit(1)
|
10
|
+
end
|
5
11
|
|
6
12
|
# Including a way to turn on debug logger for spec runs
|
7
13
|
if ENV["DEBUG"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protobuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -108,22 +108,6 @@ dependencies:
|
|
108
108
|
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: perftools.rb
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
|
-
requirements:
|
116
|
-
- - ! '>='
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
119
|
-
type: :development
|
120
|
-
prerelease: false
|
121
|
-
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
|
-
requirements:
|
124
|
-
- - ! '>='
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version: '0'
|
127
111
|
- !ruby/object:Gem::Dependency
|
128
112
|
name: pry
|
129
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,22 +156,6 @@ dependencies:
|
|
172
156
|
- - ! '>='
|
173
157
|
- !ruby/object:Gem::Version
|
174
158
|
version: '0'
|
175
|
-
- !ruby/object:Gem::Dependency
|
176
|
-
name: rake-compiler
|
177
|
-
requirement: !ruby/object:Gem::Requirement
|
178
|
-
none: false
|
179
|
-
requirements:
|
180
|
-
- - ! '>='
|
181
|
-
- !ruby/object:Gem::Version
|
182
|
-
version: '0'
|
183
|
-
type: :development
|
184
|
-
prerelease: false
|
185
|
-
version_requirements: !ruby/object:Gem::Requirement
|
186
|
-
none: false
|
187
|
-
requirements:
|
188
|
-
- - ! '>='
|
189
|
-
- !ruby/object:Gem::Version
|
190
|
-
version: '0'
|
191
159
|
- !ruby/object:Gem::Dependency
|
192
160
|
name: rspec
|
193
161
|
requirement: !ruby/object:Gem::Requirement
|
@@ -249,6 +217,7 @@ extensions:
|
|
249
217
|
extra_rdoc_files: []
|
250
218
|
files:
|
251
219
|
- .gitignore
|
220
|
+
- .travis.yml
|
252
221
|
- .yardopts
|
253
222
|
- Gemfile
|
254
223
|
- README.md
|
@@ -516,7 +485,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
516
485
|
version: '0'
|
517
486
|
segments:
|
518
487
|
- 0
|
519
|
-
hash:
|
488
|
+
hash: 659886342819533463
|
520
489
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
521
490
|
none: false
|
522
491
|
requirements:
|
@@ -525,7 +494,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
525
494
|
version: '0'
|
526
495
|
segments:
|
527
496
|
- 0
|
528
|
-
hash:
|
497
|
+
hash: 659886342819533463
|
529
498
|
requirements: []
|
530
499
|
rubyforge_project:
|
531
500
|
rubygems_version: 1.8.24
|