Commit graph

843 commits

Author SHA1 Message Date
Ryan McKern
557d38bdc6 (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.
2014-05-15 16:45:02 -07:00
Ryan McKern
93c4151edf (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.
2014-05-15 15:01:14 -07:00
Ryan McKern
0761fcf043 (maint) Add bool2str & camelcase spec tests 2014-05-13 15:46:50 -07:00
Ryan McKern
42743614cb (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.
2014-05-13 15:46:40 -07:00
Adrien Thebo
62e8c1d769 Merge branch '4.x' 2014-03-25 13:26:12 -07:00
Adrien Thebo
bc14381573 Merge branch '3.x' into 4.x 2014-03-25 13:26:00 -07:00
Adrien Thebo
fba67a1178 Merge branch '3.2.x' into 3.x 2014-03-25 13:25:31 -07:00
Adrien Thebo
39339ff313 Merge branch 'maint/3.2.x-ruby-rake-1.8-compat' into 3.2.x 2014-03-25 13:24:49 -07:00
Adrien Thebo
b6ee24687c (maint) Pin rake version to 10.1.0 for 1.8 compat 2014-03-25 09:46:53 -07:00
Hunter Haugen
a2f7202ec9 Merge branch '4.x' 2014-03-18 16:24:02 -07:00
Hunter Haugen
aedb89d91f Merge branch '3.x' into 4.x 2014-03-18 16:18:53 -07:00
Hunter Haugen
904f1a003e Merge branch '3.2.x' into 3.x 2014-03-18 16:16:00 -07:00
Ashley Penney
fec943f441 Merge pull request #231 from apenney/32-testing
Numerous changes to update testing gems.
2014-03-18 12:34:40 -04:00
Ashley Penney
9aa28f1c10 Remove this test.
It turns out that in 3.x the refresh functionality doesn't actually
exist yet, so testing it makes no sense.
2014-03-13 11:10:01 -07:00
Ashley Penney
4a461423cc Merge pull request #234 from apenney/add-beaker
Add beaker framework.
2014-03-12 11:24:32 -07:00
Ashley Penney
9a3107fed1 Add beaker framework.
This prepares the module for beaker acceptance tests.
2014-03-12 18:22:23 +00:00
Ashley Penney
e467d8f084 Merge pull request #220 from mediatemple/fix/master/deep_merge_fix
PUP-1724 Don't modify the paramaters to deep_merge
2014-03-11 09:31:23 -07:00
Ashley Penney
6a89e1cee4 Merge pull request #221 from puphpet/hash-fix
hash example has misplaced comas
2014-03-11 09:29:46 -07:00
Ashley Penney
3feb846cf4 Ensure Gemfile retains facilities for Jenkins. 2014-03-11 09:21:37 -07:00
Ashley Penney
e6c1aa6a02 Merge pull request #233 from apenney/add-back-location
Make sure location_for is used when installing Puppet.
2014-03-10 15:22:56 -07:00
Ashley Penney
36dda7b180 Make sure location_for is used when installing Puppet. 2014-03-10 15:19:03 -07:00
Ashley Penney
e382c0db5c Merge pull request #232 from apenney/add-back-location
Readd location_for
2014-03-10 14:58:25 -07:00
Ashley Penney
0fabaa5f07 Readd location_for
location_for is used in Jenkins to transform a passed in git
repo into something usable by bundler.
2014-03-10 14:56:12 -07:00
Ashley Penney
0bf470a71b Remove pry, whoops. 2014-03-10 13:07:43 -07:00
Ashley Penney
dbb29980a1 Numerous changes to update testing gems.
This work updates a number of Gems to the latest versions (rspec,
rspec-puppet), and updates and tweaks a bunch of tests to work
with the updated gems.
2014-03-10 10:58:49 -07:00
Ashley Penney
9e1cf99ccf Merge pull request #230 from apenney/fix-testing
[WIP] Spec overhaul.
2014-03-07 19:48:40 -05:00
Ashley Penney
3854e076cc Numerous changes to update testing gems.
This work updates a number of Gems to the latest versions (rspec,
rspec-puppet), and updates and tweaks a bunch of tests to work
with the updated gems.
2014-03-08 00:42:51 +00:00
Ashley Penney
326a8fd801 Merge pull request #228 from hunner/fix_metadata
Patch metadata
2014-03-03 16:59:29 -05:00
Hunter Haugen
4f65539c2e Patch metadata 2014-03-03 13:56:13 -08:00
Ashley Penney
dce1b4e75b Merge pull request #227 from hunner/add_support
Supported Release 3.2.1
2014-03-03 15:48:41 -05:00
Hunter Haugen
b3490f6318 Supported Release 3.2.1
Summary
This is a supported release

Bugfixes
- Fixed `is_integer`/`is_float`/`is_numeric` for checking the value of
  arithmatic expressions.

Known bugs
* No known bugs
2014-03-03 12:46:16 -08:00
Hunter Haugen
fecb53d46e Merge pull request #226 from apenney/supported-metadata
[don't merge] Prepare for supported modules.
2014-03-03 10:55:28 -08:00
Ashley Penney
ff47b2e040 Prepare for supported modules. 2014-03-03 18:51:18 +00:00
Juan Treminio
908db6d403 hash example has misplaced comas 2014-02-19 23:37:38 -06:00
Justin Burnham
c12e9afc97 PUP-1724 Don't modify the paramaters to deep_merge
Instead of modifying the first paramater of deep_merge due to the
use of the merge! function, instead use merge to return a copy of
the merged object. This allows one to continue to use the original
first parameter after the call to deep_merge.
2014-02-17 12:19:40 -08:00
Ashley Penney
ab981422a6 Merge pull request #217 from teancom/fix/master/file_line
(DOCUMENT-21) add docs for file_line to README.markdown
2014-02-11 12:51:37 -05:00
Ashley Penney
2435741ca7 Merge pull request #219 from petems/patch-1
Fix strftime documentation in README
2014-02-11 12:51:22 -05:00
Peter Souter
d4722d7af5 Fix strftime documentation in README
Markdown was barfing due to typo
2014-02-11 15:57:22 +00:00
Hunter Haugen
dacdfaac7f Merge pull request #218 from mediatemple/remove_trailing_whitespace
Remove trailing whitespace
2014-02-05 15:06:09 -08:00
Sharif Nassar
a972e0645b Remove trailing whitespace 2014-02-05 15:01:45 -08:00
Andrew Parker
5b85e7c39f Merge branch 'DavidS-broaden-pick-arguments2'
* DavidS-broaden-pick-arguments2:
  (PUP-638) Add a pick_default() function that always returns a value.
  (PUP-636) Ignore generated file
2014-01-29 09:28:48 -08:00
David Schmitt
52fcef573f (PUP-638) Add a pick_default() function that always returns a value.
This version of pick() does not error out, instead always returning at least
the last argument, even if that too has no "real" value.
2014-01-29 09:26:35 -08:00
David Schmitt
9346b108ce (PUP-636) Ignore generated file 2014-01-29 09:25:59 -08:00
Andrew Parker
a2e9d005c7 Merge pull request #215 from blkperl/add_root_home_to_mavericks
(PUP-1459) Add support for root_home on OS X 10.9
2014-01-28 10:52:58 -08:00
David Bishop
dbba655c10 (DOCUMENT-21) add docs for file_line to README.markdown
Without this, you have to look at the source file
(lib/puppet/type/file_line.rb) to know what it does. This adds that
documentation.
2014-01-25 13:30:50 -05:00
Henrik Lindberg
2c8450d830 (PUP-1195) Rephrase documentation for is_integer and is_numeric
The documentation contained references to future decisions about
functionality. 
Text rephrased for clarity.
2014-01-24 00:22:09 +01:00
Simon Effenberg
264dc9bbde (PUP-1195) Fix is_numeric/is_integer when checking non-string parameters
I expect a function called "is_numeric" or "is_integer" to check if a
variable is an integer or a number even if the variable passed by isn't
a string nor a number at all. Otherwise we should call them
is_string_a_number and is_string_an_integer and we have then to remove
the check for .is_a?(Number) and .is_a?(FixNum)

now checking also if it is a hex or octal number

improved/corrected checking for integer

* checking against Integer instead of Fixnum so that
  also Bignum is matching
* now .is_a? Integer is done first so this is quiet fast

Now many types of numerics are recognized.

1. Float/Integer values (signed or unsigned, with exponent or without)
2. octal and hex check
3. except hex numbers and the "0." in a float lower than 1 can be prefixed
   with a '0'.

whitespaces shouldn't be allowed as prefix/suffix

string representation of numbers should not contain any type of
whitespace.. the user is responsible to clean a string before checking
it..

fix documentation and added more checks

tried to be 99.9% backward compatible

* for now the decission is post poned if hex and octal numbers
  should be allowed or not (is_numeric)
* native Bignum is now also a valid integer class

fix problem with old 1.8 ruby and Hash.to_s/Array.to_s

In ruby < 1.9 array and hashes would be recognized as numeric
if they have a special format:

1.8:

  [1,2,3,4].to_s = "1234"
  {1=>2}.to_s    = "12"

1.9:

  [1,2,3,4].to_s = "[1, 2, 3, 4]"
  {1=>2}.to_s    = "{1=>2}"
2014-01-23 23:59:28 +01:00
Hunter Haugen
2cf6e3c0f3 Merge pull request #216 from ghoneycutt/enable_travis_fast_finish
Enable fast finish in Travis
2014-01-23 14:49:56 -08:00
Garrett Honeycutt
8f192a5a82 Enable fast finish in Travis
http://blog.travis-ci.com/2013-11-27-fast-finishing-builds/
2014-01-23 14:18:50 -05:00
William Van Hevelingen
fe676f0ac4 (PUP-1459) Add support for root_home on OS X 10.9
getent does not exist on 10.9 so this commit uses
dscacheutil to query the homedir for the root user.
2014-01-22 22:54:34 -08:00