tmuxinator 3.0.0 → 3.0.1

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: ddca034121a920730d587eda7cb2c730370183af2b4954dc16b7f1e26c6914a2
4
- data.tar.gz: a8cc80782c2d3999553b14ad54d787e8b2dc213ccd5d16e93c8eeb824e133195
3
+ metadata.gz: 19533e5c3c18b83999791fa24b296d6e3cfaa8953f46368d89c132c8c99aade8
4
+ data.tar.gz: 2dc93ac182cca66dc8321d41387001ecc508cf2982f4a4c0cf35c66a0669db40
5
5
  SHA512:
6
- metadata.gz: 6bd507ad1417bcf5067682c5e4417806533c8ea0fca89519e14a95b0cca72fd6d4161a6143ae5349263b76957561859be7e5c8b46545138b7435dcada3f7b8d5
7
- data.tar.gz: 3dfb58a37e712cc7df6f73be614699b56f4895524b3952635a88861a015b364d37109519e532eec67100aa4ecac540adb5daddcefcfc5a415576e23e03a20353
6
+ metadata.gz: 58ccdbf54cb4421e6aac93f45450b8b1e5b276a03f973db356ff4f3a586a23d58125f7e9478cd38d15ecf2de33ddce34851f6069f33834948dc11153eb25d3da
7
+ data.tar.gz: b172cc7f5bbe5289ecec50385c1569042316c082c08f9005ceecb69ae0ae2d754288266c7f9fcd107fb0931b31a6134ada1a9fe13cdb7d15905c0e9b206cda82
@@ -21,7 +21,7 @@ module Tmuxinator
21
21
  for project reuse) or a path to a project config file (via the -p flag)
22
22
  }.join(" "),
23
23
  stop: "Stop a tmux session using a project's tmuxinator config",
24
- local: "Start a tmux session using ./.tmuxinator.yml",
24
+ local: "Start a tmux session using ./.tmuxinator.y[a]ml",
25
25
  debug: "Output the shell commands that are generated by tmuxinator",
