Permalink
Browse files

release 0.4.2 to work better on heroku cedar

  • Loading branch information...
1 parent 39ff84a commit 3ee820338aea4fa988c945eb294ad476774f585e @atmos committed May 25, 2012
Showing with 48 additions and 13 deletions.
  1. +1 −1 lib/sinatra/auth/github.rb
  2. +3 −4 sinatra_auth_github.gemspec
  3. +41 −0 spec/quality_spec.rb
  4. +3 −8 spec/spec_helper.rb
View
2 lib/sinatra/auth/github.rb
@@ -6,7 +6,7 @@
module Sinatra
module Auth
module Github
- VERSION = "0.4.0"
+ VERSION = "0.4.2"
# Simple way to serve an image early in the stack and not get blocked by
# application level before filters
View
7 sinatra_auth_github.gemspec
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
Gem::Specification.new do |s|
s.name = "sinatra_auth_github"
- s.version = "0.4.0"
+ s.version = "0.4.2"
s.platform = Gem::Platform::RUBY
s.authors = ["Corey Donohoe"]
s.email = ["atmos@atmos.org"]
@@ -16,12 +16,11 @@ Gem::Specification.new do |s|
s.add_dependency "sinatra", "~>1.0"
s.add_dependency "yajl-ruby", "~>1.1"
s.add_dependency "rest-client", "~>1.6.1"
- s.add_dependency "warden-github", "~>0.4.0"
+ s.add_dependency "warden-github", "~>0.4.2"
s.add_development_dependency "rake"
- s.add_development_dependency "rspec", "~>1.3.0"
+ s.add_development_dependency "rspec", "~>2.0.0"
s.add_development_dependency "shotgun"
- s.add_development_dependency "ZenTest", "~>4.5.0"
s.add_development_dependency "randexp", "~>0.1.5"
s.add_development_dependency "rack-test", "~>0.5.3"
s.add_development_dependency "ruby-debug"
View
41 spec/quality_spec.rb
@@ -0,0 +1,41 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+describe "The library itself" do
+ Rspec::Matchers.define :have_no_tab_characters do
+ match do |filename|
+ @failing_lines = []
+ File.readlines(filename).each_with_index do |line,number|
+ @failing_lines << number + 1 if line =~ /\t/
+ end
+ @failing_lines.empty?
+ end
+
+ failure_message_for_should do |filename|
+ "The file #{filename} has tab characters on lines #{@failing_lines.join(', ')}"
+ end
+ end
+
+ Rspec::Matchers.define :have_no_extraneous_spaces do
+ match do |filename|
+ @failing_lines = []
+ File.readlines(filename).each_with_index do |line,number|
+ next if line =~ /^\s+#.*\s+\n$/
+ @failing_lines << number + 1 if line =~ /\s+\n$/
+ end
+ @failing_lines.empty?
+ end
+
+ failure_message_for_should do |filename|
+ "The file #{filename} has spaces on the EOL on lines #{@failing_lines.join(', ')}"
+ end
+ end
+
+ it "has no tab characters" do
+ Dir.chdir(File.dirname(__FILE__) + '/..') do
+ Dir.glob("./lib/**/*.rb").each do |filename|
+ filename.should have_no_tab_characters
+ filename.should have_no_extraneous_spaces
+ end
+ end
+ end
+end
View
11 spec/spec_helper.rb
@@ -1,18 +1,13 @@
-Bundler.require(:default, :runtime, :test)
+require "bundler/setup"
require File.join(File.dirname(__FILE__), '..', 'lib', 'sinatra', 'auth', 'github')
require 'pp'
-Webrat.configure do |config|
- config.mode = :rack
- config.application_port = 4567
-end
+require 'rack/test'
-Spec::Runner.configure do |config|
+RSpec.configure do |config|
config.include(Rack::Test::Methods)
- config.include(Webrat::Methods)
- config.include(Webrat::Matchers)
def app
Example.app

0 comments on commit 3ee8203

Please sign in to comment.