rafaelp-dbdesigner_generators 0.1.2

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.
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2008 Rafael Lima (http://rafael.adm.br)
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.mkdn ADDED
@@ -0,0 +1,58 @@
1
+ # DBDesigner Generators
2
+
3
+ ## DESCRIPTION
4
+
5
+ This gem generates ActiveRecord Migration files from a DB Designer 4 xml file.
6
+
7
+ ## REQUIREMENTS
8
+
9
+ * activerecord
10
+
11
+ ## INSTALLATION
12
+
13
+ $ sudo gem sources -a http://gems.github.com (you only have to do this once)
14
+ $ sudo gem install rafaelp-dbdesigner_generators
15
+
16
+ ## USAGE
17
+
18
+ Save you model in *db/dbdesigner_model.xml*, then run:
19
+
20
+ $ ruby script/generate dbdesigner_migration [MigrationName] [only|except] [table1] [table2] [table3]
21
+
22
+ ### Example 1
23
+
24
+ $ ruby script/generate dbdesigner_migration CompleteDatabase
25
+
26
+ ### Example 2
27
+
28
+ $ ruby script/generate dbdesigner_migration CreateAccountsAndUsers only accounts users
29
+
30
+ ### Example 3
31
+
32
+ $ ruby script/generate dbdesigner_migration CreateOtherTables except accounts users
33
+
34
+ ### Tricks
35
+
36
+ You can put the magical keyword *ignore* on first line of table comments, on your model at DB Designer, to automatically ignore the table on migration generation.
37
+
38
+ ## LICENSE
39
+
40
+ DBDesigner Generators is released under the MIT License.
41
+
42
+ ## AUTHOR
43
+
44
+ ### **Rafael Lima**
45
+
46
+ Working at [BielSystems](http://bielsystems.com.br) and [Myfreecomm](http://myfreecomm.com.br)
47
+
48
+ Blog: [http://rafael.adm.br](http://rafael.adm.br)
49
+
50
+ Podcast: [http://rafael.adm.br/voltandopracasa](http://rafael.adm.br/voltandopracasa)
51
+
52
+ Github: [http://github.com/rafaelp](http://github.com/rafaelp)
53
+
54
+ Twitter: [http://twitter.com/rafaelp](http://twitter.com/rafaelp)
55
+
56
+ ### Did you like?
57
+
58
+ [Recommend me at Working With Rails](http://workingwithrails.com/recommendation/new/person/14248-rafael-lima)
data/Rakefile ADDED
@@ -0,0 +1,22 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
3
+ require 'rake/rdoctask'
4
+
5
+ desc 'Default: run unit tests.'
6
+ task :default => :test
7
+
8
+ desc 'Test the dbdesigner_migration_generator plugin.'
9
+ Rake::TestTask.new(:test) do |t|
10
+ t.libs << 'lib'
11
+ t.pattern = 'test/**/*_test.rb'
12
+ t.verbose = true
13
+ end
14
+
15
+ desc 'Generate documentation for the dbdesigner_migration_generator plugin.'
16
+ Rake::RDocTask.new(:rdoc) do |rdoc|
17
+ rdoc.rdoc_dir = 'rdoc'
18
+ rdoc.title = 'DbdesignerMigrationGenerator'
19
+ rdoc.options << '--line-numbers' << '--inline-source'
20
+ rdoc.rdoc_files.include('README')
21
+ rdoc.rdoc_files.include('lib/**/*.rb')
22
+ end
@@ -0,0 +1,21 @@
1
+ Description:
2
+ Stubs out a new migration. Pass the migration name, either CamelCased or
3
+ under_scored, and an optional list of arguments.
4
+
5
+ This reads db/dbdesigner_model.xml and generates a migration in db/migrations.
6
+
7
+ Examples:
8
+ `./script/generate dbdesigner_migration CompleteDatabase`
9
+
10
+ creates a migration with all tables, columns, foreign keys:
11
+ Migration: db/migrate/XXX_complete_database.rb
12
+
13
+ `./script/generate dbdesigner_migration CreateAccountsAndUsers only accounts users`
14
+
15
+ creates a migration with accounts and users tables and their respective foreign keys
16
+ Migration: db/migrate/XXX_create_accounts_and_users.rb
17
+
18
+ `./script/generate dbdesigner_migration CreateOtherTables except accounts users`
19
+
20
+ creates a migration with all tables except accounts and users tables
21
+ Migration: db/migrate/XXX_create_other_tables.rb
@@ -0,0 +1,379 @@
1
+ require 'rails_generator'
2
+ require 'getoptlong'
3
+ require 'rexml/document'
4
+
5
+ class DbdesignerMigrationGenerator < Rails::Generator::NamedBase
6
+
7
+ attr_accessor :migration_name, :tables, :relations
8
+
9
+ def manifest
10
+ @migration_name = class_name
11
+
12
+ if args.include? "except" and args.include? "only"
13
+ raise "It is not possible to use 'except' and 'only' parameters togheter. Try again."
14
+ end
15
+
16
+ @tables = []
17
+ track = nil
18
+ args.each do |arg|
19
+ @tables << arg unless track.nil?
20
+ arg = arg.to_sym
21
+ track = arg if arg.eql? :except or arg.eql? :only
22
+ end
23
+
24
+ if track.eql? :except
25
+ puts "Ignoring table(s) #{@tables.join(',')}\n"
26
+ DBDesignerMigration::Model.ignore_tables = @tables
27
+ elsif track.eql? :only
28
+ puts "Processing only table(s) #{@tables.join(',')}\n"
29
+ DBDesignerMigration::Model.only_tables = @tables
30
+ end
31
+
32
+ begin
33
+ dbmodel_path = File.join('db', 'dbdesigner_model.xml')
34
+ unless File.exist?(dbmodel_path)
35
+ raise "Could not find any database model in db/dbdesigner_model.xml"
36
+ end
37
+
38
+ xml = REXML::Document.new(File.open(dbmodel_path))
39
+
40
+ # Verify that this is a DBDesigner XML file
41
+ if xml.elements['DBMODEL'].nil? or xml.elements['DBMODEL'].attributes["Version"] != '4.0'
42
+ raise "File '#{dbmodel_path}' is not a DBDesigner 4 XML file. Skipping..."
43
+ else
44
+ puts "Reading the datamodel XML (#{dbmodel_path}) from DBDesigner..." if not $silent
45
+ xml.elements.each("//DATATYPE") { |d| DBDesignerMigration::Model.add_datatype(d) }
46
+ xml.elements.each("//TABLE") { |t| DBDesignerMigration::Model.add_table(t) }
47
+ xml.elements.each("//RELATION") { |r| DBDesignerMigration::Model.add_relation(r) }
48
+ end
49
+ rescue Exception => ex
50
+ puts ex.message
51
+ puts ex.backtrace.find {|str| str =~ /\.rb/ } || ""
52
+ exit(1)
53
+ end
54
+
55
+ @tables = DBDesignerMigration::Model.tables
56
+ @tables.delete_if {|table| table.ignore? }
57
+
58
+ @relations = DBDesignerMigration::Model.relations
59
+ @relations.delete_if {|relation| relation.from_table.ignore? or relation.to_table.ignore? }
60
+
61
+ if @tables.empty? and @relations.empty?
62
+ puts "Nothing to do!"
63
+ exit(0)
64
+ end
65
+
66
+ record do |m|
67
+ m.directory File.join('db')
68
+ m.migration_template 'dbdesigner_migration.rb',"db/migrate", :migration_file_name => "#{file_path}"
69
+ end
70
+
71
+ end
72
+
73
+ end
74
+
75
+ module DBDesignerMigration
76
+
77
+ class Model
78
+ @datatypes = []
79
+ @tables = []
80
+ @relations = []
81
+ @only_tables = nil
82
+ @ignore_tables = nil
83
+
84
+ def self.only_tables=(tables)
85
+ @only_tables = tables
86
+ end
87
+
88
+ def self.ignore_tables=(tables)
89
+ @ignore_tables = tables
90
+ end
91
+
92
+ def self.datatypes
93
+ @datatypes
94
+ end
95
+
96
+ def self.tables
97
+ @tables
98
+ end
99
+
100
+ def self.relations
101
+ @relations
102
+ end
103
+
104
+ def self.add_datatype(xmlobj)
105
+ id = xmlobj.attributes['ID']
106
+ name = xmlobj.attributes['TypeName']
107
+
108
+ if(@datatypes.find {|d| d.id == id})
109
+ raise "Duplicate datatype definition on #{name}"
110
+ end
111
+
112
+ @datatypes << Datatype.new(xmlobj)
113
+ end
114
+
115
+ def self.add_table(xmlobj)
116
+ id = xmlobj.attributes['ID']
117
+ name = xmlobj.attributes['TableName']
118
+
119
+ if(@tables.find {|t| t.id == id})
120
+ raise "Duplicate table definition on #{name}"
121
+ end
122
+
123
+ @tables << Table.new(xmlobj)
124
+ end
125
+
126
+ def self.add_relation(xmlobj)
127
+ id = xmlobj.attributes['ID']
128
+ name = xmlobj.attributes['RelationName']
129
+
130
+ if(@relations.find {|t| t.id == id})
131
+ raise "Duplicate table definition on #{name}"
132
+ end
133
+
134
+ @relations << Relation.new(xmlobj)
135
+ end
136
+
137
+ =begin
138
+ PREPARED TO USE FOR MODELS
139
+
140
+ def self.add_relationship(r)
141
+ src_table = @tables.find {|t| t.id == r.attributes['SrcTable']}
142
+ dest_table = @tables.find {|t| t.id == r.attributes['DestTable']}
143
+
144
+ relationship = r.attributes['RelationName']
145
+ if relationship =~ /\s*habtm\s*:(\w+)/
146
+ relationship = " has_and_belongs_to_many :#{$1}"
147
+ else
148
+ # If we are inserting the other side of a relationship (non-habtm),
149
+ # we need to mirror the relationship.
150
+ # NOTE: in the DB model, links should be labeled 'has_one' or 'has_many'
151
+ # not 'belongs_to' since that label is ambiguous 1:1 or 1:n
152
+ if relationship =~ /has_one/ or relationship =~ /has_many/
153
+ dest_table.relationships << ' belongs_to :' + src_table.name
154
+ else relationship !~ /has_and_belongs_to_many/
155
+ puts "error: relationships must be labeled 'has_one :x', 'has_many :x', 'habtm :x' or 'has_and_belongs_to_many :x'"
156
+ return
157
+ end
158
+ relationship = ' ' + relationship
159
+ end
160
+ src_table.relationships << relationship
161
+ end
162
+ =end
163
+ def self.format_options(options)
164
+ return if options.empty?
165
+
166
+ formatted = ""
167
+ options.each do |k,v|
168
+ if v.is_a? Symbol
169
+ formatted << ", :#{k} => :#{v}"
170
+ elsif v.is_a? String
171
+ formatted << ", :#{k} => '#{v}'"
172
+ else
173
+ formatted << ", :#{k} => #{v}"
174
+ end
175
+ end
176
+
177
+ formatted
178
+ end
179
+
180
+ protected
181
+ def self.include_table?(table_name)
182
+ return ((!@only_tables.nil? and @only_tables.include? table_name) or (@only_tables.nil? and @ignore_tables.nil?) or (!@ignore_tables.nil? and !@ignore_tables.include? table_name))
183
+ end
184
+ end
185
+
186
+ class Datatype
187
+ attr_accessor :id, :name, :description, :physical
188
+
189
+ def initialize(xmlobj)
190
+ @id = xmlobj.attributes['ID']
191
+ @name = @physical = xmlobj.attributes['TypeName'].downcase
192
+ @description = xmlobj.attributes['Description']
193
+ @physical = xmlobj.attributes['PhysicalTypeName'].downcase if not xmlobj.attributes['PhysicalTypeName'].empty?
194
+ end
195
+ end
196
+
197
+ class Table
198
+ attr_accessor :id, :name, :comments, :columns, :indexes, :relationships, :options, :references
199
+
200
+ alias_method :fields, :columns
201
+
202
+ def initialize(xmlobj)
203
+ @id = xmlobj.attributes['ID']
204
+ @name = xmlobj.attributes['Tablename']
205
+ @comments = xmlobj.attributes['Comments'].split("\\n")
206
+ @columns = []
207
+ @fields_without_reference = []
208
+ @indexes = []
209
+ @relationships = []
210
+ @references = []
211
+ @options = {}
212
+ @process = ((Model.include_table? @name) and (@comments.empty? or @comments.first.downcase.strip != "ignore"))
213
+
214
+ if @name == @name.singularize
215
+ puts "Warning: table #{@name} is not in plural\n"
216
+ end
217
+
218
+ xmlobj.elements.each("COLUMNS/COLUMN") { |c| self.add_column(c) }
219
+ xmlobj.elements.each("INDICES/INDEX") { |i| self.add_index(i) }
220
+ end
221
+
222
+ def process?
223
+ @process
224
+ end
225
+
226
+ def ignore?
227
+ !@process
228
+ end
229
+
230
+ # Meio cambalacho, eu reconheço que sou fanfarrão!
231
+ def fields_without_references
232
+ return @fields_without_reference unless @fields_without_reference.empty?
233
+ fields.each do |field|
234
+ @fields_without_reference << field
235
+ end
236
+ references.each do |reference|
237
+ @fields_without_reference.delete_if { |field| field.name == "#{reference.name.singularize}_id" }
238
+ end
239
+ @fields_without_reference
240
+ end
241
+
242
+ def add_column(xmlobj)
243
+ id = xmlobj.attributes['ID']
244
+ name = xmlobj.attributes['ColName']
245
+ if("id" == name.downcase)
246
+ return
247
+ end
248
+
249
+ if(@columns.find {|c| c.id == id})
250
+ raise "Duplicate column definition on #{self.name} #{name}"
251
+ end
252
+
253
+ @columns << Column.new(xmlobj)
254
+ end
255
+
256
+ def add_index(xmlobj)
257
+ id = xmlobj.attributes['ID']
258
+ name = xmlobj.attributes['IndexName']
259
+
260
+ xmlobj.elements.each("INDEXCOLUMNS/INDEXCOLUMN") { |i|
261
+ if(self.columns.find {|c| c.id == i.attributes['idColumn']}.nil?)
262
+ return
263
+ end
264
+ }
265
+
266
+ if(@indexes.find {|i| i.id == id})
267
+ raise "Duplicate index definition on #{self.name} #{name} (#{id})"
268
+ end
269
+
270
+ @indexes << Index.new(self, xmlobj)
271
+ end
272
+
273
+ def add_references(reference)
274
+ @references << reference
275
+ end
276
+
277
+ end
278
+
279
+ class Column
280
+ attr_accessor :id, :name, :datatype, :params, :notnull, :default, :comments, :options
281
+
282
+ def initialize(xmlobj)
283
+ @id = xmlobj.attributes['ID']
284
+ @name = xmlobj.attributes['ColName']
285
+ @datatype = Model.datatypes.find {|c| c.id == xmlobj.attributes['idDatatype']}.physical
286
+ @params = xmlobj.attributes['DatatypeParams']
287
+ @notnull = xmlobj.attributes['NotNull']
288
+ @default = xmlobj.attributes['DefaultValue']
289
+ @comments = xmlobj.attributes['Comments']
290
+ @comments = "# #{@comments.split("\\n").join(', ')}" unless @comments.empty?
291
+
292
+ options = {}
293
+ options['default'] = @default unless @default.empty?
294
+ options['null'] = ("1" == @notnull) ? false : true
295
+ if not @params.empty?
296
+ if float = /\(([0-9]+),([0-9]+)\)/.match(@params)
297
+ options['precision'] = float[1].to_i
298
+ options['scale'] = float[2].to_i
299
+ else
300
+ options['limit'] = /\(([0-9]*)\)/.match(@params)[1].to_i
301
+ end
302
+ end
303
+ # @options['limit'] = (eval(@params) rescue nil) if not @params.empty?
304
+
305
+ @options = Model.format_options(options)
306
+
307
+ end
308
+
309
+ end
310
+
311
+ class Index
312
+ attr_accessor :id, :table, :name, :columns, :unique, :options
313
+
314
+ def initialize(table, xmlobj)
315
+ @id = xmlobj.attributes['ID']
316
+ @name = xmlobj.attributes['IndexName']
317
+ @table = table.name
318
+ columns = Array.new
319
+ xmlobj.elements.each("INDEXCOLUMNS/INDEXCOLUMN") { |i|
320
+ columns << table.columns.find {|c| c.id == i.attributes['idColumn']}.name
321
+ }
322
+ @columns = "[:#{columns.join(',:')}]" unless columns.nil?
323
+ @unique = xmlobj.attributes['IndexKind'] == "2"
324
+ if @unique
325
+ options = {}
326
+ options['unique'] = @unique
327
+ @options = Model.format_options(options)
328
+ end
329
+ end
330
+ end
331
+
332
+ class Relation
333
+ attr_accessor :id, :name, :from_table, :from_column, :to_table, :to_column, :options
334
+
335
+ def initialize(xmlobj)
336
+ # DBDesigner codes
337
+ # 0 = restrict
338
+ # 1 = cascade
339
+ # 2 = set null
340
+ # 3 = no action
341
+ # 4 = set default
342
+ @dbdesigner_codes = ['restrict','cascade','set null','no action','set default']
343
+
344
+ @id = xmlobj.attributes['ID']
345
+ @name = xmlobj.attributes['RelationName'].downcase
346
+ @from_table = Model.tables.find {|t| t.id == xmlobj.attributes['DestTable']}
347
+ @to_table = Model.tables.find {|t| t.id == xmlobj.attributes['SrcTable']}
348
+ fields = xmlobj.attributes['FKFields'].strip.split("=")
349
+ @from_column = fields[1].match(/([a-zA-Z_-])*/).to_s
350
+ @to_column = fields[0].match(/([a-zA-Z_-])*/).to_s
351
+
352
+ options = {}
353
+
354
+ on_delete = xmlobj.attributes['RefDef'].match(/OnDelete=([0-4]{1})/)
355
+ if on_delete
356
+ @on_delete = @dbdesigner_codes[on_delete[1].to_i]
357
+ options['on_delete'] = @on_delete unless on_delete[1] == '3'
358
+ end
359
+
360
+ on_update = xmlobj.attributes['RefDef'].match(/OnUpdate=([0-4]{1})/)
361
+ if on_update
362
+ @on_update = @dbdesigner_codes[on_update[1].to_i]
363
+ options['on_update'] = @on_update unless on_update[1] == '3'
364
+ end
365
+ @options = Model.format_options(options)
366
+
367
+ if(@from_table.process? and @to_table.process?)
368
+ if (@from_column == 'parent_id' and @from_table.name != @to_table.name) or
369
+ (@from_column != 'parent_id' and @from_column != "#{@to_table.name.singularize}_#{@to_column}")
370
+ puts "Warning: foreign_key #{@from_table.name}.#{@from_column} => #{@to_table.name}.#{@to_column}\n"
371
+ end
372
+ end
373
+
374
+ @from_table.add_references(@to_table) if @to_column.eql? 'id'
375
+ end
376
+ end
377
+
378
+ end
379
+
@@ -0,0 +1,45 @@
1
+ require 'postgresql_migrations'
2
+
3
+ <%= "=begin" %>
4
+ <% tables.each do |table| -%>
5
+ ./script/generate rspec_model -c --skip-migration <%= table.name.singularize.camelize %> <% table.references.each do |reference_table| -%><%= reference_table.name %>:reference <% end -%> <% table.fields_without_references.each do |field| -%><%= "#{field.name}:#{field.datatype}" %> <% end -%>
6
+
7
+ <% end -%>
8
+ <%= "=end" %>
9
+
10
+ class <%= migration_name.underscore.camelize %> < ActiveRecord::Migration
11
+ def self.up<% tables.each do |table| -%>
12
+ <% table.comments.each do |comment| -%>
13
+ <%= "\# #{comment}" %>
14
+ <% end -%>
15
+
16
+ create_table "<%= table.name %>"<% table.options.each do |k,v| %>, :<%= k %> => <%= v %><% end %>, :force => true do |t|
17
+ <% table.fields.each do |field| -%>
18
+ t.<%= field.datatype %> "<%= field.name %>" <%= field.options %> <%= field.comments %>
19
+ <% end -%>
20
+ t.timestamps
21
+ end
22
+
23
+ <% table.indexes.sort_by {|index| index.table.to_s}.each do |index| -%>
24
+ <%= "add_index :#{index.table}, #{index.columns} #{index.options}" %>
25
+ <% end -%>
26
+ <% end -%>
27
+
28
+ <% relations.each do |relation| -%>
29
+ <%= "add_foreign_key :#{relation.from_table.name}, :#{relation.from_column}, :#{relation.to_table.name}, :#{relation.to_column} #{relation.options}" %>
30
+ <% end -%>
31
+ end
32
+
33
+ def self.down
34
+ <% relations.each do |relation| -%>
35
+ <%= "remove_foreign_key :#{relation.from_table.name}, :#{relation.from_column}" %>
36
+ <% end -%>
37
+ <% tables.sort_by {|table| table.name.to_s }.each do |table| -%>
38
+ <% table.indexes.sort_by {|index| index.table.to_s}.each do |index| -%>
39
+ <%= "remove_index :#{index.table}, #{index.columns}" %>
40
+ <% end -%>
41
+ <%= "drop_table :#{table.name}" %>
42
+ <% end -%>
43
+ end
44
+ end
45
+
@@ -0,0 +1,8 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ class DbdesignerGeneratorTest < Test::Unit::TestCase
4
+ # Replace this with your real tests.
5
+ def test_this_plugin
6
+ flunk
7
+ end
8
+ end
@@ -0,0 +1,4 @@
1
+ require 'test/unit'
2
+ require 'rubygems'
3
+ require 'mocha'
4
+ require File.dirname(__FILE__) + '/../dbdesigner_migration_generator'
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rafaelp-dbdesigner_generators
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Rafael Lima
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-09-20 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activerecord
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">"
21
+ - !ruby/object:Gem::Version
22
+ version: 0.0.0
23
+ version:
24
+ description:
25
+ email: contato@rafael.adm.br
26
+ executables: []
27
+
28
+ extensions: []
29
+
30
+ extra_rdoc_files:
31
+ - README.mkdn
32
+ files:
33
+ - MIT-LICENSE
34
+ - Rakefile
35
+ - README.mkdn
36
+ - rails_generators/dbdesigner_migration/USAGE
37
+ - rails_generators/dbdesigner_migration/dbdesigner_migration_generator.rb
38
+ - rails_generators/dbdesigner_migration/templates/dbdesigner_migration.rb
39
+ has_rdoc: true
40
+ homepage: http://rafael.adm.br/opensource/dbdesigner_generators
41
+ post_install_message:
42
+ rdoc_options: []
43
+
44
+ require_paths:
45
+ - .
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: "0"
51
+ version:
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
57
+ version:
58
+ requirements: []
59
+
60
+ rubyforge_project:
61
+ rubygems_version: 1.2.0
62
+ signing_key:
63
+ specification_version: 2
64
+ summary: Generates ActiveRecord Migration files from a DB Designer 4 xml file.
65
+ test_files:
66
+ - test/test_helper.rb
67
+ - test/dbdesigner_migration_generator_test.rb