lib/wright/resource/package.rb in wright-0.1.2 vs lib/wright/resource/package.rb in wright-0.2.0
- old
+ new
@@ -62,12 +62,12 @@
end
end
Wright::DSL.register_resource(Wright::Resource::Package)
+package_providers = {
+ 'debian' => 'Wright::Provider::Package::Apt',
+ 'macosx' => 'Wright::Provider::Package::Homebrew'
+}
Wright::Config[:resources][:package] ||= {}
-
-case Wright::Util.os_family
-when 'debian'
- Wright::Config[:resources][:package][:provider] ||=
- 'Wright::Provider::Package::Apt'
-end
+Wright::Config[:resources][:package][:provider] ||=
+ package_providers[Wright::Util.os_family]