spirit_hands 2.1.3-java → 2.1.4-java

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: baf4e29fb380244925af561c3cb6e58d61412760
4
- data.tar.gz: 414d1f2d040fc219a4f41cb778fbcaeb82d39c02
3
+ metadata.gz: 560cafdaa5899c8592507655984ace52fdcc9445
4
+ data.tar.gz: 9ee4cec080fe6ac7c18f4222dafd7f15a5ddbf9d
5
5
  SHA512:
6
- metadata.gz: d3986e5f47635c92f224da7223f3b7ac380aaf5c9b04f60fb93e1227d673cd4ddbebc46a15c2534b7842315e28fa5a9b31fa30fd0b998c8a4158d64b4bc40969
7
- data.tar.gz: 6b378a73457a0a0531225786b2a664d8dfd720b06409925f4450c484b5cede512c2d73a0ff66f9098eaeed7ea05b9cbf90e9575411a06e732ec4e015a9e67bc1
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 cooline enabled?
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
- def coolline=(c)
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
- begin
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
- if !Pry.plugins['bond'].is_a? Pry::PluginManager::NoPlugin
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
- !@orig_input.nil? && @orig_input != Pry.input
27
+ Pry.input == @coolline_input[0]
46
28
  end
47
29
 
48
30
  def setup_coolline!
49
- if SpiritHands.coolline
50
- SpiritHands.install_coolline!
31
+ if coolline
32
+ install_coolline!
51
33
  else
52
- SpiritHands.uninstall_coolline!
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
- Pry.hooks.add_hook(:after_read, "setup_coolline0") do |code, pry|
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(:before_session, "setup_coolline1") do |output, binding, pry|
53
+ Pry.hooks.add_hook(:after_eval, "setup_coolline_after") do |code, pry|
61
54
  setup_coolline!
62
55
  end
63
56
  end
@@ -1,3 +1,3 @@
1
1
  module SpiritHands
2
- VERSION = '2.1.3'
2
+ VERSION = '2.1.4'
3
3
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spirit_hands
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: java
6
6
  authors:
7
7
  - Barry Allard
metadata.gz.sig CHANGED
Binary file