tmuxinator 0.5.0 → 0.6.0
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 +7 -0
- data/.gitignore +17 -0
- data/.rspec +1 -1
- data/.travis.yml +5 -0
- data/CHANGELOG.md +36 -0
- data/CONTRIBUTING.md +29 -0
- data/Gemfile +4 -7
- data/{LICENSE.txt → LICENSE} +1 -1
- data/README.md +128 -118
- data/Rakefile +1 -72
- data/bin/mux +8 -3
- data/bin/tmuxinator +8 -3
- data/completion/tmuxinator.bash +18 -0
- data/completion/tmuxinator.zsh +20 -0
- data/lib/tmuxinator.rb +13 -7
- data/lib/tmuxinator/assets/sample.yml +24 -11
- data/lib/tmuxinator/assets/template.erb +47 -0
- data/lib/tmuxinator/cli.rb +121 -145
- data/lib/tmuxinator/config.rb +92 -0
- data/lib/tmuxinator/deprecations.rb +19 -0
- data/lib/tmuxinator/pane.rb +36 -0
- data/lib/tmuxinator/project.rb +142 -0
- data/lib/tmuxinator/util.rb +14 -0
- data/lib/tmuxinator/version.rb +3 -0
- data/lib/tmuxinator/window.rb +76 -0
- data/spec/factories/projects.rb +17 -0
- data/spec/fixtures/sample.deprecations.yml +35 -0
- data/spec/fixtures/sample.yml +35 -0
- data/spec/lib/tmuxinator/cli_spec.rb +230 -0
- data/spec/lib/tmuxinator/config_spec.rb +121 -0
- data/spec/lib/tmuxinator/pane_spec.rb +7 -0
- data/spec/lib/tmuxinator/project_spec.rb +209 -0
- data/spec/lib/tmuxinator/util_spec.rb +4 -0
- data/spec/lib/tmuxinator/window_spec.rb +62 -0
- data/spec/spec_helper.rb +28 -8
- data/tmuxinator.gemspec +47 -65
- metadata +186 -62
- data/.document +0 -5
- data/Gemfile.lock +0 -28
- data/TODO +0 -4
- data/VERSION +0 -1
- data/bin/tmuxinator_completion +0 -29
- data/lib/tmuxinator/assets/tmux_config.tmux +0 -37
- data/lib/tmuxinator/config_writer.rb +0 -104
- data/lib/tmuxinator/helper.rb +0 -19
- data/spec/tmuxinator_spec.rb +0 -54
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c72488b63a209871431234e08cab3d8e4de46429
|
4
|
+
data.tar.gz: 32b983eff05dc7171872ad9d49f37e179e0e5baf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c2e491f97e5ba428c3284a4afe19abca683fc10b41a560e10a747d44f81bf3ca8da1460705703445aff33aa8d70ec59ec0ab7214365f3541feb3f45f025daf6b
|
7
|
+
data.tar.gz: 12d830182076112c8e188f2a784433a117b993ee0fc523e9d2ce70063fef9576a554736a52fed0f1e45caeaac9396e6b128f590c9fac59f5c4432b83448af173
|
data/.gitignore
ADDED
data/.rspec
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--color
|
1
|
+
--color --format=nested
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
## 0.6.0
|
2
|
+
|
3
|
+
- Rewrote core functionality with proper abstractions and unit tests
|
4
|
+
- Fixed outstanding bugs #72 #89 #90 #93 #101 #102 #103 #104 #109
|
5
|
+
- Switched to thor for command line argument parsing
|
6
|
+
- Switched to Erubis for more Rails like ERB
|
7
|
+
- Added simplecov for test coverage
|
8
|
+
- Added debug command line option to view generated shell commands
|
9
|
+
- Added commands and completion options for completion scripts
|
10
|
+
- Added `pre_window` option for running commands before all panes and windows
|
11
|
+
- Deprecated `rbenv` in favour of `pre_window`
|
12
|
+
- Deprecated `rvm` in favour of `pre_window`
|
13
|
+
- Deprecated `cli_args` in favour of `tmux_options`
|
14
|
+
- Deprecated `tabs` in favour of `windows`
|
15
|
+
- Dropped support for Ruby 1.9.2
|
16
|
+
|
17
|
+
## 0.5.0
|
18
|
+
- Added optional socket name support (Thanks to Adam Walters)
|
19
|
+
- Added auto completion (Thanks to Jose Pablo Barrantes)
|
20
|
+
|
21
|
+
## 0.4.0
|
22
|
+
- Does not crash if given an invalid yaml file format. report it and exit gracefully.
|
23
|
+
- Removed clunky scripts & shell aliases (Thanks to Dane O'Connor)
|
24
|
+
- Config files are now rendered JIT (Thanks to Dane O'Connor)
|
25
|
+
- Can now start sessions from cli (Thanks to Dane O'Connor)
|
26
|
+
|
27
|
+
## 0.3.0
|
28
|
+
- Added pre command (Thanks to Ian Yang)
|
29
|
+
- Added multiple pre command (Thanks to Bjørn Arild Mæland)
|
30
|
+
- Using tmux set default-path for project root
|
31
|
+
- New aliases
|
32
|
+
|
33
|
+
## 0.2.0
|
34
|
+
- Added pane support (Thanks to Aaron Spiegel)
|
35
|
+
- RVM support (Thanks to Jay Adkisoon)
|
36
|
+
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
## First
|
4
|
+
|
5
|
+
* Check if the issue you're going to submit isn't already submitted in
|
6
|
+
the [Issues](https://github.com/aziz/tmuxinator/issues) page.
|
7
|
+
|
8
|
+
## Issues
|
9
|
+
|
10
|
+
* Submit a ticket for your issue, assuming one does not already exist.
|
11
|
+
* The issue must:
|
12
|
+
* Clearly describe the problem including steps to reproduce when it is a bug.
|
13
|
+
* Also include all the information you can to make it easier for us to reproduce it,
|
14
|
+
like OS version, gem versions, rbenv or rvm versions etc...
|
15
|
+
* Even better, provide a failing test case for it.
|
16
|
+
|
17
|
+
## Pull Requests
|
18
|
+
|
19
|
+
If you've gone the extra mile and have a patch that fixes the issue, you
|
20
|
+
should submit a Pull Request!
|
21
|
+
|
22
|
+
* Fork the repo on Github.
|
23
|
+
* Create a topic branch from where you want to base your work.
|
24
|
+
* Add a test for your change. Only refactoring and documentation changes
|
25
|
+
require no new tests. If you are adding functionality or fixing a bug,
|
26
|
+
we need a test!
|
27
|
+
* Run _all_ the tests to assure nothine else was broken. We only take pull requests with passing tests.
|
28
|
+
* Check for unnecessary whitespace with `git diff --check` before committing.
|
29
|
+
* Push to your fork and submit a pull request.
|
data/Gemfile
CHANGED
@@ -1,8 +1,5 @@
|
|
1
|
-
source "
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
gem "jeweler", "~> 1.6.4"
|
7
|
-
gem "rcov", "~> 0.9.10"
|
8
|
-
end
|
3
|
+
|
4
|
+
# Specify your gem's dependencies in tmuxinator.gemspec
|
5
|
+
gemspec
|
data/{LICENSE.txt → LICENSE}
RENAMED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Tmuxinator
|
1
|
+
# Tmuxinator [](http://travis-ci.org/aziz/tmuxinator?branch=master) [](https://coveralls.io/r/aziz/tmuxinator) [](https://codeclimate.com/github/aziz/tmuxinator) [](https://gemnasium.com/aziz/tmuxinator)
|
2
2
|
|
3
3
|
Create and manage tmux sessions easily.
|
4
4
|
|
@@ -6,170 +6,180 @@ Create and manage tmux sessions easily.
|
|
6
6
|
|
7
7
|

|
8
8
|
|
9
|
-
|
9
|
+
## Installation
|
10
10
|
|
11
|
-
|
11
|
+
``` bash
|
12
|
+
$ gem install tmuxinator
|
13
|
+
```
|
12
14
|
|
13
|
-
|
15
|
+
## Editor and Shell
|
14
16
|
|
15
|
-
tmuxinator uses your shell's default editor for opening files. If you're not
|
17
|
+
tmuxinator uses your shell's default editor for opening files. If you're not
|
18
|
+
sure what that is type:
|
16
19
|
|
17
|
-
|
20
|
+
``` bash
|
21
|
+
$ echo $EDITOR
|
22
|
+
```
|
18
23
|
|
19
|
-
For me that produces "
|
20
|
-
|
24
|
+
For me that produces "vim" If you want to change your default editor simple
|
25
|
+
put a line in ~/.bashrc that changes it. Mine looks like this:
|
21
26
|
|
22
|
-
|
27
|
+
``` bash
|
28
|
+
export EDITOR='vim'
|
29
|
+
```
|
23
30
|
|
31
|
+
## Completion
|
24
32
|
|
25
|
-
|
33
|
+
Download the appropriate completion file from the repo.
|
26
34
|
|
27
|
-
|
35
|
+
### bash
|
28
36
|
|
29
|
-
|
37
|
+
Add the following to your `~/.bashrc`:
|
30
38
|
|
31
|
-
|
32
|
-
`tmuxinator` binary file. That will auto-complete `tmuxinator` commands, plus your `.yml` config files.
|
39
|
+
source `which tmuxinator.zsh`
|
33
40
|
|
34
|
-
###
|
41
|
+
### zsh
|
35
42
|
|
36
|
-
|
43
|
+
Add the following to your `~/.zshrc`:
|
37
44
|
|
38
|
-
|
45
|
+
source `which tmuxinator.zsh`
|
39
46
|
|
40
|
-
|
47
|
+
## Usage
|
41
48
|
|
42
|
-
|
43
|
-
# you can make as many tabs as you wish...
|
49
|
+
### Create a project
|
44
50
|
|
45
|
-
|
46
|
-
project_root: ~/code/rails_project
|
47
|
-
socket_name: foo # Not needed. Remove to use default socket
|
48
|
-
rvm: 1.9.2@rails_project
|
49
|
-
pre: sudo /etc/rc.d/mysqld start
|
50
|
-
tabs:
|
51
|
-
- editor:
|
52
|
-
layout: main-vertical
|
53
|
-
panes:
|
54
|
-
- vim
|
55
|
-
- #empty, will just run plain bash
|
56
|
-
- top
|
57
|
-
- shell: git pull
|
58
|
-
- database: rails db
|
59
|
-
- server: rails s
|
60
|
-
- logs: tail -f logs/development.log
|
61
|
-
- console: rails c
|
62
|
-
- capistrano:
|
63
|
-
- server: ssh me@myhost
|
51
|
+
Create or edit your projects with:
|
64
52
|
|
53
|
+
``` bash
|
54
|
+
$ tmuxinator new [project]
|
55
|
+
```
|
65
56
|
|
66
|
-
|
67
|
-
|
57
|
+
For editing you can also use `tmuxinator open [project]`. `new` is aliased to
|
58
|
+
`o`,`open` and `n`. Your default editor (`$EDITOR`) is used to open the file.
|
59
|
+
If this is a new project you will see this default config:
|
68
60
|
|
69
|
-
|
61
|
+
``` yaml
|
62
|
+
name: Tmuxinator
|
63
|
+
root: ~/Code/tmuxinator
|
64
|
+
socket_name: foo # Remove to use default socket
|
65
|
+
pre: sudo /etc/rc.d/mysqld start # Runs before everything
|
66
|
+
pre_window: rbenv shell 2.0.0-p247 # Runs in each tab and pane
|
67
|
+
tmux_options: -v -2 # Pass arguments to tmux
|
68
|
+
windows:
|
69
|
+
- editor:
|
70
|
+
layout: main-vertical
|
71
|
+
panes:
|
72
|
+
- vim
|
73
|
+
- #empty, will just run plain bash
|
74
|
+
- top
|
75
|
+
- shell: git pull
|
76
|
+
- database: rails db
|
77
|
+
- server: rails s
|
78
|
+
- logs: tail -f logs/development.log
|
79
|
+
- console: rails c
|
80
|
+
- capistrano:
|
81
|
+
- server: ssh me@myhost
|
82
|
+
```
|
70
83
|
|
71
|
-
|
72
|
-
you
|
84
|
+
If a tab contains multiple commands, they will be joined together with `&&`.
|
85
|
+
If you want to have your own default config, place it into
|
86
|
+
`$HOME/.tmuxinator/default.yml`
|
73
87
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
- vim
|
78
|
-
- #empty, will just run plain bash
|
79
|
-
- top
|
88
|
+
The `pre` command allows you to run anything before starting the tmux session.
|
89
|
+
Could be handy to make sure you database daemons are running. Multiple commands
|
90
|
+
can be specified, just like for tabs.
|
80
91
|
|
81
|
-
|
92
|
+
## Panes Support
|
82
93
|
|
83
|
-
|
94
|
+
You can define your own panes inside a window likes this:
|
84
95
|
|
85
|
-
|
96
|
+
``` yaml
|
97
|
+
- window_with_panes
|
98
|
+
layout: main-vertical
|
99
|
+
panes:
|
100
|
+
- vim
|
101
|
+
- #empty, will just run plain bash
|
102
|
+
- top
|
103
|
+
```
|
86
104
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
This will fire up tmux with all the tabs you configured.
|
92
|
-
|
93
|
-
### Other Commands
|
94
|
-
|
95
|
-
$ tmuxinator copy existing_project new_project
|
96
|
-
|
97
|
-
Copy an existing project. aliased to `c`
|
98
|
-
|
99
|
-
|
100
|
-
$ tmuxinator list
|
105
|
+
The layout setting gets handed down to tmux directly, so you can choose from
|
106
|
+
one of [the five standard
|
107
|
+
layouts](http://manpages.ubuntu.com/manpages/precise/en/man1/tmux.1.html#contenttoc6)
|
108
|
+
or [specify your own](http://stackoverflow.com/a/9976282/183537).
|
101
109
|
|
102
|
-
|
110
|
+
## Starting a session
|
103
111
|
|
112
|
+
This will fire up tmux with all the tabs and panes you configured.
|
104
113
|
|
105
|
-
|
114
|
+
``` bash
|
115
|
+
$ tmuinxator start [project]
|
116
|
+
```
|
106
117
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
$ tmuxinator implode
|
111
|
-
|
112
|
-
Remove all tmuxinator configs, aliases and scripts. aliased to `i`
|
113
|
-
|
114
|
-
$ tmuxinator doctor
|
115
|
-
|
116
|
-
Examines your environment and identifies problems with your configuration
|
118
|
+
## Shorthand
|
117
119
|
|
120
|
+
You can also use this shorthand alias for tmuxinator
|
118
121
|
|
119
|
-
|
122
|
+
``` bash
|
123
|
+
$ mux [command]
|
124
|
+
```
|
120
125
|
|
121
|
-
|
126
|
+
## Interpreter Managers & Environment Variables
|
122
127
|
|
128
|
+
To use tmuxinator with rbenv, RVM, NVM etc, use the `pre_tab` option.
|
123
129
|
|
124
|
-
|
130
|
+
```
|
131
|
+
pre_tab: rbenv shell 2.0.0-p247
|
132
|
+
```
|
125
133
|
|
126
|
-
|
134
|
+
These commands will run before any pane or window.
|
127
135
|
|
128
|
-
|
136
|
+
## Other Commands
|
129
137
|
|
130
|
-
|
131
|
-
|
138
|
+
Copy an existing project. Aliased to `c` and `cp`
|
139
|
+
``` bash
|
140
|
+
$ tmuxinator copy [existing] [new]
|
141
|
+
```
|
132
142
|
|
133
|
-
|
143
|
+
List all the projects you have configured. Aliased to `l` and `ls`
|
134
144
|
|
135
|
-
|
145
|
+
``` bash
|
146
|
+
$ tmuxinator list
|
147
|
+
```
|
136
148
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
149
|
+
Remove a project. Aliased to `rm`
|
150
|
+
``` bash
|
151
|
+
$ tmuxinator delete [project]
|
152
|
+
```
|
141
153
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
* Can now start sessions from cli (Thanks to Dane O'Connor)
|
154
|
+
Remove all tmuxinator configs, aliases and scripts. Aliased to `i`
|
155
|
+
``` bash
|
156
|
+
$ tmuxinator implode
|
157
|
+
```
|
147
158
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
* New aliases
|
159
|
+
Examines your environment and identifies problems with your configuration
|
160
|
+
``` bash
|
161
|
+
$ tmuxinator doctor
|
162
|
+
```
|
153
163
|
|
154
|
-
|
155
|
-
|
156
|
-
|
164
|
+
Shows tmuxinator's help. Aliased to `h`
|
165
|
+
``` bash
|
166
|
+
$ tmuxinator help
|
167
|
+
```
|
157
168
|
|
158
|
-
|
169
|
+
Shows the shell commands that get executed for a project
|
170
|
+
```bash
|
171
|
+
$ tmuxinator debug [project]
|
172
|
+
```
|
159
173
|
|
160
|
-
|
174
|
+
Shows tmuxinator's version.
|
175
|
+
``` bash
|
176
|
+
$ tmuxinator version
|
177
|
+
```
|
161
178
|
|
162
|
-
|
179
|
+
## Contributing
|
163
180
|
|
164
|
-
|
165
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
166
|
-
* Fork the project
|
167
|
-
* Start a feature/bugfix branch
|
168
|
-
* Commit and push until you are happy with your contribution
|
169
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
170
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is
|
171
|
-
otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
181
|
+
To contribute, please read the [contributing guide](https://github.com/aziz/tmuxinator/blob/master/CONTRIBUTING.md).
|
172
182
|
|
173
|
-
|
183
|
+
## Copyright
|
174
184
|
|
175
|
-
Copyright (c) 2010
|
185
|
+
Copyright (c) 2010-2013 Allen Bargi. See LICENSE for further details.
|
data/Rakefile
CHANGED
@@ -1,72 +1 @@
|
|
1
|
-
require
|
2
|
-
require 'bundler'
|
3
|
-
begin
|
4
|
-
Bundler.setup(:default, :development)
|
5
|
-
rescue Bundler::BundlerError => e
|
6
|
-
$stderr.puts e.message
|
7
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
-
exit e.status_code
|
9
|
-
end
|
10
|
-
require 'rake'
|
11
|
-
|
12
|
-
require 'jeweler'
|
13
|
-
Jeweler::Tasks.new do |gem|
|
14
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
|
-
gem.name = "tmuxinator"
|
16
|
-
gem.homepage = "http://github.com/aziz/tmuxinator"
|
17
|
-
gem.license = "MIT"
|
18
|
-
gem.summary = %Q{Create and manage complex tmux sessions easily.}
|
19
|
-
gem.description = %Q{Create and manage complex tmux sessions easily.}
|
20
|
-
gem.email = "allen.bargi@gmail.com"
|
21
|
-
gem.authors = ["Allen Bargi"]
|
22
|
-
gem.post_install_message = %{
|
23
|
-
__________________________________________________________
|
24
|
-
..........................................................
|
25
|
-
|
26
|
-
Thank you for installing tmuxinator
|
27
|
-
Please be sure to to drop a line in your ~/.bashrc file, similar
|
28
|
-
to RVM if you've used that before:
|
29
|
-
|
30
|
-
[[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator
|
31
|
-
|
32
|
-
also ensure that you've set these variables in your ENV:
|
33
|
-
|
34
|
-
$EDITOR, $SHELL
|
35
|
-
|
36
|
-
you can run `tmuxinator doctor` to make sure everything is set.
|
37
|
-
happy tmuxing with tmuxinator!
|
38
|
-
|
39
|
-
..........................................................
|
40
|
-
__________________________________________________________
|
41
|
-
|
42
|
-
}
|
43
|
-
|
44
|
-
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
45
|
-
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
46
|
-
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
47
|
-
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
48
|
-
end
|
49
|
-
Jeweler::RubygemsDotOrgTasks.new
|
50
|
-
|
51
|
-
require 'rspec/core'
|
52
|
-
require 'rspec/core/rake_task'
|
53
|
-
RSpec::Core::RakeTask.new(:spec) do |spec|
|
54
|
-
spec.pattern = FileList['spec/**/*_spec.rb']
|
55
|
-
end
|
56
|
-
|
57
|
-
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
58
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
59
|
-
spec.rcov = true
|
60
|
-
end
|
61
|
-
|
62
|
-
task :default => :spec
|
63
|
-
|
64
|
-
require 'rake/rdoctask'
|
65
|
-
Rake::RDocTask.new do |rdoc|
|
66
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
67
|
-
|
68
|
-
rdoc.rdoc_dir = 'rdoc'
|
69
|
-
rdoc.title = "tmuxinator #{version}"
|
70
|
-
rdoc.rdoc_files.include('README*')
|
71
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
72
|
-
end
|
1
|
+
require "bundler/gem_tasks"
|