Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make it all accessible directly from the gem!

  • Loading branch information...
commit 83e2e52dfe7098c2861e3edc1c674dc55e7c1a11 1 parent 8ae5fa5
@cwninja cwninja authored
Showing with 40 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +37 −0 Rakefile
  3. +2 −0  lib/geminabox.rb
View
1  .gitignore
@@ -0,0 +1 @@
+pkg
View
37 Rakefile
@@ -0,0 +1,37 @@
+require "rubygems"
+require "rake/gempackagetask"
+require "rake/rdoctask"
+
+task :default => :package
+
+spec = Gem::Specification.new do |s|
+ s.name = "geminabox"
+ s.version = "0.1.0"
+ s.summary = "Really simple rubygem hosting"
+ s.author = "Tom Lea"
+ s.email = "contrib@tomlea.co.uk"
+ s.homepage = "http://tomlea.co.uk"
+
+ s.has_rdoc = true
+ s.extra_rdoc_files = %w(README.markdown)
+ s.rdoc_options = %w(--main README.markdown)
+
+ s.files = %w(README.markdown) + Dir.glob("{lib,public,views}/**/*")
+ s.require_paths = ["lib"]
+
+ s.add_dependency("sinatra")
+ s.add_dependency("builder")
+end
+
+Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.gem_spec = spec
+end
+
+Rake::RDocTask.new do |rd|
+ rd.main = "README.markdown"
+ rd.rdoc_files.include("README.markdown", "lib/**/*.rb")
+ rd.rdoc_dir = "rdoc"
+end
+
+desc 'Clear out RDoc and generated packages'
+task :clean => [:clobber_rdoc, :clobber_package]
View
2  lib/geminabox.rb
@@ -1,3 +1,4 @@
+require "builder"
require 'sinatra/base'
require 'rubygems'
require "rubygems/indexer"
@@ -9,6 +10,7 @@ class Geminabox < Sinatra::Base
set :public, File.join(File.dirname(__FILE__), *%w[.. public])
set :data, File.join(File.dirname(__FILE__), *%w[.. data])
+ set :views, File.join(File.dirname(__FILE__), *%w[.. views])
use Hostess
Please sign in to comment.
Something went wrong with that request. Please try again.