exe/wb in wb-1.0.0 vs exe/wb in wb-1.0.1
- old
+ new
@@ -4,10 +4,20 @@
require "wb"
# Exit cleanly from an early interrupt
Signal.trap("INT") { abort }
+class VersionCommand
+ def self.name
+ @name ||= "version"
+ end
+
+ def run(*)
+ $stdout.puts WB::VERSION
+ end
+end
+
class HelpCommand
def self.name
@name ||= "help"
end
@@ -56,11 +66,11 @@
gitignore_global = File.join(Etc.getpwuid.dir, ".gitignore_global")
unless IO.read(gitignore_global).include?(breadcrumb)
WB::Shell.append(gitignore_global) do |file|
file.puts("\n# ignore project notes by #{breadcrumb}")
- file.puts("/.note/")
+ file.puts(%(/#{WB.config.project_root}/))
end
end
end
private
@@ -169,9 +179,10 @@
WB::Shell.open_file(WB.config.path)
end
end
commands = [
+ VersionCommand,
HelpCommand,
InitCommand,
IgnoreCommand,
SetupCommand,
DefaultCommand,