hacker_todo_list 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'hacker_todo_list'
3
- s.version = '1.0.2'
3
+ s.version = '1.1.0'
4
4
  s.date = '2012-11-11'
5
5
  s.summary = "A command line To-Do list"
6
6
  s.description = %Q{
@@ -4,14 +4,15 @@ module HackerToDo
4
4
  attr_accessor :auth
5
5
 
6
6
  def initialize
7
- if File.exist?(CREDENTIAL_FILE)
8
- @auth = YAML.load(File.read(CREDENTIAL_FILE))
7
+ credential_file_location = File.join(Dir.home, CREDENTIAL_FILE)
8
+ if File.exists?(credential_file_location)
9
+ @auth = YAML.load(File.read(credential_file_location))
9
10
  else
10
11
  @auth = {
11
12
  :username => HackerToDo.get_from_console("Username:"),
12
13
  :password => HackerToDo.get_from_console("Password:", true)
13
14
  }
14
- File.write(CREDENTIAL_FILE, @auth.to_yaml)
15
+ File.write(credential_file_location, @auth.to_yaml)
15
16
  end
16
17
  end
17
18
  end
data/readme.md CHANGED
@@ -16,12 +16,36 @@ Installation
16
16
  Usage
17
17
  -----
18
18
 
19
- require "rubygems" (This is required if you are running < ruby 1.9)
20
- require "hacker_todo_list"
19
+ > require "hacker_todo_list"
20
+
21
+ > todo_list = HackerToDo::ToDoList.new
21
22
 
22
-
23
+ Username: manjunath-nm89
24
+ Password:
23
25
 
24
- I have also setup a client which uses the [Hacker ToDO List](https://rubygems.org/gems/hacker_todo_list) gem.
26
+ > todo_list.add "Create a ruby gem \nUpdate the version \nLearn to play Guitar"
25
27
 
26
- ruby hacker
28
+ ToDo added successfully.
27
29
 
30
+ Hacker ToDo List:
31
+ 1. Create a ruby gem
32
+ 2. Update the version
33
+ 3. Learn to play Guitar
34
+
35
+ > todo_list.delete 1 2
36
+
37
+ ToDo deleted successfully.
38
+
39
+ Hacker ToDo List:
40
+ 1. Learn to play Guitar
41
+
42
+ > todo_list.list
43
+
44
+ Hacker ToDo List:
45
+ 1. Learn to play Guitar
46
+
47
+ Examples
48
+ --------
49
+
50
+ I have setup a client which uses the [Hacker ToDO List](https://rubygems.org/gems/hacker_todo_list) gem.
51
+ Check it out, this file can be made as an executable and used as a ToDo application.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hacker_todo_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: