| 18 | | root = File.expand_path(ReorderExtension.root) |
|---|
| 19 | | sources = Dir.glob(File.join(root, 'public', '*')) |
|---|
| 20 | | radiant_root = File.expand_path(RAILS_ROOT) |
|---|
| 21 | | destination = File.join(radiant_root, 'public') |
|---|
| 22 | | cp_r sources, destination |
|---|
| | 18 | is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) } |
|---|
| | 19 | Dir[ReorderExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file| |
|---|
| | 20 | path = file.sub(ReorderExtension.root, '') |
|---|
| | 21 | directory = File.dirname(path) |
|---|
| | 22 | puts "Copying #{path}..." |
|---|
| | 23 | mkdir_p RAILS_ROOT + directory |
|---|
| | 24 | cp file, RAILS_ROOT + path |
|---|
| | 25 | end |
|---|