tummy 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -21
- data/{Tmuxfile → Tmuxfile.erb} +2 -2
- data/exe/tummy +6 -1
- data/lib/tummy/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b8d8222ae5a01bb449853066b022f8bff9989e0
|
4
|
+
data.tar.gz: ef36914e87e1827b770ed4b7e077b5f787fb203a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8435dd7279de2fbf5013bb161a57198dff00ceb95314fec1637e049f15ce897e6dfc38e6068315de352a259b9c7e8b3996e70091ebbbc716f439242190930eba
|
7
|
+
data.tar.gz: 282be12c83ccadc9e767a37692e4e054df12d4e15bafdfec05df0cd37f97edbf27e6b1dec8a16a22bd17f346c8249aa39b49ed20db40ee8792e2ba78759a2258
|
data/README.md
CHANGED
@@ -1,36 +1,38 @@
|
|
1
1
|
# Tummy
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Use a Tmuxfile with your tmux configuration to easily manage sessions
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'tummy'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
7
|
$ gem install tummy
|
22
8
|
|
23
9
|
## Usage
|
24
10
|
|
25
|
-
|
11
|
+
put a `Tmuxfile` in your app's root by running the `tummy init` command
|
26
12
|
|
27
|
-
|
13
|
+
example Tmuxfile
|
28
14
|
|
29
|
-
|
15
|
+
```
|
16
|
+
session "z2-web"
|
17
|
+
directory "/home/minhajuddin/z2/web"
|
30
18
|
|
31
|
-
|
19
|
+
window "src", [
|
20
|
+
pane("vim TODO"),
|
21
|
+
]
|
32
22
|
|
33
|
-
|
23
|
+
window "server-iex", [
|
24
|
+
pane("iex -S mix phoenix.server"),
|
25
|
+
pane("iex -S mix", :horizontal),
|
26
|
+
pane("git status", :vertical),
|
27
|
+
]
|
34
28
|
|
35
|
-
|
29
|
+
window "play", [
|
30
|
+
pane("echo hey"),
|
31
|
+
pane("date", :horizontal),
|
32
|
+
pane("echo awesome", :vertical),
|
33
|
+
]
|
34
|
+
|
35
|
+
```
|
36
36
|
|
37
|
+
Now whenever you run the `tummy` command from this directory it will setup your sessions properly
|
38
|
+
The `Tmuxfile` is a regular ruby file. If a tmux session with this name is already running it will just connect to that session
|
data/{Tmuxfile → Tmuxfile.erb}
RENAMED
data/exe/tummy
CHANGED
@@ -105,7 +105,12 @@ if cmd.to_s.strip.downcase == "init"
|
|
105
105
|
end
|
106
106
|
|
107
107
|
require 'fileutils'
|
108
|
-
|
108
|
+
require 'erb'
|
109
|
+
raw_template = File.read File.expand_path(File.join(__FILE__, "../../Tmuxfile.erb"))
|
110
|
+
erb_template = ERB.new(raw_template)
|
111
|
+
cwd = FileUtils.pwd
|
112
|
+
current_directory_name = File.basename(cwd)
|
113
|
+
File.write("./Tmuxfile", erb_template.result(binding))
|
109
114
|
puts "created a Tmuxfile in the current directory"
|
110
115
|
exit(0)
|
111
116
|
end
|
data/lib/tummy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tummy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Khaja Minhajuddin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,7 +66,7 @@ files:
|
|
66
66
|
- Gemfile
|
67
67
|
- README.md
|
68
68
|
- Rakefile
|
69
|
-
- Tmuxfile
|
69
|
+
- Tmuxfile.erb
|
70
70
|
- bin/console
|
71
71
|
- bin/setup
|
72
72
|
- exe/tummy
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
95
|
rubyforge_project:
|
96
|
-
rubygems_version: 2.
|
96
|
+
rubygems_version: 2.5.1
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: use a Tmuxfile to create a tmux sessino
|