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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91f1a601abc4899d8ab8aa940915e543b3cd94e9
4
- data.tar.gz: dafdb56c839f51102ac008e012933f661f85c8d3
3
+ metadata.gz: 7b8d8222ae5a01bb449853066b022f8bff9989e0
4
+ data.tar.gz: ef36914e87e1827b770ed4b7e077b5f787fb203a
5
5
  SHA512:
6
- metadata.gz: b5a59c6ba2fd8d9e3d5507abd490711c4ae50dc5b0cb58607662798f5724b59e712a92897adbcc47b38bfcec4e5833498575acdafa96236446d37460c3a11ad0
7
- data.tar.gz: 384d24aad9173ce4c129a4e351eb78325c2ccfe288c66abf70a5b39d0fb307b8884789dbc580a063524fe4a2b1033e7d1b84323a9ec477f3b354c4b70eb7cabd
6
+ metadata.gz: 8435dd7279de2fbf5013bb161a57198dff00ceb95314fec1637e049f15ce897e6dfc38e6068315de352a259b9c7e8b3996e70091ebbbc716f439242190930eba
7
+ data.tar.gz: 282be12c83ccadc9e767a37692e4e054df12d4e15bafdfec05df0cd37f97edbf27e6b1dec8a16a22bd17f346c8249aa39b49ed20db40ee8792e2ba78759a2258
data/README.md CHANGED
@@ -1,36 +1,38 @@
1
1
  # Tummy
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/tummy`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- TODO: Write usage instructions here
11
+ put a `Tmuxfile` in your app's root by running the `tummy init` command
26
12
 
27
- ## Development
13
+ example Tmuxfile
28
14
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
15
+ ```
16
+ session "z2-web"
17
+ directory "/home/minhajuddin/z2/web"
30
18
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
19
+ window "src", [
20
+ pane("vim TODO"),
21
+ ]
32
22
 
33
- ## Contributing
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
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tummy.
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
@@ -1,5 +1,5 @@
1
- session "z2-web"
2
- directory "/home/minhajuddin/z2/web"
1
+ session "<%= current_directory_name %>"
2
+ directory "<%= cwd %>"
3
3
 
4
4
  window "src", [
5
5
  pane("vim TODO"),
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
- FileUtils.cp File.expand_path(File.join(__FILE__, "../../Tmuxfile")), "."
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
@@ -1,3 +1,3 @@
1
1
  module Tummy
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
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.0.0
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-06-08 00:00:00.000000000 Z
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.4.8
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