Permalink
Browse files

simplify Rakefile, randomize specs, fix on 1.9

default rake task is now specs
  • Loading branch information...
1 parent 5cd6c87 commit 12f345067ca4e04b0894a5b880ee9fc13de2bfcd Alex Suraci & Chris Brown committed Feb 8, 2013
Showing with 20 additions and 62 deletions.
  1. +4 −23 Rakefile
  2. +11 −12 caldecott.gemspec
  3. +0 −26 spec/Rakefile
  4. +1 −1 spec/server/http_tunnel_spec.rb
  5. +4 −0 spec/server/spec_helper.rb
View
@@ -1,24 +1,5 @@
-require 'rake'
+require "rake"
+require "rspec/core/rake_task"
-desc "Run specs"
-task "spec" => ["bundler:install", "test:spec"]
-
-desc "Run specs using RCov"
-task "spec:rcov" => ["bundler:install", "test:spec:rcov"]
-
-namespace "bundler" do
- desc "Install gems"
- task "install" do
- sh("bundle install")
- end
-end
-
-namespace "test" do
- task "spec" do |t|
- sh("cd spec && rake spec")
- end
-
- task "spec:rcov" do |t|
- sh("cd spec && rake spec:rcov")
- end
-end
+RSpec::Core::RakeTask.new(:spec)
+task :default => :spec
View
@@ -16,18 +16,17 @@ spec = Gem::Specification.new do |s|
s.add_dependency "caldecott-client", "~> 0.0.1"
- s.add_dependency "em-http-request", "~> 0.3.0"
- s.add_dependency "em-websocket", "~> 0.3.1"
- s.add_dependency "async_sinatra", "~> 0.5.0"
- s.add_dependency "addressable", "~> 2.2.6"
- s.add_dependency "json", "~> 1.6.1"
- s.add_dependency "uuidtools", "~> 2.1.2"
-
- s.add_development_dependency "rake", "~> 0.9.2"
- s.add_development_dependency "rcov", "~> 0.9.10"
- s.add_development_dependency "rack-test", "~> 0.6.1"
- s.add_development_dependency "rspec", "~> 2.6.0"
- s.add_development_dependency "webmock", "~> 1.7.6"
+ s.add_dependency "em-http-request", "~> 0.3"
+ s.add_dependency "em-websocket", "~> 0.3"
+ s.add_dependency "async_sinatra", "~> 0.5"
+ s.add_dependency "addressable", "~> 2.2"
+ s.add_dependency "json", "~> 1.6"
+ s.add_dependency "uuidtools", "~> 2.1"
+
+ s.add_development_dependency "rake", "~> 0.9"
+ s.add_development_dependency "rack-test", "~> 0.6"
+ s.add_development_dependency "rspec", "~> 2.6"
+ s.add_development_dependency "webmock", "~> 1.7"
s.require_path = 'lib'
s.files = %w(LICENSE README.md) + Dir.glob("{lib}/**/*")
View
@@ -1,26 +0,0 @@
-require 'tempfile'
-
-require 'rubygems'
-require 'bundler/setup'
-Bundler.require(:default, :test)
-
-require 'rake'
-require 'rspec'
-require 'rspec/core/rake_task'
-
-coverage_dir = File.expand_path(File.join(File.dirname(__FILE__), "coverage"))
-
-ignore_pattern = 'spec,[.]bundle,[/]gems[/]'
-
-RSpec::Core::RakeTask.new do |t|
- t.pattern = "**/*_spec.rb"
- t.rspec_opts = ["--format", "documentation", "--colour"]
-end
-
-desc "Run specs using RCov"
-RSpec::Core::RakeTask.new("spec:rcov") do |t|
- t.pattern = "**/*_spec.rb"
- t.rspec_opts = []
- t.rcov = true
- t.rcov_opts = %W{--exclude osx\/objc,gems\/,spec\/,features\/ -o "#{coverage_dir}"}
-end
@@ -215,7 +215,7 @@
include Caldecott::Test::Server::SinatraTest
before do
- header 'Auth-Token', AUTH_TOKEN
+ header 'Auth-Token', auth_token
end
it "should return banner via GET" do
@@ -64,6 +64,10 @@ def self.options
def app
App
end
+
+ def auth_token
+ AUTH_TOKEN
+ end
end
end

0 comments on commit 12f3450

Please sign in to comment.