lib/tools.rb in capucine-0.0.2 vs lib/tools.rb in capucine-0.0.4
- old
+ new
@@ -38,25 +38,14 @@
files << File.join(Capucine.settings.gem_content_dir, 'templates', 'capucine.yaml')
content_files.each {|file| files << file}
FileUtils.cp_r files, Capucine.settings.working_dir
- self.compile if all
-
+ Capucine::Watchr.compile if all
Capucine.settings.reset_working_dir
end
- def self.compile
- Capucine.settings.get_config
- @config = Capucine.settings.config
-
- Capucine::CompassSass.run_once if @config['compass_enable']
- Capucine::Coffee.run_once if @config['coffeescript_enable']
- Capucine::Templates.run_once if @config['templates_enable']
-
- end
-
def self.render_template template_file, content = nil
config = content
template = ERB.new File.new(template_file).read
output = template.result(binding)
end
@@ -87,11 +76,13 @@
FileUtils.mkdir_p new_dir_name if is_dir
FileUtils.mv path, new_dir_name
end
+
- def clean_name name
+
+ def self.clean_name name
require_relative 'extend_string'
name.removeaccents
name.urlize({:downcase => true, :convert_spaces => true})
end