| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Replaced 12 occurances of Win32 with Microsoft Windows
3 Examples:
The code:
# and all .rb files in lib/. This is disabled by default on Win32.
becomes:
# and all .rb files in lib/. This is disabled by default on Microsoft Windows.
The code:
# We can use Win32 functions
becomes:
# We can use Microsoft Windows functions
The code:
desc "Uses Win32 functionality to manage file's users and rights."
becomes:
desc "Uses Microsoft Windows functionality to manage file's users and rights."
* Replaced 10 occurances of :win32 with :microsoft_windows
3 Examples:
The code:
Puppet.features.add(:win32, :libs => ["sys/admin", "win32/process", "win32/dir"])
becomes:
Puppet.features.add(:microsoft_windows, :libs => ["sys/admin", "win32/process", "win32/dir"])
The code:
Puppet::Type.type(:file).provide :win32 do
becomes:
Puppet::Type.type(:file).provide :microsoft_windows do
The code:
confine :feature => :win32
becomes:
confine :feature => :microsoft_windows
* Replaced 13 occurances of win32\? with microsoft_windows?
3 Examples:
The code:
signals.update({:HUP => :restart, :USR1 => :reload, :USR2 => :reopen_logs }) unless Puppet.features.win32?
becomes:
signals.update({:HUP => :restart, :USR1 => :reload, :USR2 => :reopen_logs }) unless Puppet.features.microsoft_windows?
The code:
raise Puppet::Error,"Cannot determine basic system flavour" unless Puppet.features.posix? or Puppet.features.win32?
becomes:
raise Puppet::Error,"Cannot determine basic system flavour" unless Puppet.features.posix? or Puppet.features.microsoft_windows?
The code:
require 'sys/admin' if Puppet.features.win32?
becomes:
require 'sys/admin' if Puppet.features.microsoft_windows?
|
|
|
|
|
| |
Because the new settings scope was trying to interpolate the "code"
string, causing strange failures.
|
| |
|
| |
|
|
|
|
|
|
| |
Since it is no longer possible to find the running executable from the
call stack, docs have to be kept somewhere in the source tree.
Of course, at this point, we shouldn't be using RDoc::Usage at all.
|
| |
|
|
|
|
|
| |
The logic which iterates over the searchpath in reverse does not translate the name.
Therefore file overrides in :master or :agent are not picked up.
|
|
|
|
|
|
| |
The initial commit changed the name of a method (close -> close_all) and
changed the way the array log destination worked before we saw that the
unit tests were using it differently.
|
|
|
|
|
| |
The log will now queue any log messages created when there is no
destination, and will flush the queue when a destination is added.
|
|
|
|
|
| |
Our settings were slow because I was querying Application objects for
their run_mode repetitively
|
|
|
|
|
|
| |
Added a Puppet::Util::Settings layer called :mutable_defaults to emulate
the interaction between Puppet::Application and defaults.rb that was
getting thwarted by rspec.
|
|
|
|
|
|
|
| |
assert their run_mode
Also cleanup of an unecessary puts line, make master tests run when
on their own, and moving a require to a more usual spot.
|
|
|
|
|
|
|
| |
RunMode is only created once instead of every time it's called
Got lots of unpredictable test failures, presumably because a new
RunMode was being created every time we accessed the RunMode.
|
|
|
|
|
| |
Along the way this fixes an issue with 2.6 alpha that sections of the
puppet config file were getting ignored.
|
|
|
|
|
|
|
|
| |
Mode is a terribly overused word. Files use it, puppetdoc uses it, and
certs use it, and those are just the places that I happened to
stumble upon. It makes reading code very confusing and finding things
in code difficult. I know namespacing allows us to reuse words for
method and variable names, but that doesn't mean we should.
|
|
|
|
|
|
| |
Per Luke's replacement of :check with :audit, and deprecation of :check,
I've replaced all of our internal uses of :check with :audit. Importantly,
this silence the deprecation warnings during regular usage from eg. ralsh.
|
|
|
|
|
|
|
| |
This adds the --charset option to puppetdoc for RDoc mode.
This allows to set the charset for the generated html.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
| |
This patch allows the puppet single-executable to invoke external,
hyphenated subcommands, much like how git does.
|
| |
|
|
|
|
|
|
|
|
|
| |
Change Autoloader's load to re-raise exceptions that happen when
trying to load files, rather than just warning.
This version still does not raise an error if the file is not found, as
doing so would change the behavior of 'load' pretty significantly, but I
am ambivalent this.
|
|
|
|
|
|
|
| |
Change Autoloader's loadall to re-raise exceptions that happen when
trying to load files, rather than just warning.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
| |
Patch thanks to Alan Barrett
|
|
|
|
|
|
|
|
|
| |
We were type-checking the use of Storage for no good reason.
I've removed all of that, so we can use either resources
or their Refs for caching.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Jesse and I are shooting for the minimal viable fix here, with the idea that
a great deal of refactoring is needed but isn't appropriate at this time. The
changes in this commit are:
* Index the function-holding modules by environment
* We need to know the "current environment" when we're defining a function so
we can attach it to the proper module, and this information isn't dynamically
available when user-defined functions are being created (we're being called by
user written code that doesn't "know" about environments) so we cheat and
stash the value in Puppet::Node::Environment
* since we must do this anyway, it turns out to be cleaner & safer to do the
same when we are evaluating a functon. This is the main change from the prior
version of this patch.
* Add a special *root* environment for the built in functions, and extend all
scopes with it.
* Index the function characteristics (name, type, docstring, etc.) by environment
* Make the autoloader environment aware, so that it uses the modulepath for the
specified environment rather than the default
* Turn off caching of the modulepath since it potentially changes for each node
* Tweak tests that weren't environment aware
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements the fundamental pieces of the move to composite
keys:
* Instead of having a single namevar, we have a non-empty collection
of them, and two resources are the same if and only if all of them
match. Note that the present situation is a special case of this,
where the collection always has exactly one member.
* As currently, namevar is determined by the type.
* Instead just of inferring the single namevar from the title we let
types decompose the title into values for several (perhaps all) of
the namevar components; note that the present situation is again a
special case of this.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
| |
Jesse moved the code David was patching; the conflict resolution omits David's
change (since the code isn't there to be changed) and this moves the change to
the new location.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lib/:
* Fix Puppet::Parser::Files
* Fix Puppet::Util::Settings
spec/:
* unit/application/kick.rb: only run on posix
* unit/application.rb
* unit/parser/compiler.rb
* unit/parser/files.rb
* unit/resource.rb
* unit/resource/catalog.rb
* unit/resource/type_collection.rb
* unit/transaction.rb
* unit/type/tidy.rb
* unit/util/settings.rb
* unit/util/settings/file_setting.rb
* unit/application.rb
|
|
|
|
|
| |
*) Use File.expand_path as indicator for being an absolute path
*) Use basename instead of parsing the path manually
|
|
|
|
| |
Signed-off-by: David Schmitt <david@dasz.at>
|
|
|
|
| |
This is not supported on windows and makes little sense on POSIX
|
|
|
|
|
|
|
| |
Syck/Yaml quietly passes on undefined classes as strings, so that if objects
of those classes are loaded and re-serialized they passthrough unmodified.
While not technically correct, it's still the POLS behavior, and we now support
it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
deprecation warnings from Rails ActiveSupport
The metaid.rb file came straight from why the lucky stiff's "seeing
metaclasses clearly" article. Rails used this too, but they recently
deprecated the name metaclass in favor of singleton_class to match what
ruby-core decided to do. meta, eigen and singlton class were all
suggested and in the end singleton was agreed upon.
http://redmine.ruby-lang.org/issues/show/1082
|
|
|
|
|
|
|
|
|
|
|
| |
The FileBucket code had a bunch of checksum code
that was already available in a library, and it used a
checksum format (type + data) that was incompatible with
what we were using everywhere else.
This just fixes that code duplication.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
|
| |
Remove a stale comment about how settings work
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
|
| |
There are two codepaths for setting settings in the settings object: one
for setting individual settings, and one was setting settings in mass,
like in the system settings file.
This patch unifies some of that logic.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Historically, the Puppet[:name] setting has been settable, but the
results of chaning it are poorly defined.
The switch to modes instead of executable names seems like a good time
to disable this complexity.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
|
| |
An incorrect variable name is used in an error message, causing the
error to throw an error.
This can't appear in the wild, since it's actually just an argument
check for the defaults.rb file.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
| |
A process's settings are now determined by Puppet::Mode rather than by
the executable name.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
| |
It's useful to be able to require specific applications' ruby source by
name, even if we aren't about to run them.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
| |
Use a predicate method to check if we're running as root, rather than
comparing the effective user id
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Because environments have to declare their mode before puppet tries to
load defaults.rb, it reduces the complexity considerably to have
application classes to load their lib dependencies at the last possible
moment.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
| |
Create a Mode class and Puppet.mode and application.mode methods
Mode can be "agent", "master", or "user". Each application sets a mode.
The Mode object has some smarts about the defaults for that mode.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
| |
move Util::CommandLine methods into instances instead of on the class,
as suggested by Markus
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This was a classic semantic merge conflict; one patch adds a new type of
checksum, with a routine to compute it on files; the other adds streams with
routines to compute all the existing checksum types on them. They merge
cleanly but theresult is incorrect.
This patch completes the square by adding a none_stream routine to not-compute
a checksum on a stream.
|
|
|
|
|
|
|
|
|
|
| |
This patch moves file content writing to the content properties and
always write (or read) contents by chunks.
This reduces drastically puppetd memory consumption when handling large
sourced files.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
| |
Refactor so that the command line options only get parsed once
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|