summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
authorEzra Zygmuntowicz <ez@engineyard.com>2008-10-08 14:19:52 -0700
committerEzra Zygmuntowicz <ez@engineyard.com>2008-10-08 14:19:52 -0700
commitc5d33c1298834ce40b8fbf344f281045771b5371 (patch)
tree1f0d4c7eab1eb379b544282a7ce48052acf719a5 /lib/chef/resource
parent3d14601aea23dee3899d097324875274da419d84 (diff)
downloadchef-c5d33c1298834ce40b8fbf344f281045771b5371.tar.gz
big refactor of the repo layout. move to a chef gem and a chef-server gem all with proper deps
Diffstat (limited to 'lib/chef/resource')
-rw-r--r--lib/chef/resource/apt_package.rb33
-rw-r--r--lib/chef/resource/bash.rb33
-rw-r--r--lib/chef/resource/csh.rb33
-rw-r--r--lib/chef/resource/directory.rb74
-rw-r--r--lib/chef/resource/execute.rb133
-rw-r--r--lib/chef/resource/file.rb82
-rw-r--r--lib/chef/resource/gem_package.rb33
-rw-r--r--lib/chef/resource/link.rb60
-rw-r--r--lib/chef/resource/package.rb69
-rw-r--r--lib/chef/resource/perl.rb33
-rw-r--r--lib/chef/resource/portage_package.rb33
-rw-r--r--lib/chef/resource/python.rb33
-rw-r--r--lib/chef/resource/remote_directory.rb79
-rw-r--r--lib/chef/resource/remote_file.rb41
-rw-r--r--lib/chef/resource/ruby.rb33
-rw-r--r--lib/chef/resource/script.rb51
-rw-r--r--lib/chef/resource/service.rb113
-rw-r--r--lib/chef/resource/sysctl.rb42
-rw-r--r--lib/chef/resource/template.rb49
-rw-r--r--lib/chef/resource/user.rb96
20 files changed, 0 insertions, 1153 deletions
diff --git a/lib/chef/resource/apt_package.rb b/lib/chef/resource/apt_package.rb
deleted file mode 100644
index 58e8b14edc..0000000000
--- a/lib/chef/resource/apt_package.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-require File.join(File.dirname(__FILE__), "package")
-
-class Chef
- class Resource
- class AptPackage < Chef::Resource::Package
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :apt_package
- @provider = Chef::Provider::Package::Apt
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/bash.rb b/lib/chef/resource/bash.rb
deleted file mode 100644
index 7af5f9756a..0000000000
--- a/lib/chef/resource/bash.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-require File.join(File.dirname(__FILE__), "script")
-
-class Chef
- class Resource
- class Bash < Chef::Resource::Script
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :bash
- @interpreter = "bash"
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/csh.rb b/lib/chef/resource/csh.rb
deleted file mode 100644
index 29de9777b9..0000000000
--- a/lib/chef/resource/csh.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-require File.join(File.dirname(__FILE__), "script")
-
-class Chef
- class Resource
- class Csh < Chef::Resource::Script
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :csh
- @interpreter = "csh"
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/directory.rb b/lib/chef/resource/directory.rb
deleted file mode 100644
index 7e8944f5fc..0000000000
--- a/lib/chef/resource/directory.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-class Chef
- class Resource
- class Directory < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :directory
- @path = name
- @action = :create
- @recursive = false
- @allowed_actions.push(:create, :delete)
- end
-
- def recursive(arg=nil)
- set_or_return(
- :recursive,
- arg,
- :kind_of => [ TrueClass, FalseClass ]
- )
- end
-
- def group(arg=nil)
- set_or_return(
- :group,
- arg,
- :regex => [ /^([a-z]|[A-Z]|[0-9]|_|-)+$/, /^\d+$/ ]
- )
- end
-
- def mode(arg=nil)
- set_or_return(
- :mode,
- arg,
- :regex => /^\d{3,4}$/
- )
- end
-
- def owner(arg=nil)
- set_or_return(
- :owner,
- arg,
- :regex => [ /^([a-z]|[A-Z]|[0-9]|_|-)+$/, /^\d+$/ ]
- )
- end
-
- def path(arg=nil)
- set_or_return(
- :path,
- arg,
- :kind_of => String
- )
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb
deleted file mode 100644
index 232cfe4d64..0000000000
--- a/lib/chef/resource/execute.rb
+++ /dev/null
@@ -1,133 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-class Chef
- class Resource
- class Execute < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :execute
- @command = name
- @backup = 5
- @action = "run"
- @creates = nil
- @cwd = nil
- @environment = nil
- @group = nil
- @onlyif = nil
- @path = nil
- @notify_only = false
- @returns = 0
- @timeout = nil
- @not_if = nil
- @user = nil
- @allowed_actions.push(:run)
- end
-
- def command(arg=nil)
- set_or_return(
- :command,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def creates(arg=nil)
- set_or_return(
- :creates,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def cwd(arg=nil)
- set_or_return(
- :cwd,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def environment(arg=nil)
- set_or_return(
- :environment,
- arg,
- :kind_of => [ Hash ]
- )
- end
-
- def group(arg=nil)
- set_or_return(
- :group,
- arg,
- :kind_of => [ String, Integer ]
- )
- end
-
- def onlyif(arg=nil)
- set_or_return(
- :onlyif,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def path(arg=nil)
- set_or_return(
- :path,
- arg,
- :kind_of => [ Array ]
- )
- end
-
- def returns(arg=nil)
- set_or_return(
- :returns,
- arg,
- :kind_of => [ Integer ]
- )
- end
-
- def timeout(arg=nil)
- set_or_return(
- :timeout,
- arg,
- :kind_of => [ Integer ]
- )
- end
-
- def not_if(arg=nil)
- set_or_return(
- :not_if,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def user(arg=nil)
- set_or_return(
- :user,
- arg,
- :kind_of => [ String, Integer ]
- )
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/file.rb b/lib/chef/resource/file.rb
deleted file mode 100644
index 099bd76591..0000000000
--- a/lib/chef/resource/file.rb
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-class Chef
- class Resource
- class File < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :file
- @path = name
- @backup = 5
- @action = "create"
- @allowed_actions.push(:create, :delete, :touch)
- end
-
- def backup(arg=nil)
- set_or_return(
- :backup,
- arg,
- :kind_of => [ Integer, FalseClass ]
- )
- end
-
- def checksum(arg=nil)
- set_or_return(
- :checksum,
- arg,
- :regex => /^[a-zA-Z0-9]{32}$/
- )
- end
-
- def group(arg=nil)
- set_or_return(
- :group,
- arg,
- :regex => [ /^([a-z]|[A-Z]|[0-9]|_|-)+$/, /^\d+$/ ]
- )
- end
-
- def mode(arg=nil)
- set_or_return(
- :mode,
- arg,
- :regex => /^\d{3,4}$/
- )
- end
-
- def owner(arg=nil)
- set_or_return(
- :owner,
- arg,
- :regex => [ /^([a-z]|[A-Z]|[0-9]|_|-)+$/, /^\d+$/ ]
- )
- end
-
- def path(arg=nil)
- set_or_return(
- :path,
- arg,
- :kind_of => String
- )
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/gem_package.rb b/lib/chef/resource/gem_package.rb
deleted file mode 100644
index 1ec9463337..0000000000
--- a/lib/chef/resource/gem_package.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-require File.join(File.dirname(__FILE__), "package")
-
-class Chef
- class Resource
- class GemPackage < Chef::Resource::Package
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :gem_package
- @provider = Chef::Provider::Package::Rubygems
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/link.rb b/lib/chef/resource/link.rb
deleted file mode 100644
index 46b5793b0f..0000000000
--- a/lib/chef/resource/link.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-class Chef
- class Resource
- class Link < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :link
- @source_file = name
- @action = :create
- @link_type = :symbolic
- @target_file = nil
- @allowed_actions.push(:create, :delete)
- end
-
- def source_file(arg=nil)
- set_or_return(
- :source_file,
- arg,
- :kind_of => String
- )
- end
-
- def target_file(arg=nil)
- set_or_return(
- :target_file,
- arg,
- :kind_of => String
- )
- end
-
- def link_type(arg=nil)
- real_arg = arg.kind_of?(String) ? arg.to_sym : arg
- set_or_return(
- :link_type,
- real_arg,
- :equal_to => [ :symbolic, :hard ]
- )
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/package.rb b/lib/chef/resource/package.rb
deleted file mode 100644
index f5f1c8418e..0000000000
--- a/lib/chef/resource/package.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-class Chef
- class Resource
- class Package < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :package
- @package_name = name
- @version = nil
- @candidate_version = nil
- @response_file = nil
- @source = nil
- @action = "install"
- @allowed_actions.push(:install, :upgrade, :remove, :purge)
- end
-
- def package_name(arg=nil)
- set_or_return(
- :package_name,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def version(arg=nil)
- set_or_return(
- :version,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def response_file(arg=nil)
- set_or_return(
- :response_file,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def source(arg=nil)
- set_or_return(
- :source,
- arg,
- :kind_of => [ String ]
- )
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/perl.rb b/lib/chef/resource/perl.rb
deleted file mode 100644
index a9b891ed5c..0000000000
--- a/lib/chef/resource/perl.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-require File.join(File.dirname(__FILE__), "script")
-
-class Chef
- class Resource
- class Perl < Chef::Resource::Script
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :perl
- @interpreter = "perl"
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/portage_package.rb b/lib/chef/resource/portage_package.rb
deleted file mode 100644
index 0e300da7a3..0000000000
--- a/lib/chef/resource/portage_package.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-require File.join(File.dirname(__FILE__), "package")
-
-class Chef
- class Resource
- class PortagePackage < Chef::Resource::Package
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :portage_package
- @provider = Chef::Provider::Package::Apt
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/python.rb b/lib/chef/resource/python.rb
deleted file mode 100644
index ac2b27c00f..0000000000
--- a/lib/chef/resource/python.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-require File.join(File.dirname(__FILE__), "script")
-
-class Chef
- class Resource
- class Python < Chef::Resource::Script
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :python
- @interpreter = "python"
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/remote_directory.rb b/lib/chef/resource/remote_directory.rb
deleted file mode 100644
index a23b39d42c..0000000000
--- a/lib/chef/resource/remote_directory.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-class Chef
- class Resource
- class RemoteDirectory < Chef::Resource::Directory
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :remote_directory
- @path = name
- @delete = false
- @action = :create
- @recursive = true
- @files_backup = 5
- @files_owner = nil
- @files_group = nil
- @files_mode = 0644
- @allowed_actions.push(:create, :delete)
- end
-
- def source(args=nil)
- set_or_return(
- :source,
- args,
- :kind_of => String
- )
- end
-
- def files_backup(arg=nil)
- set_or_return(
- :files_backup,
- arg,
- :kind_of => [ Integer, FalseClass ]
- )
- end
-
- def files_group(arg=nil)
- set_or_return(
- :files_group,
- arg,
- :regex => [ /^([a-z]|[A-Z]|[0-9]|_|-)+$/, /^\d+$/ ]
- )
- end
-
- def files_mode(arg=nil)
- set_or_return(
- :files_mode,
- arg,
- :regex => /^\d{3,4}$/
- )
- end
-
- def files_owner(arg=nil)
- set_or_return(
- :files_owner,
- arg,
- :regex => [ /^([a-z]|[A-Z]|[0-9]|_|-)+$/, /^\d+$/ ]
- )
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/remote_file.rb b/lib/chef/resource/remote_file.rb
deleted file mode 100644
index dace234398..0000000000
--- a/lib/chef/resource/remote_file.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-class Chef
- class Resource
- class RemoteFile < Chef::Resource::File
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :remote_file
- @action = "create"
- @source = nil
- @variables = Hash.new
- end
-
- def source(args=nil)
- set_or_return(
- :source,
- args,
- :kind_of => String
- )
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/ruby.rb b/lib/chef/resource/ruby.rb
deleted file mode 100644
index 591f1a658b..0000000000
--- a/lib/chef/resource/ruby.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-require File.join(File.dirname(__FILE__), "script")
-
-class Chef
- class Resource
- class Ruby < Chef::Resource::Script
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :ruby
- @interpreter = "ruby"
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/script.rb b/lib/chef/resource/script.rb
deleted file mode 100644
index d59882ab9c..0000000000
--- a/lib/chef/resource/script.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-require File.join(File.dirname(__FILE__), "execute")
-
-class Chef
- class Resource
- class Script < Chef::Resource::Execute
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :script
- @command = name
- @code = nil
- @interpreter = nil
- end
-
- def code(arg=nil)
- set_or_return(
- :code,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def interpreter(arg=nil)
- set_or_return(
- :interpreter,
- arg,
- :kind_of => [ String ]
- )
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb
deleted file mode 100644
index 1c9a784745..0000000000
--- a/lib/chef/resource/service.rb
+++ /dev/null
@@ -1,113 +0,0 @@
-#
-# Author:: AJ Christensen (<aj@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-class Chef
- class Resource
- class Service < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :service
- @service_name = name
- @enabled = nil
- @running = nil
- @pattern = service_name
- @start_command = nil
- @stop_command = nil
- @status_command = nil
- @restart_command = nil
- @action = "none"
- @supports = { :restart => false, :status => false }
- @allowed_actions.push(:enable, :disable, :start, :stop)
- end
-
- def service_name(arg=nil)
- set_or_return(
- :service_name,
- arg,
- :kind_of => [ String ]
- )
- end
-
- # regex for match against ps -ef when !supports[:has_status] && status == nil
- def pattern(arg=nil)
- set_or_return(
- :pattern,
- arg,
- :kind_of => [ String ]
- )
- end
-
- # command to call to start service
- def start_command(arg=nil)
- set_or_return(
- :start_command,
- arg,
- :kind_of => [ String ]
- )
- end
-
- # command to call to stop service
- def stop_command(arg=nil)
- set_or_return(
- :stop_command,
- arg,
- :kind_of => [ String ]
- )
- end
-
- # command to call to get status of service
- def status_command(arg=nil)
- set_or_return(
- :status_command,
- arg,
- :kind_of => [ String ]
- )
- end
-
- # command to call to restart service
- def restart_command(arg=nil)
- set_or_return(
- :restart_command,
- arg,
- :kind_of => [ String ]
- )
- end
-
- # if the service is enabled or not
- def enabled(arg=nil)
- set_or_return(
- :enabled,
- arg,
- :kind_of => [ TrueClass, FalseClass ]
- )
- end
-
- # if the service is running or not
- def running(arg=nil)
- set_or_return(
- :running,
- arg,
- :kind_of => [ TrueClass, FalseClass ]
- )
- end
-
-
- end
- end
-end
diff --git a/lib/chef/resource/sysctl.rb b/lib/chef/resource/sysctl.rb
deleted file mode 100644
index 203ad72425..0000000000
--- a/lib/chef/resource/sysctl.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-class Chef
- class Resource
- class Sysctl < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :sysctl
- @action = "set"
- @name = name
- @value = nil
- @variables = Hash.new
- end
-
- def value(args=nil)
- set_or_return(
- :value,
- args,
- :kind_of => String
- )
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/template.rb b/lib/chef/resource/template.rb
deleted file mode 100644
index 5f2512a274..0000000000
--- a/lib/chef/resource/template.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-class Chef
- class Resource
- class Template < Chef::Resource::File
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :template
- @action = "create"
- @source = nil
- @variables = Hash.new
- end
-
- def source(file=nil)
- set_or_return(
- :source,
- file,
- :kind_of => [ String ]
- )
- end
-
- def variables(args=nil)
- set_or_return(
- :variables,
- args,
- :kind_of => [ Hash ]
- )
- end
-
- end
- end
-end \ No newline at end of file
diff --git a/lib/chef/resource/user.rb b/lib/chef/resource/user.rb
deleted file mode 100644
index 1702753408..0000000000
--- a/lib/chef/resource/user.rb
+++ /dev/null
@@ -1,96 +0,0 @@
-#
-# Author:: Adam Jacob (<adam@hjksolutions.com>)
-# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
-# License:: Apache License, Version 2.0
-#
-# 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.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-class Chef
- class Resource
- class User < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
- @resource_name = :user
- @username = name
- @comment = nil
- @uid = nil
- @gid = nil
- @home = nil
- @shell = nil
- @password = nil
- @action = :create
- @supports = { :manage_home => false }
- @allowed_actions.push(:create, :remove, :modify, :manage, :lock, :unlock)
- end
-
- def username(arg=nil)
- set_or_return(
- :username,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def comment(arg=nil)
- set_or_return(
- :comment,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def uid(arg=nil)
- set_or_return(
- :uid,
- arg,
- :kind_of => [ String, Integer ]
- )
- end
-
- def gid(arg=nil)
- set_or_return(
- :gid,
- arg,
- :kind_of => [ String, Integer ]
- )
- end
-
- def home(arg=nil)
- set_or_return(
- :home,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def shell(arg=nil)
- set_or_return(
- :shell,
- arg,
- :kind_of => [ String ]
- )
- end
-
- def password(arg=nil)
- set_or_return(
- :password,
- arg,
- :kind_of => [ String ]
- )
- end
-
- end
- end
-end \ No newline at end of file