Last active
October 7, 2015 21:18
-
-
Save milligramme/3227201 to your computer and use it in GitHub Desktop.
Earthquake インストールされてるプラグイン表示
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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