protobuf 2.2.3 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,20 +1,30 @@
1
1
  $:.push File.expand_path("./", File.dirname(__FILE__))
2
2
  $:.push File.expand_path("./spec", File.dirname(__FILE__))
3
3
 
4
+ require "rubygems"
5
+ require "rubygems/package_task"
4
6
  require "bundler/gem_tasks"
5
7
  # require "benchmark/tasks"
6
8
 
7
- require 'rspec/core/rake_task'
9
+ require "rspec/core/rake_task"
8
10
 
9
- desc 'Default: run specs.'
11
+ desc "Default: run specs."
10
12
  task :default => :spec
11
13
 
12
14
  desc "Run specs"
13
15
  RSpec::Core::RakeTask.new(:spec)
14
16
 
15
17
  ##
16
- # Rake-compiler
18
+ # rake-compiler
17
19
  #
18
- # require 'rake/extensiontask'
19
- #
20
- # Rake::ExtensionTask.new("ruby_generator")
20
+ spec = Gem::Specification.load("protobuf.gemspec")
21
+
22
+ Gem::PackageTask.new(spec) do |pkg|
23
+ end
24
+
25
+ if RUBY_PLATFORM =~ /java/
26
+ require "rake/javaextensiontask"
27
+ else
28
+ require "rake/extensiontask"
29
+ Rake::ExtensionTask.new("ruby_generator", spec)
30
+ end
@@ -1,17 +1,29 @@
1
- begin
2
- require 'mkmf'
1
+ unless defined?(JRUBY_VERSION)
2
+ begin
3
+ require 'mkmf'
3
4
 
4
- include_directory = File.expand_path(File.join(File.dirname(__FILE__), "..", "protobuf-2.4.1", "src"))
5
+ include_directory = File.expand_path(File.join(File.dirname(__FILE__), "..", "protobuf-2.4.1", "src"))
5
6
 
6
- $CPPFLAGS << " -I#{include_directory}"
7
- $CPPFLAGS << " -Wall "
7
+ $CPPFLAGS << " -I#{include_directory}"
8
+ $CPPFLAGS << " -Wall "
8
9
 
9
- have_library("pthread")
10
- have_library("protoc")
11
- have_library("protobuf")
10
+ have_library("pthread")
11
+ have_library("protoc")
12
+ have_library("protobuf")
12
13
 
13
- create_makefile('ruby_generator')
14
- rescue
14
+ create_makefile('ruby_generator')
15
+ rescue ::Gem::Installer::ExtensionBuildError => ex
16
+ $stdout << <<-WARNING
17
+ Cannot compile native extension.
18
+
19
+ If you are running on Jruby or Windows you should compile protocol buffer
20
+ definitions on another computer and then use those definitions locally.
21
+
22
+ Only the compiler is restricted by this. The definitions should work without issue.
23
+ WARNING
24
+ $stdout << $/
25
+ end
26
+ else
15
27
  $stdout << <<-WARNING
16
28
  Cannot compile native extension.
17
29
 
@@ -13,7 +13,6 @@ module Protobuf
13
13
  @parent_class = parent_class
14
14
  @name = name
15
15
  @value = value
16
- super(@value)
17
16
  end
18
17
 
19
18
  ##
@@ -1,4 +1,4 @@
1
1
  module Protobuf
2
- VERSION = '2.2.3'
2
+ VERSION = '2.2.4'
3
3
  PROTOC_VERSION = '2.4.1'
4
4
  end
@@ -19,7 +19,11 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  unless ENV['WITHOUT_PROTO_COMPILER']
22
- s.extensions << File.join('ext', 'ruby_generator', 'extconf.rb')
22
+ if defined?(JRUBY_VERSION)
23
+ s.platform = 'java'
24
+ else
25
+ s.extensions << File.join('ext', 'ruby_generator', 'extconf.rb')
26
+ end
23
27
  end
24
28
 
25
29
  s.add_dependency 'activesupport'
@@ -33,7 +37,7 @@ Gem::Specification.new do |s|
33
37
  s.add_development_dependency 'pry'
34
38
  s.add_development_dependency 'pry-nav'
35
39
  s.add_development_dependency 'rake'
36
- # s.add_development_dependency 'rake-compiler'
40
+ s.add_development_dependency 'rake-compiler'
37
41
  s.add_development_dependency 'rspec'
38
42
  s.add_development_dependency 'simplecov'
39
43
  s.add_development_dependency 'yard'
@@ -15,7 +15,6 @@ module Test
15
15
  #
16
16
  class ResourceFindRequest < ::Protobuf::Message; end
17
17
  class Resource < ::Protobuf::Message; end
18
- class Extended < ::Protobuf::Message; end
19
18
  class Nested < ::Protobuf::Message; end
20
19
 
21
20
  ##
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.3
4
+ version: 2.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -156,6 +156,22 @@ dependencies:
156
156
  - - ! '>='
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
+ - !ruby/object:Gem::Dependency
160
+ name: rake-compiler
161
+ requirement: !ruby/object:Gem::Requirement
162
+ none: false
163
+ requirements:
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ type: :development
168
+ prerelease: false
169
+ version_requirements: !ruby/object:Gem::Requirement
170
+ none: false
171
+ requirements:
172
+ - - ! '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
159
175
  - !ruby/object:Gem::Dependency
160
176
  name: rspec
161
177
  requirement: !ruby/object:Gem::Requirement
@@ -485,7 +501,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
485
501
  version: '0'
486
502
  segments:
487
503
  - 0
488
- hash: 878827377950165717
504
+ hash: 3450676123486449758
489
505
  required_rubygems_version: !ruby/object:Gem::Requirement
490
506
  none: false
491
507
  requirements:
@@ -494,7 +510,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
494
510
  version: '0'
495
511
  segments:
496
512
  - 0
497
- hash: 878827377950165717
513
+ hash: 3450676123486449758
498
514
  requirements: []
499
515
  rubyforge_project:
500
516
  rubygems_version: 1.8.24