Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 5.1 #93

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

Rails 5.1 #93

wants to merge 21 commits into from

Conversation

glaszig
Copy link

@glaszig glaszig commented Mar 18, 2017

this adds tests for rails 5.1.

unfortunately, controller testing changed quite heavily (they're integration tests by default) so those won't run on anything < 5 anymore. not sure how you'd like to approach this.

also makes some other adjustments for which i was too impatient to create separate PRs:

  • only install growl if running on macOS
  • gitignore gemfiles/*.lock
  • add test-unit gem to rails 3.2 gemfile because it got removed from core ruby since 2.2+
  • updated schema dump (mainly ruby syntax)
  • code climate integration according to 1.0 docs
  • made config class compatible with older rails versions (currently only works with active support 4)
  • upgraded rspec-rails because of changes in newer rake versions
  • remove version-lock from acts-as-taggable-on

by conditionally installing development gems
ruby 2.2+.

LoadError: Ruby 2.2+ has removed test/unit from the core library. Rails requires this as a dependency. Please add test-unit gem to your Gemfile: `gem 'test-unit', '~> 3.0'` (cannot load such file -- test/unit)"
https://docs.codeclimate.com/v1.0/docs/travis-ci-ruby-test-coverage

removed from spec helper since it complained as follows:

This usage of the Code Climate Test Reporter is now deprecated. Since version
1.0, we now require you to run `SimpleCov` in your test/spec helper, and then
run the provided `codeclimate-test-reporter` binary separately to report your
results to Code Climate.
AS::Configurable's `config_accessor` supports a default block
only since rails 4 -- see rails/rails#7645.
resolves the following error:

$ rake acts_as_taggable_on_engine:install:migrations
rake aborted!
NoMethodError: undefined method `last_comment' for #<Rake::Application:0x0055d4f8455538>
based on the activerecord version being used
stubbed nil arguments will end up as "" in the controller's params hash.
some weird things with the rakefiles going on.
related travis log:

$ bundle exec rake db:migrate RAILS_ENV=test
/home/travis/build/KatanaCode/blogit/lib/tasks/blogit/doc.rake:9: warning: already initialized constant DOC_FILES
/home/travis/build/KatanaCode/blogit/lib/tasks/blogit/doc.rake:9: warning: previous definition of DOC_FILES was here
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
  class CreateUsers < ActiveRecord::Migration[4.2]
/home/travis/.rvm/gems/ruby-2.4.0/gems/activerecord-5.1.0.beta1/lib/active_record/migration.rb:525:in `inherited'
/home/travis/build/KatanaCode/blogit/spec/dummy/db/migrate/20110814091304_create_users.rb:1:in `<top (required)>'
@glaszig
Copy link
Author

glaszig commented Mar 29, 2017

alright. 4.2 and 5.1 tests are green. supporting earlier versions is pointless pain, in my opinion, as they're all eol.

@Bodacious, still there?

@Bodacious
Copy link
Owner

@glaszig Thanks for doing this. I'll get back to you ASAP with these PRs.

@glaszig
Copy link
Author

glaszig commented May 4, 2018

hello?

@macanudo527
Copy link

This gem being actively maintained anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants