Permalink
Browse files

Move off of Hoe and onto Bundler, and document the build process.

  • Loading branch information...
1 parent e502bd9 commit 0c5b568136a6a4b11e938e8e362083eae6bb08cf @jcoglan jcoglan committed Apr 19, 2011
Showing with 74 additions and 66 deletions.
  1. +5 −4 .gitignore
  2. +2 −0 Gemfile
  3. +1 −1 Jakefile
  4. +0 −27 Manifest.txt
  5. +32 −11 README.rdoc
  6. +1 −19 Rakefile
  7. +29 −0 faye.gemspec
  8. +1 −1 lib/faye.rb
  9. +1 −1 package.json
  10. +2 −2 test/test_clients.rb
View
9 .gitignore
@@ -1,9 +1,10 @@
.DS_Store
.redcar
-build
*.rbc
+*.gem
+*.tgz
+build
+dump.rdb
examples/node/faye*
+Gemfile.lock
lib/*.js
-README.txt
-pkg
-dump.rdb
View
2 Gemfile
@@ -0,0 +1,2 @@
+source "http://rubygems.org/"
+gemspec
View
2 Jakefile
@@ -9,7 +9,7 @@ jake_hook :build_complete do |build|
FileUtils.rm build.package(pkg).build_path(typ)
end
- %w[package.json README.txt History.txt].each do |doc|
+ %w[package.json README.rdoc History.txt].each do |doc|
FileUtils.cp doc, File.join(build.build_dir, doc)
end
end
View
27 Manifest.txt
@@ -1,27 +0,0 @@
-History.txt
-Manifest.txt
-README.txt
-Rakefile
-lib/faye-browser-min.js
-lib/faye.rb
-lib/thin_extensions.rb
-lib/faye/adapters/rack_adapter.rb
-lib/faye/mixins/logging.rb
-lib/faye/mixins/publisher.rb
-lib/faye/mixins/timeouts.rb
-lib/faye/network/transport.rb
-lib/faye/protocol/channel.rb
-lib/faye/protocol/client.rb
-lib/faye/protocol/connection.rb
-lib/faye/protocol/extensible.rb
-lib/faye/protocol/grammar.rb
-lib/faye/protocol/server.rb
-lib/faye/protocol/subscription.rb
-lib/faye/util/namespace.rb
-lib/faye/util/web_socket.rb
-lib/faye/error.rb
-test/scenario.rb
-test/test_channel.rb
-test/test_clients.rb
-test/test_grammar.rb
-test/test_server.rb
View
43 README.rdoc
@@ -24,17 +24,38 @@ on this.
== Development
-To hack on Faye, you'll need Ruby and Jake, which we use to build
-the JavaScript packages. Once you have Ruby installed:
-
- sudo gem install jake
-
-Just run `jake` from the root of the project to build the JavaScripts.
-
-The Ruby version depends on the following gems, which you'll need
-to install:
-
- sudo gem install hoe eventmachine em-http-request rack thin json
+To hack on Faye, you'll need Ruby in order to build both the Gem and the
+NPM package. There are also a few submodules we use for testing. The following
+should get you up and running:
+
+ # Download the code from Git
+ git clone git://github.com/jcoglan/faye.git
+ cd faye
+ git submodule update --init --recursive
+
+ # Install dependencies
+ gem install bundler
+ bundle install
+ npm install redis
+
+ # Build test tools and Faye itself
+ cd vendor/js.class
+ jake
+ cd ../../
+ jake
+
+ # Run tests
+ sudo redis-server &
+ rspec -c spec/
+ node spec/node.js
+
+ # Build Ruby gem
+ gem build faye.gemspec
+ gem install faye-0.6.0.gem
+
+ # Build NPM package
+ tar zcvf faye-0.6.0.tgz build/
+ npm install ./faye-0.6.0.tgz
== To-do
View
20 Rakefile
@@ -1,21 +1,5 @@
-# -*- ruby -*-
-
require 'rubygems'
-require 'hoe'
-require './lib/faye.rb'
-
-Hoe.spec('faye') do
- self.developer('James Coglan', 'jcoglan@googlemail.com')
- self.description = 'Simple pub/sub messaging for the web'
- self.extra_deps = [
- ['eventmachine', '>= 0.12'],
- ['em-http-request', '>= 0.2'],
- ['em-hiredis', '>= 0.0.1'],
- ['rack', '>= 1.0'],
- ['thin', '>= 1.2'],
- ['json', '>= 1.0']
- ]
-end
+require './lib/faye'
task :example, :port do |t, args|
system "rackup -s thin -E production -p #{args[:port]} examples/rack/config.ru"
@@ -35,5 +19,3 @@ task :handshake, :port, :n, :c do |t, args|
system "ab -n #{args[:n]} -c #{args[:c]} '#{url}'"
end
-
-# vim: syntax=Ruby
View
29 faye.gemspec
@@ -0,0 +1,29 @@
+Gem::Specification.new do |s|
+ s.name = "faye"
+ s.version = "0.6.0"
+ s.summary = "Simple pub/sub messaging for the web"
+ s.author = "James Coglan"
+ s.email = "jcoglan@gmail.com"
+ s.homepage = "http://faye.jcoglan.com"
+
+ s.has_rdoc = true
+ s.extra_rdoc_files = %w(README.rdoc)
+ s.rdoc_options = %w(--main README.rdoc)
+
+ s.files = %w(History.txt Rakefile README.rdoc) +
+ %w(lib/faye-browser-min.js) +
+ Dir.glob("{spec,lib}/**/*")
+ s.require_paths = ["lib"]
+
+ s.add_dependency("eventmachine", "~> 0.12.0")
+ s.add_dependency("em-http-request", ">= 0.2")
+ s.add_dependency("em-hiredis", ">= 0.0.1")
+ s.add_dependency("json", ">= 1.0")
+ s.add_dependency("thin", "~> 1.2")
+ s.add_dependency("rack", ">= 1.0")
+
+ s.add_development_dependency("jake")
+ s.add_development_dependency("rspec")
+ s.add_development_dependency("rack-proxy")
+ s.add_development_dependency("rack-test")
+end
View
2 lib/faye.rb
@@ -5,7 +5,7 @@
require 'json'
module Faye
- VERSION = '0.5.5'
+ VERSION = '0.6.0'
ROOT = File.expand_path(File.dirname(__FILE__))
View
2 package.json
@@ -3,7 +3,7 @@
, "keywords" : ["comet", "websocket", "pubsub", "bayeux", "ajax", "http"]
, "author" : "James Coglan <jcoglan@gmail.com>"
-, "version" : "0.5.5"
+, "version" : "0.6.0"
, "engines" : {"node": ">=0.1.96"}
, "main" : "./faye-node"
, "dependencies" : {"redis": ""}
View
4 test/test_clients.rb
@@ -1,6 +1,6 @@
require "test/unit"
-require File.dirname(__FILE__) + "/../lib/faye"
-require "test/scenario"
+require File.expand_path(File.dirname(__FILE__) + "/../lib/faye")
+require "./test/scenario"
class TestClients < Test::Unit::TestCase
include Faye

0 comments on commit 0c5b568

Please sign in to comment.