Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Commit

Permalink
* Fixed nomenclature, just renamed everything as appropriate.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Tucker committed May 11, 2008
1 parent e57f66a commit 587d8ae
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README
Expand Up @@ -6,4 +6,4 @@ it your own, enjoy it. I've added a rackup for those of you that would prefer
to use an evented server for this application. (It's kinda ideal in this case)

Sadly, the way rubygems packs up binaries, I will need some assistance making
the rackup work.
the rackup work from the default binary install path.
20 changes: 10 additions & 10 deletions Rakefile
Expand Up @@ -2,31 +2,31 @@ require 'rubygems'
require 'rake/gempackagetask'

spec = Gem::Specification.new do |s|
s.name = "github_post_commit_server"
s.name = "github_post_receive_server"
s.version = "0.0.2"
s.platform = Gem::Platform::RUBY
s.has_rdoc = false
# s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
s.has_rdoc = true
s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
s.summary = "A post commit handler server for GitHub, built on Rack"
s.description = s.summary
s.author = "James Tucker"
s.email = "jftucker@gmail.com"
# s.homepage = "http://code.ra66i.org/github_post_commit_server"
# s.homepage = "http://code.ra66i.org/github_post_receive_server"

s.add_dependency "rack"

s.require_path = 'lib'
#s.autorequire = 'github_post_commit_server'
#s.autorequire = 'github_post_receive_server'

s.files = %w(LICENSE README Rakefile TODO) +
Dir.glob("{bin,lib,specs}/**/*")

s.bindir = 'bin'
s.executables = %w[
github_post_commit_server
github_post_commit_server.ru
github_post_receive_server
github_post_receive_server.ru
]
s.default_executable = 'github_post_commit_server'
s.default_executable = 'github_post_receive_server'
end

Rake::GemPackageTask.new(spec) do |pkg|
Expand All @@ -46,12 +46,12 @@ task :test => :spec

desc "start server (main executable)"
task :start do
sh %{bin/github_post_commit_server}
sh %{bin/github_post_receive_server}
end

desc "start server under thin (rackup)"
task :thin do
sh %{thin -R bin/github_post_commit_server.ru -p 9001 start}
sh %{thin -R bin/github_post_receive_server.ru -p 9001 start}
end

desc "remove pkg files"
Expand Down
8 changes: 4 additions & 4 deletions bin/github_post_commit_server → bin/github_post_receive_server 100644 → 100755
@@ -1,16 +1,16 @@
#!/usr/bin/env ruby
$0 = "Rack Post-Commit Server :-P"
$0 = "Rack Post-Receive Server :-P"
begin
require 'rubygems'
require 'github_post_commit_server'
require 'github_post_receive_server'
rescue LoadError
require File.dirname(__FILE__) + '/../lib/github_post_commit_server'
require File.dirname(__FILE__) + '/../lib/github_post_receive_server'
end

app = Rack::Builder.new do
use Rack::CommonLogger
use Rack::Lint
run GithubPostCommitServer::RackApp.new
run GithubPostReceiveServer::RackApp.new
end

trap(:INT) { exit 0 }
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion lib/github_post_commit_server.rb

This file was deleted.

1 change: 1 addition & 0 deletions lib/github_post_receive_server.rb
@@ -0,0 +1 @@
require 'github_post_receive_server/rack_app'
@@ -1,6 +1,8 @@
#
# rack_app.rb
# github_post_commit_server
#
# Example Rack app for http://github.com/guides/post-receive-hooks
#
# Created by James Tucker on 2008-05-11.
# Copyright 2008 James Tucker
Expand All @@ -10,7 +12,7 @@
require 'rack'
require 'json'

module GithubPostCommitServer
module GithubPostReceiveServer
class RackApp
GO_AWAY_COMMENT = "Be gone, foul creature of the internet."
THANK_YOU_COMMENT = "Thanks! You beautiful soul you."
Expand Down
@@ -1,8 +1,8 @@
require File.dirname(__FILE__) + '/../spec_helper'

describe "Rack Post-Commit Server :-P" do
describe "Rack Post-Receive Server :-P" do
before do
@server = GithubPostCommitServer::RackApp.new
@server = GithubPostReceiveServer::RackApp.new
end

it "should reply with a rude message on GET" do
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
@@ -1,4 +1,4 @@
$TESTING=true
$:.push File.join(File.dirname(__FILE__), '..', 'lib')
require "bacon"
require 'github_post_commit_server'
require 'bacon'
require 'github_post_receive_server'

0 comments on commit 587d8ae

Please sign in to comment.