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 ADDED
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ rvm:
3
+ - "1.9.2"
4
+ - "1.9.3"
5
+ - jruby-19mode
6
+ - rbx-19mode
7
+ - ruby-head
8
+ - jruby-head
9
+ script: NO_COMPILE_TEST_PROTOS=1 bundle exec rake spec
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # protobuf
2
2
 
3
- ***IMPORTANT: Those upgrading from version 1.4.2 to 2.0 should read the [UPGRADING.md](https://github.com/localshred/protobuf/blob/master/UPGRADING.md) notes***
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")
@@ -26,8 +26,15 @@ module Protobuf
26
26
  self.to_i
27
27
  end
28
28
 
29
- def to_s
30
- to_hash_value.to_s
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
@@ -1,4 +1,4 @@
1
1
  module Protobuf
2
- VERSION = '2.2.1'
2
+ VERSION = '2.2.2'
3
3
  PROTOC_VERSION = '2.4.1'
4
4
  end
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'
@@ -1,7 +1,13 @@
1
1
  require 'benchmark'
2
2
  require 'support/all'
3
3
  require 'support/test/resource_service'
4
- require 'perftools'
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"]
@@ -10,5 +10,6 @@ describe Protobuf::EnumValue do
10
10
  its(:to_hash_value) { should eq 1 }
11
11
  its(:to_s) { should eq "1" }
12
12
  its(:inspect) { should eq '#<Protobuf::EnumValue Test::EnumTestType::ONE=1>' }
13
+ specify { subject.to_s(:name).should eq("ONE") }
13
14
 
14
15
  end
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.1
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: 379065993395849020
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: 379065993395849020
497
+ hash: 659886342819533463
529
498
  requirements: []
530
499
  rubyforge_project:
531
500
  rubygems_version: 1.8.24