(#403) Requiring require_all in broker.rb

This change requires require_all in the broker.rb file the same was as
in the model.rb file. This removes the need to explicitly require each
broker under the correspondingly named subdirectory.

The change is desirable because it enables people writing custom brokers
to just drop their Ruby file under the broker subdirectory and have it
required automatically by Razor.
Fixed issue with the Razor daemon ignoring the node_expire_timeout value.
Modified the Razor daemon so that it uses the new (not sure how new)
syntax added recently to separate out slices that provide a "JSON interface"
from those that provide a "Web interface".  It turns out that invoking a
"razor -w config" command now returns an "InvalidSlice" error rather than
returning the current configuration for the Razor server...the new syntax
that must be used to obtain the configuration is "razor -j config" (and this
change in syntax had not been propagated out to everywhere that we were
using the older "razor -w config" command, including the razor_daemon.rb
script where the result was that the node_expire_timeout value contained in
the Razor configuration was being ignored and a default (15 minute) value
for this node_expire_timeout parameter was being used instead.
Merge pull request #406 from tjmcs/tb/fix_razor_config_slice_error

Fixes #405 (Razor daemon ignoring the node_expire_timeout value)
(#401) Checking network status with nm-online

This change checks the network status at the top of the os_boot.erb
template for Red Hat 6 so that the script can connect to the Razor
daemon over the network. This is done by checking the status of
the NetworkManager service and calling the nm-online command, when
it's available, with a reasonable timeout that returns as soon as the
network is online. The command and the timeout values are taken from the
NetworkManager init script from CentOS, so it should be sane and should
not introduce any regressions.

The change is necessary in the context where a Red Hat derivative uses
Anaconda which configures the network with Network Manager. This is an
asynchronous process so the network might still be offline when rc.local
is called so the boot process never completes the handoff to the broker.
You must start Razor when running the tests

Our testing guide missed an essential step:

Because we only have acceptance style tests, not unit tests, it is
necessary to manually start the Razor daemon process before running
the test suite.

This updates the document to reflect that sadly omitted step.
Merge pull request #404 from cr3/403

(#403) Requiring require_all in broker.rb
Merge pull request #402 from cr3/401

(#401) Checking network status with nm-online
(#410) Move acceptance style spec tests into the acceptance directory

The previous "spec" test suite was really an acceptance / integration level
test: you had to have a fully functional end to end Razor stack to run
the test - including the nodejs web components, a data store, etc.

This is really valuable, and has brought a lot of value to development, but it
also makes it very hard to add actual unit style tests to validate small parts
of the functionality of the Razor codebase.

This moves aside the acceptance spec files, so that we no longer have them
sitting where Ruby convention dictates a unit style test suite would live.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Remove the local .rspec options file

The Razor repository includes an rspec options file, setting some cosmetic
options.  This will override any user configuration in their `~/.rspec` file,
which means that every developer is forced to use the same cosmetic output.

That really isn't polite - we should respect individual decisions about
unimportant aspects like the spec output format; removing this file allows
for that.

The worst case is that someone who expected the old behaviour now sees
the (admittedly, terrible) rspec default output format until they create their
own personal configuration in their home directory to fix that.

(Of course, they will then benefit: every project they work in will have those
defaults they like applied, so it should be an overall quality of life win
for everyone. :)

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
(#410) Build the stub rspec unit test suite

This adds the bones of an rspec test suite.  While *cough* extremely
limited *cough* at the moment, having the framework in place makes it easier
to start adding flesh to these empty bones.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
(#410) Create template spec stubs for all conventional classes

This creates a stub template spec with a minimal test - can the code load, and
does it define the constant we expect - for everything that complies with Ruby
convention for how code is loaded.

These are not deep tests, but they should ensure that we, at the least, manage
to load most of the code in the project when we run the spec tests.  That will
catch the worst of errors, that we fail to require the right things, or that
we have a syntax error.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Update test documentation to reflect unit test creation

This updates the testing guide to point folks at the unit tests, and to
indicate how to run the acceptance suite.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #411 from daniel-pittman/feature/master/410-make-a-real-unit-test-suite-for-razor

#410 make a real unit test suite for razor
(#410) Move the acceptance spec tests to the correct location

Embarrassingly, my previous pull request for #410 was incorrect.  I had
committed and tested it, and found that it didn't work correctly since the
acceptance suite runs `acceptance/**/*.rb` unconditionally.

I then fixed that up by moving things around, staged those changes, tested,
and submitted my pull request.  Yes - without actually *committing* the fixed
version, but with testing the checked out (and functional) version.

Lesson learned: I should update my pull request making tooling to check for a
dirty repository, or staged but uncommitted changes, and abort the pull
request.  If it isn't clean, it isn't ready to be a pull request.

This fixes that by pushing the fixed and functional version into place.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Fix for failed merge of #410 - add the missing commit

The pull request for #410 was missing a commit that actually made it work,
which is very embarrassing.  This corrects that by adding it in.
Update `Gemfile` to reflect current gem dependencies

Over time the gem dependencies for Razor have changed, especially with the
introduction of a real unit test suite with a lighter weight dependency chain
than the acceptance suite.

This updates the `Gemfile` to reflect that, allowing us to use that for all
our automated testing needs.  That helps keep this accurate, which hopefully
also makes life easier for new developers on the project.

It also eliminates a number of unused gems, including `autotest`, that had
fairly heavy (and sometimes broken) dependencies.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #414 from daniel-pittman/feature/master/update-gemfile-to-current-dependencies

Update `Gemfile` to reflect current gem dependencies

This allows the `bundler` tool to install the correct set of modules for running the Razor unit test suite.
(maint) Remove natty from build_defaults

Ubuntu's Natty has been EOL for 3 months
[http://en.wikipedia.org/wiki/List_of_Ubuntu_releases#Ubuntu_11.04_.28Natty_Narwhal.29],
so this commit removes the natty cow from build_defaults.
(maint) Remove rc_mocks from build_defaults

Packaging internals have been updated to no longer require rc_mocks, so this
commit removes the rc_mocks from the build_defaults.
(maint) Add f18 mocks to build_defaults

Fedora 18 has been released to the world, so we should build packages for it.
This commit adds the fedora 18 mocks to the build_defaults so we can easily
supply fedora 18 packages.