lib/dm-is-select.rb in dm-is-select-0.0.9 vs lib/dm-is-select.rb in dm-is-select-1.2.0
- old
+ new
@@ -1,16 +1,10 @@
-# Needed to import datamapper and other gems
-require 'rubygems'
-require 'pathname'
-
# Add all external dependencies for the plugin here
-require 'dm-core'
+require 'data_mapper'
require 'dm-is-tree'
+require 'active_support/core_ext/hash/except' unless {}.respond_to?(:except)
+require 'active_support/core_ext/hash/slice' unless {}.respond_to?(:slice)
+
# Require plugin-files
-require Pathname(__FILE__).dirname.expand_path / 'dm-is-select' / 'is' / 'select.rb'
+require_relative './is/select'
DataMapper::Model.append_extensions(DataMapper::Is::Select)
-
-# If you wish to add methods to all DM Models, use this:
-#
-# DataMapper::Model.append_inclusions(DataMapper::Is::Select::ResourceInstanceMethods)
-#