Permalink
Browse files

Use Bundler gem conventions.

  • Loading branch information...
1 parent a4149be commit b3e97452f4d6917a3882b6eec512f2647294695d Gabe Berke-Williams committed Nov 12, 2011
Showing with 46 additions and 44 deletions.
  1. +1 −0 .gitignore
  2. +3 −0 Gemfile
  3. +18 −0 Gemfile.lock
  4. +2 −18 Rakefile
  5. +19 −26 bourne.gemspec
  6. +3 −0 lib/bourne/version.rb
View
@@ -4,3 +4,4 @@ pkg
*~
tags
rdoc
+*.gem
View
@@ -0,0 +1,3 @@
+source :rubygems
+
+gemspec
View
@@ -0,0 +1,18 @@
+PATH
+ remote: .
+ specs:
+ bourne (1.0)
+ mocha (= 0.9.12)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ mocha (0.9.12)
+ rake (0.9.2.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ bourne!
+ rake
View
@@ -1,12 +1,11 @@
-require 'rake/rdoctask'
-require 'rake/gempackagetask'
+require 'bundler/gem_tasks'
require 'rake/testtask'
desc "Run all tests"
task 'default' => ['test:units', 'test:acceptance', 'test:performance']
namespace 'test' do
- unit_tests = FileList['test/unit/**/*_test.rb']
+ unit_tests = FileList['test/unit/**/*_test.rb']
acceptance_tests = FileList['test/acceptance/*_test.rb']
desc "Run unit tests"
@@ -44,18 +43,3 @@ def benchmark_test_case(klass, iterations)
end
time = Benchmark.realtime { iterations.times { Test::Unit::UI::Console::TestRunner.run(klass, silent_option) } }
end
-
-eval("$specification = #{IO.read('bourne.gemspec')}")
-Rake::GemPackageTask.new($specification) do |package|
- package.need_zip = true
- package.need_tar = true
-end
-
-desc 'Generate documentation.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'Bourne'
- rdoc.options << '--line-numbers' << "--main" << "README.md"
- rdoc.rdoc_files.include('README.md')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
View
@@ -1,33 +1,26 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "bourne/version"
+
Gem::Specification.new do |s|
- s.name = %q{bourne}
- s.version = "1.0"
- s.authors = ["Joe Ferris"]
- s.date = %q{2011-03-27}
+ s.name = 'bourne'
+ s.version = Bourne::VERSION.dup
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Joe Ferris"]
+ s.email = 'jferris@thoughtbot.com'
+ s.homepage = 'http://github.com/thoughtbot/bourne'
+ s.summary = 'Adds test spies to mocha.'
s.description = %q{Extends mocha to allow detailed tracking and querying of
stub and mock invocations. Allows test spies using the have_received rspec
matcher and assert_received for Test::Unit. Extracted from the
jferris-mocha fork.}
- s.email = %q{jferris@thoughtbot.com}
- s.extra_rdoc_files = ["README.md", "LICENSE"]
- s.files = %w(lib/bourne/api.rb lib/bourne/expectation.rb
- lib/bourne/invocation.rb lib/bourne/mock.rb
- lib/bourne/mockery.rb lib/bourne.rb
- test/acceptance/acceptance_test_helper.rb
- test/acceptance/mocha_example_test.rb
- test/acceptance/spy_test.rb
- test/acceptance/stubba_example_test.rb test/execution_point.rb
- test/matcher_helpers.rb test/method_definer.rb
- test/simple_counter.rb test/test_helper.rb test/test_runner.rb
- test/unit/assert_received_test.rb test/unit/expectation_test.rb
- test/unit/have_received_test.rb test/unit/invocation_test.rb
- test/unit/mock_test.rb test/unit/mockery_test.rb LICENSE
- Rakefile README.md)
- s.homepage = %q{http://github.com/thoughtbot/bourne}
- s.rdoc_options = ["--title", "Bourne", "--main", "README", "--line-numbers"]
+
+ 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.rubygems_version = %q{1.3.4}
- s.summary = %q{Adds test spies to mocha.}
- s.specification_version = 3
- s.add_runtime_dependency(%q<mocha>, ["= 0.9.12"])
- s.add_development_dependency(%q<rake>, [">= 0"])
+
+ s.add_dependency('mocha', '= 0.9.12')
+
+ s.add_development_dependency('rake')
end
View
@@ -0,0 +1,3 @@
+module Bourne
+ VERSION = '1.0'.freeze
+end

0 comments on commit b3e9745

Please sign in to comment.