tmuxinator 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. data/README.md +43 -30
  2. data/Rakefile +22 -0
  3. data/TODO +2 -21
  4. data/VERSION +1 -1
  5. data/lib/tmuxinator/cli.rb +21 -5
  6. data/tmuxinator.gemspec +23 -2
  7. metadata +5 -5
data/README.md CHANGED
@@ -2,50 +2,55 @@
2
2
 
3
3
  Create and manage tmux sessions easily. Inspired by Jon Druse's ([Screeninator](https://github.com/jondruse/screeninator)) and Arthur Chiu's ([Terminitor](http://github.com/achiu/terminitor))
4
4
 
5
- ## Installation
5
+ ## Example
6
+
7
+ ![Sample](http://f.cl.ly/items/3e3I1l1t3D2U472n1h0h/Screen%20shot%202010-12-10%20at%2010.59.17%20PM.png)
6
8
 
7
9
 
10
+ ## Installation
11
+
8
12
  $ gem install tmuxinator
9
-
13
+
10
14
  Then follow the instructions. You just have to drop a line in your ~/.bashrc file, similar to RVM if you've used that before:
11
15
 
12
- if [[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] ; then source $HOME/.tmuxinator/scripts/tmuxinator ; fi
16
+ [[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator
13
17
 
14
- ## Editor
18
+ ## Editor and Shell
15
19
 
16
20
  tmuxinator uses your shell's default editor for opening files. If you're not sure what that is type:
17
-
21
+
18
22
  $ echo $EDITOR
19
-
20
- For me that produces "mate -w"
23
+
24
+ For me that produces "mate -w"
21
25
  If you want to change your default editor simple put a line in ~/.bashrc that changes it. Mine looks like this:
22
26
 
23
27
  export EDITOR='mate -w'
24
28
 
29
+ It also uses $SHELL variable. which is always set by your shell.
30
+
25
31
  ## Usage
26
32
 
27
-
33
+
28
34
  ### Create a project ###
29
-
35
+
30
36
  $ tmuxinator open project_name
31
-
32
- Create or edit your projects with this command. Your default editor ($EDITOR) is used to open the file. If this is a new project you will see this default config:
37
+
38
+ Create or edit your projects with this command. aliased to `o`. Your default editor ($EDITOR) is used to open the file. If this is a new project you will see this default config:
33
39
 
34
40
  # ~/.tmuxinator/project_name.yml
35
41
  # you can make as many tabs as you wish...
36
42
 
37
- escape: ``
38
43
  project_name: tmuxinator
39
44
  project_root: ~/code/rails_project
40
45
  tabs:
41
46
  - shell: git pull
42
47
  - database: rails db
43
48
  - console: rails c
44
- - logs:
49
+ - logs:
45
50
  - cd logs
46
51
  - tail -f development.log
47
52
  - ssh: ssh me@myhost
48
-
53
+
49
54
 
50
55
  If a tab contains multiple commands, they will be 'joined' together with '&&'.
51
56
 
@@ -55,24 +60,22 @@ If you want to have your own default config, place it into $HOME/.tmuxinator/def
55
60
  ## Starting a project
56
61
 
57
62
  $ start_project_name
58
-
63
+
59
64
  This will fire up tmux with all the tabs you configured.
60
65
 
61
66
  ### Limitations ###
62
67
 
63
- After you create a project, you will have to open a new shell window. This is because tmuxinator adds an alias to bash to open tmux with the project config.
64
-
65
-
66
- ## Example
67
-
68
- ![Sample](http://f.cl.ly/items/3e3I1l1t3D2U472n1h0h/Screen%20shot%202010-12-10%20at%2010.59.17%20PM.png)
68
+ After you create a project, you will have to open a new shell window. This is because tmuxinator adds an
69
+ alias to bash (or any other shell you use, like zsh) to open tmux with the project config. You can reload your shell rc file
70
+ instead of openning a new window like this, for instance in bash you could do this:
69
71
 
72
+ $ source ~/.bashrc
70
73
 
71
74
  ## Other Commands
72
75
 
73
76
  $ tmuxinator copy existing_project new_project
74
77
 
75
- Copy an existing project.
78
+ Copy an existing project. aliased to `c`
76
79
 
77
80
 
78
81
  $ tmuxinator update_scripts
@@ -81,24 +84,35 @@ Re-create the tmux scripts and aliases from the configs. Use this only if you ed
81
84
 
82
85
 
83
86
  $ tmuxinator list
84
-
85
- List all the projects you have configured
87
+
88
+ List all the projects you have configured. aliased to `l`
89
+
86
90
 
87
91
  $ tmuxinator delete project_name
88
-
92
+
89
93
  Remove a project
90
94
 
95
+
91
96
  $ tmuxinator implode
92
-
93
- Remove all tmuxinator configs, aliases and scripts.
94
97
 
98
+ Remove all tmuxinator configs, aliases and scripts. aliased to `i`
99
+
100
+
101
+ $ tmuxinator version
102
+
103
+ shows tmuxinator's version. aliased to `v`
104
+
105
+
106
+ $ tmuxinator help
107
+
108
+ shows tmuxinator's help. aliased to `h`
95
109
 
96
110
  ## Questions? Comments? Feature Request?
97
111
 
98
112
  I would love to hear your feedback on this project! Send me a message!
99
113
 
100
114
  ## Contributing to tmuxinator
101
-
115
+
102
116
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
103
117
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
104
118
  * Fork the project
@@ -109,5 +123,4 @@ I would love to hear your feedback on this project! Send me a message!
109
123
 
110
124
  ## Copyright
111
125
 
112
- Copyright (c) 2010 Allen Bargi. See LICENSE.txt for
113
- further details.
126
+ Copyright (c) 2010 Allen Bargi. See LICENSE.txt for further details.
data/Rakefile CHANGED
@@ -19,6 +19,28 @@ Jeweler::Tasks.new do |gem|
19
19
  gem.description = %Q{Create and manage complex tmux sessions easily.}
20
20
  gem.email = "allen.bargi@gmail.com"
21
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
+
22
44
  # Include your dependencies below. Runtime dependencies are required when using your gem,
23
45
  # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
46
  # gem.add_runtime_dependency 'jabber4r', '> 0.1'
data/TODO CHANGED
@@ -1,25 +1,6 @@
1
- 6. be sure to set the $SHELL and $EDITOR and path to aliases
2
- 11. improve readme file
3
-
4
- 7. have a doctor like home brew to test $SHELL and $EDITOR and path to aliases and tmux installation
5
- 8. push it to rubygems
6
-
7
-
8
- 4. support panes
9
- 5. install theme
10
-
11
1
  Later:
2
+ x. support panes
3
+ x. install theme
12
4
  x. add documentation
13
5
  x. add tests
14
6
 
15
-
16
-
17
-
18
-
19
-
20
-
21
- DONE
22
- 1. write a better sample
23
- 2. test reattaching already attached
24
- 9. cli respond to -v -h
25
- 10. add method missing for cli
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.5
@@ -16,7 +16,7 @@ module Tmuxinator
16
16
 
17
17
  # print the usage string, this is a fall through method.
18
18
  def usage
19
- puts <<"DOC"
19
+ puts %{
20
20
  Usage: tmuxinator ACTION [Arg]
21
21
 
22
22
  ACTOINS:
@@ -34,7 +34,7 @@ module Tmuxinator
34
34
  shows this help document
35
35
  version
36
36
 
37
- DOC
37
+ }
38
38
  end
39
39
  alias :help :usage
40
40
  alias :h :usage
@@ -114,11 +114,11 @@ DOC
114
114
  alias :ls :list
115
115
 
116
116
  def version
117
- system("cat #{File.dirname(__FILE__) + '/../../VERSION'}")
118
- puts
117
+ system("cat #{File.dirname(__FILE__) + '/../../VERSION'}")
118
+ puts
119
119
  end
120
120
  alias :v :version
121
-
121
+
122
122
  def update_scripts
123
123
  Dir["#{root_dir}*.tmux"].each {|p| FileUtils.rm(p) }
124
124
  aliases = []
@@ -129,6 +129,22 @@ DOC
129
129
  Tmuxinator::ConfigWriter.write_aliases(aliases)
130
130
  end
131
131
 
132
+ def doctor
133
+ print " cheking if tmux is installed ==> "
134
+ puts system("which tmux > /dev/null") ? "Yes" : "No"
135
+ print " cheking if $EDITOR is set ==> "
136
+ puts ENV['EDITOR'] ? "Yes" : "No"
137
+ print " cheking if $SHELL is set ==> "
138
+ puts ENV['SHELL'] ? "Yes" : "No"
139
+ puts %{
140
+ make sure you have this line in your ~/.bashrc file:
141
+
142
+ [[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator
143
+
144
+
145
+ }
146
+ end
147
+
132
148
  def method_missing(method, *args, &block)
133
149
  puts "There's no command called #{method} in tmuxinator"
134
150
  usage
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tmuxinator}
8
- s.version = "0.1.3"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Allen Bargi"]
12
- s.date = %q{2010-12-11}
12
+ s.date = %q{2010-12-12}
13
13
  s.default_executable = %q{tmuxinator}
14
14
  s.description = %q{Create and manage complex tmux sessions easily.}
15
15
  s.email = %q{allen.bargi@gmail.com}
@@ -41,6 +41,27 @@ Gem::Specification.new do |s|
41
41
  ]
42
42
  s.homepage = %q{http://github.com/aziz/tmuxinator}
43
43
  s.licenses = ["MIT"]
44
+ s.post_install_message = %q{
45
+ __________________________________________________________
46
+ ..........................................................
47
+
48
+ Thank you for installing tmuxinator
49
+ Please be sure to to drop a line in your ~/.bashrc file, similar
50
+ to RVM if you've used that before:
51
+
52
+ [[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator
53
+
54
+ also ensure that you've set these variables in your ENV:
55
+
56
+ $EDITOR, $SHELL
57
+
58
+ you can run `tmuxinator doctor` to make sure everything is set.
59
+ happy tmuxing with tmuxinator!
60
+
61
+ ..........................................................
62
+ __________________________________________________________
63
+
64
+ }
44
65
  s.require_paths = ["lib"]
45
66
  s.rubygems_version = %q{1.3.7}
46
67
  s.summary = %q{Create and manage complex tmux sessions easily.}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tmuxinator
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Allen Bargi
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-11 00:00:00 +01:00
18
+ date: 2010-12-12 00:00:00 +01:00
19
19
  default_executable: tmuxinator
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -114,7 +114,7 @@ has_rdoc: true
114
114
  homepage: http://github.com/aziz/tmuxinator
115
115
  licenses:
116
116
  - MIT
117
- post_install_message:
117
+ post_install_message: "\n __________________________________________________________\n ..........................................................\n\n Thank you for installing tmuxinator\n Please be sure to to drop a line in your ~/.bashrc file, similar \n to RVM if you've used that before:\n\n [[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator\n \n also ensure that you've set these variables in your ENV:\n \n $EDITOR, $SHELL\n \n you can run `tmuxinator doctor` to make sure everything is set.\n happy tmuxing with tmuxinator!\n\n ..........................................................\n __________________________________________________________\n \n "
118
118
  rdoc_options: []
119
119
 
120
120
  require_paths: