Sha256: 500090f30678f0729a07819c004d8450e275889e7a1ef9cc32f0f7151b5cc465
Contents?: true
Size: 1.18 KB
Versions: 3
Compression:
Stored size: 1.18 KB
Contents
desc "Update" task :update do src_path = "x-editable-src" dist_path = "#{src_path}/dist/bootstrap-editable" system("rm -rf #{src_path}") system("git clone https://github.com/vitalets/x-editable #{src_path}") system("cd #{src_path} && npm install") system("cd #{src_path} && grunt build") system("cp #{dist_path}/img/clear.png vendor/assets/images/") system("cp #{dist_path}/img/loading.gif vendor/assets/images/") system("cp #{dist_path}/css/bootstrap-editable.css vendor/assets/stylesheets/bootstrap-editable.scss") system("cp #{dist_path}/js/bootstrap-editable.js vendor/assets/javascripts/") fixes system("rm -rf x-editable-src") end def fixes replace_string_in_file("vendor/assets/stylesheets/bootstrap-editable.scss", "url('../img/loading.gif')", "image-url('loading.gif')") replace_string_in_file("vendor/assets/stylesheets/bootstrap-editable.scss", "url('../img/clear.png')", "image-url('clear.png')") end def replace_string_in_file(file, find, replace) file_content = File.read(file) File.open(file, "w") do |f| f.puts file_content.gsub!(find, replace) end end desc "Build" task "build" do system("gem build bootstrap-x-editable-rails.gemspec") end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bootstrap-x-editable-rails-1.4.4 | Rakefile |
bootstrap-x-editable-rails-1.4.3 | Rakefile |
bootstrap-x-editable-rails-1.4.1 | Rakefile |