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
@@ -1,9 +1,10 @@
.DS_Store .DS_Store
.redcar .redcar
build
*.rbc *.rbc
*.gem
*.tgz
build
dump.rdb
examples/node/faye* examples/node/faye*
Gemfile.lock
lib/*.js lib/*.js
README.txt
pkg
dump.rdb
2 changes: 2 additions & 0 deletions Gemfile
@@ -0,0 +1,2 @@
source "http://rubygems.org/"
gemspec
2 changes: 1 addition & 1 deletion Jakefile
Expand Up @@ -9,7 +9,7 @@ jake_hook :build_complete do |build|
FileUtils.rm build.package(pkg).build_path(typ) FileUtils.rm build.package(pkg).build_path(typ)
end 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) FileUtils.cp doc, File.join(build.build_dir, doc)
end end
end end
Expand Down
27 changes: 0 additions & 27 deletions Manifest.txt

This file was deleted.

43 changes: 32 additions & 11 deletions README.rdoc
Expand Up @@ -24,17 +24,38 @@ on this.


== Development == Development


To hack on Faye, you'll need Ruby and Jake, which we use to build To hack on Faye, you'll need Ruby in order to build both the Gem and the
the JavaScript packages. Once you have Ruby installed: NPM package. There are also a few submodules we use for testing. The following

should get you up and running:
sudo gem install jake

# Download the code from Git
Just run `jake` from the root of the project to build the JavaScripts. git clone git://github.com/jcoglan/faye.git

cd faye
The Ruby version depends on the following gems, which you'll need git submodule update --init --recursive
to install:

# Install dependencies
sudo gem install hoe eventmachine em-http-request rack thin json 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 == To-do
Expand Down
20 changes: 1 addition & 19 deletions Rakefile
@@ -1,21 +1,5 @@
# -*- ruby -*-

require 'rubygems' require 'rubygems'
require 'hoe' require './lib/faye'
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


task :example, :port do |t, args| task :example, :port do |t, args|
system "rackup -s thin -E production -p #{args[:port]} examples/rack/config.ru" 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}'" system "ab -n #{args[:n]} -c #{args[:c]} '#{url}'"
end end

# vim: syntax=Ruby
29 changes: 29 additions & 0 deletions 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
2 changes: 1 addition & 1 deletion lib/faye.rb
Expand Up @@ -5,7 +5,7 @@
require 'json' require 'json'


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


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


Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -3,7 +3,7 @@
, "keywords" : ["comet", "websocket", "pubsub", "bayeux", "ajax", "http"] , "keywords" : ["comet", "websocket", "pubsub", "bayeux", "ajax", "http"]
, "author" : "James Coglan <jcoglan@gmail.com>" , "author" : "James Coglan <jcoglan@gmail.com>"


, "version" : "0.5.5" , "version" : "0.6.0"
, "engines" : {"node": ">=0.1.96"} , "engines" : {"node": ">=0.1.96"}
, "main" : "./faye-node" , "main" : "./faye-node"
, "dependencies" : {"redis": ""} , "dependencies" : {"redis": ""}
Expand Down
4 changes: 2 additions & 2 deletions test/test_clients.rb
@@ -1,6 +1,6 @@
require "test/unit" require "test/unit"
require File.dirname(__FILE__) + "/../lib/faye" require File.expand_path(File.dirname(__FILE__) + "/../lib/faye")
require "test/scenario" require "./test/scenario"


class TestClients < Test::Unit::TestCase class TestClients < Test::Unit::TestCase
include Faye include Faye
Expand Down

0 comments on commit 0c5b568

Please sign in to comment.