Permalink
Browse files

Who needs Jeweler?!

  • Loading branch information...
1 parent 0537db2 commit a1ca5a4accaa7a402b541919c3f159e4f526b11b @sj26 committed Oct 9, 2011
Showing with 57 additions and 29 deletions.
  1. +2 −2 README.md
  2. +26 −27 Rakefile
  3. +29 −0 skinny.gemspec
View
@@ -16,7 +16,7 @@ simple, not-yet-optimised example I'm using at the moment:
class Sinatra::Request
include Skinny::Helpers
end
-
+
module MailCatcher
class Web < Sinatra::Base
get '/messages' do
@@ -34,7 +34,7 @@ simple, not-yet-optimised example I'm using at the moment:
end
end
end
-
+
This syntax will probably get cleaned up. I would like to build a
nice Sinatra handler with DSL with unbound handlers so Sinatra
requests can be recycled.
View
@@ -1,33 +1,32 @@
require 'rubygems'
-require 'rake'
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "skinny"
- gem.summary = %Q{Thin WebSockets}
- gem.description = <<-EOD
- Simple, upgradable WebSockets for Thin.
- EOD
- gem.email = "sj26@sj26.com"
- gem.homepage = "http://github.com/sj26/skinny"
- gem.authors = ["Samuel Cochran"]
-
- gem.add_dependency 'eventmachine'
- gem.add_dependency 'thin'
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
-end
+version_file = File.expand_path __FILE__ + '/../VERSION'
+version = File.read(version_file).strip
-require 'rake/rdoctask'
-Rake::RDocTask.new do |rdoc|
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
+spec_file = File.expand_path __FILE__ + '/../skinny.gemspec'
+spec = Gem::Specification.load spec_file
+require 'rdoc/task'
+RDoc::Task.new :rdoc => "rdoc",
+ :clobber_rdoc => "rdoc:clean",
+ :rerdoc => "rdoc:force" do |rdoc|
+ rdoc.title = "Skinny #{version}"
rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "skinny #{version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/*.rb')
- rdoc.rdoc_files.include('lib/**/*.rb')
+ rdoc.main = 'README.md'
+ rdoc.rdoc_files.include 'lib/**/*.rb'
+end
+
+desc "Package as Gem"
+task "package:gem" do
+ builder = Gem::Builder.new spec
+ builder.build
end
+
+task "package" => ["package:gem"]
+
+desc "Release Gem to RubyGems"
+task "release:gem" do
+ %x[gem push mailcatcher-#{version}.gem]
+end
+
+task "release" => ["package", "release:gem"]
View
@@ -0,0 +1,29 @@
+Gem::Specification.new do |s|
+ s.name = "skinny"
+ s.version = File.read(File.expand_path("../VERSION", __FILE__)).strip
+ s.summary = "Thin WebSockets"
+ s.description = "Simple, upgradable WebSockets for Thin."
+
+ s.author = "Samuel Cochran"
+ s.email = "sj26@sj26.com"
+ s.homepage = "http://github.com/sj26/skinny"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.date = "2010-11-01"
+
+ s.files = Dir[
+ "README.md", "LICENSE",
+ "lib/**/*.rb",
+ ]
+ s.require_paths = ["lib"]
+ s.extra_rdoc_files = ["README.md", "LICENSE"]
+
+ s.required_ruby_version = '>= 1.8.7'
+
+ s.add_dependency "eventmachine", "~> 0.12"
+ s.add_dependency "thin", "~> 1.2"
+
+ s.add_development_dependency "rake"
+ s.add_development_dependency "rdoc"
+end
+

0 comments on commit a1ca5a4

Please sign in to comment.