teamocil 0.4.5 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +14 -4
- data/.rubocop.yml +48 -0
- data/.travis.yml +2 -2
- data/Gemfile +1 -1
- data/{LICENSE → LICENSE.md} +0 -0
- data/README.md +124 -166
- data/Rakefile +12 -27
- data/bin/teamocil +3 -4
- data/lib/teamocil.rb +51 -4
- data/lib/teamocil/cli.rb +23 -90
- data/lib/teamocil/command/new_window.rb +16 -0
- data/lib/teamocil/command/rename_session.rb +9 -0
- data/lib/teamocil/command/rename_window.rb +9 -0
- data/lib/teamocil/command/select_layout.rb +9 -0
- data/lib/teamocil/command/select_pane.rb +9 -0
- data/lib/teamocil/command/select_window.rb +9 -0
- data/lib/teamocil/command/send_keys.rb +9 -0
- data/lib/teamocil/command/send_keys_to_pane.rb +9 -0
- data/lib/teamocil/command/split_window.rb +15 -0
- data/lib/teamocil/layout.rb +58 -36
- data/lib/teamocil/tmux/pane.rb +15 -0
- data/lib/teamocil/tmux/session.rb +28 -0
- data/lib/teamocil/tmux/window.rb +47 -0
- data/lib/teamocil/utils/closed_struct.rb +16 -0
- data/lib/teamocil/utils/option_parser.rb +56 -0
- data/lib/teamocil/version.rb +1 -1
- data/teamocil.gemspec +15 -16
- metadata +27 -54
- data/examples/four-splits.yml +0 -8
- data/examples/one-and-three-splits.yml +0 -8
- data/examples/six-splits.yml +0 -10
- data/examples/two-horizontal-splits.yml +0 -6
- data/examples/two-vertical-splits.yml +0 -6
- data/lib/teamocil/error.rb +0 -6
- data/lib/teamocil/layout/pane.rb +0 -66
- data/lib/teamocil/layout/session.rb +0 -30
- data/lib/teamocil/layout/window.rb +0 -77
- data/spec/cli_spec.rb +0 -79
- data/spec/fixtures/.my-fancy-layouts-directory/sample-3.yml +0 -10
- data/spec/fixtures/.teamocil/sample-2.yml +0 -10
- data/spec/fixtures/.teamocil/sample.yml +0 -10
- data/spec/fixtures/layouts.yml +0 -76
- data/spec/layout_spec.rb +0 -229
- data/spec/mock/cli.rb +0 -35
- data/spec/mock/layout.rb +0 -16
- data/spec/spec_helper.rb +0 -17
data/spec/mock/cli.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
module Teamocil
|
2
|
-
module Mock
|
3
|
-
module CLI
|
4
|
-
def self.included(base)
|
5
|
-
base.class_eval do
|
6
|
-
|
7
|
-
# Return all messages
|
8
|
-
def self.messages
|
9
|
-
@@messages
|
10
|
-
end
|
11
|
-
|
12
|
-
# Change messages
|
13
|
-
def self.messages=(messages)
|
14
|
-
@@messages = messages
|
15
|
-
end
|
16
|
-
|
17
|
-
# Do not print anything
|
18
|
-
def print_layouts
|
19
|
-
# Nothing
|
20
|
-
end
|
21
|
-
|
22
|
-
# Print an error message and exit the utility
|
23
|
-
#
|
24
|
-
# @param msg [Mixed] something to print before exiting.
|
25
|
-
def bail(msg)
|
26
|
-
Teamocil::CLI.messages << msg
|
27
|
-
exit 1
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
Teamocil::CLI.send :include, Teamocil::Mock::CLI
|
data/spec/mock/layout.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
module Teamocil
|
2
|
-
module Mock
|
3
|
-
module Layout
|
4
|
-
def self.included(base)
|
5
|
-
base.class_eval do
|
6
|
-
# Do not execute anything
|
7
|
-
def execute_commands(commands)
|
8
|
-
# Nothing
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
Teamocil::Layout.send :include, Teamocil::Mock::Layout
|
data/spec/spec_helper.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
2
|
-
|
3
|
-
require 'yaml'
|
4
|
-
require 'teamocil'
|
5
|
-
require File.join(File.dirname(__FILE__), "./mock/layout.rb")
|
6
|
-
require File.join(File.dirname(__FILE__), "./mock/cli.rb")
|
7
|
-
|
8
|
-
module Helpers
|
9
|
-
def layouts
|
10
|
-
return @@examples if defined?(@@examples)
|
11
|
-
@@examples = YAML.load_file(File.join(File.dirname(__FILE__), "fixtures/layouts.yml"))
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
RSpec.configure do |c|
|
16
|
-
c.include Helpers
|
17
|
-
end
|