Skip to content
Browse files

Add mousetrap:update rake task

  • Loading branch information...
1 parent 168323b commit a4cc50bd602a469250dbb2ca72d778401fca5748 @kugaevsky committed Jun 11, 2013
Showing with 12 additions and 0 deletions.
  1. +12 −0 Rakefile
View
12 Rakefile
@@ -3,3 +3,15 @@ require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
+
+namespace :mousetrap do
+ desc "Update Mousetrap javascript library from https://raw.github.com/ccampbell/mousetrap/master/mousetrap.js"
+ task :update do
+ ORIGIN_URL = "https://raw.github.com/ccampbell/mousetrap/master/mousetrap.js"
+ FILE_PATH = "vendor/assets/javascripts/mousetrap.js"
+ puts "Updating Mousetrap.js library from origin"
+ puts "#{ORIGIN_URL} -> #{FILE_PATH}\n\n"
+ system 'wget', ORIGIN_URL, "-O", FILE_PATH
+ puts "Mousetrap.js updated!"
+ end
+end

0 comments on commit a4cc50b

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