Sha256: 6e8ea3fe59062f9983322886c384b71c0ba41f8b80b91dbe4eaf509fcf4f7ccc
Contents?: true
Size: 937 Bytes
Versions: 5
Compression:
Stored size: 937 Bytes
Contents
module RubiGen #:nodoc: module Commands #:nodoc: class Create #:nodoc: # Launch given Rake task in destination_path def rake(task_name) logger.rake task_name Dir.chdir(destination_path('')){ system("rake #{task_name}") } end # Copy one directory to another in destination_path # Can be useful to duplicate index from development to production, # instead of indexing twice. def mirror(relative_source,relative_destination) logger.mirror "#{relative_source} -> #{relative_destination}" source = destination_path(relative_source) destination = destination_path(relative_destination) FileUtils.cp_r source, destination end # Remove every file from destination_path # Useful to remove temporary dirs. def clean FileUtils.remove_entry_secure destination_path('') end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
picolena-0.1.6 | lib/rubigen_ext.rb |
picolena-0.1.7 | lib/rubigen_ext.rb |
picolena-0.1.8 | lib/rubigen_ext.rb |
picolena-0.2.0 | lib/rubigen_ext.rb |
picolena-0.2.2 | lib/rubigen_ext.rb |