halfshell 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65c7923b546781e694f70250eb14d2c119ed16664a7a170287389e10e86cf895
4
- data.tar.gz: 443de88dc8348c3859e21ba978b5b1385c23cbf916f2ffc2c74db252f9b63da8
3
+ metadata.gz: '0935257037b90e7df7913f74627a9e7cbb804e4d40c01670a25457e7ce7e68b4'
4
+ data.tar.gz: dd605dfd6d1cc3c758aab07155d481b520867a69bbf78b5aaf080c225eca5b34
5
5
  SHA512:
6
- metadata.gz: ba86ae2e4fedf21fa6012a96a06b29b5b67ba58a9997c01579c2ab072aeb12141aeda22a5986008d3f9526d1c73f023361e4b500f2473e82f8446c32bd8b2d4c
7
- data.tar.gz: a1d232bf56a4dc983447d24eb44494b97103d498f533161f9efda10e798e71aafa74f21e095116eec50c423ac7549a73713376b2ba6c47b1b92723341d713b7f
6
+ metadata.gz: 76630909f2e7f4daaf03623844a847fcfe129cb52977a27d7c86a66503178204754def2993e7ae702da855406eabe79b7b196dc3de99f1235986dd35f36d8775
7
+ data.tar.gz: 3a010500e0ce510557a5898e90d3c931cb1c51dad2f51fb3281805d1027c83cce49b4b35be3592900dbf799dd69fc22ca1b5744405233887f8844257a64375fa
data/lib/halfshell.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'halfshell/version'
2
2
  require 'halfshell/terminal'
3
- require 'halfshell/typist'
3
+ require 'halfshell/agent'
4
4
 
5
5
  module Halfshell
6
6
  class Error < StandardError; end
@@ -11,11 +11,11 @@ module Halfshell
11
11
  end
12
12
 
13
13
  def Halfshell.new
14
- Typist.new(terminal: Terminal.default)
14
+ Agent.new(terminal: Terminal.default)
15
15
  end
16
16
 
17
17
  def Halfshell.zsh
18
- Typist.new(terminal: Terminal.zsh)
18
+ Agent.new(terminal: Terminal.zsh)
19
19
  end
20
20
  end
21
21
 
@@ -1,6 +1,6 @@
1
1
  module Halfshell
2
2
 
3
- class Typist
3
+ class Agent
4
4
  def initialize(terminal: Terminal.default)
5
5
  @terminal = terminal;
6
6
 
@@ -8,7 +8,7 @@ class Typist
8
8
  @limit = 20
9
9
  end
10
10
 
11
- def type(*what)
11
+ def puts(*what)
12
12
  @terminal.puts(*what)
13
13
  self
14
14
  end
@@ -50,7 +50,7 @@ class Typist
50
50
 
51
51
  alias :old_inspect :inspect
52
52
  def inspect
53
- "#<#Typist:#{object_id}>"
53
+ "#<#{self.class}:#{object_id}>"
54
54
  end
55
55
 
56
56
  def method_missing(mthd, *args, &block)
@@ -43,6 +43,7 @@ module Halfshell
43
43
  got = ""
44
44
  loop do
45
45
  begin
46
+ @tries += 1
46
47
  got << io.read_nonblock(1)
47
48
  rescue IO::EAGAINWaitReadable
48
49
  raise_error if too_many_tries?
@@ -1,3 +1,3 @@
1
1
  module Halfshell
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: halfshell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - andydna
@@ -138,8 +138,8 @@ files:
138
138
  - bin/setup
139
139
  - halfshell.gemspec
140
140
  - lib/halfshell.rb
141
+ - lib/halfshell/agent.rb
141
142
  - lib/halfshell/terminal.rb
142
- - lib/halfshell/typist.rb
143
143
  - lib/halfshell/version.rb
144
144
  homepage: https://github.com/andydna/halfshell
145
145
  licenses: []