Commit 9bd1dec9 authored by Brian Hatfield's avatar Brian Hatfield

Resolves ulimit::domain issue

parent c5bbe05b
......@@ -2,6 +2,10 @@
This file is used to list changes made in each version of ulimit.
## 0.3.2
* Resolves issue some users were having with a resource-loading race condition, thanks to Chris Roberts (https://github.com/chrisroberts)
## 0.3.1
* Fix domain typo, thanks to David Radcliffe (https://github.com/dwradcliffe) (also reported by Lewis Thompson (https://github.com/lewisthompson))
......
......@@ -32,7 +32,7 @@
]
},
"license": "Apache 2.0",
"version": "0.3.1",
"version": "0.3.2",
"providing": {
},
"recipes": {
......
......@@ -4,4 +4,4 @@ license "Apache 2.0"
description "Installs/Configures ulimit"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
name "ulimit"
version "0.3.1"
version "0.3.2"
......@@ -5,6 +5,17 @@ def initialize(*args)
super
end
def load_current_resource
# do full type check
valid_types = [Chef::Resource::UlimitDomain, String]
unless(valid_types.include?(new_resource.domain.class))
raise TypeError.new(
"Expecting `domain` attribute to be of type: #{valid_types.map(&:to_s).join(', ')}. " <<
"Got: #{new_resource.domain.class}"
)
end
end
actions :create, :delete
default_action :create
......
......@@ -4,4 +4,4 @@ default_action :create
attribute :type, :kind_of => [Symbol,String], :required => true
attribute :item, :kind_of => [Symbol,String], :required => true
attribute :value, :kind_of => [String,Numeric], :required => true
attribute :domain, :kind_of => [Chef::Resource::UlimitDomain, String], :required => true
attribute :domain, :kind_of => [Chef::Resource, String], :required => true
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment