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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c40789dee75dd957ce3e16f23a83922bf5ed5c9005c90e823b05512790a6e7d
4
- data.tar.gz: 1efdb729a65f1e9b3eef6ed00807863c1a049d7e2d4d792a46082bd4f39de443
3
+ metadata.gz: 5f934b8403a11e4c0e369e974df54bead795fb05669d1d1c53508b4d873f3853
4
+ data.tar.gz: 567eec5047ef1dc045f50232e8cb1ab7aa2e294bf8d6989ceeb6743c654b4daa
5
5
  SHA512:
6
- metadata.gz: 8c0e029a26442b4fbe9c81452a103cae18d4f15ea54ba35ccbbd10696f248d7ce12d5fe943690212a840145a83d3de5d001deb30daf93c7ec0b7f9f2d7a5285b
7
- data.tar.gz: 22ee25d68cf4952cb5340b20977bed527505aec211563240f737470c860ee52b2da111e4fa0110475ac7d3a1540743ac3e2a44b618660cdad0002e72e9d1ed92
6
+ metadata.gz: 6b43b850073043021a6d23a682b4c543a8724cc15208042bdce837878fac1d91599c66ca50cb997ab6153ef1b973b6895c1d996356e4a23ca1f9899726e373b2
7
+ data.tar.gz: 5b2f7fe2b2954cf5759954989c2ef4b3152c0501c0100ce1bbc6749dbad7a604a1a0e83355fafff0e82b26d00447e4182d01b7c37b8181143f83ee925918eac2
data/Gemfile.lock CHANGED
@@ -1,7 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- googem (0.1.0)
4
+ googem (1.0.1)
5
+ oj
6
+ tty-pager
7
+ tty-prompt
8
+ tty-spinner
9
+ unirest
5
10
 
6
11
  GEM
7
12
  remote: https://rubygems.org/
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|
@@ -1,3 +1,3 @@
1
1
  module Googem
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
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}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: googem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ThienLV