Skip to content
Browse files

Gemspec, Rakefile, etc

  • Loading branch information...
1 parent 09cd8b4 commit beb477dac2d2c592d75961568c55aa04e3e69740 @foca committed May 7, 2009
Showing with 75 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +33 −0 Rakefile
  3. +34 −0 sinatra-content-for.gemspec
  4. +5 −0 test/content_for_test.rb
View
3 .gitignore
@@ -0,0 +1,3 @@
+doc
+dist
+tmp
View
33 Rakefile
@@ -0,0 +1,33 @@
+require "rake/testtask"
+
+begin
+ require "hanna/rdoctask"
+rescue LoadError
+ require "rake/rdoctask"
+end
+
+begin
+ require "metric_fu"
+rescue LoadError
+end
+
+begin
+ require "mg"
+ MG.new("sinatra-content-for.gemspec")
+rescue LoadError
+end
+
+desc "Default: run all tests"
+task :default => :test
+
+desc "Run library tests"
+Rake::TestTask.new do |t|
+ t.test_files = FileList['test/**/*_test.rb']
+end
+
+Rake::RDocTask.new do |rd|
+ rd.main = "README"
+ rd.title = "Documentation for ContentFor"
+ rd.rdoc_files.include("README.rdoc", "LICENSE", "lib/**/*.rb")
+ rd.rdoc_dir = "doc"
+end
View
34 sinatra-content-for.gemspec
@@ -0,0 +1,34 @@
+Gem::Specification.new do |s|
+ s.name = "sinatra-content-for"
+ s.version = "0.1"
+ s.date = "2009-05-07"
+
+ s.description = "Small Sinatra extension to add a content_for helper similar to Rails'"
+ s.summary = "Small Sinatra extension to add a content_for helper similar to Rails'"
+ s.homepage = "http://sinatrarb.com"
+
+ s.authors = ["Nicolás Sanguinetti"]
+ s.email = "contacto@nicolassanguinetti.info"
+
+ s.require_paths = ["lib"]
+ s.rubyforge_project = "sinatra-ditties"
+ s.has_rdoc = true
+ s.rubygems_version = "1.3.1"
+
+ s.add_dependency "sinatra"
+
+ if s.respond_to?(:add_development_dependency)
+ s.add_development_dependency "contest"
+ s.add_development_dependency "sr-mg"
+ s.add_development_dependency "redgreen"
+ end
+
+ s.files = %w[
+.gitignore
+LICENSE
+README.rdoc
+sinatra-content-for.gemspec
+lib/sinatra/content_for.rb
+test/content_for_test.rb
+]
+end
View
5 test/content_for_test.rb
@@ -10,6 +10,11 @@
require 'contest'
require 'sinatra/test'
+begin
+ require 'redgreen'
+rescue LoadError
+end
+
require File.dirname(__FILE__) + '/../lib/sinatra/content_for'
Sinatra::Base.set :environment, :test

0 comments on commit beb477d

Please sign in to comment.
Something went wrong with that request. Please try again.