hacker_todo_list 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/hacker_todo_list.gemspec +1 -1
- data/lib/hacker_todo_list/setup.rb +4 -3
- data/readme.md +29 -5
- metadata +1 -1
data/hacker_todo_list.gemspec
CHANGED
@@ -4,14 +4,15 @@ module HackerToDo
|
|
4
4
|
attr_accessor :auth
|
5
5
|
|
6
6
|
def initialize
|
7
|
-
|
8
|
-
|
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(
|
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
|
-
|
20
|
-
|
19
|
+
> require "hacker_todo_list"
|
20
|
+
|
21
|
+
> todo_list = HackerToDo::ToDoList.new
|
21
22
|
|
22
|
-
|
23
|
+
Username: manjunath-nm89
|
24
|
+
Password:
|
23
25
|
|
24
|
-
|
26
|
+
> todo_list.add "Create a ruby gem \nUpdate the version \nLearn to play Guitar"
|
25
27
|
|
26
|
-
|
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.
|