-
Notifications
You must be signed in to change notification settings - Fork 21
Refactor rake/rspec setup + drop support for Rails < 4.1 and ruby 1.9.3 #12
Conversation
The specs for this version were failing with the following exception: Mysql2::Error: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead: CREATE TABLE `balloons` ( `id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `color` enum('red','gold') DEFAULT 'gold' NOT NULL, `size` enum('small','medium','large') ) ENGINE=InnoDB
Same effect, but limited to ActiveRecord's logging only
Instead of defining all helper methods on Object
This makes it easier to create/drop the databases. See: https://github.com/rails/rails/blob/v5.0.7/activerecord/lib/active_record/tasks/database_tasks.rb
For more info see: * travis-ci/travis-ci#8978 * travis-ci/travis-ci#8969
I'm excited to see these changes! I wonder if your problems with the old versions were due to older versions of some of the gems that seem to have issues with newer rubies. Could you check out #14 and see if that solves your issues? The specs are all passing for me on that branch. |
I checked out your branch and running the specs with those specific versions didn't fix the error. My guess is it's related to the MySQL version. (See this commit for more context)
Can you tell me which one you are running? But to be honest, I'm not sure it's even worth the effort to support rails < 4.1, since rails 4.0.x series has been retired since 2015 (meaning no more bug or security fixes). PS: I don't think it's the best idea to check in |
These changes now allow the database to be created via rake.
Example:
rake db:prepare
will create the databases.The tests for Rails < 4.1 were failing for me. Because those versions are pretty old now, I decided to delete those gem files. There might be an easy fix I overlooked though, not sure.