summaryrefslogtreecommitdiff
path: root/lib/chef/resource/windows_path.rb
diff options
context:
space:
mode:
authornimisha <nimisha.sharad@clogeny.com>2017-07-27 15:36:31 +0530
committernimisha <nimisha.sharad@clogeny.com>2017-08-16 14:48:48 +0530
commitb8c447a3f7e821773dfec4bc443e344c05d906a0 (patch)
tree5f9b7bd0b28813943e9ed2fa7b86942bf7568a7c /lib/chef/resource/windows_path.rb
parent515e2a4b04521a1a9f49b9681680507e410101b0 (diff)
downloadchef-b8c447a3f7e821773dfec4bc443e344c05d906a0.tar.gz
Added windows_path resource
Signed-off-by: nimisha <nimisha.sharad@clogeny.com>
Diffstat (limited to 'lib/chef/resource/windows_path.rb')
-rw-r--r--lib/chef/resource/windows_path.rb41
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/chef/resource/windows_path.rb b/lib/chef/resource/windows_path.rb
new file mode 100644
index 0000000000..fb47ec6791
--- /dev/null
+++ b/lib/chef/resource/windows_path.rb
@@ -0,0 +1,41 @@
+#
+# Author:: Nimisha Sharad (<nimisha.sharad@msystechnologies.com>)
+# Copyright:: Copyright 2008-2017, Chef Software Inc.
+# 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 "chef/resource"
+
+class Chef
+ class Resource
+ class WindowsPath < Chef::Resource
+
+ provides :windows_path, os: "windows"
+
+ allowed_actions :add, :remove
+ default_action :add
+
+ def initialize(name, run_context = nil)
+ super
+ @resource_name = :windows_path
+ @task_name = name
+ @provider = Chef::Provider::WindowsPath
+ @action = :add
+ end
+
+ property :path, String, name_property: true
+ end
+ end
+end