galerts 1.0.0 → 1.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5cb0c39e02378baf953220a1a115b974de39d7b
4
- data.tar.gz: a50d19fb9b533aa49cc893ad47177bc3a3748763
3
+ metadata.gz: f88f40fdf2987be7f58b77b1da44519638f3b054
4
+ data.tar.gz: 1137978841c12eb83f4ee1943d9cb25eb698ab87
5
5
  SHA512:
6
- metadata.gz: 2fb5d10dde9537a902a3f673bdd53a8cbd29fb5c7928f8a56365d09c5ded9428e9c1e381e6d4c698b24b704dc9b499af4129ed59fb9703be0b3e01cf3f91b4ea
7
- data.tar.gz: 6ae338a36a44410083d0259de4e14dccf718fa876f04d71eb5750fc17688d829cba79115194753403eb8ee618e5362b01dc5f0b45ca46655bf5e436c681e525c
6
+ metadata.gz: 4bd8dd01be0edc8a28a053919699292d6d4c6d524c3f2a60aef7ef7634e30db95be30049e47dbee57029c19f5fb059c191163d4447adf874b5241f0e0154674e
7
+ data.tar.gz: ef9a7f1a250887d296e20db23459d558481edc1bc648741bb31fe1e31e4cf8ccbb36047078878820598316a1332de4fb351e5f1770531b096c136e65d0ffcf5f
@@ -3,7 +3,7 @@ require File.expand_path('../lib/galerts/version', __FILE__)
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'galerts'
5
5
  s.version = Galerts::VERSION.dup
6
- s.date = '2014-09-16'
6
+ s.date = Time.now.strftime "%Y-%m-%d"
7
7
  s.summary = 'Ruby library to manage google alerts'
8
8
  s.description = %q{Ruby library to manage google alerts}
9
9
  s.authors = ["Emre Can Yılmaz"]
@@ -4,6 +4,7 @@ module Galerts
4
4
  DELETE_ALERT_URL = 'https://www.google.com/alerts/delete?'
5
5
  MODIFY_ALERT_URL = 'https://www.google.com/alerts/modify?'
6
6
  GOOGLE_LOGIN_URL = 'https://accounts.google.com/ServiceLogin?'
7
+ GOOGLE_URL = 'https://www.google.com'
7
8
  ALERTS_URL = 'https://www.google.com/alerts'
8
9
  LOGIN_URL = "#{GOOGLE_LOGIN_URL}service=alerts&continue=#{ALERTS_URL}"
9
10
 
@@ -56,7 +56,7 @@ module Galerts
56
56
  result << Alert.new(alert[2][3][1], {
57
57
  id: alert[2].last.last.last,
58
58
  query: alert[2][3][1],
59
- feed_url: "/alerts/feeds/#{alert.last}/#{alert[2].last.last.last}",
59
+ feed_url: "#{ALERTS_URL}/feeds/#{alert.last}/#{alert[2].last.last.last}",
60
60
  data_id: alert[1],
61
61
  domain: alert[2][3][2],
62
62
  language: alert[2][3][3][1],
@@ -139,7 +139,7 @@ module Galerts
139
139
 
140
140
  if options[:delivery] == RSS
141
141
  alert.id = created_alert.css('a')[0]['href'].split('/').last if options[:delivery] == RSS
142
- alert.feed_url = created_alert.css('a')[0]['href']
142
+ alert.feed_url = GOOGLE_URL + created_alert.css('a')[0]['href']
143
143
  end
144
144
  alert.data_id = created_alert.css('li')[0]['data-id']
145
145
  alert
@@ -160,7 +160,7 @@ module Galerts
160
160
 
161
161
  if alert.delivery == RSS
162
162
  alert.id = created_alert.css('a')[0]['href'].split('/').last if alert.delivery == RSS
163
- alert.feed_url = created_alert.css('a')[0]['href']
163
+ alert.feed_url = GOOGLE_URL + created_alert.css('a')[0]['href']
164
164
  end
165
165
  alert.data_id = created_alert.css('li')[0]['data-id']
166
166
  alert
@@ -1,3 +1,3 @@
1
1
  module Galerts
2
- VERSION = '1.0.0'.freeze unless defined?(::Galerts::VERSION)
2
+ VERSION = '1.0.1'.freeze unless defined?(::Galerts::VERSION)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: galerts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emre Can Yılmaz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-16 00:00:00.000000000 Z
11
+ date: 2014-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize