Skip to content

Commit

Permalink
Move mapper logic into rom-mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavoCaso committed Mar 9, 2017
1 parent 74bdf41 commit 143fee9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 98 deletions.
2 changes: 2 additions & 0 deletions lib/rom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module ROM
require 'rom/plugin'
require 'rom/relation'
require 'rom-mapper'
require 'rom/mapper/configuration_plugin'
require 'rom/commands'

# rom Global
Expand All @@ -37,6 +38,7 @@ module ROM
extend Global

plugins do
register :mappers, ROM::Mapper::ConfigurationPlugin, type: :configuration
register :macros, ROM::ConfigurationPlugins::ConfigurationDSL, type: :configuration
register :registry_reader, ROM::Plugins::Relation::RegistryReader, type: :relation
register :instrumentation, ROM::Plugins::Relation::Instrumentation, type: :relation
Expand Down
19 changes: 0 additions & 19 deletions lib/rom/configuration_dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,6 @@ def relation(name, options = EMPTY_HASH, &block)
klass
end

# Mapper definition DSL
#
# @example
#
# setup.mappers do
# define(:users) do
# model name: 'User'
# end
#
# define(:names, parent: :users) do
# exclude :id
# end
# end
#
# @api public
def mappers(&block)
register_mapper(*MapperDSL.new(self, mapper_classes, block).mapper_classes)
end

# Command definition DSL
#
# @example
Expand Down
36 changes: 0 additions & 36 deletions lib/rom/configuration_dsl/mapper.rb

This file was deleted.

43 changes: 0 additions & 43 deletions lib/rom/configuration_dsl/mapper_dsl.rb

This file was deleted.

0 comments on commit 143fee9

Please sign in to comment.