Skip to content
Browse files

Modernize Rakefile for Jeweler, fix spelling errors, and remove super…

…fluous files from gem
  • Loading branch information...
1 parent b42683f commit 5c3ca7df1b289a277f02c8042c3e4fd507a94e26 @RISCfuture committed Aug 31, 2011
Showing with 24 additions and 20 deletions.
  1. +9 −9 Gemfile
  2. +15 −11 Rakefile
View
18 Gemfile
@@ -3,12 +3,12 @@ source :rubygems
# DEPENDENCIES
gem 'activerecord', '>= 3.1', require: 'active_record'
-# DEVELOPMENT
-gem 'jeweler'
-gem 'yard'
-gem 'RedCloth', require: 'redcloth'
-
-# TEST
-gem 'rspec'
-
-
+group :development do
+ # DEVELOPMENT
+ gem 'jeweler'
+ gem 'yard'
+ gem 'RedCloth', require: 'redcloth'
+
+ # TEST
+ gem 'rspec'
+end
View
26 Rakefile
@@ -1,33 +1,37 @@
-require 'rake'
+require 'rubygems'
+require 'bundler'
begin
- require 'bundler'
-rescue LoadError
- puts "Bundler is not installed; install with `gem install bundler`."
- exit 1
+ Bundler.setup(:default, :development)
+rescue Bundler::BundlerError => e
+ $stderr.puts e.message
+ $stderr.puts "Run `bundle install` to install missing gems"
+ exit e.status_code
end
+require 'rake'
-Bundler.require :default
-
+require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "validates_im"
- gem.summary = %Q{A set of Rails validators for common instant messenging services}
- gem.description = %Q{Adds ActiveModel validators for common instant messenging services like Skype and AIM.}
+ gem.summary = %Q{A set of Rails validators for common instant messaging services}
+ gem.description = %Q{Adds ActiveModel validators for common instant messaging services like Skype and AIM.}
gem.email = "git@timothymorgan.info"
gem.homepage = "http://github.com/riscfuture/validates_im"
gem.authors = [ "Tim Morgan" ]
gem.add_dependency 'activerecord', '>= 3.0'
+ gem.files = %w( lib/**/* validates_im.gemspec README.textile LICENSE )
end
-Jeweler::GemcutterTasks.new
+Jeweler::RubygemsDotOrgTasks.new
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
+require 'yard'
YARD::Rake::YardocTask.new('doc') do |doc|
doc.options << "-m" << "textile"
doc.options << "--protected"
doc.options << "-r" << "README.textile"
doc.options << "-o" << "doc"
- doc.options << "--title" << "validates_im Documentation".inspect
+ doc.options << "--title" << "validates_im Documentation"
doc.files = [ 'lib/*_validator.rb', 'README.textile' ]
end

0 comments on commit 5c3ca7d

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