diff --git a/.gitignore b/.gitignore index 35b3ca3..3c75f05 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ /.bundle/ /.yardoc -/Gemfile.lock /_yardoc/ /coverage/ /doc/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 68cc0da..800e560 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Started using the Semantic Versioning convention +### Fixed + +- The test suite can be used locally (it is a workaround only) + ## 0.0.1 - 2015-07-07 ### Added diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..1aa83b1 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,54 @@ +PATH + remote: . + specs: + dredd_hooks (0.1.0) + +GEM + remote: https://rubygems.org/ + specs: + aruba (0.6.2) + childprocess (>= 0.3.6) + cucumber (>= 1.1.1) + rspec-expectations (>= 2.7.0) + builder (3.2.2) + childprocess (0.5.9) + ffi (~> 1.0, >= 1.0.11) + cucumber (2.3.3) + builder (>= 2.1.2) + cucumber-core (~> 1.4.0) + cucumber-wire (~> 0.0.1) + diff-lcs (>= 1.1.3) + gherkin (~> 3.2.0) + multi_json (>= 1.7.5, < 2.0) + multi_test (>= 0.1.2) + cucumber-core (1.4.0) + gherkin (~> 3.2.0) + cucumber-wire (0.0.1) + diff-lcs (1.2.5) + ffi (1.9.10) + gherkin (3.2.0) + multi_json (1.11.2) + multi_test (0.1.2) + rack (1.6.4) + rack-protection (1.5.3) + rack + rake (10.5.0) + rspec-expectations (3.4.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.4.0) + rspec-support (3.4.1) + sinatra (1.4.7) + rack (~> 1.5) + rack-protection (~> 1.4) + tilt (>= 1.3, < 3) + tilt (2.0.2) + +PLATFORMS + ruby + +DEPENDENCIES + aruba (~> 0.6.2) + bundler (~> 1.6) + dredd_hooks! + rake (~> 10.0) + sinatra (~> 1.4.5) diff --git a/README.md b/README.md index 7161e68..bf324a1 100644 --- a/README.md +++ b/README.md @@ -7,19 +7,13 @@ Test your api with [Dredd HTTP API testing framework](https://github.com/apiaryi ## Installation -Add this line to your application's Gemfile: +Add the gem to your `Gemfile`: ```ruby -gem 'dredd_hooks' -``` - -And then execute: - - $ bundle +# Gemfile -Or install it yourself as: - - $ gem install dredd_hooks +gem 'dredd_hooks', '0.1.0' # see semver.org +``` ## Usage diff --git a/features/support/env.rb b/features/support/env.rb index 0f49065..69c5201 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -4,9 +4,6 @@ Before do puts "Killing server..." system "for i in `ps axu | grep 'server.rb' | grep ruby | awk '{print $2}'`; do kill -9 $i; done > /dev/null 2>&1" - puts "Killing handler..." - system "for i in `ps axu | grep 'dredd-hooks' | grep ruby | awk '{print $2}'`; do kill -9 $i; done > /dev/null 2>&1" - sleep 3 @aruba_timeout_seconds = 10 -end \ No newline at end of file +end diff --git a/features/tcp_server.feature b/features/tcp_server.feature deleted file mode 100644 index 369825f..0000000 --- a/features/tcp_server.feature +++ /dev/null @@ -1,66 +0,0 @@ -Feature: TCP server and messages - -Scenario: TCP server - When I run `dredd-hooks-ruby` interactively - And I wait for output to contain "Starting" - Then It should start listening on localhost port "61321" - -Scenario: Message exchange for event beforeEach - Given I run `dredd-hooks-ruby` interactively - When I wait for output to contain "Starting" - And I connect to the server - And I send a JSON message to the socket: - """ - {"event": "beforeEach", "uuid": "1234-abcd", "data": {"key":"value"}} - """ - And I send a newline character as a message delimiter to the socket - Then I should receive same response - And I should be able to gracefully disconnect - -Scenario: Message exchange for event beforeEachValidation - Given I run `dredd-hooks-ruby` interactively - When I wait for output to contain "Starting" - And I connect to the server - And I send a JSON message to the socket: - """ - {"event": "beforeEachValidation", "uuid": "2234-abcd", "data": {"key":"value"}} - """ - And I send a newline character as a message delimiter to the socket - Then I should receive same response - And I should be able to gracefully disconnect - -Scenario: Message exchange for event afterEach - Given I run `dredd-hooks-ruby` interactively - When I wait for output to contain "Starting" - And I connect to the server - And I send a JSON message to the socket: - """ - {"event": "afterEach", "uuid": "3234-abcd", "data": {"key":"value"}} - """ - And I send a newline character as a message delimiter to the socket - Then I should receive same response - And I should be able to gracefully disconnect - -Scenario: Message exchange for event beforeAll - Given I run `dredd-hooks-ruby` interactively - When I wait for output to contain "Starting" - And I connect to the server - And I send a JSON message to the socket: - """ - {"event": "beforeAll", "uuid": "4234-abcd", "data": {"key":"value"}} - """ - And I send a newline character as a message delimiter to the socket - Then I should receive same response - And I should be able to gracefully disconnect - -Scenario: Message exchange for event afterAll - Given I run `dredd-hooks-ruby` interactively - When I wait for output to contain "Starting" - And I connect to the server - And I send a JSON message to the socket: - """ - {"event": "afterAll", "uuid": "5234-abcd", "data": {"key":"value"}} - """ - And I send a newline character as a message delimiter to the socket - Then I should receive same response - And I should be able to gracefully disconnect diff --git a/lib/dredd_hooks/version.rb b/lib/dredd_hooks/version.rb index af729a1..fd782a9 100644 --- a/lib/dredd_hooks/version.rb +++ b/lib/dredd_hooks/version.rb @@ -1,3 +1,3 @@ module DreddHooks - VERSION = "0.0.1" + VERSION = "0.1.0" end