Add SimpleCov

Add SimpleCov and configure it so that it doesn't report coverage when
`rake` completes and acts only as a 'red light' if coverage drops
significantly (by 20%) or drops below a percentage (80%).

Note that to silence the 'Coverage report generated for' message that
reports the coverage percentage when SimpleCov completes, we
monkey-patch the SimpleCov::Formatter::HTMLFormatter class.

The SimpleCov::Formatter::HTMLFormatter#output_message _only_ prints the
'Coverage report generated for' message, so by monkey-patching it we
don't lose the other warnings that we want to keep (mentioned above).
Pin SimpleCov to version 0.7.1

Pin SimpleCov to version 0.7.1 to avoid the bug in SimpleCov 0.8.x
affecting exit codes:

colszowka/simplecov#281

Note that I had to change `profiles` to `adapters`, as the naming
changed in version 0.8.0[1].

[1]:
colszowka/simplecov@60f4717#diff-4ac32a78649ca5bdd8e0ba38b7006a1eR16
Adjust SimpleCov thresholds

Set the minimum coverage to 100% to match the current coverage, as
discussed with @annashipman.

Also, remove the maximum coverage drop as this will never be triggered
given the minimum coverage we have set.
Merge pull request #13 from gds-operations/72169016-simple-cov-red-light

[#72169016] Add SimpleCov
Add required Ruby version

As per https://github.com/gds-operations/vcloud-tools/pull/194.
Merge pull request #14 from gds-operations/ruby-version

[#73379346] Add required Ruby version
Configure Travis to test Ruby 2.0.0 and 2.1.2

To ensure that we support Ruby versions other than 1.9.3.

I've chosen 2.1.2 as it's the latest stable release. 2.0.0 is the
previous stable release.
Merge pull request #15 from gds-operations/73308952-test-more-ruby

[#73308952] Configure Travis to test Ruby 2.0.0 and 2.1.2
Rename test_parameters_spec.rb

Rename `test_parameters_spec.rb` to `user_parameters_spec.rb`.

The logic from the `TestParameters` class will be moved to a new class
called `UserParameters`, a name more appropriate to its newly reduced
scope.

Accordingly, rename `test_parameters_spec.rb` to reflect this.
Move some tests to `test_parameters_spec.rb`

The new `TestParameters` class will deal with both user-defined and
automatically-generated parameters that we retrieve by querying the API.

Move the appropriate tests to `test_parameters_spec.rb` to reflect this.
user_parameters_spec.rb describes UserParameters

This commit is best reviewed with whitespace changes ignored.
Namespace using `describe`

This commit is best reviewed with whitespace changes ignored.

Remove the `module` namespacing and namespace using `describe` instead
for neatness.
Convert `before` to `let`

This `before` statement was simply setting the value of `data_dir`. A
`let` statement is a more appropriate construct for this.
Add Pry as a development dependency

Useful for debugging; see:

http://pryrepl.org/
Rewrite TestParameters to support fixture setup

Rewrite the `TestParameters` class and add new `UserParameters`,
`FixtureParameters` and `TestSetup` classes so that vCloud Tools Tester
can support the creation and verification of require test fixtures.

The roles are as follows:

`TestParameters` is concerned with retrieving the user-defined
parameters and the parameters it can find by querying the API. To do
this, it calls the `UserParameters` and `FixtureParameters` classes
respectively.

The `UserParameters` class is solely concerned with parsing the
configuration file for user parameters and performing validation of
those parameters.

The `FixtureParameters` class is concerned with ensuring that the
correct fixtures exist in the environment against which the integration
tests are run. As part of this, it will query the vCloud Director API,
compare the existing configuration to the one expected and create new
fixtures if required. Currently, the only fixture it knows to create are
networks.

These changes mean that the method to retrieve the test parameters, as
used by the other vCloud Tools, has changed.

Instead of calling `TestParameters#new`, the test parameters should be
retrieved as follows:

```ruby
test_params = Vcloud::Tools::Tester::TestSetup.new(config_file, user_expected_params).test_params
```

`TestSetup#new` takes an argument `user_expected_params`, which can be
used to specify which user-defined parameters should be present in the
configuration file specified.

We now depend on vCloud Core version 0.5.0, which allows us to query the
vCloud Director API.

Notice that we don't tear down the networks once tests have finished.
There are two reasons for this; firstly because deleting and creating
networks can be expensive operations and secondly because many other
tests rely on these networks and have not yet been converted to create
these fixtures as required.

* * *

If a network with the same name as the test networks already exists, we
check its configuration and raise an error if it is incorrectly
configured for our tests. Raise an error rather than deleting these
networks as it's less aggressive and an existing network with a
different configuration may indicate an underlying issue, i.e. perhaps
the tests are running against the wrong organisation.

Note that we don't check the 'IsEnabled' property of the network
adapters as it's not exposed by the call to
Fog::Compute::VcloudDirector::Collection#all. We could make an extra
call to the API separately but in reality a disabled network is an edge
case and I don't think it's worth the extra API call.

* * *

We use Fog::Compute::VcloudDirector::Collection#all to retrieve the list
of networks in the organisation instead of
Vcloud::Core::EdgeGateway#interfaces as that method does not return
_isolated_ networks, which appear not to associate to a specific Edge
Gateway. Interestingly, the EdgeGateway#interfaces method _does_ return
the 'IsEnabled' property for network interfaces (see comments above).
Amend spec tests to reflect rewrite

Rewrite the spec tests to reflect the change in responsibilities for the
`TestParameters` class and also the addition of the `UserParameters`,
`TestSetup` and `FixtureParameters` classes in the previous commit.
Share `mock_found_interfaces` between contexts

Move the `let` declaration for `:mock_found_interfaces` to the block
above so that it can be re-used by tests.
Confirm fixture networks available to vDCs

Add a new method
`Vcloud::Tools::Tester::FixtureParameters#network_available_to_correct_vdc?`
that checks if existing fixture networks are available to the vDCs used
by the tests.

This is necessary because the call we make to retrieve the network
attributes (line 38) contains no information on which vDCs the networks
are available to. Therefore, we make a second call to the Fog model
interface to query which vDCs are present in the environment and we
match the IDs of the networks available in each vDC to the networks we
found.

As part of this, `network_config_matches_expected` has been renamed
`network_config_matches_expected?` and now receives the network as an
object rather than a hash.

A new method, `network_matches_expected?`, has also been added. This
calls `network_config_matches_expected?` and
`network_available_to_correct_vdc?`.

Also creates an instance variable, `@vcloud_api`, so that the instance
of the model interface can be re-used.
Add spec test checking networks available to vDCs

Test what happens if a fixture network already exists, but is not
available to the vDCs used by the tests.
Version 0.1.0