From 7a7f06485f904329495e11fb02a9c1b91ce6fbb1 Mon Sep 17 00:00:00 2001 From: Bill Niblock Date: Sat, 14 Oct 2017 22:34:21 -0400 Subject: [PATCH] sapling.rb: Update for gemspec - Modify required gems in accordance with re-org - Fix minor logic bug for 'read' command - Remove start command; placed into executable in bin/ --- lib/sapling.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/sapling.rb b/lib/sapling.rb index 31cbdb5..2025207 100644 --- a/lib/sapling.rb +++ b/lib/sapling.rb @@ -3,13 +3,13 @@ require 'thor' require 'yaml' -Dir[File.join(__dir__, '..', 'lib', '*.rb')].each { |file| require file } +Dir[File.join(__dir__, 'sapling', '*.rb')].each { |file| require file } # The main Sapling interface. class Sapling < Thor desc 'read TREE', 'Load and traverse the TREE' def read(tree) - exit if verify_tree(tree) + exit unless verify_tree(tree) puts 'Welcome to Sapling, a Dialogue Tree Utility.' speaker = Dialogue::Speaker.new(YAML.load_file(tree), false) speaker.conversation @@ -41,5 +41,3 @@ class Sapling < Thor puts 'Cool feature, bro!' end end - -Sapling.start(ARGV)