Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (54 sloc) 2.15 KB
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require "rake/gempackagetask"
desc 'Default: run unit tests.'
task :default => :test
#todo: the tests seem to be removed and replaced with rspec specs instead...
desc 'Test the mobile-fu plugin.' do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
desc 'Generate documentation for the mobile-fu plugin.' do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'mobile-fu'
rdoc.options << '--line-numbers' << '--inline-source'
spec = do |s| = "mobile-fu"
s.version = "3.0.0"
s.platform = Gem::Platform::RUBY
s.authors = ["The Author's Name"] = [""]
s.homepage = ""
s.summary = "Automatically detect mobile requests from mobile devices in your Rails application."
s.description = "Want to automatically detect mobile devices that access your Rails application? Mobile Fu allows you to do just that. People can access your site from a Palm, Blackberry, iPhone, iPad, Nokia, etc. and it will automatically adjust the format of the request from :html to :mobile."
s.required_rubygems_version = ">= 1.3.6"
# required for validation
# s.rubyforge_project = "mobile-fu"
# If you have other dependencies, add them here
#todo: here, add development dep to rspec
s.files = Dir["{lib}/**/*.rb", "rails/init.rb", "MIT-LICENSE", "README.rdoc", "CHANGELOG"]
s.require_path = 'lib'
desc 'Package the gem' do |pkg|
pkg.gem_spec = spec
desc "Build the gemspec file #{}.gemspec"
task :gemspec do
file = File.dirname(__FILE__) + "/#{}.gemspec", "w") {|f| f << spec.to_ruby }
desc "Remove any temporary products, including gemspec"
task :clean => [:clobber] do
rm "#{}.gemspec"
desc "Package the library and generates the gemspec"
task :package => [:gemspec]