tmuxinator 2.0.2 → 3.0.2

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
  SHA256:
3
- metadata.gz: 54e8e4201ea345caceac79395c8f17c96220133e654f1059ca6bff819fa760c0
4
- data.tar.gz: 725fc6e53b2eab7b9635d0d535e8bf8dec095e2effd2d525ba5e7c6ae86980ac
3
+ metadata.gz: e1445a84b4db2ae8491e8d895bd6343b25787b25f2dfc6b5a4dd9fe5d27c8c94
4
+ data.tar.gz: 0a62c72d12d8c7da0e9f620cc2c7494e29c62a8d1082cac9252494cd7acea84f
5
5
  SHA512:
6
- metadata.gz: 10dbacb4d1dc8cbd2285ab6d007c9f2b03212febc0a47a334ba7f9b85c41a82903b314947e3129d3c94bf4d50a43a5c098c7dbbe7593da0c37174b5d089913ab
7
- data.tar.gz: '048348805de439f943762c73a8f1ddb68bd50d0fc1e875b480984dab6607f0e5b64511d1b70c898473b921ff7f503c0c21221e208b5a5423a13de7bd033d5f60'
6
+ metadata.gz: 62f7922c6dccd8b432bc48f8f2a0d5c954c8cef56a7ff6b73931e196c40b1ee043f4c20141cbe5f665c216d3afc4146edf0b2ec806df9ceab2089e8c6b80c6ef
7
+ data.tar.gz: 2b7217de7eead78143abc75ca04e6d2ce16439c1ea0c2b11f3fedc26ddf7bc53c65c834d0c940b5dc1a2a06c7498433cf4b8ae369ba1fdb9c34984fc309f47c5
@@ -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)
@@ -48,7 +48,7 @@ module Tmuxinator
48
48
  @args = args
49
49
 
50
50
  content = Erubis::Eruby.new(raw_content).result(binding)
51
- YAML.safe_load(content, [], [], true)
51
+ YAML.safe_load(content, aliases: true)
52
52
  rescue SyntaxError, StandardError => error
53
53
  raise "Failed to parse config file: #{error.message}"
54
54
  end
@@ -1,6 +1,8 @@
1
1
  module Tmuxinator
2
2
  module TmuxVersion
3
3
  SUPPORTED_TMUX_VERSIONS = [
4
+ "3.2a",
5
+ 3.2,
4
6
  "3.1c",
5
7
  "3.1b",
6
8
  "3.1a",
@@ -1,3 +1,3 @@
1
1
  module Tmuxinator
2
- VERSION = "2.0.2".freeze
2
+ VERSION = "3.0.2".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: 2.0.2
4
+ version: 3.0.2
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: 2020-11-04 00:00:00.000000000 Z
12
+ date: 2022-02-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: erubis
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '1.0'
34
+ version: 1.2.1
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '1.0'
41
+ version: 1.2.1
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: xdg
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -295,14 +295,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
295
295
  requirements:
296
296
  - - ">="
297
297
  - !ruby/object:Gem::Version
298
- version: 2.5.8
298
+ version: 2.6.7
299
299
  required_rubygems_version: !ruby/object:Gem::Requirement
300
300
  requirements:
301
301
  - - ">="
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.1.6
306
306
  signing_key:
307
307
  specification_version: 4
308
308
  summary: Create and manage complex tmux sessions easily.