consular-gnome-terminal 0.1.0 → 0.1.1
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.
- data/History.md +13 -0
- data/README.rdoc +6 -6
- data/lib/consular/gnome-terminal.rb +2 -2
- data/lib/consular/gnome-terminal/version.rb +1 -1
- data/spec/gnome-terminal_spec.rb +2 -2
- metadata +4 -3
data/History.md
ADDED
data/README.rdoc
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
=
|
1
|
+
= Gnome Terminal support for Consular
|
2
2
|
|
3
|
-
This gem is an add-on to Consular that implements support for the
|
4
|
-
|
3
|
+
This gem is an add-on to Consular that implements support for the Gnome
|
4
|
+
Terminal emulator on Linux.
|
5
5
|
|
6
|
-
Since
|
7
|
-
called `xdotool` is used to send keyboard shortcuts to a running
|
6
|
+
Since Gnome Terminal does not have an API for controlling it, a commandline tool
|
7
|
+
called `xdotool` is used to send keyboard shortcuts to a running Gnome Terminal
|
8
8
|
in order to control it.
|
9
9
|
|
10
10
|
== Copyright
|
11
11
|
|
12
|
-
Copyright (c) 2011
|
12
|
+
Copyright (c) 2011 Jesse Cooke. See LICENSE.txt for further details.
|
13
13
|
|
@@ -2,7 +2,7 @@ require 'consular'
|
|
2
2
|
require 'rbconfig'
|
3
3
|
|
4
4
|
module Consular
|
5
|
-
# Consular core for interacting with
|
5
|
+
# Consular core for interacting with Gnome Terminal.
|
6
6
|
#
|
7
7
|
# Since we don't have any real API to work with and just send
|
8
8
|
# keypresses via XTEST, we don't have tab references either.
|
@@ -192,7 +192,7 @@ module Consular
|
|
192
192
|
# @api public
|
193
193
|
def open_window(options = nil)
|
194
194
|
windowid_before = active_gnome_terminal_window
|
195
|
-
send_keypress(active_gnome_terminal_window, "ctrl+shift+
|
195
|
+
send_keypress(active_gnome_terminal_window, "ctrl+shift+n")
|
196
196
|
# wait for the active window to change -> new window opened
|
197
197
|
while active_gnome_terminal_window == windowid_before
|
198
198
|
sleep 1
|
data/spec/gnome-terminal_spec.rb
CHANGED
@@ -34,13 +34,13 @@ describe Consular::GnomeTerminal do
|
|
34
34
|
Consular::GnomeTerminal.valid_system?.should == false
|
35
35
|
end
|
36
36
|
|
37
|
-
it 'should send ctrl+shift+
|
37
|
+
it 'should send ctrl+shift+n when creating new window' do
|
38
38
|
f = EmptyTermfile.new
|
39
39
|
core = Consular::GnomeTerminal.new f.path
|
40
40
|
core.expects(:active_gnome_terminal_window).once.returns(1)
|
41
41
|
core.expects(:active_gnome_terminal_window).once.returns(1)
|
42
42
|
core.expects(:xdotool).with("windowfocus 1")
|
43
|
-
core.expects(:xdotool).with("key ctrl+shift+
|
43
|
+
core.expects(:xdotool).with("key ctrl+shift+n")
|
44
44
|
core.expects(:active_gnome_terminal_window).once.returns(2)
|
45
45
|
core.open_window
|
46
46
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: consular-gnome-terminal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1930240754208419655
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jesse Cooke
|
@@ -159,6 +159,7 @@ files:
|
|
159
159
|
- .rspec
|
160
160
|
- Gemfile
|
161
161
|
- Gemfile.lock
|
162
|
+
- History.md
|
162
163
|
- LICENSE.txt
|
163
164
|
- README.rdoc
|
164
165
|
- Rakefile
|