diff options
author | Seth Vargo <sethvargo@gmail.com> | 2013-09-24 17:38:44 -0400 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2013-09-26 11:13:59 -0700 |
commit | 6315871ae7deeead95d84d2487c54a03c47e318f (patch) | |
tree | a2bf980c434c657aa350c0d3fc4073652cdf43cf /lib/chef/resource | |
parent | 61e98b94fb387353841d5b4575816a1d716cfbc9 (diff) | |
download | chef-6315871ae7deeead95d84d2487c54a03c47e318f.tar.gz |
Normalize whitespace on all files
Diffstat (limited to 'lib/chef/resource')
40 files changed, 164 insertions, 165 deletions
diff --git a/lib/chef/resource/apt_package.rb b/lib/chef/resource/apt_package.rb index 524abbb370..050cf838ae 100644 --- a/lib/chef/resource/apt_package.rb +++ b/lib/chef/resource/apt_package.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,7 @@ require 'chef/provider/package/apt' class Chef class Resource class AptPackage < Chef::Resource::Package - + def initialize(name, run_context=nil) super @resource_name = :apt_package diff --git a/lib/chef/resource/bash.rb b/lib/chef/resource/bash.rb index 374bca9e11..c56de5fe20 100644 --- a/lib/chef/resource/bash.rb +++ b/lib/chef/resource/bash.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,7 +21,7 @@ require 'chef/resource/script' class Chef class Resource class Bash < Chef::Resource::Script - + def initialize(name, run_context=nil) super @resource_name = :bash diff --git a/lib/chef/resource/batch.rb b/lib/chef/resource/batch.rb index 705260bbce..576e6b4c6b 100644 --- a/lib/chef/resource/batch.rb +++ b/lib/chef/resource/batch.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,11 +21,11 @@ require 'chef/resource/windows_script' class Chef class Resource class Batch < Chef::Resource::WindowsScript - + def initialize(name, run_context=nil) super(name, run_context, :batch, "cmd.exe") end - + end end end diff --git a/lib/chef/resource/bff_package.rb b/lib/chef/resource/bff_package.rb index f65aae8449..2d78483e4b 100644 --- a/lib/chef/resource/bff_package.rb +++ b/lib/chef/resource/bff_package.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,13 +22,13 @@ require 'chef/provider/package/aix' class Chef class Resource class BffPackage < Chef::Resource::Package - + def initialize(name, run_context=nil) super @resource_name = :bff_package @provider = Chef::Provider::Package::Aix end - + end end end diff --git a/lib/chef/resource/breakpoint.rb b/lib/chef/resource/breakpoint.rb index 34aeae6b47..83c397bd5b 100644 --- a/lib/chef/resource/breakpoint.rb +++ b/lib/chef/resource/breakpoint.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,7 @@ require 'chef/resource' class Chef class Resource class Breakpoint < Chef::Resource - + def initialize(action="break", *args) @name = caller.first super(@name, *args) diff --git a/lib/chef/resource/cron.rb b/lib/chef/resource/cron.rb index 5f858cec81..dfbb91f80c 100644 --- a/lib/chef/resource/cron.rb +++ b/lib/chef/resource/cron.rb @@ -7,9 +7,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,7 @@ require 'chef/resource' class Chef class Resource class Cron < Chef::Resource - + identity_attr :command state_attrs :minute, :hour, :day, :month, :weekday, :user @@ -186,9 +186,9 @@ class Chef :kind_of => Hash ) end - + private - + # On Ruby 1.8, Kernel#Integer will happily do this for you. On 1.9, no. def integerize(integerish) Integer(integerish) diff --git a/lib/chef/resource/csh.rb b/lib/chef/resource/csh.rb index 6e871e8605..95aa8afd7a 100644 --- a/lib/chef/resource/csh.rb +++ b/lib/chef/resource/csh.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,7 +21,7 @@ require 'chef/resource/script' class Chef class Resource class Csh < Chef::Resource::Script - + def initialize(name, run_context=nil) super @resource_name = :csh diff --git a/lib/chef/resource/deploy.rb b/lib/chef/resource/deploy.rb index 60bfbbc81c..76478ed07c 100644 --- a/lib/chef/resource/deploy.rb +++ b/lib/chef/resource/deploy.rb @@ -50,9 +50,9 @@ class Chef # release directory. Callback files can contain chef code (resources, etc.) # class Deploy < Chef::Resource - + provider_base Chef::Provider::Deploy - + identity_attr :repository state_attrs :deploy_to, :revision @@ -389,7 +389,7 @@ class Chef arg ||= block set_or_return(:after_restart, arg, :kind_of => [Proc, String]) end - + def additional_remotes(arg=nil) set_or_return( :additional_remotes, diff --git a/lib/chef/resource/deploy_revision.rb b/lib/chef/resource/deploy_revision.rb index 55a3e38130..ceac26e91a 100644 --- a/lib/chef/resource/deploy_revision.rb +++ b/lib/chef/resource/deploy_revision.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,9 +18,9 @@ class Chef class Resource - + # Convenience class for using the deploy resource with the revision - # deployment strategy (provider) + # deployment strategy (provider) class DeployRevision < Chef::Resource::Deploy def initialize(*args, &block) super @@ -28,13 +28,13 @@ class Chef @provider = Chef::Provider::Deploy::Revision end end - + class DeployBranch < Chef::Resource::DeployRevision def initialize(*args, &block) super @resource_name = :deploy_branch end end - + end end diff --git a/lib/chef/resource/directory.rb b/lib/chef/resource/directory.rb index a5d5ea7366..423c0bbe27 100644 --- a/lib/chef/resource/directory.rb +++ b/lib/chef/resource/directory.rb @@ -25,11 +25,11 @@ require 'chef/mixin/securable' class Chef class Resource class Directory < Chef::Resource - + identity_attr :path state_attrs :group, :mode, :owner - + include Chef::Mixin::Securable provides :directory, :on_platforms => :all diff --git a/lib/chef/resource/dpkg_package.rb b/lib/chef/resource/dpkg_package.rb index 02886e8649..2fb5b5c249 100644 --- a/lib/chef/resource/dpkg_package.rb +++ b/lib/chef/resource/dpkg_package.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,13 +22,13 @@ require 'chef/provider/package/dpkg' class Chef class Resource class DpkgPackage < Chef::Resource::Package - + def initialize(name, run_context=nil) super @resource_name = :dpkg_package @provider = Chef::Provider::Package::Dpkg end - + end end end diff --git a/lib/chef/resource/easy_install_package.rb b/lib/chef/resource/easy_install_package.rb index 10e80bdd3b..f25e1ac22f 100644 --- a/lib/chef/resource/easy_install_package.rb +++ b/lib/chef/resource/easy_install_package.rb @@ -21,7 +21,7 @@ require 'chef/resource/package' class Chef class Resource class EasyInstallPackage < Chef::Resource::Package - + def initialize(name, run_context=nil) super @resource_name = :easy_install_package diff --git a/lib/chef/resource/erl_call.rb b/lib/chef/resource/erl_call.rb index e0e38926bb..959856af66 100644 --- a/lib/chef/resource/erl_call.rb +++ b/lib/chef/resource/erl_call.rb @@ -24,7 +24,7 @@ class Chef class ErlCall < Chef::Resource # erl_call : http://erlang.org/doc/man/erl_call.html - + identity_attr :code def initialize(name, run_context=nil) diff --git a/lib/chef/resource/freebsd_package.rb b/lib/chef/resource/freebsd_package.rb index 9a9a84900e..94286eae18 100644 --- a/lib/chef/resource/freebsd_package.rb +++ b/lib/chef/resource/freebsd_package.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,13 +22,13 @@ require 'chef/provider/package/freebsd' class Chef class Resource class FreebsdPackage < Chef::Resource::Package - + def initialize(name, run_context=nil) super @resource_name = :freebsd_package @provider = Chef::Provider::Package::Freebsd end - + end end end diff --git a/lib/chef/resource/group.rb b/lib/chef/resource/group.rb index 76f3a779ae..fd09ecb052 100644 --- a/lib/chef/resource/group.rb +++ b/lib/chef/resource/group.rb @@ -7,9 +7,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,7 @@ class Chef class Resource class Group < Chef::Resource - + identity_attr :group_name state_attrs :members @@ -35,7 +35,7 @@ class Chef @append = false @allowed_actions.push(:create, :remove, :modify, :manage) end - + def group_name(arg=nil) set_or_return( :group_name, @@ -43,7 +43,7 @@ class Chef :kind_of => [ String ] ) end - + def gid(arg=nil) set_or_return( :gid, @@ -62,7 +62,7 @@ class Chef end alias_method :users, :members - + def append(arg=nil) set_or_return( :append, diff --git a/lib/chef/resource/http_request.rb b/lib/chef/resource/http_request.rb index fc64121f4e..47f6286fb4 100644 --- a/lib/chef/resource/http_request.rb +++ b/lib/chef/resource/http_request.rb @@ -7,9 +7,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,7 @@ require 'chef/resource' class Chef class Resource class HttpRequest < Chef::Resource - + identity_attr :url def initialize(name, run_context=nil) @@ -34,7 +34,7 @@ class Chef @headers = {} @allowed_actions.push(:get, :put, :post, :delete, :head, :options) end - + def url(args=nil) set_or_return( :url, @@ -42,7 +42,7 @@ class Chef :kind_of => String ) end - + def message(args=nil, &block) args = block if block_given? set_or_return( @@ -59,7 +59,7 @@ class Chef :kind_of => Hash ) end - + end end end diff --git a/lib/chef/resource/ifconfig.rb b/lib/chef/resource/ifconfig.rb index daa8a572a0..c289ddadbe 100644 --- a/lib/chef/resource/ifconfig.rb +++ b/lib/chef/resource/ifconfig.rb @@ -7,9 +7,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,7 @@ require 'chef/resource' class Chef class Resource class Ifconfig < Chef::Resource - + identity_attr :device state_attrs :inet_addr, :mask @@ -39,7 +39,7 @@ class Chef @bcast = nil @mtu = nil @metric = nil - @device = nil + @device = nil @onboot = nil @network = nil @bootproto = nil diff --git a/lib/chef/resource/ips_package.rb b/lib/chef/resource/ips_package.rb index f82e0877df..88c6e9a538 100644 --- a/lib/chef/resource/ips_package.rb +++ b/lib/chef/resource/ips_package.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/lib/chef/resource/log.rb b/lib/chef/resource/log.rb index 30a5bb93c6..f62ffaf176 100644 --- a/lib/chef/resource/log.rb +++ b/lib/chef/resource/log.rb @@ -7,9 +7,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,7 +19,7 @@ class Chef class Resource class Log < Chef::Resource - + identity_attr :message # Sends a string from a recipe to a log provider @@ -27,16 +27,16 @@ class Chef # log "some string to log" do # level :info # (default) also supports :warn, :debug, and :error # end - # + # # === Example - # log "your string to log" + # log "your string to log" # - # or + # or # # log "a debug string" { level :debug } # - - # Initialize log resource with a name as the string to log + + # Initialize log resource with a name as the string to log # # === Parameters # name<String>:: Message to log @@ -57,7 +57,7 @@ class Chef :kind_of => String ) end - + # <Symbol> Log level, one of :debug, :info, :warn, :error or :fatal def level(arg=nil) set_or_return( @@ -66,9 +66,9 @@ class Chef :equal_to => [ :debug, :info, :warn, :error, :fatal ] ) end - + end - end + end end diff --git a/lib/chef/resource/macports_package.rb b/lib/chef/resource/macports_package.rb index 911d3c19cb..c9434c9e69 100644 --- a/lib/chef/resource/macports_package.rb +++ b/lib/chef/resource/macports_package.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/lib/chef/resource/mount.rb b/lib/chef/resource/mount.rb index ad68391fe4..49984630c0 100644 --- a/lib/chef/resource/mount.rb +++ b/lib/chef/resource/mount.rb @@ -7,9 +7,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,7 @@ require 'chef/resource' class Chef class Resource class Mount < Chef::Resource - + identity_attr :device state_attrs :mount_point, :device_type, :fstype, :username, :password, :domain @@ -46,7 +46,7 @@ class Chef @password = nil @domain = nil end - + def mount_point(arg=nil) set_or_return( :mount_point, @@ -54,7 +54,7 @@ class Chef :kind_of => [ String ] ) end - + def device(arg=nil) set_or_return( :device, @@ -62,7 +62,7 @@ class Chef :kind_of => [ String ] ) end - + def device_type(arg=nil) real_arg = arg.kind_of?(String) ? arg.to_sym : arg set_or_return( @@ -79,7 +79,7 @@ class Chef :kind_of => [ String ] ) end - + def options(arg=nil) if arg.is_a?(String) converted_arg = arg.gsub(/,/, ' ').split(/ /) @@ -92,7 +92,7 @@ class Chef :kind_of => [ Array ] ) end - + def dump(arg=nil) set_or_return( :dump, @@ -100,7 +100,7 @@ class Chef :kind_of => [ Integer, FalseClass ] ) end - + def pass(arg=nil) set_or_return( :pass, @@ -108,7 +108,7 @@ class Chef :kind_of => [ Integer, FalseClass ] ) end - + def mounted(arg=nil) set_or_return( :mounted, @@ -124,7 +124,7 @@ class Chef :kind_of => [ TrueClass, FalseClass ] ) end - + def supports(args={}) if args.is_a? Array args.each { |arg| @supports[arg] = true } @@ -163,4 +163,3 @@ class Chef end end - diff --git a/lib/chef/resource/ohai.rb b/lib/chef/resource/ohai.rb index 48e55e9f01..b567db40f9 100644 --- a/lib/chef/resource/ohai.rb +++ b/lib/chef/resource/ohai.rb @@ -7,9 +7,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,7 @@ class Chef class Resource class Ohai < Chef::Resource - + identity_attr :name state_attrs :plugin diff --git a/lib/chef/resource/pacman_package.rb b/lib/chef/resource/pacman_package.rb index d66c93be66..2894e415ac 100644 --- a/lib/chef/resource/pacman_package.rb +++ b/lib/chef/resource/pacman_package.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,13 +21,13 @@ require 'chef/resource/package' class Chef class Resource class PacmanPackage < Chef::Resource::Package - + def initialize(name, run_context=nil) super @resource_name = :pacman_package @provider = Chef::Provider::Package::Pacman end - + end end end diff --git a/lib/chef/resource/perl.rb b/lib/chef/resource/perl.rb index d3cf696cbb..546f639e1f 100644 --- a/lib/chef/resource/perl.rb +++ b/lib/chef/resource/perl.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,7 +21,7 @@ require 'chef/resource/script' class Chef class Resource class Perl < Chef::Resource::Script - + def initialize(name, run_context=nil) super @resource_name = :perl diff --git a/lib/chef/resource/portage_package.rb b/lib/chef/resource/portage_package.rb index fc72381482..42c03560b6 100644 --- a/lib/chef/resource/portage_package.rb +++ b/lib/chef/resource/portage_package.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,13 +21,13 @@ require 'chef/resource/package' class Chef class Resource class PortagePackage < Chef::Resource::Package - + def initialize(name, run_context=nil) super @resource_name = :portage_package @provider = Chef::Provider::Package::Portage end - + end end end diff --git a/lib/chef/resource/powershell_script.rb b/lib/chef/resource/powershell_script.rb index e257eb2fb1..cbd81b1259 100644 --- a/lib/chef/resource/powershell_script.rb +++ b/lib/chef/resource/powershell_script.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,7 +25,7 @@ class Chef def initialize(name, run_context=nil) super(name, run_context, :powershell_script, "powershell.exe") end - + end end end diff --git a/lib/chef/resource/python.rb b/lib/chef/resource/python.rb index 85a5348d27..f340afdb39 100644 --- a/lib/chef/resource/python.rb +++ b/lib/chef/resource/python.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,7 +21,7 @@ require 'chef/resource/script' class Chef class Resource class Python < Chef::Resource::Script - + def initialize(name, run_context=nil) super @resource_name = :python diff --git a/lib/chef/resource/route.rb b/lib/chef/resource/route.rb index c8680697af..942905d138 100644 --- a/lib/chef/resource/route.rb +++ b/lib/chef/resource/route.rb @@ -7,9 +7,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,7 +26,7 @@ class Chef identity_attr :target state_attrs :netmask, :gateway - + def initialize(name, run_context=nil) super @resource_name = :route @@ -36,7 +36,7 @@ class Chef @netmask = nil @gateway = nil @metric = nil - @device = nil + @device = nil @route_type = :host @networking = nil @networking_ipv6 = nil diff --git a/lib/chef/resource/rpm_package.rb b/lib/chef/resource/rpm_package.rb index 7ab1202ef2..200a9633ce 100644 --- a/lib/chef/resource/rpm_package.rb +++ b/lib/chef/resource/rpm_package.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/lib/chef/resource/ruby.rb b/lib/chef/resource/ruby.rb index 7617839bab..605d27b00d 100644 --- a/lib/chef/resource/ruby.rb +++ b/lib/chef/resource/ruby.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,7 +21,7 @@ require 'chef/resource/script' class Chef class Resource class Ruby < Chef::Resource::Script - + def initialize(name, run_context=nil) super @resource_name = :ruby diff --git a/lib/chef/resource/ruby_block.rb b/lib/chef/resource/ruby_block.rb index 296345bde3..d9b8954a90 100644 --- a/lib/chef/resource/ruby_block.rb +++ b/lib/chef/resource/ruby_block.rb @@ -7,9 +7,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,7 @@ class Chef class Resource class RubyBlock < Chef::Resource - + identity_attr :block_name def initialize(name, run_context=nil) diff --git a/lib/chef/resource/scm.rb b/lib/chef/resource/scm.rb index 7542ad9952..d9a372900e 100644 --- a/lib/chef/resource/scm.rb +++ b/lib/chef/resource/scm.rb @@ -23,8 +23,8 @@ class Chef class Resource class Scm < Chef::Resource - identity_attr :destination - + identity_attr :destination + state_attrs :revision def initialize(name, run_context=nil) diff --git a/lib/chef/resource/script.rb b/lib/chef/resource/script.rb index 6a7c8e0d5e..8cc9c6f0c5 100644 --- a/lib/chef/resource/script.rb +++ b/lib/chef/resource/script.rb @@ -7,9 +7,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,7 @@ require 'chef/resource/execute' class Chef class Resource class Script < Chef::Resource::Execute - + identity_attr :command def initialize(name, run_context=nil) @@ -33,7 +33,7 @@ class Chef @interpreter = nil @flags = nil end - + def code(arg=nil) set_or_return( :code, @@ -41,7 +41,7 @@ class Chef :kind_of => [ String ] ) end - + def interpreter(arg=nil) set_or_return( :interpreter, diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb index ea43baa414..befa4be1c9 100644 --- a/lib/chef/resource/service.rb +++ b/lib/chef/resource/service.rb @@ -7,9 +7,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,7 @@ require 'chef/resource' class Chef class Resource class Service < Chef::Resource - + identity_attr :service_name state_attrs :enabled, :running @@ -47,7 +47,7 @@ class Chef @supports = { :restart => false, :reload => false, :status => false } @allowed_actions.push(:enable, :disable, :start, :stop, :restart, :reload) end - + def service_name(arg=nil) set_or_return( :service_name, @@ -55,7 +55,7 @@ class Chef :kind_of => [ String ] ) end - + # regex for match against ps -ef when !supports[:has_status] && status == nil def pattern(arg=nil) set_or_return( diff --git a/lib/chef/resource/smartos_package.rb b/lib/chef/resource/smartos_package.rb index 315481bd93..a011b32d5b 100644 --- a/lib/chef/resource/smartos_package.rb +++ b/lib/chef/resource/smartos_package.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,13 +22,13 @@ require 'chef/provider/package/smartos' class Chef class Resource class SmartOSPackage < Chef::Resource::Package - + def initialize(name, run_context=nil) super @resource_name = :smartos_package @provider = Chef::Provider::Package::SmartOS end - + end end end diff --git a/lib/chef/resource/subversion.rb b/lib/chef/resource/subversion.rb index e3226d8b3b..04fec9b1d8 100644 --- a/lib/chef/resource/subversion.rb +++ b/lib/chef/resource/subversion.rb @@ -7,9 +7,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,7 +31,7 @@ class Chef @provider = Chef::Provider::Subversion allowed_actions << :force_export end - + end end end diff --git a/lib/chef/resource/timestamped_deploy.rb b/lib/chef/resource/timestamped_deploy.rb index d89274bb44..4032ae9854 100644 --- a/lib/chef/resource/timestamped_deploy.rb +++ b/lib/chef/resource/timestamped_deploy.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,9 +18,9 @@ class Chef class Resource - + # Convenience class for using the deploy resource with the timestamped - # deployment strategy (provider) + # deployment strategy (provider) class TimestampedDeploy < Chef::Resource::Deploy def initialize(*args, &block) super(*args, &block) diff --git a/lib/chef/resource/user.rb b/lib/chef/resource/user.rb index 4d8c4ac11b..357d6d12ea 100644 --- a/lib/chef/resource/user.rb +++ b/lib/chef/resource/user.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,7 +25,7 @@ class Chef identity_attr :username state_attrs :uid, :gid, :home - + def initialize(name, run_context=nil) super @resource_name = :user @@ -40,13 +40,13 @@ class Chef @manage_home = false @non_unique = false @action = :create - @supports = { + @supports = { :manage_home => false, :non_unique => false } @allowed_actions.push(:create, :remove, :modify, :manage, :lock, :unlock) end - + def username(arg=nil) set_or_return( :username, @@ -54,7 +54,7 @@ class Chef :kind_of => [ String ] ) end - + def comment(arg=nil) set_or_return( :comment, @@ -62,7 +62,7 @@ class Chef :kind_of => [ String ] ) end - + def uid(arg=nil) set_or_return( :uid, @@ -70,7 +70,7 @@ class Chef :kind_of => [ String, Integer ] ) end - + def gid(arg=nil) set_or_return( :gid, @@ -78,9 +78,9 @@ class Chef :kind_of => [ String, Integer ] ) end - + alias_method :group, :gid - + def home(arg=nil) set_or_return( :home, @@ -88,7 +88,7 @@ class Chef :kind_of => [ String ] ) end - + def shell(arg=nil) set_or_return( :shell, @@ -96,7 +96,7 @@ class Chef :kind_of => [ String ] ) end - + def password(arg=nil) set_or_return( :password, @@ -128,7 +128,7 @@ class Chef :kind_of => [ TrueClass, FalseClass ] ) end - + end end end diff --git a/lib/chef/resource/windows_script.rb b/lib/chef/resource/windows_script.rb index 5f2311a5bb..2b563f5bec 100644 --- a/lib/chef/resource/windows_script.rb +++ b/lib/chef/resource/windows_script.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,14 +27,14 @@ class Chef def initialize(name, run_context, resource_name, interpreter_command) super(name, run_context) - @interpreter = interpreter_command + @interpreter = interpreter_command @resource_name = resource_name end include Chef::Mixin::WindowsArchitectureHelper public - + def architecture(arg=nil) assert_architecture_compatible!(arg) if ! arg.nil? result = set_or_return( @@ -43,7 +43,7 @@ class Chef :kind_of => Symbol ) end - + protected def assert_architecture_compatible!(desired_architecture) @@ -56,7 +56,7 @@ class Chef def node run_context && run_context.node end - + end end end diff --git a/lib/chef/resource/yum_package.rb b/lib/chef/resource/yum_package.rb index bcb1f65667..dff70bcf62 100644 --- a/lib/chef/resource/yum_package.rb +++ b/lib/chef/resource/yum_package.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |