Permalink
Browse files

Rearrange repo to make it Rubygem friendly

  • Loading branch information...
1 parent 719c6a2 commit e70a0cb91b8cb676a7075115fd76f2c5b2eda791 @cee-dub cee-dub committed Jan 23, 2009
View
@@ -1,3 +1,6 @@
+2009-01-23
+ Reorganized repo to make it Rubygem friendly
+
2008-12-21
Consolidated repository
View
@@ -0,0 +1,40 @@
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+require 'rcov/rcovtask'
+
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |s|
+ s.name = "csshttprequest"
+ s.summary = %Q{CSSHttpRequest is cross-domain AJAX using CSS as a transport.}
+ s.email = "ping+csshttprequest@nb.io"
+ s.homepage = "http://github.com/nbio/csshttprequest"
+ s.description = "Please see the latest info at http://nb.io/hacks/csshttprequest/"
+ s.authors = ["Cameron Walters", "Randy Reddig"]
+ end
+rescue LoadError
+ puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
+end
+
+Rake::TestTask.new do |t|
+ t.libs << 'lib'
+ t.pattern = 'test/**/*_test.rb'
+ t.verbose = false
+end
+
+Rake::RDocTask.new do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'try-jeweler'
+ rdoc.options << '--line-numbers' << '--inline-source'
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
+
+Rcov::RcovTask.new do |t|
+ t.libs << 'test'
+ t.test_files = FileList['test/**/*_test.rb']
+ t.verbose = true
+end
+
+task :default => :rcov
File renamed without changes.
View
@@ -14,7 +14,7 @@ from csshttprequest import encode, decode
class TestSequenceFunctions(unittest.TestCase):
def setUp(self):
self.fixtures = {}
- for filename in glob.glob(os.path.join('tests','*.in')):
+ for filename in glob.glob(os.path.join('test', 'inputs', '*.in')):
with open(filename) as f:
self.fixtures[filename.rsplit('.')[0]] = f.read()
@@ -35,7 +35,7 @@ class TestSequenceFunctions(unittest.TestCase):
self._test_cmd(['python', 'csshttprequest.py'])
def test_ruby(self):
- self._test_cmd(['ruby', 'css_http_request.rb'])
+ self._test_cmd(['ruby', os.path.join('lib', 'csshttprequest.rb')])
def test_php(self):
self._test_cmd(['php', 'csshttprequest.php'])
@@ -0,0 +1,7 @@
+require File.dirname(__FILE__) + '/test_helper'
+
+class TryJewelerTest < Test::Unit::TestCase
+ should "use the python-based tests, they run all inputs through all implementations" do
+ flunk "hey buddy, you should probably really run the python tests"
+ end
+end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,10 @@
+require 'rubygems'
+require 'test/unit'
+require 'shoulda'
+require 'mocha'
+
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+require 'csshttprequest'
+
+class Test::Unit::TestCase
+end

0 comments on commit e70a0cb

Please sign in to comment.