AddressBookImporter 0.0.9 → 0.0.10

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 (2) hide show
  1. data/lib/address_book_importer.rb +3 -3
  2. metadata +10 -7
@@ -4,7 +4,7 @@ require 'cgi'
4
4
  require 'iconv'
5
5
 
6
6
  module AddressBookImporter
7
- VERSION = '0.0.9'
7
+ VERSION = '0.0.10'
8
8
 
9
9
  class EmptyEmailException < Exception ; end
10
10
  class LoginErrorException < Exception ; end
@@ -112,11 +112,11 @@ module AddressBookImporter
112
112
  raise LoginErrorException if page.uri.to_s == "https://www.google.com/accounts/ServiceLoginAuth"
113
113
  url = "http://mail.google.com/mail/?ui=html&zy=n"
114
114
  page = @agent.get(url)
115
- @agent.click(page.links[1])
115
+ @base = page.uri.to_s.split('?').first
116
116
  end
117
117
 
118
118
  def fetch_contacts(page)
119
- contact_page = @agent.get("?pnl=a&v=cl")
119
+ contact_page = @agent.get(@base+"?pnl=a&v=cl")
120
120
  emails = contact_page.search('td').select{|l|l.inner_html.chomp.split(' ')[0] =~ /([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/}.collect{|k|k.inner_html.chomp.split(' ')[0]}
121
121
  end
122
122
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: AddressBookImporter
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.9
7
- date: 2007-08-08 00:00:00 +02:00
6
+ version: 0.0.10
7
+ date: 2007-08-09 00:00:00 +02:00
8
8
  summary: Mechanize scraper for address books
9
9
  require_paths:
10
10
  - lib
@@ -37,10 +37,13 @@ files:
37
37
  - test/test_address_book_importer.rb
38
38
  test_files:
39
39
  - test/test_address_book_importer.rb
40
- rdoc_options: []
41
-
42
- extra_rdoc_files: []
43
-
40
+ rdoc_options:
41
+ - --main
42
+ - README.txt
43
+ extra_rdoc_files:
44
+ - History.txt
45
+ - Manifest.txt
46
+ - README.txt
44
47
  executables: []
45
48
 
46
49
  extensions: []
@@ -64,5 +67,5 @@ dependencies:
64
67
  requirements:
65
68
  - - ">="
66
69
  - !ruby/object:Gem::Version
67
- version: 1.2.0
70
+ version: 1.2.2
68
71
  version: