-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathRakefile
More file actions
23 lines (19 loc) · 749 Bytes
/
Rakefile
File metadata and controls
23 lines (19 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'bundler/setup'
require 'bundler/gem_tasks'
require 'rake/testtask'
task :default => :test
Rake::TestTask.new do |t|
t.libs << 'test'
t.pattern = ['test/controllers/*_test.rb', 'test/features/*_test.rb']
t.verbose = true
end
desc 'Update jquery-pjax to last version'
task :update do
require 'open-uri'
version = open('https://github.com/defunkt/jquery-pjax/commit/master').readlines.grep(/<title>/)[0][/\b[0-9a-f\.]+\b/, 0]
message = "Update pjax to #{version}"
data = open('https://raw.github.com/defunkt/jquery-pjax/master/jquery.pjax.js').read
File.open('vendor/assets/javascripts/jquery.pjax.js', 'w') { |f| f.write data }
sh 'git add vendor/assets/javascripts/jquery.pjax.js'
sh "git commit -m '#{message}'"
end