Skip to content

Commit

Permalink
Move off of Hoe and onto Bundler, and document the build process.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoglan committed Apr 19, 2011
1 parent e502bd9 commit 0c5b568
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 66 deletions.
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source "http://rubygems.org/"
gemspec
2 changes: 1 addition & 1 deletion Jakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 0 additions & 27 deletions Manifest.txt

This file was deleted.

43 changes: 32 additions & 11 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 1 addition & 19 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
29 changes: 29 additions & 0 deletions faye.gemspec
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion lib/faye.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require 'json'

module Faye
VERSION = '0.5.5'
VERSION = '0.6.0'

ROOT = File.expand_path(File.dirname(__FILE__))

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""}
Expand Down
4 changes: 2 additions & 2 deletions test/test_clients.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 0c5b568

Please sign in to comment.