ruby-hackernews 1.3.7 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +4 -2
- data/lib/ruby-hackernews/domain/entry/entry.rb +5 -1
- data/lib/ruby-hackernews/services/entry_service.rb +3 -0
- data/lib/ruby-hackernews/services/login_service.rb +2 -2
- data/lib/ruby-hackernews/services/signup_service.rb +2 -2
- data/lib/ruby-hackernews/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f48014b00147c10a872eabab64e2c1514ac67f23
|
4
|
+
data.tar.gz: c8dad359b0c07c43e4e22272df143c1da0fcfaa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5edccf9e5df807bb7b1b65bf902a80553d4d2c8cebe615e87d999ed6b6061545bfe88b8aeb61732c4cfa999c35901fab7dc5d62711c50042b46154509a3f9a71
|
7
|
+
data.tar.gz: 1769d51cf5bb8c7889375eae78fd66df951fec39e0cd1a84a28fe829ee5dad7700ff01815dde62871ba3989b950aeb0e176e02e9d36378c87d5ae649a931df74
|
data/README.rdoc
CHANGED
@@ -35,7 +35,7 @@ You can provide a number of pages:
|
|
35
35
|
|
36
36
|
There are methods for getting specific entry types:
|
37
37
|
|
38
|
-
Entry.questions # gets the first page of questions (ask
|
38
|
+
Entry.questions # gets the first page of questions (ask HN)
|
39
39
|
Entry.newest # gets the first page of new links (new)
|
40
40
|
Entry.jobs # gets the first page of job offerts (jobs)
|
41
41
|
Entry.shows # gets the first page of shows (show HN)
|
@@ -90,7 +90,7 @@ Note that the method above will send a request to HN. If you just need the comme
|
|
90
90
|
|
91
91
|
and
|
92
92
|
|
93
|
-
entry.
|
93
|
+
entry.comments_url
|
94
94
|
|
95
95
|
Either of which will not issue a request to HN's site.
|
96
96
|
|
@@ -174,3 +174,5 @@ Will return the HN comment url of the last submitted story of that user
|
|
174
174
|
- Girish Sonawane ( https://github.com/girishso) for adding Entry#shows and Entry#new_shows methods
|
175
175
|
- Niels Van Aken ( https://github.com/nvaken ) for a bugfix in EntryPageParser
|
176
176
|
- Pedro Lambert ( https://github.com/p-lambert ) for fixing bugs and improving structure of CommentInfoParser, TimeInfoParser and UserInfoParser
|
177
|
+
- FreedomBen ( https://github.com/FreedomBen ) for fixing a typo in the readme
|
178
|
+
- Davide Santangelo ( https://github.com/davidesantangelo ) for reporting a bug related to jobs and show HN entries
|
@@ -14,7 +14,11 @@ module RubyHackernews
|
|
14
14
|
@user = user
|
15
15
|
@time = time
|
16
16
|
@comments_info = comments
|
17
|
-
|
17
|
+
if @comments_info
|
18
|
+
@cache = PageFetcher.new(@comments_info.page)
|
19
|
+
else
|
20
|
+
@cache = PageFetcher.new(@link.href)
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
24
|
def text
|
@@ -8,8 +8,8 @@ module RubyHackernews
|
|
8
8
|
login_url = page.search(".pagetop/a").last['href'].sub("/","")
|
9
9
|
login_page = agent.get(ConfigurationService.base_url + login_url)
|
10
10
|
form = login_page.forms.first
|
11
|
-
form.
|
12
|
-
form.
|
11
|
+
form.acct = username
|
12
|
+
form.pw = password
|
13
13
|
page = form.submit
|
14
14
|
return page.title != nil
|
15
15
|
end
|
@@ -9,8 +9,8 @@ module RubyHackernews
|
|
9
9
|
login_url = page.search(".pagetop/a").last['href'].sub("/","")
|
10
10
|
login_page = agent.get(ConfigurationService.base_url + login_url)
|
11
11
|
form = login_page.forms[1]
|
12
|
-
form.
|
13
|
-
form.
|
12
|
+
form.acct = username
|
13
|
+
form.pw = password
|
14
14
|
page = form.submit
|
15
15
|
return page.title != nil
|
16
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-hackernews
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Dallera
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.
|
142
|
+
rubygems_version: 2.4.8
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: An interface to Hacker News
|