module AppboxOctopress::Utilities

Constants

CSS_DIR
PLUGINS_DIR

Public Class Methods

install() click to toggle source
# File lib/appbox_octopress/utilities.rb, line 6
def self.install
  FileUtils.copy_file plugin_path, plugin_destination
  FileUtils.copy_file css_path, css_destination
  add_stylesheet
end
remove() click to toggle source
# File lib/appbox_octopress/utilities.rb, line 12
def self.remove
  FileUtils.rm plugin_destination
  FileUtils.rm css_destination
end

Protected Class Methods

add_stylesheet() click to toggle source
# File lib/appbox_octopress/utilities.rb, line 35
def self.add_stylesheet
  File.open('source/_includes/custom/head.html', 'a') { |file| file << "<link href=\"{{ root_url }}/stylesheets/appbox.css\" media=\"screen, projection\" rel=\"stylesheet\" type=\"text/css\">\n"}
end
css_destination() click to toggle source
# File lib/appbox_octopress/utilities.rb, line 31
def self.css_destination
  File.join(Dir.pwd, 'source', 'stylesheets', 'appbox.css')
end
css_path() click to toggle source
# File lib/appbox_octopress/utilities.rb, line 27
def self.css_path
  File.join(CSS_DIR, 'appbox.css')
end
plugin_destination() click to toggle source
# File lib/appbox_octopress/utilities.rb, line 23
def self.plugin_destination
  File.join(Dir.pwd, 'plugins', 'appbox.rb')
end
plugin_path() click to toggle source
# File lib/appbox_octopress/utilities.rb, line 19
def self.plugin_path
  File.join(PLUGINS_DIR, 'appbox.rb')
end