keybase-unofficial 0.2.0 → 0.3.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: 473dbc527ff74c54687f3e7bb0a02995d22ddb0a
4
- data.tar.gz: 007dd1d1b2391186b16ba2bef90f40319aeaca34
3
+ metadata.gz: 461111311c6782d52f5b6e60db7c20067124756a
4
+ data.tar.gz: 2d785d0a0c0fa0a67c02b1fdd9d3e1596fea66c6
5
5
  SHA512:
6
- metadata.gz: 3d13bd698881ab20740d8296670e2dedf7c01460327b62f5cd95a32b784e3d1314552ef39f64862ca00e19ce66d274c59436c57a7a030e78f3327bde1ac49f95
7
- data.tar.gz: 6e2e1d574c6894229281dd951f268947403716417eb1b0c486a76dc1d8697856b74784a82c1673cb79eb604dee9c8d4168c2dc182abd2844bec295d58a3d4e50
6
+ metadata.gz: 51d21e7ab430c0114d987fcc35c0cc3e9e862498614e97ffd9b4da83f046a6db4c4d307a8b77c05611dc911cf49d0d30dcc82b58c2886f6e20667d80911a0e33
7
+ data.tar.gz: 7e9c98c821a81d0d2f194206cda9443c088aea0e96170af880908d5ecb84810618cd0457edbc7fbe9e5bb34c7e3bc251237fab5b85504591785242bdc10a5e4b
data/lib/keybase.rb CHANGED
@@ -11,7 +11,7 @@ require_relative "keybase/chat"
11
11
  # The primary namespace for keybase-unofficial.
12
12
  module Keybase
13
13
  # keybase-unofficial's current version
14
- VERSION = "0.2.0"
14
+ VERSION = "0.3.0"
15
15
 
16
16
  extend Configuration
17
17
  end
@@ -16,7 +16,7 @@ module Keybase
16
16
  CONFIG_FILE = File.join(CONFIG_DIR, "config.json").freeze
17
17
 
18
18
  # there's not much this library can do without a local config
19
- raise KeybaseNotInstalledError unless File.file?(CONFIG_FILE)
19
+ raise Exceptions::KeybaseNotInstalledError unless File.file?(CONFIG_FILE)
20
20
 
21
21
  # The hash from Keybase's configuration file.
22
22
  CONFIG_HASH = JSON.parse(File.read(CONFIG_FILE)).freeze
@@ -58,9 +58,9 @@ module Keybase
58
58
  end
59
59
 
60
60
  # @return [String] the running Keybase's version string
61
- # @raise [KeybaseNotRunningError] if Keybase is not running
61
+ # @raise [Exceptions::KeybaseNotRunningError] if Keybase is not running
62
62
  def running_version
63
- raise KeybaseNotRunningError unless Keybase.running?
63
+ raise Exceptions::KeybaseNotRunningError unless Keybase.running?
64
64
  `keybase --version`.split[2]
65
65
  end
66
66
  end
@@ -1,28 +1,31 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Keybase
4
- # A top-level exception for the library.
5
- class KeybaseError < RuntimeError
6
- end
4
+ # A namespace for all exceptions defined by {Keybase}.
5
+ module Exceptions
6
+ # A top-level exception for the library.
7
+ class KeybaseError < RuntimeError
8
+ end
7
9
 
8
- # Raised if a Keybase installation can't be found.
9
- class KeybaseNotInstalledError < KeybaseError
10
- def initialize
11
- super "keybase needs to be installed"
10
+ # Raised if a Keybase installation can't be found.
11
+ class KeybaseNotInstalledError < KeybaseError
12
+ def initialize
13
+ super "keybase needs to be installed"
14
+ end
12
15
  end
13
- end
14
16
 
15
- # Raised whenever Keybase is not running locally.
16
- class KeybaseNotRunningError < KeybaseError
17
- def initialize
18
- super "keybase needs to be running"
17
+ # Raised whenever Keybase is not running locally.
18
+ class KeybaseNotRunningError < KeybaseError
19
+ def initialize
20
+ super "keybase needs to be running"
21
+ end
19
22
  end
20
- end
21
23
 
22
- # Raised whenever KBFS is not running locally.
23
- class KBFSNotRunningError < KeybaseError
24
- def initialize
25
- super "KBFS needs to be enabled and running"
24
+ # Raised whenever KBFS is not running locally.
25
+ class KBFSNotRunningError < KeybaseError
26
+ def initialize
27
+ super "KBFS needs to be enabled and running"
28
+ end
26
29
  end
27
30
  end
28
31
  end
data/lib/keybase/kbfs.rb CHANGED
@@ -4,11 +4,11 @@ module Keybase
4
4
  # Represents the Keybase filesystem.
5
5
  # @note This is just a stub for the time being.
6
6
  class KBFS
7
- # @raise [KeybaseNotRunningError] unless Keybase is running
8
- # @raise [KBFSNotRunningError] unless KBFS is running
7
+ # @raise [Exceptions::KeybaseNotRunningError] unless Keybase is running
8
+ # @raise [Exceptions::KBFSNotRunningError] unless KBFS is running
9
9
  def initialize
10
- raise KeybaseNotRunningError unless Keybase.running?
11
- raise KBFSNotRunningError unless Dir.exist?("/keybase")
10
+ raise Exceptions::KeybaseNotRunningError unless Keybase.running?
11
+ raise Exceptions::KBFSNotRunningError unless Dir.exist?("/keybase")
12
12
  end
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keybase-unofficial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
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-08-02 00:00:00.000000000 Z
11
+ date: 2017-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  version: '0'
62
62
  requirements: []
63
63
  rubyforge_project:
64
- rubygems_version: 2.6.11
64
+ rubygems_version: 2.6.13
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: keybase-unofficial - An unofficial library for Keybase.