ttytest 0.1.0 → 0.2.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: 58e7cfbcc044cae295f1667619da61dbff469b00
4
- data.tar.gz: b7a3fde532a3a2eb07098e648fefb472a7996d3f
3
+ metadata.gz: ec223f6306af46c375d8682b34246d96a35bfeb2
4
+ data.tar.gz: '08f13d79052c316a5890b396004dae0d4b00c748'
5
5
  SHA512:
6
- metadata.gz: 9f99ff25102a617841af7ede0537860c71a431826082666d3fe605d55fad9208ff2c2edcc3eb6d2ee505bf3d56f290f52c287c0ca505e53e0ba90f5bf3f99404
7
- data.tar.gz: a9acb9d56b24443740c51df19f338aaa77279e56876b4ac170976922605d783db214d7ae6f829e0d06e2d2750e802bc71e3c7d8aee3a84a76dc13916127f8efe
6
+ metadata.gz: 1ce7169be0b7222a5becc34ff849d76d401b64596e7538796da2425b6bc8eb8d3bb7dba19eaa247ef48ac65ba9ff9c71270237ab842c79e9ad1fec55e370ca0c
7
+ data.tar.gz: 3a4c6dcc1a0c6d7360344fca24d2eac9b5c1b218f42efb58fe1318b09164f76e0bf6d10a93aa191688cc7173dff5a3ca5e11777747e91cdef1ca9f36ba49fba2
data/README.md CHANGED
@@ -40,7 +40,7 @@ addons:
40
40
 
41
41
  ## Contributing
42
42
 
43
- Bug reports and pull requests are welcome on GitHub at https://github.com/jhawthorn/execjs-fastnode.
43
+ Bug reports and pull requests are welcome on GitHub at https://github.com/jhawthorn/ttytest.
44
44
 
45
45
  ## License
46
46
 
@@ -7,7 +7,7 @@ module TTYtest
7
7
  end
8
8
  end
9
9
 
10
- def assert_cursor_position(x, y)
10
+ def assert_cursor_position(x:, y:)
11
11
  expected = [x, y]
12
12
  actual = cursor_position
13
13
  if actual != expected
@@ -12,6 +12,8 @@ module TTYtest
12
12
  COMMAND = 'tmux'
13
13
  SOCKET_NAME = 'ttytest'
14
14
  REQUIRED_TMUX_VERSION = '1.8'
15
+ CONF_PATH = File.expand_path('../tmux.conf', __FILE__)
16
+ SLEEP_INFINITY = 'read x < /dev/fd/1'
15
17
 
16
18
  class TmuxError < StandardError; end
17
19
 
@@ -22,8 +24,10 @@ module TTYtest
22
24
  end
23
25
 
24
26
  def new_terminal(cmd, width: 80, height: 24)
27
+ cmd = "#{cmd};#{SLEEP_INFINITY}"
28
+
25
29
  session_name = "ttytest-#{SecureRandom.uuid}"
26
- tmux(*%W[new-session -s #{session_name} -d -x #{width} -y #{height} #{cmd}])
30
+ tmux(*%W[-f #{CONF_PATH} new-session -s #{session_name} -d -x #{width} -y #{height} #{cmd}])
27
31
  session = Session.new(self, session_name)
28
32
  Terminal.new(session)
29
33
  end
File without changes
@@ -1,3 +1,3 @@
1
1
  module TTYtest
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ttytest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Hawthorn
@@ -72,6 +72,7 @@ files:
72
72
  - lib/ttytest/terminal.rb
73
73
  - lib/ttytest/tmux/driver.rb
74
74
  - lib/ttytest/tmux/session.rb
75
+ - lib/ttytest/tmux/tmux.conf
75
76
  - lib/ttytest/version.rb
76
77
  - ttytest.gemspec
77
78
  homepage: https://github.com/jhawthorn/ttytest