Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rearrange repo to make it Rubygem friendly

  • Loading branch information...
commit e70a0cb91b8cb676a7075115fd76f2c5b2eda791 1 parent 719c6a2
@cee-dub cee-dub authored
View
3  CHANGES
@@ -1,3 +1,6 @@
+2009-01-23
+ Reorganized repo to make it Rubygem friendly
+
2008-12-21
Consolidated repository
View
40 Rakefile
@@ -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
View
0  csshttprequest.rb → lib/csshttprequest.rb
File renamed without changes
View
4 test-all
@@ -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'])
View
7 test/csshttprequest_test.rb
@@ -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
View
0  tests/hello-world.in → test/inputs/hello-world.in
File renamed without changes
View
0  tests/json-flickr.in → test/inputs/json-flickr.in
File renamed without changes
View
0  tests/json-time.in → test/inputs/json-time.in
File renamed without changes
View
0  tests/lorem.in → test/inputs/lorem.in
File renamed without changes
View
10 test/test_helper.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.