minimapper 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/minimapper/ar.rb +3 -6
- data/lib/minimapper/version.rb +1 -1
- metadata +6 -6
data/lib/minimapper/ar.rb
CHANGED
@@ -64,21 +64,18 @@ module Minimapper
|
|
64
64
|
|
65
65
|
private
|
66
66
|
|
67
|
-
#
|
68
|
-
# that the test suite runs, but there could be bugs and I'll extract minimapper soon.
|
67
|
+
# NOTE: Don't memoize the classes or code reloading will break in rails apps.
|
69
68
|
|
70
69
|
# Will attempt to use AR:Project as the record class
|
71
70
|
# when the mapper class name is AR::ProjectMapper
|
72
71
|
def record_klass
|
73
|
-
|
74
|
-
@record_klass
|
72
|
+
self.class.name.gsub(/Mapper/, '').constantize
|
75
73
|
end
|
76
74
|
|
77
75
|
# Will attempt to use Project as the enity class when
|
78
76
|
# the mapper class name is AR::ProjectMapper
|
79
77
|
def entity_class
|
80
|
-
|
81
|
-
@entity_class
|
78
|
+
("::" + self.class.name.split('::').last.gsub(/Mapper/, '')).constantize
|
82
79
|
end
|
83
80
|
|
84
81
|
def accessible_attributes(entity)
|
data/lib/minimapper/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minimapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70347484679120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70347484679120
|
25
25
|
description: A minimalistic way of separating your models from ORMs like ActiveRecord.
|
26
26
|
email:
|
27
27
|
- joakim.kolsjo@gmail.com
|
@@ -77,7 +77,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
77
77
|
version: '0'
|
78
78
|
segments:
|
79
79
|
- 0
|
80
|
-
hash: -
|
80
|
+
hash: -3403860792313798379
|
81
81
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
82
|
none: false
|
83
83
|
requirements:
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
version: '0'
|
87
87
|
segments:
|
88
88
|
- 0
|
89
|
-
hash: -
|
89
|
+
hash: -3403860792313798379
|
90
90
|
requirements: []
|
91
91
|
rubyforge_project:
|
92
92
|
rubygems_version: 1.8.5
|