keybase-unofficial-local 0.1.0 → 0.1.1
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/lib/keybase/local/kbfs.rb +21 -1
- data/lib/keybase/local.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: c9abc92bbf6c5c1e35a0f214950abf59dfffe6ad
|
4
|
+
data.tar.gz: 833f5c2a500127851944c3d18857a1c7fdfda64c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36ab4b95a42f5be43feacdf40d7d6e234264759098741863e8cc035f690fccb40abc52b14885290b38750b00791e9002230014b5a7a39b8dbeb2b901ba8c0436
|
7
|
+
data.tar.gz: 113b4a5985bd2cf4d7e945563acb24cada98e4a5695c5fa2644fc7421791efc01b97f202ee16765bf6215cc1c00b0c50e4dd2ebda6dfc7542295f3a33820ebd8
|
data/lib/keybase/local/kbfs.rb
CHANGED
@@ -14,8 +14,28 @@ module Keybase
|
|
14
14
|
KBFS_STATUS_FILE = File.join Config::KBFS_MOUNT, ".kbfs_status"
|
15
15
|
|
16
16
|
class << self
|
17
|
-
# @return [Boolean] whether KBFS is currently
|
17
|
+
# @return [Boolean] whether or not KBFS is currently running
|
18
|
+
# @note {running?} does *not* mean that KBFS is mounted. For that, see {mounted?}
|
19
|
+
def running?
|
20
|
+
if Gem.win_platform?
|
21
|
+
!`tasklist | find "kbfsfuse.exe"`.empty?
|
22
|
+
elsif RUBY_PLATFORM =~ /darwin/
|
23
|
+
!`pgrep kbfsfuse`.empty?
|
24
|
+
else
|
25
|
+
Dir["/proc/[0-9]*/comm"].any? do |comm|
|
26
|
+
File.read(comm).chomp == "kbfsfuse" rescue false
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# @return [Boolean] whether or not KBFS is currently mounted
|
32
|
+
# @note The criteria for being mounted is as follows:
|
33
|
+
# 1. Keybase is running
|
34
|
+
# 2. KBFS is running
|
35
|
+
# 3. {KBFS_STATUS_FILE} exists
|
18
36
|
def mounted?
|
37
|
+
return false unless Local.running?
|
38
|
+
return false unless running?
|
19
39
|
File.exist? KBFS_STATUS_FILE
|
20
40
|
end
|
21
41
|
|
data/lib/keybase/local.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keybase-unofficial-local
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Woodruff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: keybase-unofficial-core
|