tmuxinator 3.4.1 → 3.4.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a09259643bd044af3e5d2ed4dba81a22185e8989459b814ccbf089e84e6a2589
4
- data.tar.gz: fb7dfd5ae08a7a0fe0ad526fd2576d8b79613e741bcab7175643417ec87bb771
3
+ metadata.gz: 9a28fcd139a6a2ff19dbfb39a683879c281a3f50a69708eaae5fe7ea91f042ce
4
+ data.tar.gz: 1f9f45e49666e96cec5ec9e5b979cf8dc70d957d5a668575077f93d470fa860f
5
5
  SHA512:
6
- metadata.gz: 241501ffa56846f8b46c822a1796ff8af6a132cbd104ab6063291ef78d9ee72816a80c12c1120b6806587bc05b489a1233dd9484e4b7ddec3052b0783f673754
7
- data.tar.gz: a6f29a21917100234da0ce475e1adb60677d2b606dc84b400a323f42beda1bced2bd8b105b1749994d86eb3812a2fc736c319063b50095db80914b40acdbd0fe
6
+ metadata.gz: f171e361de524406ab8fa8ae72576845db194cb0db71a6f97e9432f84245d831357e96e4ae575009a890a447ce371045fe34fe76b9524dae7e01bb84dd196e58
7
+ data.tar.gz: 681c3b88e2a9b2a82126fdace5e82dd8c8eaea17f56fe0f53b4625798039bc714e5ef86eee71c9021432187f635b48f2862e34a3a4cce4dec4566c98fc58fcb8
@@ -3,6 +3,8 @@
3
3
  module Tmuxinator
4
4
  module TmuxVersion
5
5
  SUPPORTED_TMUX_VERSIONS = [
6
+ 3.8,
7
+ "3.7c",
6
8
  "3.7b",
7
9
  "3.7a",
8
10
  3.7,
@@ -14,7 +14,9 @@ module Tmuxinator
14
14
  end
15
15
 
16
16
  def current_session_name
17
- `[[ -n "${TMUX+set}" ]] && tmux display-message -p "#S"`.strip
17
+ return "" unless ENV.key?("TMUX")
18
+
19
+ `tmux display-message -p "#S"`.strip
18
20
  end
19
21
  end
20
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tmuxinator
4
- VERSION = "3.4.1"
4
+ VERSION = "3.4.2"
5
5
  end
@@ -209,6 +209,8 @@ describe Tmuxinator::Config do
209
209
  "v3.7" => 3.7,
210
210
  "v3.7a" => 3.7,
211
211
  "v3.7b" => 3.7,
212
+ "v3.7c" => 3.7,
213
+ "v3.8" => 3.8,
212
214
  "v3.12.0" => 3.12,
213
215
  "v3.12.5" => 3.12
214
216
  }.freeze
@@ -4,4 +4,44 @@ require "spec_helper"
4
4
 
5
5
  describe Tmuxinator::Util do
6
6
  let(:util) { Object.new.extend(Tmuxinator::Util) }
7
+
8
+ describe "#current_session_name" do
9
+ def with_env(key, value)
10
+ had_key = ENV.key?(key)
11
+ original = ENV[key]
12
+ if value.nil?
13
+ ENV.delete(key)
14
+ else
15
+ ENV[key] = value
16
+ end
17
+ yield
18
+ ensure
19
+ if had_key
20
+ ENV[key] = original
21
+ else
22
+ ENV.delete(key)
23
+ end
24
+ end
25
+
26
+ context "when TMUX is not set" do
27
+ it "returns an empty string without invoking the shell" do
28
+ with_env("TMUX", nil) do
29
+ expect(util).not_to receive(:`)
30
+ expect(util.current_session_name).to eq("")
31
+ end
32
+ end
33
+ end
34
+
35
+ context "when TMUX is set" do
36
+ it "returns the current tmux session name" do
37
+ with_env("TMUX", "/tmp/tmux-1000/default,1,0") do
38
+ expect(util).to receive(:`).
39
+ with('tmux display-message -p "#S"').
40
+ and_return("flash\n")
41
+
42
+ expect(util.current_session_name).to eq("flash")
43
+ end
44
+ end
45
+ end
46
+ end
7
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tmuxinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allen Bargi
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
250
  - !ruby/object:Gem::Version
251
251
  version: '2.7'
252
252
  requirements: []
253
- rubygems_version: 3.7.2
253
+ rubygems_version: 4.0.16
254
254
  specification_version: 4
255
255
  summary: Create and manage complex tmux sessions easily.
256
256
  test_files: