rails-erd 0.4.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.rdoc +18 -0
- data/LICENSE +1 -1
- data/README.md +3 -3
- data/Rakefile +57 -46
- data/bin/erd +4 -0
- data/lib/rails_erd.rb +4 -2
- data/lib/rails_erd/cli.rb +149 -0
- data/lib/rails_erd/diagram.rb +18 -16
- data/lib/rails_erd/diagram/graphviz.rb +23 -2
- data/lib/rails_erd/domain/attribute.rb +9 -3
- data/lib/rails_erd/domain/entity.rb +15 -15
- data/lib/rails_erd/domain/relationship.rb +11 -1
- data/lib/rails_erd/domain/relationship/cardinality.rb +15 -15
- data/lib/rails_erd/domain/specialization.rb +8 -8
- data/lib/rails_erd/version.rb +4 -0
- data/test/test_helper.rb +14 -11
- data/test/unit/attribute_test.rb +66 -3
- data/test/unit/cardinality_test.rb +10 -10
- data/test/unit/diagram_test.rb +44 -18
- data/test/unit/domain_test.rb +20 -20
- data/test/unit/entity_test.rb +19 -19
- data/test/unit/graphviz_test.rb +53 -10
- data/test/unit/rake_task_test.rb +8 -8
- data/test/unit/relationship_test.rb +31 -31
- data/test/unit/specialization_test.rb +3 -3
- metadata +72 -108
- data/.gemtest +0 -0
- data/Gemfile +0 -19
- data/Gemfile.lock +0 -44
- data/VERSION +0 -1
- data/rails-erd.gemspec +0 -105
@@ -8,7 +8,7 @@ class SpecializationTest < ActiveSupport::TestCase
|
|
8
8
|
assert_match %r{#<RailsERD::Domain::Specialization:.* @generalized=Beverage @specialized=Beer>},
|
9
9
|
Domain::Specialization.new(domain, domain.entity_by_name("Beverage"), domain.entity_by_name("Beer")).inspect
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
test "generalized should return source entity" do
|
13
13
|
create_specialization
|
14
14
|
domain = Domain.generate
|
@@ -22,7 +22,7 @@ class SpecializationTest < ActiveSupport::TestCase
|
|
22
22
|
assert_equal domain.entity_by_name("Beer"),
|
23
23
|
Domain::Specialization.new(domain, domain.entity_by_name("Beverage"), domain.entity_by_name("Beer")).specialized
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
# Specialization properties ================================================
|
27
27
|
test "inheritance should be true for inheritance specializations" do
|
28
28
|
create_specialization
|
@@ -43,7 +43,7 @@ class SpecializationTest < ActiveSupport::TestCase
|
|
43
43
|
create_generalization
|
44
44
|
assert_equal [true], Domain.generate.specializations.map(&:polymorphic?)
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
test "inheritance should be false for polymorphic specializations to specialized entities" do
|
48
48
|
create_model "Cannon"
|
49
49
|
create_model "Ship", :type => :string
|
metadata
CHANGED
@@ -1,126 +1,88 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-erd
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
4
5
|
prerelease:
|
5
|
-
version: 0.4.5
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Rolf Timmermans
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-07-19 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: activerecord
|
18
|
-
requirement: &
|
16
|
+
requirement: &70146121979600 !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.0'
|
24
22
|
type: :runtime
|
25
23
|
prerelease: false
|
26
|
-
version_requirements: *
|
27
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: *70146121979600
|
25
|
+
- !ruby/object:Gem::Dependency
|
28
26
|
name: activesupport
|
29
|
-
requirement: &
|
27
|
+
requirement: &70146121979080 !ruby/object:Gem::Requirement
|
30
28
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version:
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3.0'
|
35
33
|
type: :runtime
|
36
34
|
prerelease: false
|
37
|
-
version_requirements: *
|
38
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *70146121979080
|
36
|
+
- !ruby/object:Gem::Dependency
|
39
37
|
name: ruby-graphviz
|
40
|
-
requirement: &
|
38
|
+
requirement: &70146121978600 !ruby/object:Gem::Requirement
|
41
39
|
none: false
|
42
|
-
requirements:
|
40
|
+
requirements:
|
43
41
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.0.4
|
46
44
|
type: :runtime
|
47
45
|
prerelease: false
|
48
|
-
version_requirements: *
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
51
|
-
requirement: &
|
46
|
+
version_requirements: *70146121978600
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: choice
|
49
|
+
requirement: &70146121978120 !ruby/object:Gem::Requirement
|
52
50
|
none: false
|
53
|
-
requirements:
|
51
|
+
requirements:
|
54
52
|
- - ~>
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: 1.
|
57
|
-
type: :
|
58
|
-
prerelease: false
|
59
|
-
version_requirements: *id004
|
60
|
-
- !ruby/object:Gem::Dependency
|
61
|
-
name: sqlite3
|
62
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
63
|
-
none: false
|
64
|
-
requirements:
|
65
|
-
- - ">="
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: "0"
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: *id005
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: jdbc-sqlite3
|
73
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
|
-
requirements:
|
76
|
-
- - ">="
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: "0"
|
79
|
-
type: :development
|
80
|
-
prerelease: false
|
81
|
-
version_requirements: *id006
|
82
|
-
- !ruby/object:Gem::Dependency
|
83
|
-
name: activerecord-jdbc-adapter
|
84
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
85
|
-
none: false
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: "0"
|
90
|
-
type: :development
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.6
|
55
|
+
type: :runtime
|
91
56
|
prerelease: false
|
92
|
-
version_requirements: *
|
93
|
-
- !ruby/object:Gem::Dependency
|
94
|
-
name:
|
95
|
-
requirement: &
|
57
|
+
version_requirements: *70146121978120
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rake
|
60
|
+
requirement: &70146121977640 !ruby/object:Gem::Requirement
|
96
61
|
none: false
|
97
|
-
requirements:
|
98
|
-
- -
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version:
|
62
|
+
requirements:
|
63
|
+
- - ~>
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0.9'
|
101
66
|
type: :development
|
102
67
|
prerelease: false
|
103
|
-
version_requirements: *
|
104
|
-
description: Automatically generate an entity-relationship diagram (ERD) for your
|
105
|
-
|
106
|
-
|
107
|
-
|
68
|
+
version_requirements: *70146121977640
|
69
|
+
description: Automatically generate an entity-relationship diagram (ERD) for your
|
70
|
+
Rails models.
|
71
|
+
email:
|
72
|
+
- r.timmermans@voormedia.com
|
73
|
+
executables:
|
74
|
+
- erd
|
108
75
|
extensions: []
|
109
|
-
|
110
|
-
|
111
|
-
- LICENSE
|
112
|
-
- README.md
|
113
|
-
files:
|
114
|
-
- .gemtest
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
115
78
|
- CHANGES.rdoc
|
116
|
-
- Gemfile
|
117
|
-
- Gemfile.lock
|
118
79
|
- LICENSE
|
119
80
|
- README.md
|
120
81
|
- Rakefile
|
121
|
-
-
|
82
|
+
- bin/erd
|
122
83
|
- lib/rails-erd.rb
|
123
84
|
- lib/rails_erd.rb
|
85
|
+
- lib/rails_erd/cli.rb
|
124
86
|
- lib/rails_erd/diagram.rb
|
125
87
|
- lib/rails_erd/diagram/graphviz.rb
|
126
88
|
- lib/rails_erd/diagram/templates/node.html.erb
|
@@ -133,7 +95,7 @@ files:
|
|
133
95
|
- lib/rails_erd/domain/specialization.rb
|
134
96
|
- lib/rails_erd/railtie.rb
|
135
97
|
- lib/rails_erd/tasks.rake
|
136
|
-
-
|
98
|
+
- lib/rails_erd/version.rb
|
137
99
|
- test/test_helper.rb
|
138
100
|
- test/unit/attribute_test.rb
|
139
101
|
- test/unit/cardinality_test.rb
|
@@ -144,35 +106,37 @@ files:
|
|
144
106
|
- test/unit/rake_task_test.rb
|
145
107
|
- test/unit/relationship_test.rb
|
146
108
|
- test/unit/specialization_test.rb
|
147
|
-
has_rdoc: true
|
148
109
|
homepage: http://rails-erd.rubyforge.org/
|
149
110
|
licenses: []
|
150
|
-
|
151
111
|
post_install_message:
|
152
112
|
rdoc_options: []
|
153
|
-
|
154
|
-
require_paths:
|
113
|
+
require_paths:
|
155
114
|
- lib
|
156
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
157
116
|
none: false
|
158
|
-
requirements:
|
159
|
-
- -
|
160
|
-
- !ruby/object:Gem::Version
|
161
|
-
version:
|
162
|
-
|
117
|
+
requirements:
|
118
|
+
- - ! '>='
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
segments:
|
122
|
+
- 0
|
123
|
+
hash: 3954294952765829690
|
124
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
125
|
none: false
|
164
|
-
requirements:
|
165
|
-
- -
|
166
|
-
- !ruby/object:Gem::Version
|
167
|
-
version:
|
126
|
+
requirements:
|
127
|
+
- - ! '>='
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
segments:
|
131
|
+
- 0
|
132
|
+
hash: 3954294952765829690
|
168
133
|
requirements: []
|
169
|
-
|
170
134
|
rubyforge_project: rails-erd
|
171
|
-
rubygems_version: 1.
|
135
|
+
rubygems_version: 1.8.11
|
172
136
|
signing_key:
|
173
137
|
specification_version: 3
|
174
138
|
summary: Entity-relationship diagram for your Rails models.
|
175
|
-
test_files:
|
139
|
+
test_files:
|
176
140
|
- test/test_helper.rb
|
177
141
|
- test/unit/attribute_test.rb
|
178
142
|
- test/unit/cardinality_test.rb
|
data/.gemtest
DELETED
File without changes
|
data/Gemfile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
source "http://rubygems.org"
|
2
|
-
|
3
|
-
gem "activerecord", "~> 3.0"
|
4
|
-
gem "activesupport", "~> 3.0"
|
5
|
-
gem "ruby-graphviz", "~> 0.9.18"
|
6
|
-
|
7
|
-
group :development do
|
8
|
-
gem "jeweler", "~> 1.5.2"
|
9
|
-
|
10
|
-
platforms :ruby do
|
11
|
-
gem "sqlite3"
|
12
|
-
end
|
13
|
-
|
14
|
-
platforms :jruby do
|
15
|
-
gem "jdbc-sqlite3"
|
16
|
-
gem "activerecord-jdbc-adapter"
|
17
|
-
gem "jruby-openssl", :require => false # Silence openssl warnings.
|
18
|
-
end
|
19
|
-
end
|
data/Gemfile.lock
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
activemodel (3.0.4)
|
5
|
-
activesupport (= 3.0.4)
|
6
|
-
builder (~> 2.1.2)
|
7
|
-
i18n (~> 0.4)
|
8
|
-
activerecord (3.0.4)
|
9
|
-
activemodel (= 3.0.4)
|
10
|
-
activesupport (= 3.0.4)
|
11
|
-
arel (~> 2.0.2)
|
12
|
-
tzinfo (~> 0.3.23)
|
13
|
-
activerecord-jdbc-adapter (1.1.1)
|
14
|
-
activesupport (3.0.4)
|
15
|
-
arel (2.0.8)
|
16
|
-
bouncy-castle-java (1.5.0145.2)
|
17
|
-
builder (2.1.2)
|
18
|
-
git (1.2.5)
|
19
|
-
i18n (0.5.0)
|
20
|
-
jdbc-sqlite3 (3.6.14.2.056-java)
|
21
|
-
jeweler (1.5.2)
|
22
|
-
bundler (~> 1.0.0)
|
23
|
-
git (>= 1.2.5)
|
24
|
-
rake
|
25
|
-
jruby-openssl (0.7.3)
|
26
|
-
bouncy-castle-java
|
27
|
-
rake (0.8.7)
|
28
|
-
ruby-graphviz (0.9.20)
|
29
|
-
sqlite3 (1.3.3)
|
30
|
-
tzinfo (0.3.24)
|
31
|
-
|
32
|
-
PLATFORMS
|
33
|
-
java
|
34
|
-
ruby
|
35
|
-
|
36
|
-
DEPENDENCIES
|
37
|
-
activerecord (~> 3.0)
|
38
|
-
activerecord-jdbc-adapter
|
39
|
-
activesupport (~> 3.0)
|
40
|
-
jdbc-sqlite3
|
41
|
-
jeweler (~> 1.5.2)
|
42
|
-
jruby-openssl
|
43
|
-
ruby-graphviz (~> 0.9.18)
|
44
|
-
sqlite3
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.4.5
|
data/rails-erd.gemspec
DELETED
@@ -1,105 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = %q{rails-erd}
|
8
|
-
s.version = "0.4.5"
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Rolf Timmermans"]
|
12
|
-
s.date = %q{2011-04-13}
|
13
|
-
s.description = %q{Automatically generate an entity-relationship diagram (ERD) for your Rails models.}
|
14
|
-
s.email = %q{r.timmermans@voormedia.com}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE",
|
17
|
-
"README.md"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".gemtest",
|
21
|
-
"CHANGES.rdoc",
|
22
|
-
"Gemfile",
|
23
|
-
"Gemfile.lock",
|
24
|
-
"LICENSE",
|
25
|
-
"README.md",
|
26
|
-
"Rakefile",
|
27
|
-
"VERSION",
|
28
|
-
"lib/rails-erd.rb",
|
29
|
-
"lib/rails_erd.rb",
|
30
|
-
"lib/rails_erd/diagram.rb",
|
31
|
-
"lib/rails_erd/diagram/graphviz.rb",
|
32
|
-
"lib/rails_erd/diagram/templates/node.html.erb",
|
33
|
-
"lib/rails_erd/diagram/templates/node.record.erb",
|
34
|
-
"lib/rails_erd/domain.rb",
|
35
|
-
"lib/rails_erd/domain/attribute.rb",
|
36
|
-
"lib/rails_erd/domain/entity.rb",
|
37
|
-
"lib/rails_erd/domain/relationship.rb",
|
38
|
-
"lib/rails_erd/domain/relationship/cardinality.rb",
|
39
|
-
"lib/rails_erd/domain/specialization.rb",
|
40
|
-
"lib/rails_erd/railtie.rb",
|
41
|
-
"lib/rails_erd/tasks.rake",
|
42
|
-
"rails-erd.gemspec",
|
43
|
-
"test/test_helper.rb",
|
44
|
-
"test/unit/attribute_test.rb",
|
45
|
-
"test/unit/cardinality_test.rb",
|
46
|
-
"test/unit/diagram_test.rb",
|
47
|
-
"test/unit/domain_test.rb",
|
48
|
-
"test/unit/entity_test.rb",
|
49
|
-
"test/unit/graphviz_test.rb",
|
50
|
-
"test/unit/rake_task_test.rb",
|
51
|
-
"test/unit/relationship_test.rb",
|
52
|
-
"test/unit/specialization_test.rb"
|
53
|
-
]
|
54
|
-
s.homepage = %q{http://rails-erd.rubyforge.org/}
|
55
|
-
s.require_paths = ["lib"]
|
56
|
-
s.rubyforge_project = %q{rails-erd}
|
57
|
-
s.rubygems_version = %q{1.5.2}
|
58
|
-
s.summary = %q{Entity-relationship diagram for your Rails models.}
|
59
|
-
s.test_files = [
|
60
|
-
"test/test_helper.rb",
|
61
|
-
"test/unit/attribute_test.rb",
|
62
|
-
"test/unit/cardinality_test.rb",
|
63
|
-
"test/unit/diagram_test.rb",
|
64
|
-
"test/unit/domain_test.rb",
|
65
|
-
"test/unit/entity_test.rb",
|
66
|
-
"test/unit/graphviz_test.rb",
|
67
|
-
"test/unit/rake_task_test.rb",
|
68
|
-
"test/unit/relationship_test.rb",
|
69
|
-
"test/unit/specialization_test.rb"
|
70
|
-
]
|
71
|
-
|
72
|
-
if s.respond_to? :specification_version then
|
73
|
-
s.specification_version = 3
|
74
|
-
|
75
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
76
|
-
s.add_runtime_dependency(%q<activerecord>, ["~> 3.0"])
|
77
|
-
s.add_runtime_dependency(%q<activesupport>, ["~> 3.0"])
|
78
|
-
s.add_runtime_dependency(%q<ruby-graphviz>, ["~> 0.9.18"])
|
79
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
80
|
-
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
81
|
-
s.add_development_dependency(%q<jdbc-sqlite3>, [">= 0"])
|
82
|
-
s.add_development_dependency(%q<activerecord-jdbc-adapter>, [">= 0"])
|
83
|
-
s.add_development_dependency(%q<jruby-openssl>, [">= 0"])
|
84
|
-
else
|
85
|
-
s.add_dependency(%q<activerecord>, ["~> 3.0"])
|
86
|
-
s.add_dependency(%q<activesupport>, ["~> 3.0"])
|
87
|
-
s.add_dependency(%q<ruby-graphviz>, ["~> 0.9.18"])
|
88
|
-
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
89
|
-
s.add_dependency(%q<sqlite3>, [">= 0"])
|
90
|
-
s.add_dependency(%q<jdbc-sqlite3>, [">= 0"])
|
91
|
-
s.add_dependency(%q<activerecord-jdbc-adapter>, [">= 0"])
|
92
|
-
s.add_dependency(%q<jruby-openssl>, [">= 0"])
|
93
|
-
end
|
94
|
-
else
|
95
|
-
s.add_dependency(%q<activerecord>, ["~> 3.0"])
|
96
|
-
s.add_dependency(%q<activesupport>, ["~> 3.0"])
|
97
|
-
s.add_dependency(%q<ruby-graphviz>, ["~> 0.9.18"])
|
98
|
-
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
99
|
-
s.add_dependency(%q<sqlite3>, [">= 0"])
|
100
|
-
s.add_dependency(%q<jdbc-sqlite3>, [">= 0"])
|
101
|
-
s.add_dependency(%q<activerecord-jdbc-adapter>, [">= 0"])
|
102
|
-
s.add_dependency(%q<jruby-openssl>, [">= 0"])
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|