Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Refactor rake/rspec setup + drop support for Rails < 4.1 and ruby 1.9.3 #12

Merged
merged 9 commits into from
Nov 18, 2019

Conversation

mcls
Copy link
Contributor

@mcls mcls commented Apr 1, 2018

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.

mcls added 8 commits April 1, 2018 14:32
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
@mcls mcls mentioned this pull request Apr 1, 2018
@iangreenleaf
Copy link
Owner

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.

@mcls
Copy link
Contributor Author

mcls commented Apr 2, 2018

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)

$ mysqld --version
mysqld  Ver 5.7.21 for osx10.13 on x86_64 (Homebrew)

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 Gemfile.lock files for gems. It does make the build more reproducible, but it won't necessarily match the dependency versions that people have installed when they install the gem.

iangreenleaf added a commit that referenced this pull request Nov 18, 2019
@iangreenleaf iangreenleaf merged commit 664aff3 into iangreenleaf:master Nov 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants