mucks 0.0.0.alpha.1 → 0.0.1
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 +4 -4
- checksums.yaml.gz.sig +2 -0
- data/README.md +163 -0
- data/bin/mucks +3 -0
- data.tar.gz.sig +0 -0
- metadata +67 -12
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b34c0969733ec94dcf1a1c39fdf9a813797b94ff
|
4
|
+
data.tar.gz: b47e4254c6736e6615346ed1da99f40b197c0ac0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df80b113e6bd6efc24cc3180f438c12b19200bcd9286124d606f9c252820049c2bce3a0d38e8a08017826dddce92b0e61a0352d3a84540b78f60d5664f4c56b7
|
7
|
+
data.tar.gz: 2a97e9bfc3ec9f213b24a39aa825398ead6c92ac1b852d15b3d0568589c99b7b9a69987b9b2fb0980d6ed649e263832b14c862326e18f652589e635ef61e4e7f
|
checksums.yaml.gz.sig
ADDED
data/README.md
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
# Mucks
|
2
|
+
|
3
|
+
Assists with environment management when using tmux.
|
4
|
+
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
$ gem install mucks
|
9
|
+
|
10
|
+
|
11
|
+
## Configuration
|
12
|
+
|
13
|
+
Two configuraiton files are required.
|
14
|
+
They are expected to exist in `~/.mucks`
|
15
|
+
|
16
|
+
|
17
|
+
### Session (sessions.yaml)
|
18
|
+
|
19
|
+
This file contains a list of sessions,
|
20
|
+
which may then contain values for one of two options.
|
21
|
+
These options are mutually exclusive.
|
22
|
+
|
23
|
+
1. A list of other sessions to open.
|
24
|
+
2. A path and layout.
|
25
|
+
* The path is the path that will be used in the session.
|
26
|
+
* The layout is which layout will be used from the layout configuration.
|
27
|
+
|
28
|
+
A `sessions.yaml` might look something like this:
|
29
|
+
|
30
|
+
all:
|
31
|
+
- user
|
32
|
+
- mucks
|
33
|
+
user:
|
34
|
+
path: '~'
|
35
|
+
layout: base
|
36
|
+
mucks:
|
37
|
+
path: ~/source/gems/mucks
|
38
|
+
layout: mucks
|
39
|
+
|
40
|
+
This provides 3 sessions (`all`, `user`, and `mucks`).
|
41
|
+
|
42
|
+
* `all` - A session comprised of other sessions (`user` and `mucks`)
|
43
|
+
* `user` - A session that will have the user's home folder as the root
|
44
|
+
and use the `base` layout.
|
45
|
+
* `mucks` - A session that will have the user's home folder as the root
|
46
|
+
and use the `mucks` layout.
|
47
|
+
|
48
|
+
|
49
|
+
### Layout (layouts.yaml)
|
50
|
+
|
51
|
+
This file contains a list of layouts, which themselves may contain layouts.
|
52
|
+
|
53
|
+
These layouts are simply commands that will be run
|
54
|
+
upon successful creation of a session.
|
55
|
+
|
56
|
+
A `layouts.yaml` might look something like this:
|
57
|
+
|
58
|
+
base:
|
59
|
+
- tmux split-window -h -p 66
|
60
|
+
|
61
|
+
hg_layout:
|
62
|
+
- tmux send-keys 'hg inall' C-m
|
63
|
+
- tmux send-keys 'hg outall' C-m
|
64
|
+
- tmux send-keys 'hg status' C-m
|
65
|
+
|
66
|
+
- base
|
67
|
+
- tmux select-pane -t 1
|
68
|
+
- tmux send-keys 'ruby ~/.vim/bundle/vim_test_runner/test_runner' C-m
|
69
|
+
- tmux split-window -v -p 25
|
70
|
+
- tmux select-pane -t 3
|
71
|
+
|
72
|
+
mucks:
|
73
|
+
- hg_layout
|
74
|
+
- tmux send-keys 'vi ~/.mucks/layouts.yaml' C-m
|
75
|
+
- tmux send-keys ':vsp ~/.mucks/sessions.yaml' C-m
|
76
|
+
- tmux send-keys ':vsp lib/mucks/mucks.rb' C-m
|
77
|
+
|
78
|
+
Only `base` and `mucks` are used by `sessions.yaml`,
|
79
|
+
but `mucks` references `hg_layout`, which in turn references `base`.
|
80
|
+
These will all get interpolated when it is time to run the commands.
|
81
|
+
`mucks all -n` would show the exact commands that would be executed.
|
82
|
+
|
83
|
+
|
84
|
+
## Running
|
85
|
+
|
86
|
+
You may chain sessions together or run them one at a time:
|
87
|
+
|
88
|
+
$ mucks foo bar -d
|
89
|
+
|
90
|
+
will do the same thing as:
|
91
|
+
|
92
|
+
$ mucks foo -d
|
93
|
+
$ mucks bar -d
|
94
|
+
|
95
|
+
By default, the user will be taken to the last session that is started.
|
96
|
+
To prevent this, use the `-d` flag.
|
97
|
+
|
98
|
+
|
99
|
+
### Command Line Options
|
100
|
+
|
101
|
+
* `-d` (Detach) Do not attach to the last session in the list.
|
102
|
+
* `-v` (Verbose) Detailed output about what is happening.
|
103
|
+
* `-n` (Dry-Run) Do net execute any commands, simply output them to STDOUT.
|
104
|
+
* `-ls` (List) List all sessions that are in `sessions.yaml`.
|
105
|
+
|
106
|
+
These commands may be used together in any combination, in any order,
|
107
|
+
with the exception of `-ls`
|
108
|
+
(it short-circuits, so any specified sessions will not be started).
|
109
|
+
|
110
|
+
You may also put them together in one chain (`-dvn` is the same as `-d -v -n`).
|
111
|
+
|
112
|
+
|
113
|
+
## Did You Just Re-Invent Tmuxinator?
|
114
|
+
|
115
|
+
|
116
|
+
### No.
|
117
|
+
|
118
|
+
To be fair, there was a point when I thought that's what I was doing.
|
119
|
+
Mucks started as a teeny, tiny, lightweight script that was highly customized
|
120
|
+
to my configuration and workflow, but it grew into something more useful
|
121
|
+
as I DRY'd things up and wanted to use my tiny script across devices.
|
122
|
+
|
123
|
+
... so I packaged it up in a gem.
|
124
|
+
|
125
|
+
|
126
|
+
### Disambiguation
|
127
|
+
|
128
|
+
I looked into using Tmuxinator prior to doing the work to make Mucks into a gem.
|
129
|
+
|
130
|
+
At that time, there was what I considered to be a major flaw.
|
131
|
+
I have tried a number of layouts and will likely continue to try more.
|
132
|
+
Tmuxinator makes it (too) hard to customize layouts, in my opinion.
|
133
|
+
To get the same layout specified in `hg_layout` above,
|
134
|
+
Tmuxinator would have you do this:
|
135
|
+
|
136
|
+
layout: e388,374x104,0,0{127x104,0,0[127x77,0,0,0,127x26,0,78,2],246x104,128,0,1}
|
137
|
+
|
138
|
+
At the time that Mucks was published,
|
139
|
+
the [Tmuxinator readme][tmuxinator-readme] pointed to
|
140
|
+
[this link on StackOverflow][so-layouts] explaining
|
141
|
+
how to generate these values for custom layouts.
|
142
|
+
|
143
|
+
I have no idea what that line means or how to make minor adjustments to it.
|
144
|
+
I know exactly what every line in `layouts.yaml` means
|
145
|
+
and exactly how to change it to suit my whims.
|
146
|
+
|
147
|
+
|
148
|
+
### Final Thought
|
149
|
+
|
150
|
+
I have outlined how to use Mucks and what I believe the major difference is
|
151
|
+
between Mucks and Tmuxinator, but ultimately,
|
152
|
+
it is up to you to determine which tool suits your needs best.
|
153
|
+
|
154
|
+
|
155
|
+
## Contributions
|
156
|
+
|
157
|
+
The [main repo][mucks] is on Bitbucket, NOT on Github.
|
158
|
+
Please open issues and make pull requests there.
|
159
|
+
|
160
|
+
|
161
|
+
[mucks]: https://bitbucket.org/ToadJamb/gems_mucks
|
162
|
+
[tmuxinator-readme]: https://github.com/tmuxinator/tmuxinator#panes
|
163
|
+
[so-layouts]: http://stackoverflow.com/a/9976282/183537
|
data/bin/mucks
ADDED
data.tar.gz.sig
ADDED
Binary file
|
metadata
CHANGED
@@ -1,23 +1,78 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mucks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis Herrick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDcjCCAlqgAwIBAgIBAT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R
|
28
|
+
aWrUh9/kRyfTkrLS4sltuyGhGZPYGFqFeOOXfM2c43/3qwjHU0rJNPEf2fAoZG9E
|
29
|
+
at+NN+vUGIi00xlgYc9uzmTlFXyr3tfhYhrIZnyd02xsDkN3gMbs/KTGYPQYMTZQ
|
30
|
+
dFfJVAFuyqXRLmrl1YroL9qLu8nKUUiKEcrRbc44Bd84Ti0VdHms+c7SZXqW+VUV
|
31
|
+
kMsvl643w+TJ2BmsFnWZ4JMvHdZ8oQ==
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2014-08-09 00:00:00.000000000 Z
|
34
|
+
dependencies:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: cane
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
type: :development
|
43
|
+
prerelease: false
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: rspec
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
type: :development
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
description: Environment management system that was born out of managing tmux sessions.
|
14
64
|
email: tthetoad@gmail.com
|
15
|
-
executables:
|
65
|
+
executables:
|
66
|
+
- mucks
|
16
67
|
extensions: []
|
17
|
-
extra_rdoc_files:
|
18
|
-
|
68
|
+
extra_rdoc_files:
|
69
|
+
- README.md
|
70
|
+
files:
|
71
|
+
- README.md
|
72
|
+
- bin/mucks
|
19
73
|
homepage: http://www.bitbucket.org/ToadJamb/gems_mucks
|
20
|
-
licenses:
|
74
|
+
licenses:
|
75
|
+
- LGPLV3
|
21
76
|
metadata: {}
|
22
77
|
post_install_message:
|
23
78
|
rdoc_options: []
|
@@ -30,13 +85,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
30
85
|
version: '0'
|
31
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
32
87
|
requirements:
|
33
|
-
- - "
|
88
|
+
- - ">="
|
34
89
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
90
|
+
version: '0'
|
36
91
|
requirements: []
|
37
92
|
rubyforge_project:
|
38
93
|
rubygems_version: 2.2.2
|
39
94
|
signing_key:
|
40
95
|
specification_version: 4
|
41
|
-
summary:
|
96
|
+
summary: Console development environment management
|
42
97
|
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|