Commit graph

964 commits

Author SHA1 Message Date
Travis Fields
191f180d1b Merge pull request #282 from hunner/rm_modulefile
Remove Modulefile; use metadata.json
2014-06-23 16:18:08 -07:00
Hunter Haugen
cfce787890 Remove Modulefile; use metadata.json 2014-06-23 16:17:23 -07:00
Travis Fields
a6b57376b0 Merge pull request #281 from hunner/win_loadyaml
Windows needs a tmpdir path
2014-06-23 15:14:51 -07:00
Hunter Haugen
f7b7c4a6ec Windows needs a tmpdir path 2014-06-23 15:13:29 -07:00
Travis Fields
d38ccfc9d2 Merge pull request #280 from hunner/win_aug
Augeas isn't present on windows
2014-06-23 13:51:33 -07:00
Hunter Haugen
280d808eb4 Augeas isn't present on windows 2014-06-23 13:50:24 -07:00
Travis Fields
8510d344d5 Merge pull request #279 from hunner/osx_interface
OS X also has lo0 and can't manage user homedirs
2014-06-23 13:46:59 -07:00
Hunter Haugen
4b7162896a OS X also has lo0 and can't manage user homedirs 2014-06-23 13:45:06 -07:00
Morgan Haskel
3ec3a4b0fa Merge pull request #278 from cyberious/4.3.x
Add windows Nodesets and remove Beaker from Gemfile
2014-06-20 19:40:26 -04:00
Travis Fields
24a6fecc78 Add windows Nodesets and remove Beaker from Gemfile 2014-06-20 16:39:15 -07:00
Hunter Haugen
c634e4748c Merge pull request #277 from hunner/update_ensure
Patch ensure_* tests
2014-06-20 13:51:29 -07:00
Hunter Haugen
7eda161be8 Patch ensure_* tests 2014-06-20 10:41:43 -07:00
Hunter Haugen
4523bc50ca Merge branch 'master' into 4.3.x 2014-06-19 16:25:16 -07:00
Travis Fields
7d4fa05da1 Merge pull request #276 from hunner/fm_1587
(FM-1587) Fix test issues on solaris 10
2014-06-19 15:42:27 -07:00
Hunter Haugen
197e2d7e70 (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
2014-06-19 15:38:23 -07:00
Ashley Penney
f049509155 Merge pull request #270 from raphink/dev/private
Add private() function
2014-06-18 10:02:07 -04:00
Raphaël Pinson
2062f9734b Add private() function 2014-06-11 16:35:32 +02:00
Morgan Haskel
ffe21fc674 Merge pull request #268 from apenney/rspec3
Rspec3 changes
2014-06-05 16:16:34 -04:00
Ashley Penney
6287a200af 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
2014-06-04 14:38:37 -04:00
Ashley Penney
d65d2354a7 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
2014-06-04 14:37:45 -04:00
Ashley Penney
e7b27205c4 Prepare a 4.2.2 release. 2014-06-04 14:18:41 -04:00
Morgan Haskel
af71faa247 Merge pull request #265 from apenney/fix-tests
Further fixes to tests for 14.04.
2014-06-03 15:01:12 -04:00
Morgan Haskel
f9f6e92dff Merge pull request #265 from apenney/fix-tests
Further fixes to tests for 14.04.
2014-06-03 14:53:04 -04:00
Ashley Penney
6010e9bd93 Further fixes to tests for 14.04. 2014-06-03 14:52:10 -04:00
Morgan Haskel
a364605f3b Merge pull request #264 from apenney/fixes-for-tests
Fixes for PE3.3.
2014-06-03 11:15:20 -04:00
Morgan Haskel
43df782406 Merge pull request #264 from apenney/fixes-for-tests
Fixes for PE3.3.
2014-06-03 11:13:35 -04:00
Ashley Penney
08f7553fb6 Fixes for PE3.3. 2014-06-03 11:11:08 -04:00
Ashley Penney
0cda858744 Merge pull request #258 from mckern/enhancement/master/camelcasedembools
(MODULES-905) Narrow the confinement in bool2str
2014-05-15 21:48:40 -04:00
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
Ashley Penney
645de3cccb Merge pull request #257 from apenney/revert-before
Revert "Merge pull request #256 from stbenjam/2571-before"
2014-05-15 17:31:28 -04:00
Ashley Penney
c5b06f9bbc Revert "Merge pull request #256 from stbenjam/2571-before"
This reverts commit 8499ebdb7f, reversing
changes made to 08b00d9229.
2014-05-15 17:28:59 -04:00
Ashley Penney
430d821ad3 Merge pull request #255 from mckern/enhancement/master/camelcasedembools
(MODULES-905) Add bool2str() and camelcase() for string manipulation
2014-05-15 17:03:18 -04:00
Ashley Penney
fa45d594ad Claim PE3.3 support. 2014-05-15 14:59:37 -04:00
Ashley Penney
8499ebdb7f Merge pull request #256 from stbenjam/2571-before
(PUP-2571) add 'before' functionality to file_line
2014-05-15 13:31:23 -04:00
Ashley Penney
1155d66381 Prepare a 4.3.0 release. 2014-05-14 16:37:48 -04:00
Stephen Benjamin
6eaa592cd8 (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.
2014-05-14 20:33:57 +02: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
Ashley Penney
08b00d9229 Merge pull request #254 from apenney/421
Prepare a 4.2.1 release.
2014-05-09 19:15:17 -04:00
Ashley Penney
14c9155745 Prepare a 4.2.1 release. 2014-05-09 16:57:32 +02:00
Ashley Penney
04fa5a0cd9 Merge pull request #252 from hunner/release_4.2.0
Release - 4.2.0
2014-05-08 18:44:30 -04:00
Hunter Haugen
f3be3b625a Release - 4.2.0
Summary
========
This release adds many new functions and fixes, and continues to be backwards compatible with stdlib 3.x

Features
-------
- New `base64()` function
- New `deep_merge()` function
- New `delete_undef_values()` function
- New `delete_values()` function
- New `difference()` function
- New `intersection()` function
- New `is_bool()` function
- New `pick_default()` function
- New `union()` function
- New `validate_ipv4_address` function
- New `validate_ipv6_address` function
- Update `ensure_packages()` to take an option hash as a second parameter.
- Update `range()` to take an optional third argument for range step
- Update `validate_slength()` to take an optional third argument for minimum length
- Update `file_line` resource to take `after` and `multiple` attributes

Bugfixes
--------
- Correct `is_string`, `is_domain_name`, `is_array`, `is_float`, and `is_function_available` for parsing odd types such as bools and hashes.
- Allow facts.d facts to contain `=` in the value
- Fix `root_home` fact on darwin systems
- Fix `concat()` to work with a second non-array argument
- Fix `floor()` to work with integer strings
- Fix `is_integer()` to return true if passed integer strings
- Fix `is_numeric()` to return true if passed integer strings
- Fix `merge()` to work with empty strings
- Fix `pick()` to raise the correct error type
- Fix `uriescape()` to use the default URI.escape list
- Add/update unit & acceptance tests.
2014-05-08 15:20:35 -07:00
Ashley Penney
14d656dd41 Merge pull request #251 from hunner/fix_tests
Fix the stdlib functions that fail tests
2014-05-08 18:16:05 -04:00
Hunter Haugen
0804121719 Fix the stdlib functions that fail tests 2014-05-08 14:55:23 -07:00
Ashley Penney
e2297a1ea6 Merge pull request #250 from hunner/move_unit
Move unit tests to spec/functions
2014-05-08 13:58:53 -04:00
Hunter Haugen
96e43e69d8 Move unit tests to spec/functions
rspec-puppet matchers are defined for tests which exist in
spec/functions, but the function unit tests lived in
spec/unit/puppet/parser/functions. This moves them to the correct place
for using rspec-puppet
2014-05-08 10:47:24 -07:00
Ashley Penney
17a912ea0a Merge pull request #247 from hunner/more_tests
Adding more spec coverage
2014-05-07 18:03:57 -04:00
Hunter Haugen
c66a2e4f49 Add mode +x to spec .rb files 2014-05-07 15:00:30 -07:00
Hunter Haugen
78982c9238 Move the 4 misplaced tests 2014-05-07 15:00:30 -07:00