hurriyet_cli 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 596adbe2eb781657a802fb91395d0082f7a2d8b5
4
- data.tar.gz: 60822453f12e13326fc1a51877f79ccba618aed3
3
+ metadata.gz: b94b13b5c22dd0c4cac3fe7189f5e0667a8d4ced
4
+ data.tar.gz: 94cf9d8d6f7e11acb0036c59422251f7b90f9dd6
5
5
  SHA512:
6
- metadata.gz: a061c85807af2b9c3829bd30d0770b4ff8f61018aebcf21dc2a84b3ffa2fdf6016d1116288d2cc803acbfa3f7fef147b8c5a60ccf141b815744ad0021b6ed3d2
7
- data.tar.gz: 1ab6c516210113d01a6ab492543f3c394685f06ed0ed1016164d88e04783490db1ae8a1b4475d1d5587bdd2f19548a0fb943d6495ae81f53839b1d78478be170
6
+ metadata.gz: 30c31face20071561d013ef0ab496b24d64f5cbce20b615b43f2675c5f99e88dc0a572e2feff8ab95713e9e67b807744a937231ebcb8eca9121fcade6b10a899
7
+ data.tar.gz: c029ca5eeb7cdb7b601a1ff6d382ddbea2c7953587360d2bf92487df8ebbb449d6d542187d945ff80ff0cfa8e61170287fab2f9a967106a78a441a3517d2b045
data/README.md CHANGED
@@ -23,8 +23,12 @@ Or install it yourself as:
23
23
  Export your ```API_KEY``` that you get from [https://developers.hurriyet.com.tr](https://developers.hurriyet.com.tr)
24
24
 
25
25
  ```bash
26
- $ bundle exec bin/hurriyet_cli articles # Fetch all articles
27
- $ bundle exec bin/hurriyet_cli articles --top 5 # Fetch top 5 articles
26
+ $ export API_KEY=<YOUR_API_KEY>
27
+ ```
28
+
29
+ ```bash
30
+ $ hurriyet_cli articles # Fetch all articles
31
+ $ hurriyet_cli articles --top 5 # Fetch top 5 articles
28
32
  ```
29
33
 
30
34
  ## Thanks
@@ -17,10 +17,10 @@ module HurriyetCli
17
17
 
18
18
  private
19
19
  def formated_parse(articles)
20
- articles.each do |a|
21
- created_at = Time.parse(a["CreatedDate"]).strftime("%d/%m/%y|%H:%M")
22
- @display.puts "#{created_at} - #{Rainbow(a["Title"]).red} - #{Rainbow(a["Url"]).cyan}"
20
+ articles.each.with_index(1) do |a, i|
21
+ created_at = Time.parse(a["CreatedDate"]).strftime("%d/%m/%y | %H:%M")
22
+ @display.print "#{i} - #{Rainbow(a["Title"]).red} - #{Rainbow(created_at).color(:yellow)} \n #{Rainbow(a["Description"]).color(:dimgray)} \n #{Rainbow(a["Url"]).cyan} \n"
23
23
  end
24
24
  end
25
25
  end
26
- end
26
+ end
@@ -17,10 +17,10 @@ module HurriyetCli
17
17
 
18
18
  private
19
19
  def formated_parse(columns)
20
- columns.each do |a|
21
- created_at = Time.parse(a["CreatedDate"]).strftime("%d/%m/%y|%H:%M")
22
- @display.puts "#{created_at} - #{Rainbow(a["Title"]).red} - #{Rainbow(a["Fullname"]).orange} - #{Rainbow(a["Url"]).cyan}"
20
+ columns.each.with_index(1) do |a, i|
21
+ created_at = Time.parse(a["CreatedDate"]).strftime("%d/%m/%y | %H:%M")
22
+ @display.print "#{i} - #{Rainbow(a["Title"]).red} - #{Rainbow(a["Fullname"]).orange} - #{Rainbow(created_at).color(:blue)} \n #{Rainbow(a["Description"]).color(:dimgray)} \n #{Rainbow(a["Url"]).cyan} \n"
23
23
  end
24
24
  end
25
25
  end
26
- end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module HurriyetCli
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hurriyet_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ender Ahmet Yurt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-25 00:00:00.000000000 Z
11
+ date: 2016-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler