Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

copy over assets on plugin installation

  • Loading branch information...
commit 6757a86000a0e96a6ea3afdd55e0a90288fb8dac 1 parent 19f0b72
@dfl dfl authored
View
0  assets/swfobject.js → assets/javascripts/swfobject.js
File renamed without changes
View
18 install.rb
@@ -1 +1,17 @@
-# Install hook code here
+# Workaround a problem with script/plugin and http-based repos.
+# See http://dev.rubyonrails.org/ticket/8189
+Dir.chdir(Dir.getwd.sub(/vendor.*/, '')) do
+
+ ##
+ ## Copy over asset files (javascript/css/images) from the plugin directory to public/
+ ##
+
+ def copy_files(source_path, destination_path, directory)
+ source, destination = File.join(directory, source_path), File.join(RAILS_ROOT, destination_path)
+ # FileUtils.mkdir(destination) unless File.exist?(destination)
+ FileUtils.cp_r(Dir.glob(source+'/*.*'), destination)
+ end
+
+ directory = File.dirname(__FILE__)
+ copy_files("/assets", "/public", directory)
+end
Please sign in to comment.
Something went wrong with that request. Please try again.