Sha256: da750d7ceece94eb4890880c1f526d293ed838f54b21edd021c7488c1677cc91
Contents?: true
Size: 741 Bytes
Versions: 245
Compression:
Stored size: 741 Bytes
Contents
require "fileutils" require "find" namespace :smock do desc "Move files to the Rails assets directory." task :install, [:sass_path] do |t, args| args.with_defaults(:sass_path => 'public/stylesheets/sass') source_root = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) FileUtils.mkdir_p("#{Rails.root}/#{args.sass_path}/smock") FileUtils.cp_r("#{source_root}/app/assets/stylesheets/.", "#{Rails.root}/#{args.sass_path}/smock", { :preserve => true }) Find.find("#{Rails.root}/#{args.sass_path}/smock") do |path| if path.end_with?(".css.scss") path_without_css_extension = path.gsub(/\.css\.scss$/, ".scss") FileUtils.mv(path, path_without_css_extension) end end end end
Version data entries
245 entries across 245 versions & 1 rubygems