tmuxinator 0.6.9 → 0.6.10.pre

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: 60c188fb2f653399d19450cb82fddc9649e62983
4
- data.tar.gz: efdf85185c8c00cee928a4b3e0114111d2efc406
3
+ metadata.gz: 7cf9390018701842df43e662ae82659def0a7493
4
+ data.tar.gz: 57c891da937c5418bec18526d553fb2e1c6c7953
5
5
  SHA512:
6
- metadata.gz: a9014d3cbacead8062969fc79059631e72683bd746b4139f4d67d23f9a5886fbe4626ef5de8d5b92fa2c2420fb67782e47ce6db31100881594a02c64c2f76412
7
- data.tar.gz: c49b1ab81d626ed96711ab0df8e7eb142e1bc81683ab6dc4d371236956e16477504d8211273bf242b4bc2b32c83a5b0d1e63aa576350dd1b19b9697811cc4de0
6
+ metadata.gz: eeabb93033c3714f2fe4778e7c6a1da3b29fa4256163364bf6009807176f422d49233d7a4e61aee6448acb96682f1f1cebdeadef9b262fbc3365d050c684780c
7
+ data.tar.gz: 1907c39aab69f71534513707cd437d04cf06c042bf021a0cd5e0b1135bb03fbdca440d00fdabb11a158d7cb6f4e1d40bdea7d4f6c0e922ffb7552478a94b5cde
data/bin/mux CHANGED
@@ -7,7 +7,7 @@ require "tmuxinator"
7
7
  if ARGV.length == 1
8
8
  name = ARGV[0]
9
9
 
10
- if Tmuxinator::Cli.new.command_list.include?(name)
10
+ if Tmuxinator::Cli.new.command_hash.keys.include?(name.to_sym)
11
11
  Tmuxinator::Cli.start
12
12
  elsif Tmuxinator::Config.exists?(name)
13
13
  Tmuxinator::Cli.new.start(name)
@@ -7,7 +7,7 @@ require "tmuxinator"
7
7
  if ARGV.length == 1
8
8
  name = ARGV[0]
9
9
 
10
- if Tmuxinator::Cli.new.command_list.include?(name)
10
+ if Tmuxinator::Cli.new.command_hash.keys.include?(name.to_sym)
11
11
  Tmuxinator::Cli.start
12
12
  elsif Tmuxinator::Config.exists?(name)
13
13
  Tmuxinator::Cli.new.start(name)
@@ -2,19 +2,41 @@ module Tmuxinator
2
2
  class Cli < Thor
3
3
  include Tmuxinator::Util
4
4
 
5
- attr_reader :command_list
5
+ attr_reader :command_hash
6
6
 
7
7
  def initialize(*args)
8
8
  super
9
- @command_list = %w(commands copy debug delete doctor help implode list start version)
9
+
10
+ @command_hash = {
11
+ commands: "Lists commands available in tmuxinator",
12
+ completions: "Used for shell completion",
13
+ new: "Create a new project file and open it in your editor",
14
+ open: "Alias of new",
15
+ start: "Start a tmux session using a project's tmuxinator config",
16
+ debug: "Output the shell commands that are generated by tmuxinator",
17
+ copy: "Copy an existing project to a new project and open it in your editor",
18
+ delete: "Deletes given project",
19
+ implode: "Deletes all tmuxinator projects",
20
+ version: "Display installed tmuxinator version",
21
+ doctor: "Look for problems in your configuration"
22
+ }
23
+
10
24
  end
11
25
 
12
26
  package_name "tmuxinator" unless Gem::Version.create(Thor::VERSION) < Gem::Version.create("0.18")
13
27
 
14
28
  desc "commands", "Lists commands available in tmuxinator"
15
29
 
16
- def commands
17
- puts command_list.join("\n")
30
+ def commands(shell = nil)
31
+ out = if shell == "zsh"
32
+ command_hash.map do |command, desc|
33
+ "#{command}:#{desc}"
34
+ end.join("\n")
35
+ else
36
+ command_hash.keys.join("\n")
37
+ end
38
+
39
+ puts out
18
40
  end
19
41
 
20
42
  desc "completions [arg1 arg2]", "Used for shell completion"
@@ -97,7 +119,7 @@ module Tmuxinator
97
119
  say "Deleted #{project}"
98
120
  end
99
121
  else
100
- exit! "That file doesn't exist."
122
+ exit!("That file doesn't exist.")
101
123
  end
102
124
  end
103
125
 
@@ -1,3 +1,3 @@
1
1
  module Tmuxinator
2
- VERSION = "0.6.9"
2
+ VERSION = "0.6.10.pre"
3
3
  end
@@ -36,7 +36,7 @@ describe Tmuxinator::Cli do
36
36
 
37
37
  it "lists the commands" do
38
38
  out, _ = capture_io { cli.start }
39
- expect(out).to eq "#{%w(commands copy debug delete doctor help implode list start version).join("\n")}\n"
39
+ expect(out).to eq "#{%w(commands completions new open start debug copy delete implode version doctor).join("\n")}\n"
40
40
  end
41
41
  end
42
42
 
@@ -163,6 +163,7 @@ describe Tmuxinator::Cli do
163
163
 
164
164
  context "project doesn't exist" do
165
165
  before do
166
+ allow(Tmuxinator::Config).to receive(:exists?) { false }
166
167
  allow(Thor::LineEditor).to receive_messages(:readline => "y")
167
168
  end
168
169
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tmuxinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.9
4
+ version: 0.6.10.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allen Bargi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-12 00:00:00.000000000 Z
11
+ date: 2014-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -232,4 +232,3 @@ test_files:
232
232
  - spec/lib/tmuxinator/util_spec.rb
233
233
  - spec/lib/tmuxinator/window_spec.rb
234
234
  - spec/spec_helper.rb
235
- has_rdoc: