tlux 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tlux/commands/run_command.rb +4 -1
- data/lib/tlux/session.rb +14 -4
- data/lib/tlux/version.rb +1 -1
- data/spec/session_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5868f6939ee6a21a9a14030d2cbbe91c0768954
|
4
|
+
data.tar.gz: e431f91cf3a018489d2504915f45ed89ff925143
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b0c796a8956bf24e891c3f6d68f80e92dcf3e1af9a59c803b1b2427b673ef36bd4610c147b4eff7d8c51393f123046fe9cce2dbdb88d52d48dedeceb650fb2d
|
7
|
+
data.tar.gz: d54fc6f4b585c0ebb52d25c898c631ada435c99f4cd173865f0bffbb928e8ceea8289265a8ca1672f5fc0b3d7778ce726c545880cdc86eaa9b0fc732faf9934d
|
@@ -14,7 +14,10 @@ module Tlux
|
|
14
14
|
def run
|
15
15
|
parser = Tlux::Config::Parser.from_file(config_file_path)
|
16
16
|
parser.parse!
|
17
|
-
|
17
|
+
|
18
|
+
unless dir.empty?
|
19
|
+
parser.session.dir(dir)
|
20
|
+
end
|
18
21
|
|
19
22
|
exec Tlux::Config::Generator.new(parser.session).generate!
|
20
23
|
end
|
data/lib/tlux/session.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
module Tlux
|
2
2
|
class Session
|
3
|
-
attr_accessor :dir
|
4
3
|
attr_reader :windows
|
5
|
-
attr_writer :name
|
6
4
|
|
7
5
|
def initialize(name = "")
|
8
6
|
@name = name
|
@@ -16,8 +14,20 @@ module Tlux
|
|
16
14
|
window.instance_eval(&block) if block_given?
|
17
15
|
end
|
18
16
|
|
19
|
-
def name
|
20
|
-
|
17
|
+
def name(val = nil)
|
18
|
+
if val.nil?
|
19
|
+
@name.empty? ? name_from_dir : @name
|
20
|
+
else
|
21
|
+
@name = val
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def dir(val = nil)
|
26
|
+
if val.nil?
|
27
|
+
@dir
|
28
|
+
else
|
29
|
+
@dir = val
|
30
|
+
end
|
21
31
|
end
|
22
32
|
|
23
33
|
def get_binding
|
data/lib/tlux/version.rb
CHANGED
data/spec/session_spec.rb
CHANGED
@@ -14,7 +14,7 @@ describe Tlux::Session do
|
|
14
14
|
|
15
15
|
context "settable" do
|
16
16
|
it "should have a name" do
|
17
|
-
session.name
|
17
|
+
session.name("foo")
|
18
18
|
session.name.should == "foo"
|
19
19
|
end
|
20
20
|
end
|
@@ -29,7 +29,7 @@ describe Tlux::Session do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
context "settable" do
|
32
|
-
before { session.dir
|
32
|
+
before { session.dir(:foo) }
|
33
33
|
its(:dir) { should == :foo }
|
34
34
|
end
|
35
35
|
end
|