From f63de218944ead52d0df1b8ed458a85eb60ad8ad Mon Sep 17 00:00:00 2001 From: Domenic Del Nano Date: Sun, 15 May 2016 13:02:51 -0400 Subject: [PATCH 1/4] Add tests for --force and --port flags --- features/server_configuration.feature | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 features/server_configuration.feature diff --git a/features/server_configuration.feature b/features/server_configuration.feature new file mode 100644 index 0000000..13c1a3a --- /dev/null +++ b/features/server_configuration.feature @@ -0,0 +1,12 @@ +Feature: Configuring the server + + @announce + Scenario: Starting the server with --force flag if port is blocked + Given I run `dredd-hooks-php` interactively + Then I run `dredd-hooks-php --force` interactively + + @announce + Scenario: Starting the server on non standard port + Given I run `dredd-hooks-php --port 123` interactively + Then It should start listening on localhost port 123 + From 7a8148dc6d9ec54d79317a34aa134d7f0688523d Mon Sep 17 00:00:00 2001 From: Domenic Del Nano Date: Sun, 15 May 2016 13:10:34 -0400 Subject: [PATCH 2/4] Surroung port number in qutoes to match cucumber rule --- features/server_configuration.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/server_configuration.feature b/features/server_configuration.feature index 13c1a3a..d927ea6 100644 --- a/features/server_configuration.feature +++ b/features/server_configuration.feature @@ -8,5 +8,5 @@ Feature: Configuring the server @announce Scenario: Starting the server on non standard port Given I run `dredd-hooks-php --port 123` interactively - Then It should start listening on localhost port 123 + Then It should start listening on localhost port "123" From 1cfee7ebd1bce6be63b2d804cc368051b07c251b Mon Sep 17 00:00:00 2001 From: Domenic Del Nano Date: Sun, 15 May 2016 13:16:03 -0400 Subject: [PATCH 3/4] Add step to check server is running and change port number --- features/server_configuration.feature | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/features/server_configuration.feature b/features/server_configuration.feature index d927ea6..7dbe4ae 100644 --- a/features/server_configuration.feature +++ b/features/server_configuration.feature @@ -3,10 +3,12 @@ Feature: Configuring the server @announce Scenario: Starting the server with --force flag if port is blocked Given I run `dredd-hooks-php` interactively + When I wait for output to contain "Starting" Then I run `dredd-hooks-php --force` interactively @announce Scenario: Starting the server on non standard port - Given I run `dredd-hooks-php --port 123` interactively - Then It should start listening on localhost port "123" + Given I run `dredd-hooks-php --port 1123` interactively + When I wait for output to contain "Starting" + Then It should start listening on localhost port "1123" From f4c18835b6869c3d6ef6858f059c948a9a0cb221 Mon Sep 17 00:00:00 2001 From: Domenic Del Nano Date: Sun, 15 May 2016 13:25:43 -0400 Subject: [PATCH 4/4] Add changelog to repo --- CHANGES | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CHANGES diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..b29c54e --- /dev/null +++ b/CHANGES @@ -0,0 +1,5 @@ +Changes from 1.1.4 to 1.1.5 + +dredd-hooks-php command can now accept the flags --port, --host and --force. + +The host and port flags are obviously to override the default of localhost and 61321 respectively. The force flag allows the server to start regardless if some other service is already listening on that port.