googem 1.0.1 → 1.0.2
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/Gemfile.lock +6 -1
- data/lib/googem/cli.rb +1 -0
- data/lib/googem/version.rb +1 -1
- data/lib/googem.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5f934b8403a11e4c0e369e974df54bead795fb05669d1d1c53508b4d873f3853
|
|
4
|
+
data.tar.gz: 567eec5047ef1dc045f50232e8cb1ab7aa2e294bf8d6989ceeb6743c654b4daa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b43b850073043021a6d23a682b4c543a8724cc15208042bdce837878fac1d91599c66ca50cb997ab6153ef1b973b6895c1d996356e4a23ca1f9899726e373b2
|
|
7
|
+
data.tar.gz: 5b2f7fe2b2954cf5759954989c2ef4b3152c0501c0100ce1bbc6749dbad7a604a1a0e83355fafff0e82b26d00447e4182d01b7c37b8181143f83ee925918eac2
|
data/Gemfile.lock
CHANGED
data/lib/googem/cli.rb
CHANGED
|
@@ -12,6 +12,7 @@ module Googem
|
|
|
12
12
|
opts.on("-v","--version", "Show googem version") do
|
|
13
13
|
require "googem/version"
|
|
14
14
|
out << "Googem v#{Googem::VERSION}\n"
|
|
15
|
+
exit
|
|
15
16
|
end
|
|
16
17
|
|
|
17
18
|
opts.on("-k","--keyword KEYWORDS", String, "Search by keyword \"keywords\", eg: $ googem -k \"ruby\"") do |keywords|
|
data/lib/googem/version.rb
CHANGED
data/lib/googem.rb
CHANGED
|
@@ -22,6 +22,8 @@ module Googem
|
|
|
22
22
|
document["items"].each_with_index do |i, index|
|
|
23
23
|
content["#{'%-3.3s' % (index + 1).to_s}#{i["title"]}\n#{'%-3.3s' % ''}#{i["link"]}\n#{'%-3.3s' % ''}by #{'%-25.25s' % i["owner"]["display_name"]} ◇ #{Helper.minutes_in_words Time.at(i["creation_date"])} ◇ Views #{i["view_count"]} ◇ Answers #{i["answer_count"]}\n"] = -> do Helper.show_question(i["question_id"]) end;
|
|
24
24
|
end
|
|
25
|
+
|
|
26
|
+
content["#{'%-3.3s' % "X"} Exit\n"] = -> do exit end;
|
|
25
27
|
spinner.success('Done!') # Stop animation
|
|
26
28
|
puts "--------------------------------------------------- \n"
|
|
27
29
|
puts "Results found containing \"#{keywords}\": #{document["items"].count}"
|