teamocil 0.4.5 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +14 -4
  3. data/.rubocop.yml +48 -0
  4. data/.travis.yml +2 -2
  5. data/Gemfile +1 -1
  6. data/{LICENSE → LICENSE.md} +0 -0
  7. data/README.md +124 -166
  8. data/Rakefile +12 -27
  9. data/bin/teamocil +3 -4
  10. data/lib/teamocil.rb +51 -4
  11. data/lib/teamocil/cli.rb +23 -90
  12. data/lib/teamocil/command/new_window.rb +16 -0
  13. data/lib/teamocil/command/rename_session.rb +9 -0
  14. data/lib/teamocil/command/rename_window.rb +9 -0
  15. data/lib/teamocil/command/select_layout.rb +9 -0
  16. data/lib/teamocil/command/select_pane.rb +9 -0
  17. data/lib/teamocil/command/select_window.rb +9 -0
  18. data/lib/teamocil/command/send_keys.rb +9 -0
  19. data/lib/teamocil/command/send_keys_to_pane.rb +9 -0
  20. data/lib/teamocil/command/split_window.rb +15 -0
  21. data/lib/teamocil/layout.rb +58 -36
  22. data/lib/teamocil/tmux/pane.rb +15 -0
  23. data/lib/teamocil/tmux/session.rb +28 -0
  24. data/lib/teamocil/tmux/window.rb +47 -0
  25. data/lib/teamocil/utils/closed_struct.rb +16 -0
  26. data/lib/teamocil/utils/option_parser.rb +56 -0
  27. data/lib/teamocil/version.rb +1 -1
  28. data/teamocil.gemspec +15 -16
  29. metadata +27 -54
  30. data/examples/four-splits.yml +0 -8
  31. data/examples/one-and-three-splits.yml +0 -8
  32. data/examples/six-splits.yml +0 -10
  33. data/examples/two-horizontal-splits.yml +0 -6
  34. data/examples/two-vertical-splits.yml +0 -6
  35. data/lib/teamocil/error.rb +0 -6
  36. data/lib/teamocil/layout/pane.rb +0 -66
  37. data/lib/teamocil/layout/session.rb +0 -30
  38. data/lib/teamocil/layout/window.rb +0 -77
  39. data/spec/cli_spec.rb +0 -79
  40. data/spec/fixtures/.my-fancy-layouts-directory/sample-3.yml +0 -10
  41. data/spec/fixtures/.teamocil/sample-2.yml +0 -10
  42. data/spec/fixtures/.teamocil/sample.yml +0 -10
  43. data/spec/fixtures/layouts.yml +0 -76
  44. data/spec/layout_spec.rb +0 -229
  45. data/spec/mock/cli.rb +0 -35
  46. data/spec/mock/layout.rb +0 -16
  47. 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