forked from remarkable-rb/remarkable
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created rake_helper and refactored Rakefiles.
- Loading branch information
Showing
4 changed files
with
77 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
current_dir = File.dirname(__FILE__) | ||
require File.join(current_dir, "remarkable/lib/remarkable/version.rb") | ||
|
||
require 'rubygems' | ||
require 'rake/gempackagetask' | ||
require 'rake/rdoctask' | ||
|
||
########### Common package && release | ||
|
||
RUBY_FORGE_PROJECT = "remarkable" | ||
PROJECT_URL = "http://github.com/carlosbrando/remarkable" | ||
|
||
GEM_VERSION = Remarkable::VERSION | ||
PACKAGE_DIR = File.join(File.dirname(__FILE__), 'pkg') | ||
RELEASE_NAME = "REL #{GEM_VERSION}" | ||
|
||
RSPEC_VERSION = '1.2.0' | ||
|
||
desc "Create a gemspec file" | ||
task :gemspec do | ||
File.open("#{GEM_NAME}.gemspec", "w") do |file| | ||
file.puts $spec.to_ruby | ||
end | ||
end | ||
|
||
desc "Build the gem and install it" | ||
task :install => :gem do | ||
system("sudo gem install #{PACKAGE_DIR}/#{GEM_NAME}-#{GEM_VERSION}.gem --local --ignore-dependencies") | ||
end | ||
|
||
desc "Uninstall the gem" | ||
task :uninstall do | ||
system("sudo gem uninstall #{GEM_NAME} --version #{GEM_VERSION}") | ||
end | ||
|
||
########### Common specs | ||
|
||
gem 'rspec', ENV['RSPEC_VERSION'] || '1.2.2' | ||
require 'spec/rake/spectask' | ||
|
||
desc "Run the specs under spec" | ||
Spec::Rake::SpecTask.new do |t| | ||
t.spec_opts = ['--options', "spec/spec.opts"] | ||
t.spec_files = FileList['spec/**/*_spec.rb'] | ||
end | ||
|
||
########## Common rdoc | ||
|
||
Rake::RDocTask.new do |rdoc| | ||
rdoc.main = "README" | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = GEM_NAME | ||
rdoc.rdoc_files.include(*EXTRA_RDOC_FILES) | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
rdoc.options << '--line-numbers' << '--inline-source' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters