I will work on a pull request for it. Thanks! On Monday, April 14, 2014 4:35:21 PM UTC-6, Jeremy Evans wrote: > > On Monday, April 14, 2014 3:11:51 PM UTC-7, Mike Gehard wrote: >> >> I have a project that acts as a template for Sequel backed Sinatra >> applications (https://github.com/msgehard/sinatra-postgres-starter-app) >> that I use for teaching students. As part of that, there is a spec that >> tests to make sure Sinatra is wired up properly that should be green >> immediately after downloading. >> >> While working with the starter project, that is lacking migrations, I >> found that the IntegerMigrator returns nil from the >> latest_migration_version method: >> >> def latest_migration_version >> l = files.last >> l ? migration_version_from_file(File.basename(l)) : nil >> end >> >> I am wondering if it would be better if this returned 0 if it couldn't >> find any files since migration 0 is used as the absence of migrations. >> > > I suppose having IntegerMigrator.run be a noop if no :target or :current > option is given and the directory is empty is OK. I don't think we have > any specs for empty directories, so it's currently undefined behavior. For > consistency the TimestampMigrator should operate similarly for an empty > directory. > > If you want to work on a pull request for that, that would be great, > otherwise I'll add it to my todo list. > > Thanks, > Jeremy >
-- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
