#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: transmission
# Resource:: torrent_file
#
# Copyright:: 2011-2016, Chef Software, Inc. <legal@chef.io>
#
# 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.
#

actions :create
default_action :create

attribute :path, kind_of: String, name_attribute: true
attribute :torrent, kind_of: String
attribute :blocking, kind_of: [true, false], default: true
attribute :continue_seeding, default: false
attribute :owner, regex: Chef::Config[:user_valid_regex]
attribute :group, regex: Chef::Config[:group_valid_regex]
attribute :rpc_host, kind_of: String, default: 'localhost'
attribute :rpc_port, kind_of: Integer, default: 9091
attribute :rpc_username, kind_of: String, default: 'transmission'
attribute :rpc_password, kind_of: String

#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: transmission
# Resource:: torrent_file
#
# Copyright:: 2011-2016, Chef Software, Inc. <legal@chef.io>
#
# 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.
#

actions :create
default_action :create

attribute :path, kind_of: String, name_attribute: true
attribute :torrent, kind_of: String
attribute :blocking, kind_of: [TrueClass, FalseClass], default: true
attribute :continue_seeding, default: false
attribute :owner, regex: Chef::Config[:user_valid_regex]
attribute :group, regex: Chef::Config[:group_valid_regex]
attribute :rpc_host, kind_of: String, default: 'localhost'
attribute :rpc_port, kind_of: Integer, default: 9091
attribute :rpc_username, kind_of: String, default: 'transmission'
attribute :rpc_password, kind_of: String

Switch to the actual class names in the resource
Switch to the actual class names in the resource

Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
