From 1ee12d52a12c457c96c96cc3b850ecc00e558e5f Mon Sep 17 00:00:00 2001 From: Fabiano Beselga Date: Fri, 31 Jan 2014 10:31:15 -0200 Subject: [PATCH] updating bulldoggy gem and giving feedback for the user when adding task --- Gemfile | 2 +- Gemfile.lock | 4 ++-- lib/bulldoggy-thor/cli.rb | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 4d25548..6f7f4bd 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' gem 'thor' -gem 'bulldoggy', '~> 0.0.1.alpha' +gem 'bulldoggy', '~> 0.0.5.alpha' gem 'rake' diff --git a/Gemfile.lock b/Gemfile.lock index 3768020..2c4b428 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - bulldoggy (0.0.3.alpha) + bulldoggy (0.0.5.alpha) rake (10.1.1) thor (0.18.1) @@ -9,6 +9,6 @@ PLATFORMS ruby DEPENDENCIES - bulldoggy (~> 0.0.1.alpha) + bulldoggy (~> 0.0.5.alpha) rake thor diff --git a/lib/bulldoggy-thor/cli.rb b/lib/bulldoggy-thor/cli.rb index ad446e3..b1aa101 100644 --- a/lib/bulldoggy-thor/cli.rb +++ b/lib/bulldoggy-thor/cli.rb @@ -5,7 +5,8 @@ module BulldoggyThor class CLI < ::Thor desc "add_task DESCRIPTION", "Type a task to create with DESCRIPTION" def add_task(description) - Bulldoggy.add_task(description) + task = Bulldoggy.add_task(description) + puts "id: #{task.id}, description: #{task.description}" end desc "remove_task TASK_ID", "Removes a task with TASK_ID" @@ -15,7 +16,8 @@ def remove_task(task_id) desc "fetch", "fetches all tasks" def fetch - Bulldoggy.fetch + tasks = Bulldoggy.fetch + puts tasks end desc "check_task TASK_ID", "Mark a task as done"