forked from mozy/ruby-protocol-buffers
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up gem/rake/rdoc/rspec infrastructure using the Jeweler library
- Loading branch information
Brian Palmer
committed
Jan 6, 2010
1 parent
e0cb153
commit 0062b18
Showing
14 changed files
with
83 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
README | ||
lib/**/*.rb | ||
LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
/*.pb.rb | ||
/*.d | ||
/*.proto | ||
pkg/* | ||
prof/* | ||
tests/* | ||
coverage | ||
rdoc | ||
pkg | ||
prof | ||
tests | ||
d/* | ||
doc/* | ||
*.gemspec | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,57 @@ | ||
require 'rubygems' | ||
require 'rake/gempackagetask' | ||
|
||
spec = Gem::Specification.new do |s| | ||
s.name = "ruby-protocol-buffers" | ||
s.version = "0.1.0" | ||
s.author = "Brian Palmer" | ||
s.email = "[email protected]" | ||
s.homepage = "http://todo" | ||
s.platform = Gem::Platform::RUBY | ||
s.summary = "Ruby compiler and runtime for the google protocol buffers library. Currently includes a compiler that utilizes protoc." | ||
|
||
s.required_ruby_version = ">=1.8.6" | ||
|
||
s.files = FileList["{bin,lib,ext}/**/*"].to_a | ||
s.require_path = 'lib' | ||
s.executables << 'ruby-protoc' | ||
# disabled to avoid needing to compile a C extension just to boost | ||
# performance. TODO: is there a way to tell gems to make the extension | ||
# optional? | ||
# s.extensions << 'ext/extconf.rb' | ||
require 'rake' | ||
|
||
begin | ||
require 'metric_fu' | ||
rescue LoadError | ||
end | ||
|
||
begin | ||
require 'jeweler' | ||
Jeweler::Tasks.new do |gem| | ||
gem.name = "ruby-protocol-buffers" | ||
gem.summary = %Q{Ruby compiler and runtime for the google protocol buffers library.} | ||
# gem.description = %Q{description} | ||
gem.email = "[email protected]" | ||
gem.homepage = "http://todo/" | ||
gem.authors = ["Brian Palmer"] | ||
gem.version = File.read('VERSION') | ||
gem.add_development_dependency "rspec", ">= 1.2.9" | ||
gem.required_ruby_version = ">=1.8.6" | ||
gem.require_path = 'lib' | ||
# disabled to avoid needing to compile a C extension just to boost | ||
# performance. TODO: is there a way to tell gems to make the extension | ||
# optional? | ||
# s.extensions << 'ext/extconf.rb' | ||
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings | ||
end | ||
Jeweler::GemcutterTasks.new | ||
rescue LoadError | ||
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler" | ||
end | ||
|
||
require 'spec/rake/spectask' | ||
Spec::Rake::SpecTask.new(:spec) do |spec| | ||
spec.libs << 'lib' << 'spec' | ||
spec.pattern = 'spec/**/*_spec.rb' | ||
end | ||
|
||
Rake::GemPackageTask.new(spec) do |pkg| | ||
Spec::Rake::SpecTask.new(:rcov) do |spec| | ||
spec.libs << 'lib' << 'spec' | ||
spec.pattern = 'spec/**/*_spec.rb' | ||
spec.rcov = true | ||
end | ||
|
||
task :default => "pkg/#{spec.name}-#{spec.version}.gem" do | ||
puts "generated latest version" | ||
task :spec => :check_dependencies | ||
|
||
task :default => :spec | ||
|
||
require 'rake/rdoctask' | ||
Rake::RDocTask.new do |rdoc| | ||
version = File.exist?('VERSION') ? File.read('VERSION') : "" | ||
|
||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = "ruby-protocol-buffers #{version}" | ||
rdoc.rdoc_files.include('README*', 'LICENSE') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.0 | ||
0.8.0 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
module ProtocolBuffers | ||
VERSION = File.read(File.join(File.dirname(__FILE__), "..", "VERSION")).chomp | ||
end | ||
|
||
require 'protocol_buffers/runtime/message' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env ruby | ||
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') | ||
|
||
require 'stringio' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
$LOAD_PATH.unshift(File.dirname(__FILE__)) | ||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) | ||
require 'protocol_buffers' | ||
require 'spec' | ||
require 'spec/autorun' | ||
|
||
Spec::Runner.configure do |config| | ||
end |