diff options
author | Lee Jarvis <lee@jarvis.co> | 2010-12-08 10:33:14 +0000 |
---|---|---|
committer | Lee Jarvis <lee@jarvis.co> | 2010-12-08 10:33:14 +0000 |
commit | 2eb8fdc68bb8a6135ab39e20e540ace1058246f2 (patch) | |
tree | 2936a5c2b289731b1d67d4bef91dbb025df6c0e4 /Rakefile | |
parent | a3e4b6f3e8914a570aa18428693250d8eceaf766 (diff) | |
download | slop-2eb8fdc68bb8a6135ab39e20e540ace1058246f2.tar.gz |
added rake install task rather than modifying readme every time
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 21 |
1 files changed, 5 insertions, 16 deletions
@@ -1,26 +1,15 @@ require 'rspec/core/rake_task' -require File.join(File.dirname(__FILE__), 'lib/slop') +require File.expand_path('../lib/slop', __FILE__) RSpec::Core::RakeTask.new(:spec) do |spec| spec.rspec_opts = ["-c", "--fail-fast", "-f documentation"] spec.pattern = 'spec/**/*_spec.rb' end -namespace :readme do - - desc "Modify readme documentation automatically" - task :compile do - latest_version = 'slop-' + Slop::VERSION - readme_filepath = File.join(File.dirname(__FILE__), "README.md") - - puts "Updating gem commands to instruct developer with version #{latest_version}" - - working_readme = File.read(readme_filepath) - working_readme.gsub! /(slop-[0-9]+\.[0-9]+\.[0-9]+)/, latest_version - - File.open(readme_filepath, "w") { |readme| readme.puts working_readme } - end - +desc "Install Slop as a Ruby gem" +task :install do + sh("gem build slop.gemspec") + sh("gem install slop-#{Slop::VERSION}.gem") end task :default => :spec |