diff options
author | Luke Kanies <luke@madstop.com> | 2009-04-25 19:55:05 +0100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-06-06 19:53:34 +1000 |
commit | 024ccf5b9a30977e9eee4ecf1d91eaf64f44a509 (patch) | |
tree | 6ae2306ee4e432a65966d358872bbaabc429765f /lib/puppet | |
parent | c8b382df2b6664333eaa339237cfbefd3eb12b96 (diff) | |
download | puppet-024ccf5b9a30977e9eee4ecf1d91eaf64f44a509.tar.gz puppet-024ccf5b9a30977e9eee4ecf1d91eaf64f44a509.tar.xz puppet-024ccf5b9a30977e9eee4ecf1d91eaf64f44a509.zip |
Adding a "json" feature
We have to guarantee that the Rails code is loaded before the JSON code,
because Rails includes its own incompatible JSON support.
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/feature/base.rb | 1 | ||||
-rw-r--r-- | lib/puppet/feature/json.rb | 2 | ||||
-rw-r--r-- | lib/puppet/feature/rails.rb | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/feature/base.rb b/lib/puppet/feature/base.rb index 747468f74..c3fb9a2f3 100644 --- a/lib/puppet/feature/base.rb +++ b/lib/puppet/feature/base.rb @@ -28,4 +28,3 @@ Puppet.features.add(:augeas, :libs => ["augeas"]) # We have RRD available Puppet.features.add(:rrd, :libs => ["RRDtool"]) - diff --git a/lib/puppet/feature/json.rb b/lib/puppet/feature/json.rb new file mode 100644 index 000000000..1f3845c2a --- /dev/null +++ b/lib/puppet/feature/json.rb @@ -0,0 +1,2 @@ +# This is here so it autoloads correctly. +Puppet.features.rails? diff --git a/lib/puppet/feature/rails.rb b/lib/puppet/feature/rails.rb index 533f9ce7c..597b0288c 100644 --- a/lib/puppet/feature/rails.rb +++ b/lib/puppet/feature/rails.rb @@ -35,3 +35,7 @@ Puppet.features.add(:rails) do end end +# We have JSON available +# This is stupid - Rails breaks json compatibility if we load json before +# rails, therefore we load rails and then json. Dumb, mother-dumb. +Puppet.features.add(:json, :libs => ["json"]) |