mongoid-erd 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
File without changes
File without changes
File without changes
File without changes
data/lib/mongoid_erd.rb CHANGED
@@ -191,17 +191,17 @@ class MongoidErd
191
191
  g = Rviz::Graph.new @config[:title], {rankdir: 'LR', dpi: 300}
192
192
 
193
193
  @models.each do |mname, model|
194
- g.add_record(model.name, model.attrs)
195
- g.node(model.name).add_row(model.title, true)
194
+ g.add_record(model.name.camelize, model.attrs)
195
+ g.node(model.name.camelize).add_row(model.title, true)
196
196
  model.fields.each do |field|
197
- g.node(model.name).add_row(field.as_row, true, 'l')
197
+ g.node(model.name.camelize).add_row(field.as_row, true, 'l')
198
198
  if field.edge
199
199
  to_node, to_anchor, attrs = field.edge[0].underscore, field.edge[1], field.edge[2]
200
200
  unless @models[to_node]
201
201
  g.add(to_node, 'oval', {style:'filled', fillcolor:'grey', color:'grey'})
202
202
  to_anchor = ''
203
203
  end
204
- g.link(model.name, field.as_row, to_node, to_anchor, attrs)
204
+ g.link(model.name.camelize, field.as_row, to_node.camelize, to_anchor, attrs)
205
205
  end
206
206
  end
207
207
 
@@ -210,7 +210,7 @@ class MongoidErd
210
210
  unless @models[model.parent]
211
211
  g.add(model.parent, 'oval', {style:'filled', fillcolor:'grey', color:'grey'})
212
212
  end
213
- g.link(model.name, model.title, model.parent, '', {arrowhead: 'onormal'})
213
+ g.link(model.name.camelize, model.title, model.parent.camelize, '', {arrowhead: 'onormal'})
214
214
  end
215
215
  end
216
216
 
data/mongoid-erd.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
2
2
 
3
- Gem::Specification.new 'mongoid-erd', '0.0.5' do |s|
3
+ Gem::Specification.new 'mongoid-erd', '0.0.6' do |s|
4
4
  s.executables << "merd"
5
5
  s.description = "Create model diagram graph (ERD graph) in graphviz's dot language"
6
6
  s.summary = "Mongoid ERD diagram creator"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-erd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
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-03-10 00:00:00.000000000 Z
12
+ date: 2013-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rviz
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  version: '0'
86
86
  requirements: []
87
87
  rubyforge_project:
88
- rubygems_version: 1.8.24
88
+ rubygems_version: 1.8.25
89
89
  signing_key:
90
90
  specification_version: 3
91
91
  summary: Mongoid ERD diagram creator