spirit_hands 2.1.3-java → 2.1.4-java
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
- checksums.yaml.gz.sig +0 -0
- data/lib/spirit_hands/options/coolline.rb +21 -28
- data/lib/spirit_hands/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 560cafdaa5899c8592507655984ace52fdcc9445
|
4
|
+
data.tar.gz: 9ee4cec080fe6ac7c18f4222dafd7f15a5ddbf9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36a88845e2e296298e18a7cb655a761bcbab7779de1bb41e4fcf2ea3006fa7b73c11177f8d77cd502de95fa0f0d22c41072ae557b7024b3f3bc1a35b96f90643
|
7
|
+
data.tar.gz: 7a0f3d0c9835e13ea9f32bd722caf05dbffb935c89b24d6a550675a571748bd9ecfa622d3b70b6f7bc973bba6df7352489657f5f14f8511e11064ec496983987
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -1,63 +1,56 @@
|
|
1
1
|
module SpiritHands
|
2
2
|
class << self
|
3
|
-
# Is
|
3
|
+
# Is coolline enabled?
|
4
4
|
def coolline
|
5
5
|
@coolline = DEFAULT_COOLLINE if @coolline.nil?
|
6
6
|
@coolline
|
7
7
|
end
|
8
8
|
|
9
9
|
# Set whether hirb is enabled (default: true)
|
10
|
-
|
11
|
-
c = DEFAULT_COOLLINE if c.nil?
|
12
|
-
@coolline = !!c
|
13
|
-
end
|
10
|
+
attr_writer :coolline
|
14
11
|
|
15
12
|
protected
|
16
13
|
|
17
14
|
def install_coolline!
|
18
15
|
return if coolline_installed?
|
19
|
-
@orig_input ||= Pry.input
|
20
|
-
@orig_completer ||= Pry.config.completer
|
21
|
-
require 'pry-coolline'
|
22
16
|
Pry.plugins['coolline'].activate!
|
23
|
-
|
24
|
-
require 'pry-bond'
|
25
|
-
Pry.plugins['bond'].activate!
|
26
|
-
rescue LoadError
|
27
|
-
end
|
28
|
-
@coolline_input ||= Pry.input
|
29
|
-
@coolline_completer ||= Pry.config.completer
|
30
|
-
Pry.config.completer = @coolline_completer
|
31
|
-
Pry.input = @coolline_input
|
17
|
+
self.input_config = @coolline_input
|
32
18
|
end
|
33
19
|
|
34
20
|
def uninstall_coolline!
|
35
21
|
return unless coolline_installed?
|
36
22
|
Pry.plugins['coolline'].disable!
|
37
|
-
|
38
|
-
Pry.plugins['bond'].disable!
|
39
|
-
end
|
40
|
-
Pry.config.completer = @orig_completer
|
41
|
-
Pry.input = @orig_input
|
23
|
+
self.input_config = @orig_input
|
42
24
|
end
|
43
25
|
|
44
26
|
def coolline_installed?
|
45
|
-
|
27
|
+
Pry.input == @coolline_input[0]
|
46
28
|
end
|
47
29
|
|
48
30
|
def setup_coolline!
|
49
|
-
if
|
50
|
-
|
31
|
+
if coolline
|
32
|
+
install_coolline!
|
51
33
|
else
|
52
|
-
|
34
|
+
uninstall_coolline!
|
53
35
|
end
|
54
36
|
end
|
55
37
|
|
38
|
+
def input_config=(args)
|
39
|
+
Pry.input, Pry.config.completer = args
|
40
|
+
end
|
41
|
+
|
42
|
+
def input_config
|
43
|
+
[Pry.input, Pry.config.completer]
|
44
|
+
end
|
45
|
+
|
56
46
|
def setup_coolline
|
57
|
-
|
47
|
+
@orig_input = input_config
|
48
|
+
require 'pry-coolline'
|
49
|
+
@coolline_input = input_config
|
50
|
+
Pry.hooks.add_hook(:before_session, "setup_coolline_before") do |output, binding, pry|
|
58
51
|
setup_coolline!
|
59
52
|
end
|
60
|
-
Pry.hooks.add_hook(:
|
53
|
+
Pry.hooks.add_hook(:after_eval, "setup_coolline_after") do |code, pry|
|
61
54
|
setup_coolline!
|
62
55
|
end
|
63
56
|
end
|
data/lib/spirit_hands/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|