skygrepe 0.0.1 → 0.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/skygrepe +19 -3
  3. data/lib/skygrepe/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d84f96a728302a2b5cc52f88a85133e27ab47079
4
- data.tar.gz: b0a895987122a263e6d791eb85ffb1e4ad26cac8
3
+ metadata.gz: 6fd6ad1e12855a62e7a8a68d2ae3f1dfafe61907
4
+ data.tar.gz: 7dd30deed5ab0a00c32f18fb891ccbd3b983149a
5
5
  SHA512:
6
- metadata.gz: 74e2e353a1ae5d468a7de50a18c6bb863175b34a4b358c481f68caca06bc603baf23db1f011639902f821964b48960ed5fce54d3b02b277339b2f612682a4c40
7
- data.tar.gz: f48bc273f135b786f6fbc3649e7f8bd29735c42e997d25f089152dcc2c93c0cefe46798023b462df7e1b8afb2705cc328307b8b4edcb4214300663ac5ba9d5c3
6
+ metadata.gz: 0d1f90f2b5042d047b4838c0a348b1034cad533f9d450a902ffdf0fe1fe19ca8b67694d62f62fbbaad6bc02baf3f02df7150d7dd7da9383af329c3996e0d8ff0
7
+ data.tar.gz: 6837017e272240f721d2122a6b1fd356e7d0d276fe5760c71a84b60acfe485cfe7a858079609853551edacd2f0896cd03e4281a751975942f764fcb779e2bafa
data/bin/skygrepe CHANGED
@@ -10,8 +10,25 @@ if File.readable?(config_path)
10
10
  end
11
11
 
12
12
  unless config["main_db_path"]
13
- print "please type path/to/main.db: "
14
- path = File.expand_path($stdin.gets.strip.gsub(/\\ /, "\ "))
13
+ path = nil
14
+ files = Dir["#{ENV['HOME']}/Library/Application Support/Skype/*/main.db"].to_a
15
+ unless files.empty?
16
+ files.each.with_index do |file, idx|
17
+ puts "%2d %s" % [idx + 1, file]
18
+ end
19
+ puts "%2d %s" % [files.length + 1, "Other"]
20
+ puts "Choose path: "
21
+ idx = $stdin.gets.to_i - 1
22
+ if idx < files.length
23
+ path = files[idx]
24
+ end
25
+ end
26
+
27
+ unless path
28
+ print "please type path/to/main.db: "
29
+ path = File.expand_path($stdin.gets.strip.gsub(/\\ /, "\ "))
30
+ end
31
+
15
32
  raise "Failed to read #{path.inspect}" unless File.readable?(path)
16
33
  config = {"main_db_path" => path}
17
34
  open(config_path, "w") do |f|
@@ -19,7 +36,6 @@ unless config["main_db_path"]
19
36
  end
20
37
  end
21
38
 
22
-
23
39
  $LOAD_PATH << File.expand_path("../../lib", __FILE__)
24
40
  require 'skygrepe'
25
41
 
@@ -1,3 +1,3 @@
1
1
  module Skygrepe
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skygrepe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - akima