rails-erd 1.4.6 → 1.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1cff8c4febb03921cfffca5079b6f5deb56fbf07
4
- data.tar.gz: 69861d0ef513b5b8bc60df935fca6931b02e9aaa
3
+ metadata.gz: e10c973dc76bbb05773bc6920678cc060878c740
4
+ data.tar.gz: 42af4a884c51e266b993d255a49e2647c2d4e368
5
5
  SHA512:
6
- metadata.gz: b960e026b757827e0a7ec486916578390b269a6acf2a9597dcda73c69ebbf7aa01850a83090d49064f79973cf120205c75a79c0a33f1a254c481f8c238f3e5ca
7
- data.tar.gz: 4ac3b8cae5bb82b5f6270396e3b7a44b4089e504bfd2370e5ecca1a787087a2ddc6157f8a5da7a917c24651aed55535ccd390629e8a690945924c3bd453112c4
6
+ metadata.gz: 9dbb498dd6dbfb15a243d3957e5172ab0fb6ffb54c39ba5ba4aac13ea7fb8a38d2272e07fd6b8b67651e39ed842620757b387c23cd77f4325d1736e3e5706efe
7
+ data.tar.gz: ca3b2a15e3db16434341e6d8c2b439b0a97fcfd9ed0304b5eaf07d1e571b11d82ff44a0ffc6fbd352d0dbae8eb7c380b98beaef57d3ffe16ced26a7f4cbf4b81
@@ -57,7 +57,7 @@ module RailsERD
57
57
  end
58
58
 
59
59
  # <symbol>
60
- when :filetype, :notation, :orientation
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] = :TB if options.orientation == :vertical
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
 
@@ -1,4 +1,4 @@
1
1
  module RailsERD
2
- VERSION = "1.4.6"
2
+ VERSION = "1.4.7"
3
3
  BANNER = "RailsERD #{VERSION}"
4
4
  end
@@ -20,7 +20,7 @@ class ConfigTest < ActiveSupport::TestCase
20
20
  inheritance: false,
21
21
  markup: true,
22
22
  notation: :simple,
23
- orientation: :horizontal,
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: :horizontal,
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: :horizontal,
77
+ orientation: "horizontal",
78
78
  polymorphism: false,
79
79
  warn: true,
80
80
  title: "sample title",
@@ -59,14 +59,14 @@ class GraphvizTest < ActiveSupport::TestCase
59
59
  end
60
60
  end
61
61
 
62
- test "rank direction should be lr for horizontal orientation" do
62
+ test "rank direction should be tb for horizontal orientation" do
63
63
  create_simple_domain
64
- assert_equal '"LR"', diagram(:orientation => :horizontal).graph[:rankdir].to_s
64
+ assert_equal '"TB"', diagram(:orientation => "horizontal").graph[:rankdir].to_s
65
65
  end
66
66
 
67
- test "rank direction should be tb for vertical orientation" do
67
+ test "rank direction should be lr for vertical orientation" do
68
68
  create_simple_domain
69
- assert_equal '"TB"', diagram(:orientation => :vertical).graph[:rankdir].to_s
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.6
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-02-10 00:00:00.000000000 Z
11
+ date: 2016-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord