contacts 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -137,7 +137,7 @@ Class <a href="Contacts/Yahoo.html" class="link">Contacts::Yahoo</a><br />
137
137
  <tr class="top-aligned-row context-row">
138
138
  <td class="context-item-name">VERSION</td>
139
139
  <td>=</td>
140
- <td class="context-item-value">&quot;1.0.4&quot;</td>
140
+ <td class="context-item-value">&quot;1.0.5&quot;</td>
141
141
  </tr>
142
142
  </table>
143
143
  </div>
@@ -108,7 +108,7 @@
108
108
  <tr class="top-aligned-row context-row">
109
109
  <td class="context-item-name">URL</td>
110
110
  <td>=</td>
111
- <td class="context-item-value">&quot;http://www.hotmail.com/&quot;</td>
111
+ <td class="context-item-value">&quot;http://login.live.com/login.srf?id=2&quot;</td>
112
112
  </tr>
113
113
  <tr class="top-aligned-row context-row">
114
114
  <td class="context-item-name">OLD_CONTACT_LIST_URL</td>
@@ -15,7 +15,11 @@
15
15
  <span class="ruby-ivar">@use_new_contact_url</span> = <span class="ruby-keyword kw">false</span>
16
16
 
17
17
  <span class="ruby-identifier">data</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">forward</span> = <span class="ruby-identifier">get</span>(<span class="ruby-constant">URL</span>)
18
- <span class="ruby-identifier">data</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">forward</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">forward</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-constant">URL</span>)
18
+
19
+ <span class="ruby-identifier">old_url</span> = <span class="ruby-constant">URL</span>
20
+ <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">forward</span>.<span class="ruby-identifier">nil?</span>
21
+ <span class="ruby-identifier">data</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">forward</span>, <span class="ruby-identifier">old_url</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">forward</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">old_url</span>) <span class="ruby-operator">+</span> [<span class="ruby-identifier">forward</span>]
22
+ <span class="ruby-keyword kw">end</span>
19
23
 
20
24
  <span class="ruby-identifier">postdata</span> = <span class="ruby-node">&quot;PPSX=#{CGI.escape(data.split(&quot;&gt;&lt;&quot;).grep(/PPSX/).first[/=\S+$/][2..-3])}&amp;&quot;</span>
21
25
  <span class="ruby-identifier">postdata</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;PwdPad=#{PWDPAD[0...(PWDPAD.length-@password.length)]}&amp;&quot;</span>
data/doc/created.rid CHANGED
@@ -1 +1 @@
1
- Tue Aug 28 17:00:59 PDT 2007
1
+ Tue Aug 28 17:09:48 PDT 2007
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Aug 28 17:00:28 PDT 2007</td>
59
+ <td>Tue Aug 28 17:09:30 PDT 2007</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Mon Jun 04 13:29:50 PDT 2007</td>
59
+ <td>Tue Aug 28 17:08:49 PDT 2007</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
data/lib/contacts/base.rb CHANGED
@@ -8,7 +8,7 @@ require "thread"
8
8
 
9
9
  class Contacts
10
10
  TYPES = {}
11
- VERSION = "1.0.4"
11
+ VERSION = "1.0.5"
12
12
 
13
13
  class Base
14
14
  def initialize(login, password)
@@ -1,6 +1,6 @@
1
1
  class Contacts
2
2
  class Hotmail < Base
3
- URL = "http://www.hotmail.com/"
3
+ URL = "http://login.live.com/login.srf?id=2"
4
4
  OLD_CONTACT_LIST_URL = "http://%s/cgi-bin/addresses"
5
5
  NEW_CONTACT_LIST_URL = "http://%s/mail/GetContacts.aspx"
6
6
  COMPOSE_URL = "http://%s/cgi-bin/compose?"
@@ -12,7 +12,11 @@ class Contacts
12
12
  @use_new_contact_url = false
13
13
 
14
14
  data, resp, cookies, forward = get(URL)
15
- data, resp, cookies, forward = get(forward, cookies, URL)
15
+
16
+ old_url = URL
17
+ until forward.nil?
18
+ data, resp, cookies, forward, old_url = get(forward, cookies, old_url) + [forward]
19
+ end
16
20
 
17
21
  postdata = "PPSX=#{CGI.escape(data.split("><").grep(/PPSX/).first[/=\S+$/][2..-3])}&"
18
22
  postdata += "PwdPad=#{PWDPAD[0...(PWDPAD.length-@password.length)]}&"
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: contacts
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.4
6
+ version: 1.0.5
7
7
  date: 2007-08-28 00:00:00 -07:00
8
8
  summary: Ridiculously easy contact list information from various providers including Yahoo, Gmail, and Hotmail
9
9
  require_paths: