tmuxinator 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +4 -0
- data/lib/tmuxinator/config.rb +3 -7
- data/lib/tmuxinator/version.rb +1 -1
- data/spec/lib/tmuxinator/config_spec.rb +13 -5
- data/spec/spec_helper.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b06e623d6c02197262ff6d6241180088471cb6e
|
4
|
+
data.tar.gz: 5ebb19b7d6b07d4e383a27641ae7749135aa9a4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7ed48e3667e16bb099ee748b4eca69e756059509ea09e193a7eeeaeb98b4b5b5c3a7b00ffe3c1560a9b3463709810cdc7f10bc2aad502039f93b7d08e0b7d63
|
7
|
+
data.tar.gz: a36db9dfdcbaf9407117907a32b9a0df592c89d45ea797bd80e46a6724b5a6c36c8b71a2fac5193321fe3b86f7e4a89f4d0b0222df43bdd2d253a1b46f382845
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/tmuxinator/config.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require "pry"
|
2
1
|
module Tmuxinator
|
3
2
|
class Config
|
4
3
|
class << self
|
@@ -32,16 +31,13 @@ module Tmuxinator
|
|
32
31
|
end
|
33
32
|
|
34
33
|
def exists?(name)
|
35
|
-
|
36
|
-
File.exists?(project(name))
|
37
|
-
else
|
38
|
-
false
|
39
|
-
end
|
34
|
+
File.exists?(project(name))
|
40
35
|
end
|
41
36
|
|
42
37
|
def project(name)
|
43
38
|
projects = Dir.glob("#{root}/**/*.yml")
|
44
|
-
projects.
|
39
|
+
project_file = projects.detect { |project| project =~ /#{name}.yml/ }
|
40
|
+
project_file || "#{root}/#{name}.yml"
|
45
41
|
end
|
46
42
|
|
47
43
|
def template
|
data/lib/tmuxinator/version.rb
CHANGED
@@ -107,15 +107,23 @@ describe Tmuxinator::Config do
|
|
107
107
|
end
|
108
108
|
|
109
109
|
describe "#project" do
|
110
|
+
let(:root) { Tmuxinator::Config.root }
|
111
|
+
|
110
112
|
before do
|
111
|
-
|
113
|
+
path = File.expand_path("../../../fixtures/", __FILE__)
|
114
|
+
Tmuxinator::Config.stub(:root => path)
|
112
115
|
end
|
113
116
|
|
117
|
+
context 'with project yml' do
|
118
|
+
it "gets the project as path to the yml file" do
|
119
|
+
expect(Tmuxinator::Config.project("sample")).to eq "#{root}/sample.yml"
|
120
|
+
end
|
121
|
+
end
|
114
122
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
123
|
+
context 'without project yml' do
|
124
|
+
it "gets the project as path to the yml file" do
|
125
|
+
expect(Tmuxinator::Config.project("new-project")).to eq "#{root}/new-project.yml"
|
126
|
+
end
|
119
127
|
end
|
120
128
|
end
|
121
129
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -6,7 +6,9 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
|
6
6
|
SimpleCov::Formatter::HTMLFormatter,
|
7
7
|
Coveralls::SimpleCov::Formatter
|
8
8
|
]
|
9
|
-
SimpleCov.start
|
9
|
+
SimpleCov.start do
|
10
|
+
add_filter 'vendor/cache'
|
11
|
+
end
|
10
12
|
|
11
13
|
require "tmuxinator"
|
12
14
|
require "factory_girl"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tmuxinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allen Bargi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|