(MODULES-905) Add bool2str() and camelcase() for string manipulation

Python likes to have its constants Capitalized, and the capitalize
function only understands strings... so I shave a yak.

bool2str will convert a boolean to its equivalent string value,
and camelcase extends on uppercase & downcase to convert an underscore
delimited string into a camelcased string.
(maint) Add bool2str & camelcase spec tests
(PUP-2571) add 'before' functionality to file_line

file_line supports adding lines after a match, but there are use cases when
having "before" would be useful. For example, in Debian-based OS's, the last
line of /etc/rc.local is "exit 0" it's an incredible pain to deal with
that scenario today.

This commit adds a 'before' parameter to the file_line type, and implements
it for the ruby provider.
Merge pull request #256 from stbenjam/2571-before

(PUP-2571) add 'before' functionality to file_line
Merge pull request #255 from mckern/enhancement/master/camelcasedembools

(MODULES-905) Add bool2str() and camelcase() for string manipulation
Revert "Merge pull request #256 from stbenjam/2571-before"

This reverts commit 8499ebdb7f892f2623295058649c67a5553d4732, reversing
changes made to 08b00d9229961d7b3c3cba997bfb35c8d47e4c4b.
Merge pull request #257 from apenney/revert-before

Revert "Merge pull request #256 from stbenjam/2571-before"
(MODULES-905) Narrow the confinement in bool2str

Previously, bool2str() accepted a broad array of boolean values and
bare strings, without any attempt to validate that the strings in any
way resembled "true" or "false" (or any of the other values bool2num()
accepts). This commit narrows the input confinement to TrueClass and
FalseClass, which means that bool2str() will only interpolate
strict boolean values now.
(MODULES-905) Extend spec tests for bool2str

The extended spec tests validate that the common types of values
that could be passed to bool2str() are rejected.
Merge pull request #258 from mckern/enhancement/master/camelcasedembools

(MODULES-905) Narrow the confinement in bool2str
Fixes for PE3.3.
Merge pull request #264 from apenney/fixes-for-tests

Fixes for PE3.3.
Further fixes to tests for 14.04.
Merge pull request #265 from apenney/fix-tests

Further fixes to tests for 14.04.
Prepare a 4.2.2 release.
Convert specs to RSpec 2.99.0 syntax with Transpec

This conversion is done by Transpec 2.2.1 with the following command:
    transpec spec/unit

* 53 conversions
    from: obj.should
      to: expect(obj).to

* 19 conversions
    from: == expected
      to: eq(expected)

* 5 conversions
    from: lambda { }.should
      to: expect { }.to

* 2 conversions
    from: be_true
      to: be_truthy

For more details: https://github.com/yujinakayama/transpec#supported-conversions
Convert specs to RSpec 2.99.0 syntax with Transpec

This conversion is done by Transpec 2.2.1 with the following command:
    transpec spec/functions

* 345 conversions
    from: obj.should
      to: expect(obj).to

* 122 conversions
    from: == expected
      to: eq(expected)

* 85 conversions
    from: lambda { }.should
      to: expect { }.to

* 22 conversions
    from: be_true
      to: be_truthy

* 16 conversions
    from: be_false
      to: be_falsey

* 11 conversions
    from: pending
      to: skip

* 9 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 5 conversions
    from: =~ [1, 2]
      to: match_array([1, 2])

* 2 conversions
    from: =~ /pattern/
      to: match(/pattern/)

* 2 conversions
    from: obj.should_not
      to: expect(obj).not_to

For more details: https://github.com/yujinakayama/transpec#supported-conversions
Merge pull request #268 from apenney/rspec3

Rspec3 changes
(FM-1587) Fix test issues on solaris 10

- ensure_packages fails because Error: Sun packages must specify a package source
- ensure_resource fails for the same reason
- get_module_path fails because the modulepath is different
- has_interface_with fails because the interface is lo0 not lo
Merge pull request #276 from hunner/fm_1587

(FM-1587) Fix test issues on solaris 10