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

Fix sample app activerecord #110

Merged
merged 8 commits into from
Apr 13, 2020

Conversation

CeeBeeUK
Copy link
Contributor

This is designed to address some of the issues raised in #109

This allows the tests to run without failing
Add an explicit `rake db:migrate` step for `RAILS_ENV=test`
This allows the test to run
@dangerpr-bot
Copy link

dangerpr-bot commented Apr 11, 2020

1 Message
📖 We really appreciate pull requests that demonstrate issues, even without a fix. That said, the next step is to try and fix the failing tests!

Generated by 🚫 danger

Replace the `* Your contribution here.` and add the PR link
now I know it!
Copy link
Collaborator

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

CHANGELOG.md Outdated
@@ -3,6 +3,7 @@
#### 0.11.2 (Next)

* Your contribution here.
* [#110](https://github.com/slack-ruby/slack-ruby-bot-server/pull/110): Update the sample_app_activerecord Gemfile and README to make them function as expected.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a format fix (include your name).

I would also just write "Fix ActiveRecord sample app", short and concise

@dblock
Copy link
Collaborator

dblock commented Apr 12, 2020

Build is failing on rubocop, run rubocop -a. I think the Gemfile needs to have the gems in alphabetical order.

@CeeBeeUK
Copy link
Contributor Author

Build is failing on rubocop, run rubocop -a. I think the Gemfile needs to have the gems in alphabetical order.

🤦 Yup, just had that on my clone of this...
Do you require comments explaining odd breaches?
e.g.

gem 'virtus'

gem 'activerecord', '~> 5.0.0', require: 'active_record'
gem 'newrelic-slack-ruby-bot'
<snip>

works, the gap between virtus and activerecord is enough for rubocop.
Or would you prefer...

# Virtus needs to be loaded before activerecord
gem 'virtus'

gem 'activerecord', '~> 5.0.0', require: 'active_record'
gem 'newrelic-slack-ruby-bot'
<snip>

?

Virtus needs to be loaded before activerecord but
rubocop alerts when sequential gems are not in
alphabetical order
@dblock
Copy link
Collaborator

dblock commented Apr 13, 2020

Tests against AR are still failing. LMK if you need help.

Btw, while adding virtus seems to fix problems, I wonder why we need it at all. Grape removed this dependency in 1.3.0, see https://github.com/ruby-grape/grape/blob/master/UPGRADING.md#upgrading-to--130.

Not just the sampleapp version.

The reference to Virtus being needed seemd to come from
ActiveRecord rather than Grape
@dblock dblock merged commit 7a8cdf9 into slack-ruby:master Apr 13, 2020
@dblock
Copy link
Collaborator

dblock commented Apr 13, 2020

Merged, thanks.

@dblock
Copy link
Collaborator

dblock commented Apr 13, 2020

Can we figure out why we need Virtus at all though with the latest version(s) of Grape?

@dblock
Copy link
Collaborator

dblock commented Apr 13, 2020

This is actually quite simple. Virtus used to have a Boolean definition and Grape used it by default. Then Grape implemented its own, and got rid of the Virtus dependency. I updated the boolean definition in #111 instead of taking the virtus dependency.

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