diff options
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 |