summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-12-15 16:29:28 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2011-12-15 16:29:28 +0100
commitb2dd711d92ad53d15ab8973654f05e98e2213b61 (patch)
treed1756a2731ba64b62cf3112f2f2e1bcae57368bb
parentb633a610e6ede36b410a4892c32f7593c2148867 (diff)
downloadbin-b2dd711d92ad53d15ab8973654f05e98e2213b61.zip
bin-b2dd711d92ad53d15ab8973654f05e98e2213b61.tar.gz
fix typos
-rwxr-xr-xdia2pg.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/dia2pg.rb b/dia2pg.rb
index 36c4299..cbb8a31 100755
--- a/dia2pg.rb
+++ b/dia2pg.rb
@@ -217,7 +217,7 @@ class Attribute
rl = RELATIONS.find { |r| r.tbl_to==@tbl and r.attr_to.name==@name }
if rl.nil?
$stderr << "MISSING RELATION FOR FOREIGN KEY #{@tbl.name} #{@name}\n"
- raise Excpetion.new "MISSING RELATION FOR FOREIGN KEY #{@tbl.name} #{@name}\n"
+ raise Exception.new "MISSING RELATION FOR FOREIGN KEY #{@tbl.name} #{@name}\n"
else
r << "integer REFERENCES #{rl.tbl_from.name}(#{rl.attr_from.real_name})"
r << " NOT NULL" if not @nullable
@@ -270,7 +270,7 @@ doc.xpath('//dia:object[@type="Database - Table"]').each do |node|
end
# DATABASE REFERENCES
doc.xpath('//dia:object[@type="Database - Reference"]').each do |node|
- r = Relation.new options
+ r = Relation.new
r.m_from = node.xpath('dia:attribute[@name="start_point_desc"]/dia:string').first.content[1..-2]
r.m_to = node.xpath('dia:attribute[@name="end_point_desc"]/dia:string').first.content[1..-2]
r.tbl_from = DATABASE[node.xpath('dia:connections/dia:connection[@handle="0"]/@to').to_s]