26
26
  copy: %w{
27
27
  Copy an existing project to a new project and
@@ -160,7 +160,7 @@ module Tmuxinator
160
160
 
161
161
  def config_path(name, local = false)
162
162
  if local
163
- Tmuxinator::Config::LOCAL_DEFAULT
163
+ Tmuxinator::Config::LOCAL_DEFAULTS[0]
164
164
  else
165
165
  Tmuxinator::Config.default_project(name)
166
166
  end
@@ -1,6 +1,6 @@
1
1
  module Tmuxinator
2
2
  class Config
3
- LOCAL_DEFAULT = "./.tmuxinator.yml".freeze
3
+ LOCAL_DEFAULTS = ["./.tmuxinator.yml", "./.tmuxinator.yaml"].freeze
4
4
  NO_LOCAL_FILE_MSG =
5
5
  "Project file at ./.tmuxinator.yml doesn't exist.".freeze
6
6
  NO_PROJECT_FOUND_MSG = "Project could not be found.".freeze
@@ -94,7 +94,7 @@ module Tmuxinator
94
94
  end
95
95
 
96
96
  def local_project
97
- [LOCAL_DEFAULT].detect { |f| File.exist?(f) }
97
+ LOCAL_DEFAULTS.detect { |f| File.exist?(f) }
98
98
  end
99
99
 
100
100
  def default_project(name)
@@ -1,6 +1,7 @@
1
1
  module Tmuxinator
2
2
  module TmuxVersion
3
3
  SUPPORTED_TMUX_VERSIONS = [
4
+ "3.2a",
4
5
  3.2,
5
6
  "3.1c",
6
7
  "3.1b",
@@ -1,3 +1,3 @@
1
1
  module Tmuxinator
2
- VERSION = "3.0.0".freeze
2
+ VERSION = "3.0.1".freeze
3
3
  end
@@ -501,7 +501,7 @@ describe Tmuxinator::Cli do
501
501
  end
502
502
 
503
503
  context "file exists" do
504
- let(:path) { Tmuxinator::Config::LOCAL_DEFAULT }
504
+ let(:path) { Tmuxinator::Config::LOCAL_DEFAULTS[0] }
505
505
  before do
506
506
  expect(File).to receive(:exist?).with(path) { true }
507
507
  end
@@ -213,12 +213,14 @@ describe Tmuxinator::Config do
213
213
 
214
214
  describe "#default?" do
215
215
  let(:directory) { described_class.directory }
216
- let(:local_default) { described_class::LOCAL_DEFAULT }
216
+ let(:local_yml_default) { described_class::LOCAL_DEFAULTS[0] }
217
+ let(:local_yaml_default) { described_class::LOCAL_DEFAULTS[1] }
217
218
  let(:proj_default) { described_class.default }
218
219
 
219
220
  context "when the file exists" do
220
221
  before do
221
- allow(File).to receive(:exist?).with(local_default) { false }
222
+ allow(File).to receive(:exist?).with(local_yml_default) { false }
223
+ allow(File).to receive(:exist?).with(local_yaml_default) { false }
222
224
  allow(File).to receive(:exist?).with(proj_default) { true }
223
225
  end
224
226
 
@@ -229,7 +231,8 @@ describe Tmuxinator::Config do
229
231
 
230
232
  context "when the file doesn't exist" do
231
233
  before do
232
- allow(File).to receive(:exist?).with(local_default) { false }
234
+ allow(File).to receive(:exist?).with(local_yml_default) { false }
235
+ allow(File).to receive(:exist?).with(local_yaml_default) { false }
233
236
  allow(File).to receive(:exist?).with(proj_default) { false }
234
237
  end
235
238
 
@@ -309,14 +312,14 @@ describe Tmuxinator::Config do
309
312
 
310
313
  describe "#local?" do
311
314
  it "checks if the given project exists" do
312
- path = described_class::LOCAL_DEFAULT
315
+ path = described_class::LOCAL_DEFAULTS[0]
313
316
  expect(File).to receive(:exist?).with(path) { true }
314
317
  expect(described_class.local?).to be_truthy
315
318
  end
316
319
  end
317
320
 
318
321
  describe "#local_project" do
319
- let(:default) { described_class::LOCAL_DEFAULT }
322
+ let(:default) { described_class::LOCAL_DEFAULTS[0] }
320
323
 
321
324
  context "with a project yml" do
322
325
  it "gets the project as path to the yml file" do
@@ -334,7 +337,7 @@ describe Tmuxinator::Config do
334
337
 
335
338
  describe "#project" do
336
339
  let(:directory) { described_class.directory }
337
- let(:default) { described_class::LOCAL_DEFAULT }
340
+ let(:default) { described_class::LOCAL_DEFAULTS[0] }
338
341
 
339
342
  context "with an non-local project yml" do
340
343
  before do
@@ -363,7 +366,8 @@ describe Tmuxinator::Config do
363
366
  end
364
367
 
365
368
  describe "#validate" do
366
- let(:default) { described_class::LOCAL_DEFAULT }
369
+ let(:local_yml_default) { described_class::LOCAL_DEFAULTS[0] }
370
+ let(:local_yaml_default) { described_class::LOCAL_DEFAULTS[1] }
367
371
 
368
372
  context "when a project config file is provided" do
369
373
  it "should raise if the project config file can't be found" do
@@ -412,19 +416,42 @@ describe Tmuxinator::Config do
412
416
 
413
417
  context "when no project name is provided" do
414
418
  it "should raise if the local project file doesn't exist" do
415
- expect(File).to receive(:exist?).with(default) { false }
419
+ expect(File).to receive(:exist?).with(local_yml_default) { false }
420
+ expect(File).to receive(:exist?).with(local_yaml_default) { false }
416
421
  expect do
417
422
  described_class.validate
418
423
  end.to raise_error RuntimeError, %r{Project.+doesn't.exist}
419
424
  end
420
425
 
421
- it "should load and validate the project" do
422
- content = File.read(File.join(fixtures_dir, "sample.yml"))
426
+ context "and tmuxinator.yml exists" do
427
+ it "should load and validate the local project" do
428
+ content = File.read(File.join(fixtures_dir, "sample.yml"))
423
429
 
424
- expect(File).to receive(:exist?).with(default).at_least(:once) { true }
425
- expect(File).to receive(:read).with(default).and_return(content)
430
+ expect(File).to receive(:exist?).
431
+ with(local_yml_default).
432
+ at_least(:once) { true }
433
+ expect(File).to receive(:read).
434
+ with(local_yml_default).
435
+ and_return(content)
436
+ expect(described_class.validate).to be_a Tmuxinator::Project
437
+ end
438
+ end
426
439
 
427
- expect(described_class.validate).to be_a Tmuxinator::Project
440
+ context "and tmuxinator.yaml exists" do
441
+ it "should load and validate the local project" do
442
+ content = File.read(File.join(fixtures_dir, "sample.yml"))
443
+
444
+ expect(File).to receive(:exist?).
445
+ with(local_yml_default).
446
+ at_least(:once) { false }
447
+ expect(File).to receive(:exist?).
448
+ with(local_yaml_default).
449
+ at_least(:once) { true }
450
+ expect(File).to receive(:read).
451
+ with(local_yaml_default).
452
+ and_return(content)
453
+ expect(described_class.validate).to be_a Tmuxinator::Project
454
+ end
428
455
  end
429
456
  end
430
457
 
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.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allen Bargi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-06-07 00:00:00.000000000 Z
12
+ date: 2021-06-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: erubis
@@ -302,7 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
302
302
  - !ruby/object:Gem::Version
303
303
  version: 1.8.23
304
304
  requirements: []
305
- rubygems_version: 3.0.8
305
+ rubygems_version: 3.2.15
306
306
  signing_key:
307
307
  specification_version: 4
308
308
  summary: Create and manage complex tmux sessions easily.