forked from halorgium/rack-client
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the code to use the bundler and make it clean
- Loading branch information
Showing
13 changed files
with
89 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
.DS_Store | ||
*~ | ||
.#* | ||
*.jar | ||
sinatra.log | ||
pkg | ||
pkg | ||
bin | ||
vendor/gems |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
gem 'rack' | ||
gem 'rack-test' | ||
|
||
only :test do | ||
gem 'rake' | ||
gem 'sinatra', :require_as => 'sinatra/base' | ||
gem 'rspec', :require_as => 'spec' | ||
gem 'rack-contrib', :require_as => 'rack/contrib' | ||
gem 'ruby-debug' | ||
gem 'bundler' | ||
end | ||
|
||
disable_system_gems |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
== 0.1.0 / 2009-06-14 | ||
|
||
* 1 major enhancement | ||
|
||
* Birthday! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') | ||
|
||
describe "The library itself" do | ||
|
||
def check_for_tab_characters(filename) | ||
failing_lines = [] | ||
File.readlines(filename).each_with_index do |line,number| | ||
failing_lines << number + 1 if line =~ /\t/ | ||
end | ||
|
||
unless failing_lines.empty? | ||
"#{filename} has tab characters on lines #{failing_lines.join(', ')}" | ||
end | ||
end | ||
|
||
def check_for_extra_spaces(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 | ||
|
||
unless failing_lines.empty? | ||
"#{filename} has spaces on the EOL on lines #{failing_lines.join(', ')}" | ||
end | ||
end | ||
|
||
def be_well_formed | ||
simple_matcher("be well formed") do |given, matcher| | ||
matcher.failure_message = given.join("\n") | ||
given.empty? | ||
end | ||
end | ||
|
||
it "has no malformed whitespace" do | ||
error_messages = [] | ||
Dir.chdir(File.dirname(__FILE__) + '/..') do | ||
`git ls-files`.split("\n").each do |filename| | ||
next if filename =~ /\.gitmodules|fixtures/ | ||
error_messages << check_for_tab_characters(filename) | ||
error_messages << check_for_extra_spaces(filename) | ||
end | ||
end | ||
error_messages.compact.should be_well_formed | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
require 'rubygems' | ||
require 'spec' | ||
require 'rack/contrib' | ||
gem 'rack-test' | ||
Bundler.require_env(:test) | ||
|
||
require File.expand_path(File.dirname(__FILE__) + "/../lib/rack/client") |