tmuxinator 3.4.0 → 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: 322e55351978533f2dcca159c0f3cdd068baa6ff6a74105c26ef4ff788ecd033
4
- data.tar.gz: 64aa7c6fb70e76019575e090e6f56b43be3b88e64e6efb3f7a91a94f0ba96963
3
+ metadata.gz: 9a28fcd139a6a2ff19dbfb39a683879c281a3f50a69708eaae5fe7ea91f042ce
4
+ data.tar.gz: 1f9f45e49666e96cec5ec9e5b979cf8dc70d957d5a668575077f93d470fa860f
5
5
  SHA512:
6
- metadata.gz: 78c824a5705cc25a9cb7bb013053006c2cdf943b5b158e1431e44b5fe6ddd75db31efca58c6ec5c693f919c2d1b21f4fba7728ed7e260f6452849f4de5d3e5bb
7
- data.tar.gz: 5530202ccef42f13efce8b6082d1af63d80365896251f018f118437746e01278bf8080634a7996e86c67e1ab8280c7d6be8f4f36e0ca0ea717ccda2b9d0cfabc
6
+ metadata.gz: f171e361de524406ab8fa8ae72576845db194cb0db71a6f97e9432f84245d831357e96e4ae575009a890a447ce371045fe34fe76b9524dae7e01bb84dd196e58
7
+ data.tar.gz: 681c3b88e2a9b2a82126fdace5e82dd8c8eaea17f56fe0f53b4625798039bc714e5ef86eee71c9021432187f635b48f2862e34a3a4cce4dec4566c98fc58fcb8
@@ -3,6 +3,11 @@
3
3
  module Tmuxinator
4
4
  module TmuxVersion
5
5
  SUPPORTED_TMUX_VERSIONS = [
6
+ 3.8,
7
+ "3.7c",
8
+ "3.7b",
9
+ "3.7a",
10
+ 3.7,
6
11
  "3.6b",
7
12
  "3.6a",
8
13
  3.6,
@@ -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.0"
4
+ VERSION = "3.4.2"
5
5
  end
@@ -11,4 +11,6 @@ windows:
11
11
  - shell:
12
12
  root: .
13
13
  panes:
14
- - bin/setup
14
+ - commands:
15
+ - bin/setup
16
+ - bundle exec rake test
@@ -6,6 +6,14 @@ describe "tmuxinator debug snapshots" do
6
6
  let(:cli) { Tmuxinator::Cli }
7
7
  let(:snapshot_root) { File.expand_path("../snapshots/debug", __dir__) }
8
8
 
9
+ def expect_snapshot(output, snapshot_path)
10
+ if ENV["UPDATE_SNAPSHOTS"]
11
+ File.write(snapshot_path, output.delete_suffix("\n"))
12
+ else
13
+ expect(output).to eq("#{File.read(snapshot_path)}\n")
14
+ end
15
+ end
16
+
9
17
  around do |example|
10
18
  original_argv = ARGV.dup
11
19
  example.run
@@ -44,7 +52,7 @@ describe "tmuxinator debug snapshots" do
44
52
  "#{fixture_name}.sh"
45
53
  )
46
54
 
47
- expect(output).to eq("#{File.read(snapshot_path)}\n")
55
+ expect_snapshot(output, snapshot_path)
48
56
  end
49
57
  end
50
58
  end
@@ -60,6 +68,6 @@ describe "tmuxinator debug snapshots" do
60
68
 
61
69
  snapshot_path = File.join(snapshot_root, "2.6", "session_name.sh")
62
70
 
63
- expect(output).to eq("#{File.read(snapshot_path)}\n")
71
+ expect_snapshot(output, snapshot_path)
64
72
  end
65
73
  end
@@ -206,6 +206,11 @@ describe Tmuxinator::Config do
206
206
  "v3.6" => 3.6,
207
207
  "v3.6a" => 3.6,
208
208
  "v3.6b" => 3.6,
209
+ "v3.7" => 3.7,
210
+ "v3.7a" => 3.7,
211
+ "v3.7b" => 3.7,
212
+ "v3.7c" => 3.7,
213
+ "v3.8" => 3.8,
209
214
  "v3.12.0" => 3.12,
210
215
  "v3.12.5" => 3.12
211
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
@@ -52,6 +52,7 @@ cd /workspace/basic
52
52
 
53
53
  tmux -L interface send-keys -t basic:1.0 bundle\ exec\ ruby\ -v C-m
54
54
  tmux -L interface send-keys -t basic:1.0 bin/setup C-m
55
+ tmux -L interface send-keys -t basic:1.0 bundle\ exec\ rake\ test C-m
55
56
 
56
57
  tmux -L interface select-layout -t basic:1 tiled
57
58
 
@@ -50,6 +50,7 @@ cd /workspace/basic
50
50
 
51
51
  tmux -L interface send-keys -t basic:1.0 bundle\ exec\ ruby\ -v C-m
52
52
  tmux -L interface send-keys -t basic:1.0 bin/setup C-m
53
+ tmux -L interface send-keys -t basic:1.0 bundle\ exec\ rake\ test C-m
53
54
 
54
55
  tmux -L interface select-layout -t basic:1 tiled
55
56
 
@@ -50,9 +50,10 @@ cd /workspace/basic
50
50
  # Window "shell"
51
51
 
52
52
 
53
-
53
+ tmux -L interface select-pane -t basic:1.0 -T commands
54
54
  tmux -L interface send-keys -t basic:1.0 bundle\ exec\ ruby\ -v C-m
55
55
  tmux -L interface send-keys -t basic:1.0 bin/setup C-m
56
+ tmux -L interface send-keys -t basic:1.0 bundle\ exec\ rake\ test C-m
56
57
 
57
58
  tmux -L interface select-layout -t basic:1 tiled
58
59
 
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tmuxinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allen Bargi
8
8
  - Christopher Chow
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2026-05-23 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: erubi
@@ -251,8 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
250
  - !ruby/object:Gem::Version
252
251
  version: '2.7'
253
252
  requirements: []
254
- rubygems_version: 3.5.22
255
- signing_key:
253
+ rubygems_version: 4.0.16
256
254
  specification_version: 4
257
255
  summary: Create and manage complex tmux sessions easily.
258
256
  test_files: