Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Commit

Permalink
release 0.4.2 to work better on heroku cedar
Browse files Browse the repository at this point in the history
  • Loading branch information
atmos committed May 25, 2012
1 parent 39ff84a commit 3ee8203
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/sinatra/auth/github.rb
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions sinatra_auth_github.gemspec
Expand Up @@ -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"]
Expand All @@ -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"
Expand Down
41 changes: 41 additions & 0 deletions 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
11 changes: 3 additions & 8 deletions 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
Expand Down

0 comments on commit 3ee8203

Please sign in to comment.