lib/conjur/api.rb in conjur-api-2.1.0 vs lib/conjur/api.rb in conjur-api-2.1.1
- old
+ new
@@ -1,20 +1,28 @@
require 'conjur/env'
require 'conjur/base'
+require 'conjur/build_from_response'
require 'conjur/acts_as_resource'
require 'conjur/acts_as_role'
require 'conjur/acts_as_user'
require 'conjur/log_source'
require 'conjur/has_attributes'
require 'conjur/has_identifier'
require 'conjur/has_id'
+require 'conjur/acts_as_asset'
require 'conjur/authn-api'
require 'conjur/authz-api'
require 'conjur/core-api'
class RestClient::Resource
include Conjur::Escape
include Conjur::LogSource
+ extend Conjur::BuildFromResponse
+
+ def path_components
+ require 'uri'
+ URI.parse(self.url).path.split('/').map{|e| URI.unescape e}
+ end
def username
options[:user] || options[:username]
end
end
\ No newline at end of file