Skip to content

Commit 5d3a69a

Browse files
committed
Merge pull request #95 from tony/before_script-arguments
Support for before_script with arguments
2 parents 10a29ad + de60a86 commit 5d3a69a

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

CHANGES

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Changelog
44

55
Here you can find the recent changes to tmuxp.
66

7-
CURRENT
8-
-------
7+
0.1.13
8+
------
99

1010
- [internal] Remove ``package_metadata.py`` in favor of ``__about__.py``.
1111
- [docs] ``scent.py`` for building docs
@@ -19,9 +19,16 @@ CURRENT
1919
- [docs] updates to doc links
2020
- [docs] ``make checkbuild`` for verifying internal / intersphinx doc
2121
references.
22+
- [internal] Add Warning tmux versions less than 1.4 from `@techtonik`_.
23+
- [internal] [docs] Add documentation on leading space in ``send_keys``
24+
from `@thomasballinger`_.
25+
- [docs] Update about page from teamocil and erb support from `@raine`_.
2226

2327
.. _sniffer: https://github.com/jeffh/sniffer
2428
.. _watchingtestrunner: https://pypi.python.org/pypi/watching_testrunner/1.0
29+
.. _@raine: https://github.com/raine
30+
.. _@thomasballinger: https://github.com/thomasballinger
31+
.. _@techtonik: https://github.com/techtonik
2532

2633
0.1.12
2734
------

tmuxp/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__title__ = 'tmuxp'
22
__package_name__ = 'tmuxp'
3-
__version__ = '0.1.12'
3+
__version__ = '0.1.13'
44
__description__ = 'Manage tmux sessions thru JSON, YAML configs. Features Python API'
55
__email__ = '[email protected]'
66
__author__ = 'Tony Narlock'

tmuxp/testsuite/workspacebuilder.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,23 @@ def test_true_if_test_passes(self):
846846
with self.temp_session() as session:
847847
builder.build(session=self.session)
848848

849+
def test_true_if_test_passes_with_args(self):
850+
assert(os.path.exists(os.path.join(fixtures_dir, 'script_complete.sh')))
851+
sconfig = kaptan.Kaptan(handler='yaml')
852+
yaml = self.config_script_completes.format(
853+
fixtures_dir=fixtures_dir,
854+
script_complete=os.path.join(fixtures_dir, 'script_complete.sh') + ' -v'
855+
)
856+
857+
sconfig = sconfig.import_config(yaml).get()
858+
sconfig = config.expand(sconfig)
859+
sconfig = config.trickle(sconfig)
860+
861+
builder = WorkspaceBuilder(sconf=sconfig)
862+
863+
with self.temp_session() as session:
864+
builder.build(session=self.session)
865+
849866

850867
def suite():
851868
suite = unittest.TestSuite()

tmuxp/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import re
1515
import os
1616
import sys
17+
import shlex
1718
import logging
1819

1920
from distutils.version import StrictVersion
@@ -31,7 +32,7 @@ def run_before_script(script_file):
3132
"""Function to wrap try/except for subprocess.check_call()."""
3233
try:
3334
proc = subprocess.Popen(
34-
script_file,
35+
shlex.split(str(script_file)),
3536
stderr=subprocess.PIPE
3637
)
3738
proc.wait()

0 commit comments

Comments
 (0)