modest_model 0.0.3 → 0.0.4
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/modest_model/base.rb +6 -6
- data/lib/modest_model.rb +8 -2
- metadata +3 -3
data/lib/modest_model/base.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
module ModestModel
|
|
2
2
|
class Base
|
|
3
|
-
include
|
|
4
|
-
extend
|
|
5
|
-
extend
|
|
6
|
-
include
|
|
7
|
-
include
|
|
3
|
+
include ActiveModel::Conversion
|
|
4
|
+
extend ActiveModel::Naming
|
|
5
|
+
extend ActiveModel::Translation
|
|
6
|
+
include ActiveModel::Validations
|
|
7
|
+
include ActiveModel::AttributeMethods
|
|
8
8
|
|
|
9
|
-
include
|
|
9
|
+
include ModestModel::Validators
|
|
10
10
|
|
|
11
11
|
def initialize(attributes = {})
|
|
12
12
|
attributes.each do |attr, value|
|
data/lib/modest_model.rb
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
begin
|
|
2
|
+
require 'active_model'
|
|
3
|
+
rescue LoadError => e
|
|
4
|
+
retry if require('rubygems')
|
|
5
|
+
end
|
|
6
|
+
|
|
1
7
|
module ModestModel
|
|
2
|
-
autoload :Base,
|
|
3
|
-
autoload :Validators,
|
|
8
|
+
autoload :Base, File.expand_path('../modest_model/base', __FILE__)
|
|
9
|
+
autoload :Validators, File.expand_path('../modest_model/validators', __FILE__)
|
|
4
10
|
end
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: modest_model
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.0.
|
|
5
|
+
version: 0.0.4
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Mike Fulcher
|
|
@@ -106,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
106
106
|
requirements:
|
|
107
107
|
- - ">="
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
hash:
|
|
109
|
+
hash: 34671401275301002
|
|
110
110
|
segments:
|
|
111
111
|
- 0
|
|
112
112
|
version: "0"
|
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
115
115
|
requirements:
|
|
116
116
|
- - ">="
|
|
117
117
|
- !ruby/object:Gem::Version
|
|
118
|
-
hash:
|
|
118
|
+
hash: 34671401275301002
|
|
119
119
|
segments:
|
|
120
120
|
- 0
|
|
121
121
|
version: "0"
|