schemata 0.0.0 → 0.1.0
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/README.markdown +20 -2
- data/VERSION +1 -1
- data/lib/schemata.rb +0 -1
- data/schemata.gemspec +2 -3
- metadata +3 -4
- data/lib/schemata/schema/menuable.rb +0 -23
data/README.markdown
CHANGED
@@ -21,11 +21,29 @@ becomes
|
|
21
21
|
|
22
22
|
* Addressable
|
23
23
|
* Contactable
|
24
|
-
* Menuable
|
25
24
|
* Nameable
|
26
25
|
|
27
26
|
##Creating your own collection
|
28
|
-
|
27
|
+
|
28
|
+
Creating your own collections is easy:
|
29
|
+
|
30
|
+
#schema/timeable.rb
|
31
|
+
module Schemata
|
32
|
+
module Schema
|
33
|
+
def timeable
|
34
|
+
apply_schema :start_time, :datetime
|
35
|
+
apply_schema :end_time , :datetime
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
Then require the file in environment.rb or your rails engine.
|
41
|
+
|
42
|
+
require 'schema/timeable'
|
43
|
+
|
44
|
+
You can define as many methods within a file as you want and they'll be available. A quick an easy way to port your definitions would be to create a gem like schemata-timeables.
|
45
|
+
|
46
|
+
|
29
47
|
|
30
48
|
## Contributing to schemata
|
31
49
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.1.0
|
data/lib/schemata.rb
CHANGED
data/schemata.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{schemata}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.1.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Spencer Markowski"]
|
12
|
-
s.date = %q{2011-04-
|
12
|
+
s.date = %q{2011-04-14}
|
13
13
|
s.description = %q{Schema definitions for commonly used logical objects.}
|
14
14
|
s.email = %q{spencer@theablefew.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -29,7 +29,6 @@ Gem::Specification.new do |s|
|
|
29
29
|
"lib/schemata/schema.rb",
|
30
30
|
"lib/schemata/schema/addressable.rb",
|
31
31
|
"lib/schemata/schema/contactable.rb",
|
32
|
-
"lib/schemata/schema/menuable.rb",
|
33
32
|
"lib/schemata/schema/nameable.rb",
|
34
33
|
"schemata.gemspec",
|
35
34
|
"test/helper.rb",
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: schemata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.1.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Spencer Markowski
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
13
|
+
date: 2011-04-14 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -90,7 +90,6 @@ files:
|
|
90
90
|
- lib/schemata/schema.rb
|
91
91
|
- lib/schemata/schema/addressable.rb
|
92
92
|
- lib/schemata/schema/contactable.rb
|
93
|
-
- lib/schemata/schema/menuable.rb
|
94
93
|
- lib/schemata/schema/nameable.rb
|
95
94
|
- schemata.gemspec
|
96
95
|
- test/helper.rb
|
@@ -109,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
108
|
requirements:
|
110
109
|
- - ">="
|
111
110
|
- !ruby/object:Gem::Version
|
112
|
-
hash:
|
111
|
+
hash: 1093815929551237212
|
113
112
|
segments:
|
114
113
|
- 0
|
115
114
|
version: "0"
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module Schemata
|
2
|
-
module Schema
|
3
|
-
def menuable
|
4
|
-
apply_schema :title, String
|
5
|
-
apply_schema :cable_menuable_id , Integer
|
6
|
-
apply_schema :cable_menuable_type, String
|
7
|
-
apply_schema :parent_id, Integer
|
8
|
-
apply_schema :lft, Integer
|
9
|
-
apply_schema :rgt, Integer
|
10
|
-
apply_schema :url, String
|
11
|
-
apply_schema :menu_identifier, String
|
12
|
-
apply_schema :show_in_menu, :boolean, :default => true
|
13
|
-
apply_schema :meta_description, String
|
14
|
-
apply_schema :meta_keywords, String
|
15
|
-
apply_schema :special_action, String
|
16
|
-
apply_schema :marketable_url, String
|
17
|
-
apply_schema :show_on_landing_page, :boolean
|
18
|
-
apply_schema :template, String
|
19
|
-
apply_schema :tree_id, Integer
|
20
|
-
apply_schema :options, :text
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|