modaldiagrams 1.1.3 → 1.1.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/TODO +2 -0
- data/VERSION +1 -1
- data/lib/modaldiagrams/modaldiagrams.rb +4 -4
- data/lib/modaldiagrams/parameters.rb +6 -0
- data/modaldiagrams.gemspec +3 -3
- metadata +4 -4
data/TODO
CHANGED
@@ -1,2 +1,4 @@
|
|
1
1
|
TODO
|
2
2
|
* Write tests (use simple demo data model whose diagrams will serve as a generic diagram legend as well)
|
3
|
+
* If the use of requires_presence_of with has_many and has_one associations could be detected, specific
|
4
|
+
arrowheads could be used for "one or more" (e.g. crowtee) and "one only" (e.g. teetee) associations.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.4
|
@@ -121,13 +121,13 @@ module ModalDiagrams
|
|
121
121
|
case type
|
122
122
|
when :one_to_one
|
123
123
|
tail = "none"
|
124
|
-
head = poly ?
|
124
|
+
head = poly ? cfg.arrow_heads.poly_single : cfg.arrow_heads.single # mark the end with the foreign key
|
125
125
|
when :one_to_many
|
126
126
|
tail = "none"
|
127
|
-
head = poly ?
|
127
|
+
head = poly ? cfg.arrow_heads.poly_multiple : cfg.arrow_heads.multiple
|
128
128
|
when :many_to_many
|
129
|
-
tail =
|
130
|
-
head =
|
129
|
+
tail = cfg.arrow_heads.multiple
|
130
|
+
head = cfg.arrow_heads.multiple
|
131
131
|
end
|
132
132
|
samehead = (cfg.unified_polymorphic && label) ? %{, samehead="#{label}"} : ''
|
133
133
|
label = nil if cfg.no_association_labels
|
@@ -27,6 +27,12 @@ module ModalDiagrams
|
|
27
27
|
:decimal=>'d',
|
28
28
|
:geometry=>'g',
|
29
29
|
:spatial=>'g'
|
30
|
+
},
|
31
|
+
:arrow_heads => {
|
32
|
+
:multiple => 'dot', # zero or more (crowodot for standard ERD notation)
|
33
|
+
:single => 'tee', # zero or one (teeodot for standard ERD notation),
|
34
|
+
:poly_multiple => 'odot', # polymorphic zero or more
|
35
|
+
:poly_single => 'obox' # polymorphic zero or more
|
30
36
|
}
|
31
37
|
].merge Settings.load(Rails.root.join('config','modal_diagrams.yml'))
|
32
38
|
end
|
data/modaldiagrams.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "modaldiagrams"
|
8
|
-
s.version = "1.1.
|
8
|
+
s.version = "1.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Javier Goizueta"]
|
12
|
-
s.date = "2013-07-
|
12
|
+
s.date = "2013-07-26"
|
13
13
|
s.description = "modaldiagrams provides Rake tasks for diagramming ActiveRecord databases. It generates Graphviz dot files."
|
14
14
|
s.email = "jgoizueta@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -40,7 +40,7 @@ Gem::Specification.new do |s|
|
|
40
40
|
s.homepage = "http://github.com/jgoizueta/modaldiagrams"
|
41
41
|
s.licenses = ["MIT"]
|
42
42
|
s.require_paths = ["lib"]
|
43
|
-
s.rubygems_version = "1.8.
|
43
|
+
s.rubygems_version = "1.8.23"
|
44
44
|
s.summary = "DB diagramming tool fo Rails ActiveRecord applications"
|
45
45
|
|
46
46
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modaldiagrams
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: modalsettings
|
@@ -166,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
166
|
version: '0'
|
167
167
|
segments:
|
168
168
|
- 0
|
169
|
-
hash:
|
169
|
+
hash: 2560568046753040955
|
170
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
171
|
none: false
|
172
172
|
requirements:
|
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
version: '0'
|
176
176
|
requirements: []
|
177
177
|
rubyforge_project:
|
178
|
-
rubygems_version: 1.8.
|
178
|
+
rubygems_version: 1.8.23
|
179
179
|
signing_key:
|
180
180
|
specification_version: 3
|
181
181
|
summary: DB diagramming tool fo Rails ActiveRecord applications
|