sesh 0.1.7 → 0.1.8

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: 3f031c33596a36708c39ab2da30fb3a91bf3624d
4
- data.tar.gz: a401f69d3a2e3833a18a816ca50c17ca15956c81
3
+ metadata.gz: 6b5f1db52bde7aeb52c772263c225b37bc313853
4
+ data.tar.gz: fc33dfa2ff73a5222da0adebabf3b853a1831769
5
5
  SHA512:
6
- metadata.gz: bb800b8f9bc52a6a2bf5a3d462c8083f181c59a6e1aceedba526f3b42059bca789e91f1fc4242b10b1094e582800decfb57083df87a90d85f354590e83636f0e
7
- data.tar.gz: e4c4beace836f03c2d489a07f09c978052b3911545128ce0c2d29cdcd829937d11818cbf2962f50044acf637b0454e85a68f8a3249ffaee3880b5818ade1c31e
6
+ metadata.gz: 23390a6b2979915e6c802cfd4a2e6b3f98047e57ab08bbbc5d62b9f9d576a3651d421937d9d3051d3feb7978f6101a352440bd1c1397f4bd2380762d0a59d56c
7
+ data.tar.gz: eff0a26db44e6ed23c023a8d3f8c428c932f8ef9ae6b9f9442aeda95e6704cdcadab2ee32bfd5ba41c4471e1c0eac49182389a754b8c786d8eeecb3c5f779401
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sesh (0.1.7)
4
+ sesh (0.1.8)
5
5
  awesome_print
6
6
  colorize
7
7
  deep_merge
data/lib/sesh/cli.rb CHANGED
@@ -14,6 +14,7 @@ module Sesh
14
14
  puts HELP_BANNER.blue; exit end
15
15
  parse_options!
16
16
  @tmux_control = TmuxControl.new @options[:project], @options[:tmux]
17
+
17
18
  @ssh_control = SshControl.new @tmux_control, @options[:ssh]
18
19
  handle_command!
19
20
  end
@@ -18,7 +18,7 @@ module Sesh
18
18
  # `ps aux | grep "#{project_name_matcher}"`.strip.length > 0 end
19
19
 
20
20
  def project_name_matcher
21
- "[t]mux.*[t]mp\\/#{Regexp.escape(@options[:socket_file].split('/')[2..-1].join('/'))}.*"
21
+ "[t]mux.*#{Regexp.escape(@project)}.*"
22
22
  end
23
23
  # pn = @project.gsub '-', '\-'
24
24
  # "[t]mux.*[#{pn[0]}]#{pn[1..-1]}" end
@@ -26,14 +26,15 @@ module Sesh
26
26
  def issue_start_command!
27
27
  # Add bundle exec to the sesh begin command for dev purposes.
28
28
  cmd = Sesh.format_command <<-BASH
29
- tmux -S "#{@options[:socket_file]}" new-session -d "eval \\"\$SHELL -l -c 'rvm use default; sesh begin'\\"" 2>&1
29
+ tmux -S "#{@options[:socket_file]}" new-session -d "eval \\"\$SHELL -l -c 'rvm use default; sesh begin #{@project}'\\"" 2>&1
30
30
  BASH
31
31
  output = `#{cmd}`.strip
32
32
  return true if $? && output.length == 0
33
33
  Logger.warn "Tmux failed to start with the following error: #{output}"; false
34
34
  end
35
35
 
36
- def issue_stop_command!; `pkill -f "#{project_name_matcher}"` end
36
+ def issue_stop_command!;
37
+ `pkill -f "[t]mux .*#{Regexp.escape(@project)}"` end
37
38
 
38
39
  def connection_command; "tmux -S #{@options[:socket_file]} a" end
39
40
 
data/lib/sesh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sesh
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sesh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - MacKinley Smith