tmrb 1.2.5 → 1.2.6
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.
- data/Env +4 -2
- data/Gemfile +2 -2
- data/Gemfile.lock +2 -8
- data/bin/tmrb +29 -0
- data/lib/tmrb/templates/lib.tt +17 -0
- data/lib/tmrb/version.rb +1 -1
- data/tmrb.gemspec +1 -1
- metadata +22 -3
data/Env
CHANGED
@@ -3,7 +3,9 @@
|
|
3
3
|
require 'tmrb'
|
4
4
|
|
5
5
|
tmux = TmRb::Multiplexer.new
|
6
|
-
tmux.new_session(:window_name =>
|
7
|
-
|
6
|
+
tmux.new_session(:window_name => "default")
|
7
|
+
|
8
|
+
tmux.new_window(:name => 'code', :command => 'vim -p lib/**/*.rb')
|
8
9
|
tmux.new_window(:name => 'spec', :command => 'vim -p spec/**/*.rb')
|
10
|
+
tmux.new_window(:name => 'features', :command => 'vim -p features/**/*.{rb,feature}')
|
9
11
|
tmux.start
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -2,6 +2,7 @@ PATH
|
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
4
|
tmrb (1.2.5)
|
5
|
+
thor
|
5
6
|
|
6
7
|
GEM
|
7
8
|
remote: http://rubygems.org/
|
@@ -14,11 +15,6 @@ GEM
|
|
14
15
|
rspec-instafail (~> 0.2.0)
|
15
16
|
ruby-progressbar (~> 0.0.10)
|
16
17
|
github-markup (0.7.2)
|
17
|
-
guard (1.0.2)
|
18
|
-
ffi (>= 0.5.0)
|
19
|
-
thor (~> 0.14.6)
|
20
|
-
guard-rspec (0.7.0)
|
21
|
-
guard (>= 0.10.0)
|
22
18
|
libnotify (0.7.2)
|
23
19
|
method_source (0.7.1)
|
24
20
|
pry (0.9.9.4)
|
@@ -41,7 +37,7 @@ GEM
|
|
41
37
|
rspec-mocks (2.10.1)
|
42
38
|
ruby-progressbar (0.0.10)
|
43
39
|
slop (2.4.4)
|
44
|
-
thor (0.
|
40
|
+
thor (0.15.2)
|
45
41
|
yard (0.8.1)
|
46
42
|
|
47
43
|
PLATFORMS
|
@@ -50,8 +46,6 @@ PLATFORMS
|
|
50
46
|
DEPENDENCIES
|
51
47
|
fuubar
|
52
48
|
github-markup
|
53
|
-
guard
|
54
|
-
guard-rspec
|
55
49
|
libnotify
|
56
50
|
pry
|
57
51
|
rake
|
data/bin/tmrb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'thor'
|
4
|
+
require 'thor/group'
|
5
|
+
require 'thor/actions'
|
6
|
+
|
7
|
+
class Init < Thor::Group
|
8
|
+
include Thor::Actions
|
9
|
+
|
10
|
+
class_option :empty_window_count, :default => 1, :type => :numeric, :alias => '-w'
|
11
|
+
class_option :session_name, :default => 'default', :type => :string, :alias => '-s'
|
12
|
+
class_option :create_default_windows, :default => true, :type => :boolean , :alias => '-c'
|
13
|
+
|
14
|
+
def self.source_root
|
15
|
+
File.expand_path( '../lib/tmrb/templates' , File.dirname(__FILE__) )
|
16
|
+
end
|
17
|
+
|
18
|
+
argument :template_name, :desc => 'Name of the template', :default => 'lib'
|
19
|
+
def create_terminal_multiplexer
|
20
|
+
starter_path = File.join(Dir.pwd,'Env')
|
21
|
+
template("#{template_name}.tt", starter_path )
|
22
|
+
chmod( starter_path , 0755)
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
class Default < Thor; end
|
28
|
+
Default.register(Init , 'init' , 'init [template]' , 'Create new starter for multiplexer')
|
29
|
+
Default.start
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'tmrb'
|
4
|
+
|
5
|
+
tmux = TmRb::Multiplexer.new
|
6
|
+
tmux.new_session(:window_name => "<%= options[:session_name] %>")
|
7
|
+
<%if options[:empty_window_count] > 1 %><% (options[:empty_window_count] - 1).times do %>
|
8
|
+
tmux.new_window<% end %><% end
|
9
|
+
if options[:create_default_windows]
|
10
|
+
if Dir.exists? 'lib' %>
|
11
|
+
tmux.new_window(:name => 'code', :command => 'vim -p lib/**/*.rb')<% end
|
12
|
+
if Dir.exists? 'spec' %>
|
13
|
+
tmux.new_window(:name => 'spec', :command => 'vim -p spec/**/*.rb')<% end
|
14
|
+
if Dir.exists? 'features' %>
|
15
|
+
tmux.new_window(:name => 'features', :command => 'vim -p features/**/*.{rb,feature}')<% end
|
16
|
+
end %>
|
17
|
+
tmux.start
|
data/lib/tmrb/version.rb
CHANGED
data/tmrb.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tmrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,28 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
date: 2012-05-09 00:00:00.000000000 Z
|
13
|
-
dependencies:
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: thor
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
14
30
|
description:
|
15
31
|
email:
|
16
32
|
- dev@fedux.org
|
17
|
-
executables:
|
33
|
+
executables:
|
34
|
+
- tmrb
|
18
35
|
extensions: []
|
19
36
|
extra_rdoc_files: []
|
20
37
|
files:
|
@@ -26,12 +43,14 @@ files:
|
|
26
43
|
- LICENCE.md
|
27
44
|
- README.md
|
28
45
|
- Rakefile
|
46
|
+
- bin/tmrb
|
29
47
|
- doc/examples/tmux_wrapper-thor.rb
|
30
48
|
- doc/examples/tmux_wrapper.rb
|
31
49
|
- lib/tmrb.rb
|
32
50
|
- lib/tmrb/exceptions.rb
|
33
51
|
- lib/tmrb/helper.rb
|
34
52
|
- lib/tmrb/session.rb
|
53
|
+
- lib/tmrb/templates/lib.tt
|
35
54
|
- lib/tmrb/version.rb
|
36
55
|
- lib/tmrb/window.rb
|
37
56
|
- spec/session/session_spec.rb
|