gmailRubyUtilities 0.0.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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/gmailRubyUtilities.rb +11 -0
  3. metadata +45 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5762c5c6fae54d681965009c8d745356891869ce
4
+ data.tar.gz: 2aab341108f66e828372a5eee2ef696d79327126
5
+ SHA512:
6
+ metadata.gz: ad39f617f1ade732618862815d568b1e24da6b25e6da3e8ec8492837b8f2a92a2b87a6b0057a4d0705de79957e93d90d910c578d02f223c321ed4a41d90030c2
7
+ data.tar.gz: 2e5052f3b8bfb4aadb3140fad69cccc7328b8a2fcef6274b7d2aced9136964fd3ad5f560a14f3d112ef6935981ce06a9f7b3a0204977f9536339010052743f98
@@ -0,0 +1,11 @@
1
+ class GmailRubyUtilities
2
+ require 'gmail'
3
+
4
+ def self.readLatestMailFromGmail(username,password,sender)
5
+ gmail = Gmail.connect(username, password)
6
+ numberOfEmails=gmail.inbox.emails(:from => sender).length
7
+ mail=gmail.inbox.emails(:from => sender)[numberOfEmails-1]
8
+ linkInTheEmail=mail.html_part.decoded.scan(/<a.+?href="(.+?)".+?/)[0]
9
+ return linkInTheEmail
10
+ end
11
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gmailRubyUtilities
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Adarsha
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-10-08 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A simple hello world gem
14
+ email: adarsha.shetty.89@live.in
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/gmailRubyUtilities.rb
20
+ homepage: http://rubygems.org/gems/gmailRubyUtilities
21
+ licenses:
22
+ - None
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.4.8
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: A gem to interact with gmail
44
+ test_files: []
45
+ has_rdoc: