Module: PopularPost::Utilities

Defined in:
lib/octopress-gauges-popular-posts/utilities.rb

Constant Summary collapse

TEMPLATES_DIR =
File.expand_path(File.dirname(__FILE__) + '/../../templates')

Class Method Summary collapse

Class Method Details

.installObject

Public: Installs the templates to the designated locations

Examples

PopularPost.install
# => nil

Returns nothing


15
16
17
18
19
20
# File 'lib/octopress-gauges-popular-posts/utilities.rb', line 15

def self.install
  FileUtils.copy_file plugin_path, plugin_destination
  FileUtils.copy_file aside_path, aside_destination
  Dir.mkdir cache_path unless File.directory?(cache_path)
  FileUtils.copy_file config_path, config_destination unless File.exists?(config_destination)
end

.removeObject

Public: Removes plugin files

Examples

PopularPost.remove
# => nil

Returns nothing


30
31
32
33
# File 'lib/octopress-gauges-popular-posts/utilities.rb', line 30

def self.remove
  FileUtils.rm plugin_destination
  FileUtils.rm aside_destination
end