multiterm 0.0.2 → 0.0.4

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: c5ea07352fc603aea65964367f1641e14448ed93
4
- data.tar.gz: 8e341a7a7b20a3122764ea56dd8e36468dfe0bd1
3
+ metadata.gz: e207700504c308b51e5b21ec534e6abb6ec40a1a
4
+ data.tar.gz: 64a936ab048cdf27fb86fcd8e064b15ca6b11eaa
5
5
  SHA512:
6
- metadata.gz: d05be027eaf1a1f2f6025c5dc689045d76c456d4466b8be826aa48afb269da3ba004b504b3adb63c3d4c1ed667057dc6fb589000d7e0661385472839abe44429
7
- data.tar.gz: aa09971aba2845fcb3f8fb0bf26dfd22585af5a3c5d4de78a004fad4ef1138295d04766f7e901407b0a8a25249ea75132a0364f24089d547592445aec10e47b5
6
+ metadata.gz: 976b34ae6f28c2e26d2aa47b01af9f2735e1b4684ab7785846fd20505534bc77a09942b5ada466a7195cc9871bff2a372e8854c45f0e78bf2cc495b305152f9f
7
+ data.tar.gz: b2912c9c2f8b39469c155d1124bc8f2c1bdbb61b13c544ff11c2bdcd96e27e50dbcf13082521f7359c054ce9d985e374c588bf16ce3cfdeeb30466beea1601c4
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
- == 0.1.0
1
+ == 0.0.4
2
+
3
+ * allow configuration of current tab
4
+
5
+ == 0.0.1
2
6
 
3
7
  * initial release
data/README.md CHANGED
@@ -11,13 +11,24 @@
11
11
 
12
12
  MultiTerm is a rudimentary terminal multiplexer for OS X that uses the built-in Terminal.app tabs.
13
13
 
14
- # Features
15
-
16
- * A feature list goes here.
17
-
18
14
  # Example Usage
19
15
 
20
- # Some code goes here.
16
+ # .multiterm.yml
17
+ ---
18
+ :parent:
19
+ :name: Main
20
+ :tabs:
21
+ - :name: Server
22
+ :script: bundle exec rails s
23
+ - :name: Sidekiq
24
+ :script: bundle exec sidekiq -q default
25
+ - :name: Chef
26
+ :directory: ../chef-cookbooks
27
+ - :name: SSH
28
+ :script: echo "ssh ubuntu@1.2.3.4"
29
+
30
+ # shell
31
+ multiterm
21
32
 
22
33
  # Install
23
34
 
@@ -6,11 +6,11 @@ module Osaka
6
6
  super "Terminal"
7
7
  end
8
8
 
9
- def new_tab(options={})
9
+ def tab_configure(options={})
10
10
  tab_name = options[:name]
11
11
  script = options[:script]
12
12
  directory = options[:directory]
13
- control.keystroke('t', :command)
13
+ control.keystroke('t', :command) if options[:new_tab]
14
14
  if directory != nil
15
15
  control.tell('do script "cd \'' + directory + '\'" in front window')
16
16
  end
@@ -18,7 +18,7 @@ unless defined? MultiTerm::VERSION
18
18
  module VERSION
19
19
  MAJOR = 0
20
20
  MINOR = 0
21
- TINY = 2
21
+ TINY = 4
22
22
 
23
23
  STRING = [MAJOR, MINOR, TINY].join('.')
24
24
  end
data/lib/multiterm.rb CHANGED
@@ -49,8 +49,21 @@ module MultiTerm
49
49
  if configuration
50
50
  app = Osaka::Terminal.new
51
51
  app.activate
52
+ tab_config = {
53
+ :directory => configuration[:root],
54
+ :new_tab => false
55
+ }.merge(configuration[:parent])
56
+ app.tab_configure(tab_config)
52
57
  for tab_config in configuration[:tabs]
53
- app.new_tab({:directory => configuration[:root]}.merge(tab_config))
58
+ tab_config = {
59
+ :directory => configuration[:root],
60
+ :new_tab => true
61
+ }.merge(tab_config)
62
+ tab_config[:directory] = File.realdirpath(
63
+ tab_config[:directory],
64
+ (configuration[:root] || File.expand_path('.'))
65
+ )
66
+ app.tab_configure(tab_config)
54
67
  end
55
68
  else
56
69
  puts "Missing '.multiterm.yml' configuration."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multiterm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Aman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-09 00:00:00.000000000 Z
11
+ date: 2014-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake