lib/conjur/acts_as_resource.rb in conjur-api-2.0.1 vs lib/conjur/acts_as_resource.rb in conjur-api-2.1.0
- old
+ new
@@ -1,9 +1,9 @@
module Conjur
module ActsAsResource
def resource
require 'conjur/resource'
- Conjur::Resource.new("#{Conjur::Authz::API.host}/#{path_escape resource_kind}/#{path_escape resource_id}", self.options)
+ Conjur::Resource.new(Conjur::Authz::API.host, self.options)[[ Conjur.account, 'resources', path_escape(resource_kind), path_escape(resource_id) ].join('/')]
end
def resource_kind
self.class.name.split("::")[1..-1].join('-').downcase
end
\ No newline at end of file