summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2014-08-22(PUP-2040) .pmtignore and .gitignore for buildBrandon High11-4/+731
Prior to this commit there was no way for a module developer to specify files that they want to ignore when building/packaging their module. This commit adds the ability to specify files to ignore in a .pmtignore file, located in the project root and using the same syntax as .gitignore, or if that is not present, reading the .gitignore file and using that. This commit also adds pathspec as a vendored gem. (PE-5574)
2014-08-22Merge pull request #2980 from highb/fix/master/pup-2745_skip_moduleAnderson Mills1-2/+12
(PUP-2745) Skip dependencies with malformed dependencies.
2014-08-21Merge pull request #2973 from vrthra/fix/pup-2817/zonesKylo Ginsberg2-7/+4
(PUP-2817) Fix zone properties so that nil is not passed through
2014-08-21Merge pull request #2998 from ↵Kylo Ginsberg3-3/+6
demophoon/deprecation/master/deprecate-instrumentation-system (PUP-586) Deprecate Instrumentation System
2014-08-21Merge pull request #3000 from ↵Kylo Ginsberg1-1/+1
demophoon/deprecation/master/deprecate-stringify-fact-default (PUP-406) Deprecate stringify_ facts option
2014-08-21Merge remote-tracking branch 'upstream/pr/2995'Josh Cooper165-0/+17226
* upstream/pr/2995: (doc) Add Puppet Specific Documentation (PUP-2914) Remove rgen 0.7.0 dependency (PUP-2914) Add rgen 0.7.0 to vendored libraries
2014-08-21(PUP-586) Deprecate Instrumentation SystemBritt Gresham3-3/+6
The instrumentation system is being removed in Puppet 4.0. This commit is for adding a deprecation message on the subcommands for users to migrate off of it before it is finally deleted.
2014-08-21(PUP-406) Deprecate stringify_ facts optionBritt Gresham1-1/+1
The `stringify_facts` option is going to be removed in Puppet 4.0 and we need to let users know about deprecated features. This commit adds in a deprecation message in the stringify_facts description.
2014-08-20(PUP-2817) Fix zone properties so that nil is not passed throughRahul Gopinath2-7/+4
Before this patch, when `insync?` was called on the zone properties ip, dataset and inherit with value nil (happens the first time when the properties are not present), `true` was returned, which resulted in them not being set until the values were actually queried, which happened after the installation of zone. Unfortunately, the inherit property can only be set before installation. This patch removes the spurious check for `nil`, which always returned `true`, and instead handles it similar to when `:absent` is used.
2014-08-21(PUP-1044) Ensure file bucket streams are closed at all times after useHenrik Lindberg3-15/+16
This makes the stream() method on file bucket file take a block to ensure that the processing of the stream always ends up closing it.
2014-08-20(PUP-2745) Skip dependencies with malformed dependencies.Brandon High1-2/+12
Prior to this commit if we encountered a dependent candidate module with a malformed dependency, we would just ignore the malformed dependency. This commit changes that behavior to ignore the entire dependent candidate as an invalid module, this preventing the installation of a module with unknown dependencies.
2014-08-20(doc) Add Puppet Specific DocumentationBritt Gresham3-0/+18
Vendored libraries had no way for us to tell where they had come from or what version the library was at. This commit adds `PUPPET_README.md` files to each of our vendored libraries to give us more information about where they came from.
2014-08-20Merge pull request #2977 from fiddyspence/doc/rpm_grammarJosh Partlow1-2/+2
(doc) Changing don't to does not in rpm.rb
2014-08-19(PUP-2914) Add rgen 0.7.0 to vendored librariesBritt Gresham162-0/+17208
This commit adds the rgen 0.7.0 library by placing it in the vendor lib that is needed for development on the new parser.
2014-08-19(PUP-1044) Fix mode of stream used by filebucket to be binaryHenrik Lindberg2-5/+5
The stream used by a FileBucket::File in #stream opened the file with 'r' mode which will cause end of line translation on windows. The corret binary mode for reading is 'rb'. This also does some maintenance changes by removing parentheses and semicolons that are not needed.
2014-08-19Merge pull request #2985 from ↵Josh Partlow3-22/+55
cprice404/feature/master/PUP-3032-setting-to-cache-feature-load-failures (PUP-3032) Add setting to always cache `feature` load attempts
2014-08-19Merge pull request #2984 from ↵Josh Partlow7-111/+291
cprice404/bug/master/PUP-3030-server-side-tempfiles (PUP-3030) More explicit handling of tempfiles on the server
2014-08-19Merge pull request #2982 from hlindberg/PUP-1044_filebucket-less-memoryBritt Gresham5-26/+101
(PUP-1044) Make FileBucket::File use a file when possible
2014-08-19Merge pull request #2971 from ↵Britt Gresham1-1/+9
zaphod42/issue/master/pup-2631-non-existant-env-produces-long-message (PUP-2631) Elide long URIs for 404 message
2014-08-19(PUP-3032) Add comment explaining ordering of settings accessorsChris Price1-0/+4
2014-08-18(maint) Require forwardable in puppet/settings.rbJosh Partlow1-0/+1
Commit a8e9aa6 extended Puppet::Settings with Forwardable, but did not require it. This passed specs, but failed in acceptance when run with system rubies (locally with rvm/rbenv, we're not seeing a problem). Requiring forwardable, as we do in other files seems to fix the issue.
2014-08-19(PUP-1044) Replace IO::copy_stream with FileUtils.copy_stream for 1.8.7Henrik Lindberg2-2/+2
Ruby 1.8.7 does not have IO::copy_stream, this method is only available on FileUtils.
2014-08-18(PUP-3030) Rename P::F::Tempfile to UniquefileChris Price5-85/+108
Since the new implementation of Puppet::FileSystem::Tempfile is not trying to manage the deletion of files created through it, the name was misleading. This commit simply changes the name to Uniquefile to try to make it a bit more obvious that it is not responsible for deleting the files.
2014-08-18(PUP-3030) Flesh out implementation of P::F::TempfileChris Price1-10/+171
This commit changes `Puppet::FileSystem::Tempfile` so that it no longer subclasses the built-in `Tempfile`. The goal here is to give us more control over the life cycle of the files when used on the server. The implementation is based on the Ruby 1.9.3 implementation of `Tempfile`, but strips out some things like the finalizer and methods that we don't need / use. Note that we had to also port over a few methods from `Dir` in order to support ruby 1.8.7. Relevant source code is here: https://github.com/ruby/ruby/blob/v1_9_3_547/lib/tempfile.rb https://github.com/ruby/ruby/blob/v1_9_3_547/lib/tmpdir.rb In its current incarnation the class is probably poorly named because it no longer makes any attempt to automagically unlink the file at some point in the future. I intend to submit a follow-up commit that renames the class to make this more obvious.
2014-08-18(PUP-3030) Port P::U::Execution to use our TempfileChris Price1-1/+3
This commit ports Puppet::Util::Execution over to use our alternate implementation of Tempfile. This will allow us to have more explicit control over the life cycle of these files on the server.
2014-08-18(PUP-3030) Port Util#replace_file to use our TempfileChris Price2-6/+5
This simply changes the `replace_file` method to use `Puppet::FileSystem::Tempfile`, rather than the Ruby built-in `Tempfile`. This will allow us to have a bit more control over the lifecycle of these files on the server.
2014-08-18(PUP-3030) Refactor 'store' report to use replace_fileChris Price1-9/+4
There was some logic in the 'store' report processor that was almost identical to the logic in 'puppet/util.rb''s 'replace_file' method. This commit refactors 'store' to re-use the existing logic.
2014-08-18Merge branch 'zaphod42-issue/master/pup-3054-incorrect-lookup-in-inherits'Henrik Lindberg6-78/+95
2014-08-18(maint) Fix optimization that altered semantics for += productionHenrik Lindberg1-1/+2
2014-08-18(perf) Speed up setting lookupAndrew Parker2-23/+19
One of the slowest thing for tests is setting values. They are reset and changed often. This speeds up a few of the settings code paths by removing unneeded method calls, either by introducing local variables, or using delegators. In addition the ChainedValues objects are held on to so that if the same environment and section is needed again it doesn't need to be recreated.
2014-08-18(perf) Several small performance improvementsAndrew Parker4-40/+45
This removes some "dev mistake" error checking, which reduces the overhead of some common calls. It also makes some calls less common, most notably it caches the environment of a node when it wasn't explicitly set and it falls back to using Puppet.lookup(:environments). This can drastically reduce the number of environment lookups in some situations. For the resource_expression_spec.rb tests, this resulted in a 0.6 second improvement (~3 seconds to ~2.4 seconds).
2014-08-18(maint) Express language tests in puppet languageAndrew Parker1-12/+21
This changes the tests of the puppet language, which should become part of the language specification's example and test suite, to be entirely expressed in the puppet language. This removes any dependency on ruby! Well, any dependency on ruby for specifying the language tests.
2014-08-18(PUP-3054) Ensure that inherits are absoluteAndrew Parker1-2/+8
PUP-121 was supposed to make all references to classes and resource types absolute, but it looks like it missed a spot. The class referenced in an inherits clause was not being looked up in an absolute manner, which caused it to find the wrong parent class in certain cases. This changes the future parser so that inherited classes are always absolute names.
2014-08-18(PUP-1044) Fix missing file mode in call to file system openHenrik Lindberg1-1/+1
The mode 'nil' was accidentally dropped in the call to open the file to get a stream. This caused 9 tests to fail.
2014-08-18Merge pull request #2979 from Sharpie/pup-2924-resource-new-typesAdrien Thebo2-14/+34
(PUP-2924) Initialize resources from Type classes
2014-08-16(PUP-3032) Add setting to always cache `feature` load attemptsChris Price3-22/+51
This commit adds a new setting, :always_cache_features, which affects how we cache attempts to load Puppet 'features'. If false, then calls to `Puppet.features.<feature>?` will always attempt to load the feature (which can be an expensive operation) unless it has already been loaded successfully. This makes it possible for a single agent run to, e.g., install a package that provides the underlying capabilities for a feature, and then later load that feature during the same run (even if the feature had been tested earlier and had not been available). If this setting is set to true, then features will only be checked once, and if they are not available, the negative result is cached and returned for all subsequent attempts to load the feature. This behavior is almost always appropriate for the server, and can result in a significant performance improvement for features that are checked frequently.
2014-08-15(PUP-1044) Cleanup commented out code, and commentsHenrik Lindberg4-16/+1
2014-08-15(PUP-1044) Add info output for when file/string is used for checksumHenrik Lindberg2-1/+2
This commit adds Puppet.info calls to make it possible to monitor the number of file vs string checksum computations They can be ovserved when running in verbose mode.
2014-08-15(PUP-2349) Add deprecation warning for non-string mode property valuesKylo Ginsberg1-0/+4
The 'future' (4.x) parser treats literal numbers as actual numbers instead of strings as the 3.x parser did. This makes file resources that use unquoted mode values behave strangely (see PUP-2156) so we are deprecating non-String values for mode. So this change adds a deprecation warning for non-String values of mode when running with --parser future.
2014-08-15(PUP-2349) Specify mode as a string containing an octal modeKylo Ginsberg1-50/+50
Previously, mode was specified in some places as a Fixnum, in others as a String. Consistently specify mode as a string containing octal.
2014-08-15(PUP-2349) Treat mode strings as octalKylo Ginsberg1-1/+9
Previously there was logic to convert incoming mode using to_i, but if it were a String that would convert the string as decimal, whereas mode is always specified as octal. I don't know why the to_i conversion was in there and whether it ever worked in a meaningful way. So fix this to convert Strings as octal.
2014-08-15(PUP-2924) Initialize resources from Type classesCharlie Sharpsteen2-14/+34
This patch extends the signature of `Puppet::Resource#initialize` to accept subclasses of `Puppet::Type` as arguments. This allows `resource_type` to be set during initialzation for some cases and eliminates a later, costly, call to `environment.known_resource_types`.
2014-08-15Merge pull request #2933 from rdark/fix/master/pup1527Adrien Thebo1-1/+1
(PUP-1527) After upgrade from 3.3.2-1 to 3.4.2-1 naginator fails to crea...
2014-08-15Changing don't to does not because grammarfiddyspence1-2/+2
2014-08-14(PUP 229) Fix /etc/shadow parsing so that max/min_age is reported correctlyRahul Gopinath1-3/+4
Before this patch, parsing /etc/shadow, when empty trailing fields were present, they were discarded, and inturn a nil check was used to ensure that the fields did not exist. However, this ran into trouble when a value was appended to the end, causing all the empty fields to be returned as empty strings instead, failing the nil checks. This patch ensures that all empty fields are returned as empty strings, and a check for empty string is used to check whether the field exists or not.
2014-08-14Merge pull request #2965 from peterhuene/pup/3050Michael Smith3-28/+3
(PUP-3050) Update cfacter option for recent cfacter gem changes.
2014-08-15(PUP-1044) Make FileBucket::File use a local file whenever possibleHenrik Lindberg5-26/+115
2014-08-14Merge pull request #2972 from ↵Andrew Parker3-3/+6
cprice404/maint/master/PUP-3031-move-cert-expiration-check (PUP-3031) Move certification expiration check up
2014-08-14Merge pull request #2967 from ↵Rob Reynolds2-0/+4
Iristyle/ticket/master/PUP-3056-restore-constants-API-deprecations (PUP-3056) Restore Windows constants from mixins
2014-08-14(PUP-3031) Move certification expiration check upChris Price3-3/+6
The http handler code contains a check to see if the expiration date of the client certificate is within a certain window, so that we can log a warning message if it will expire soon. However, the mechanisms for handling this kind of check can really vary depending on what web server you're running in, so it doesn't make sense for this check to occur in a code path that is common to all of the different web servers. This commit simply moves the logic up into the code for the individual web servers so that they will have the ability to adjust the behavior according to their own needs.