gmailUtilities 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/gmailUtilities.rb +11 -0
  3. metadata +45 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c62441731d5909336fd340242b8238dbd0547503
4
+ data.tar.gz: 300fbe8e537ca5edda1cc333a2ff33924c6adfc8
5
+ SHA512:
6
+ metadata.gz: b19f97720231c7a1f00f860c661a42c090e964bcb4cec6285d2db9b0c2be5ab17fefc1b12608d43a98f2a09540851d77a7a46a0f49055767224f39e3d7f32444
7
+ data.tar.gz: 6325f2f9c6f4a3866c46467770d37b620ed441690e000b0128339356c6b9fb37085e2b8d8bdc3b5bcd3896fd69e95d535435784ca0cc8683ab9e11c5d086a700
@@ -0,0 +1,11 @@
1
+ class GmailUtilities
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: gmailUtilities
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-09-25 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/gmailUtilities.rb
20
+ homepage: http://rubygems.org/gems/gmailUtilities
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: