hnposts 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/hnposts +11 -3
- data/lib/hnposts/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: 68d893f1165efc23bf5d3dbbb500f7c05d1d6242
|
4
|
+
data.tar.gz: 13ad6bb3a4f43719afd3402be0f5c997ba7d68bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c743222b23fc961008efcffae37bfa4cdce0b6feb0282175911cb378f5e184a6fff9f276fdd82f97a9c74cba519dcdf24086105a91c111d4ce1a6c4b618889e
|
7
|
+
data.tar.gz: a68d08ac29df736191b86eb51dfaf383bdf29ce345b72e5465e3a4dab9e75bcda3715f02d95c351e9bf4a4a98f1474194b14b1aea808360f6a2f96f156338aff
|
data/bin/hnposts
CHANGED
@@ -12,7 +12,15 @@ enc_opts = {
|
|
12
12
|
|
13
13
|
posts = HNPosts.fetch_posts
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
if STDOUT.tty?
|
16
|
+
puts "Hacker News Stories".red.bold
|
17
|
+
posts.each do |p|
|
18
|
+
puts "#{format('%2d', p.position)}. #{p.title.blue} | " \
|
19
|
+
"#{p.comments.to_s.yellow.bold} #{"comments".yellow} | " \
|
20
|
+
"#{p.points.to_s.yellow.bold} #{"points".yellow}".encode(enc,enc_opts)
|
21
|
+
end
|
22
|
+
else
|
23
|
+
posts.each do |p|
|
24
|
+
puts "#{p.title} | #{p.comments} comments | #{p.points} points".encode(enc,enc_opts)
|
25
|
+
end
|
18
26
|
end
|
data/lib/hnposts/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hnposts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sankaranarayanan Viswanathan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|