Skip to content

Commit

Permalink
update to use bundler and rspec 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
codekitchen committed Mar 20, 2011
1 parent dbdfbc5 commit a11f85d
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 55 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/*.pb.rb
/*.d
/*.proto
.yardoc/
Gemfile.lock
doc/*
coverage
rdoc
pkg
Expand Down
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "http:https://rubygems.org"

# Specify your gem's dependencies in ruby-protocol-buffers.gemspec
gemspec
64 changes: 14 additions & 50 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,56 +1,20 @@
require 'rubygems'
require 'rake'
require 'spec'
require 'bundler'
Bundler::GemHelper.install_tasks

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.homepage = "http:https://github.com/mozy/ruby-protocol-buffers"
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'
gem.extra_rdoc_files << "Changelog.md"
gem.files << "Changelog.md"
# 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:https://www.rubygems.org/read/chapter/20 for additional settings
end
Jeweler::GemcutterTasks.new
rescue LoadError
# You'll need to install Jeweler to build packages
end
task :default => 'spec'

require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = "-c -f d"
end

Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
RSpec::Core::RakeTask.new(:rcov) do |t|
t.rspec_opts = "-c -f d"
t.rcov = true
t.rcov_opts = ["--exclude", "spec,gems/,rubygems/"]
end

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')
require 'yard'
YARD::Rake::YardocTask.new(:doc) do |t|
version = ProtocolBuffers::VERSION
t.options = ["--title", "ruby protocol buffers #{version}", "--files", "LICENSE,Changelog.md"]
end
26 changes: 26 additions & 0 deletions ruby-protocol-buffers.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "protocol_buffers"

Gem::Specification.new do |s|
s.name = "ruby-protocol-buffers"
s.version = ProtocolBuffers::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Brian Palmer"]
s.email = ["[email protected]"]
s.homepage = "https://github.com/mozy/ruby-protocol-buffers"
s.summary = %{Ruby compiler and runtime for the google protocol buffers library.}

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

s.extra_rdoc_files << "Changelog.md"

s.add_development_dependency "rspec", "~> 2.5"
s.add_development_dependency "autotest-standalone"
s.add_development_dependency "autotest-growl"
s.add_development_dependency "rcov"
s.add_development_dependency "yard"
end
8 changes: 3 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
$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|
require 'rspec'

RSpec.configure do |config|
end

0 comments on commit a11f85d

Please sign in to comment.