lib/conjur/acts_as_resource.rb in conjur-api-4.8.0 vs lib/conjur/acts_as_resource.rb in conjur-api-4.9.0

- old
+ new

@@ -16,10 +16,14 @@ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # + +require 'active_support/dependencies/autoload' +require 'active_support/core_ext' + module Conjur module ActsAsResource def resource require 'conjur/resource' # NOTE: should we use specific class to build sub-url below? @@ -29,11 +33,10 @@ def resourceid [ core_conjur_account, resource_kind, resource_id ].join(':') end def resource_kind - require 'active_support/core_ext' self.class.name.split("::")[-1].underscore.split('/').join('-') end def resource_id id @@ -50,6 +53,6 @@ def deny(privilege, role) resource.deny privilege, role end end -end \ No newline at end of file +end