gmail_todo 0.0.1 → 0.0.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/todo +1 -1
  3. data/lib/gmail_todo.rb +12 -5
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1804b6dcce2a0d49cbaedb427a92c248d84dfb91
4
- data.tar.gz: 0b31b01044ff46b6524c4c08adf77af298ab3dae
3
+ metadata.gz: 841e95b4df367f8a291646d7e37f2c83502a51cb
4
+ data.tar.gz: fa41ead79b2f78ec84714ff44ac8a922cb79bf68
5
5
  SHA512:
6
- metadata.gz: 29e0557487144dc4062949d644425518396f05460153bd19f1277554b0ea71abc0ef55149baaa2eff41db92e82958fd03f4f403cc91c7b6d8cc376a86bd44f4e
7
- data.tar.gz: c371eaa16ac725f6dc3f5063f13e5776665d1e06b8e330988a448a8279283d4733fcc01d7a3f3a9f2502a675d58ce9094eb0ea4a8b4eee0514de3c003fe298f4
6
+ metadata.gz: 99f5049962730f6b2a344b3ff5218b2405067b6046cf8320ff3d414532c12585f37b45c815b3c9dae06ca56209b8d35e2baaa97bbebe8441bfa72d343b7a2541
7
+ data.tar.gz: 240550597986216b150afafe2710e552cb559ae85669a282465aa39fd02b1843b3d6a10bfd6d3b3c6d820800be59318d3ddc79a1ceca965e7edd07f5c7b4e10d
data/bin/todo CHANGED
@@ -4,5 +4,5 @@ require File.expand_path('../../lib/gmail_todo', __FILE__)
4
4
 
5
5
  fork do
6
6
  mailer = GmailToDo.new
7
- mailer.send_todo ARGV[0]
7
+ mailer.send_todo ARGV[0], ARGV[1]
8
8
  end
data/lib/gmail_todo.rb CHANGED
@@ -12,17 +12,24 @@ class GmailToDo
12
12
  @password = credentials["gmail"]["password"]
13
13
  end
14
14
 
15
- def send_todo todo
16
- gmail = Gmail.connect(@username, @password)
15
+ def username
16
+ @username
17
+ end
18
+
19
+ def password
20
+ @password
21
+ end
22
+
23
+ def send_todo(todo, details = nil)
24
+ gmail = Gmail.connect(username, password)
17
25
 
18
26
  gmail.deliver do
19
- to "#{@username}@gmail.com"
27
+ to gmail.username
20
28
  subject "[ToDo] #{todo}"
29
+ body "#{details}"
21
30
  end
22
31
 
23
32
  gmail.logout
24
33
  end
25
34
 
26
35
  end
27
-
28
- gm = GmailToDo.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gmail_todo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Hughes
@@ -20,7 +20,7 @@ extra_rdoc_files: []
20
20
  files:
21
21
  - bin/todo
22
22
  - lib/gmail_todo.rb
23
- homepage: http://rubygems.org/gems/gmail_todo
23
+ homepage: https://github.com/pickle27/gmail_todo
24
24
  licenses:
25
25
  - MIT
26
26
  metadata: {}