adsense-info 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Adsense
2
2
  class Info
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
data/lib/adsense-info.rb CHANGED
@@ -7,15 +7,18 @@ module Adsense
7
7
  def initialize( username, password )
8
8
  @username = username
9
9
  @password = password
10
+ @agent = Mechanize::Mechanize.new
10
11
  end
11
12
 
12
13
  def login!
13
- @agent = Mechanize::Mechanize.new
14
14
  page = @agent.get 'http://www.gmail.com'
15
15
  form = page.forms.first
16
- form.Email = @username
17
- form.Passwd = @password
18
- @agent.submit form
16
+ if form
17
+ form.Email = @username
18
+ form.Passwd = @password
19
+ @agent.submit form
20
+ end
21
+ nil
19
22
  end
20
23
 
21
24
  def today_so_far
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 1
9
- version: 1.0.1
8
+ - 2
9
+ version: 1.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Clive Crous
@@ -103,7 +103,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
103
  requirements:
104
104
  - - ">="
105
105
  - !ruby/object:Gem::Version
106
- hash: -421568899
106
+ hash: -1003718979
107
107
  segments:
108
108
  - 0
109
109
  version: "0"
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  requirements:
113
113
  - - ">="
114
114
  - !ruby/object:Gem::Version
115
- hash: -421568899
115
+ hash: -1003718979
116
116
  segments:
117
117
  - 0
118
118
  version: "0"