Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (28 sloc) 967 Bytes
task :test do
require "cutest"["test/nest*"])
task :default => :test
task :commands do
require "open-uri"
require "par"
require "json"
file = File.expand_path("lib/nest.rb", File.dirname(__FILE__))
path = ""
commands = JSON.parse(open(path).read).select do |name, command|
# Skip all DEBUG commands
next if command["group"] == "server"
# If the command has no arguments, it doesn't operate on a key
next if command["arguments"].nil?
arg = command["arguments"].first
arg["type"] == "key" ||
Array(arg["name"]) == ["channel"]
commands = { |key| key.downcase.to_sym }
source = METHODS = .+?\n\n/m) do" METHODS = #{commands.inspect}\n\n", p: 2)
end, "w") { |f| f.write source }
system "git diff --color-words #{file}"
Something went wrong with that request. Please try again.