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 +4 -4
- data/galerts.gemspec +1 -1
- data/lib/galerts/defaults.rb +1 -0
- data/lib/galerts/manager.rb +3 -3
- data/lib/galerts/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f88f40fdf2987be7f58b77b1da44519638f3b054
|
|
4
|
+
data.tar.gz: 1137978841c12eb83f4ee1943d9cb25eb698ab87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4bd8dd01be0edc8a28a053919699292d6d4c6d524c3f2a60aef7ef7634e30db95be30049e47dbee57029c19f5fb059c191163d4447adf874b5241f0e0154674e
|
|
7
|
+
data.tar.gz: ef9a7f1a250887d296e20db23459d558481edc1bc648741bb31fe1e31e4cf8ccbb36047078878820598316a1332de4fb351e5f1770531b096c136e65d0ffcf5f
|
data/galerts.gemspec
CHANGED
|
@@ -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 =
|
|
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"]
|
data/lib/galerts/defaults.rb
CHANGED
|
@@ -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
|
|
data/lib/galerts/manager.rb
CHANGED
|
@@ -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: "/
|
|
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
|
data/lib/galerts/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2014-09-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mechanize
|