Skip to content

Instantly share code, notes, and snippets.

@milligramme
Last active October 7, 2015 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milligramme/3227201 to your computer and use it in GitHub Desktop.
Save milligramme/3227201 to your computer and use it in GitHub Desktop.
Earthquake インストールされてるプラグイン表示
# -*- coding: utf-8 -*-
# show installed plugin for earthquake.gem
#
require "pathname"
Earthquake.init do
command :show_plugins do
plugin_dir = Pathname.new(config[:plugin_dir])
plugin_dir.children.each do |rb|
plugin_name = rb.basename.to_s
if plugin_name.match(/.+\.rb$/)
puts "%24s_____%s".c(90) % [plugin_name, File.new(rb).read(140).gsub(/[\r\n]/,"").split("command").join("command".c(31))]
end
end
end
end
# https://gist.github.com/milligramme/3227201
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment