rails-erd 1.4.6 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_erd/config.rb +2 -2
- data/lib/rails_erd/diagram/graphviz.rb +1 -1
- data/lib/rails_erd/domain/relationship.rb +1 -1
- data/lib/rails_erd/version.rb +1 -1
- data/test/unit/config_test.rb +3 -3
- data/test/unit/graphviz_test.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e10c973dc76bbb05773bc6920678cc060878c740
|
4
|
+
data.tar.gz: 42af4a884c51e266b993d255a49e2647c2d4e368
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dbb498dd6dbfb15a243d3957e5172ab0fb6ffb54c39ba5ba4aac13ea7fb8a38d2272e07fd6b8b67651e39ed842620757b387c23cd77f4325d1736e3e5706efe
|
7
|
+
data.tar.gz: ca3b2a15e3db16434341e6d8c2b439b0a97fcfd9ed0304b5eaf07d1e571b11d82ff44a0ffc6fbd352d0dbae8eb7c380b98beaef57d3ffe16ced26a7f4cbf4b81
|
data/lib/rails_erd/config.rb
CHANGED
@@ -57,7 +57,7 @@ module RailsERD
|
|
57
57
|
end
|
58
58
|
|
59
59
|
# <symbol>
|
60
|
-
when :filetype, :notation
|
60
|
+
when :filetype, :notation
|
61
61
|
value.to_sym
|
62
62
|
|
63
63
|
# [<string>]
|
@@ -68,7 +68,7 @@ module RailsERD
|
|
68
68
|
!!value
|
69
69
|
|
70
70
|
# nil | <string>
|
71
|
-
when :filename
|
71
|
+
when :filename, :orientation
|
72
72
|
value.nil? ? nil : value.to_s
|
73
73
|
|
74
74
|
# true | false | <string>
|
@@ -183,7 +183,7 @@ module RailsERD
|
|
183
183
|
EDGE_ATTRIBUTES.each { |attribute, value| graph.edge[attribute] = value }
|
184
184
|
|
185
185
|
# Switch rank direction if we're creating a vertically oriented graph.
|
186
|
-
graph[:rankdir] =
|
186
|
+
graph[:rankdir] = (options.orientation == "vertical") ? :LR : :TB
|
187
187
|
|
188
188
|
# Title of the graph itself.
|
189
189
|
graph[:label] = "#{title}\\n\\n" if title
|
@@ -21,7 +21,7 @@ module RailsERD
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def association_identity(association)
|
24
|
-
identifier = association_identifier(association)
|
24
|
+
identifier = association_identifier(association).to_s
|
25
25
|
Set[identifier, association_owner(association), association_target(association)]
|
26
26
|
end
|
27
27
|
|
data/lib/rails_erd/version.rb
CHANGED
data/test/unit/config_test.rb
CHANGED
@@ -20,7 +20,7 @@ class ConfigTest < ActiveSupport::TestCase
|
|
20
20
|
inheritance: false,
|
21
21
|
markup: true,
|
22
22
|
notation: :simple,
|
23
|
-
orientation:
|
23
|
+
orientation: "horizontal",
|
24
24
|
polymorphism: false,
|
25
25
|
warn: true,
|
26
26
|
title: "sample title",
|
@@ -42,7 +42,7 @@ class ConfigTest < ActiveSupport::TestCase
|
|
42
42
|
inheritance: false,
|
43
43
|
markup: true,
|
44
44
|
notation: :simple,
|
45
|
-
orientation:
|
45
|
+
orientation: "horizontal",
|
46
46
|
polymorphism: false,
|
47
47
|
warn: true,
|
48
48
|
title: "sample title",
|
@@ -74,7 +74,7 @@ class ConfigTest < ActiveSupport::TestCase
|
|
74
74
|
inheritance: false,
|
75
75
|
markup: true,
|
76
76
|
notation: :simple,
|
77
|
-
orientation:
|
77
|
+
orientation: "horizontal",
|
78
78
|
polymorphism: false,
|
79
79
|
warn: true,
|
80
80
|
title: "sample title",
|
data/test/unit/graphviz_test.rb
CHANGED
@@ -59,14 +59,14 @@ class GraphvizTest < ActiveSupport::TestCase
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
-
test "rank direction should be
|
62
|
+
test "rank direction should be tb for horizontal orientation" do
|
63
63
|
create_simple_domain
|
64
|
-
assert_equal '"
|
64
|
+
assert_equal '"TB"', diagram(:orientation => "horizontal").graph[:rankdir].to_s
|
65
65
|
end
|
66
66
|
|
67
|
-
test "rank direction should be
|
67
|
+
test "rank direction should be lr for vertical orientation" do
|
68
68
|
create_simple_domain
|
69
|
-
assert_equal '"
|
69
|
+
assert_equal '"LR"', diagram(:orientation => "vertical").graph[:rankdir].to_s
|
70
70
|
end
|
71
71
|
|
72
72
|
# Diagram generation =======================================================
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-erd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rolf Timmermans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|