Viewing homepage, ubmitting a story, viewing a story as a logged-in or
logged-out user, and submitting a comment. Also allows posting comments
without JavaScript.
I wanted smoke tests for the highest-traffic endpoints that tend to throw me a
few hundred emails if they hit exceptions in production.
I discussed with @pushcx about adding Skylight instrumentation
to lobste.rs under the new [Skylight for Open Source](https://www.skylight.io/oss)
program.
If you’re not already familiar with Skylight, it is a smart profiler
for Rails apps. Skylight makes it easy to pinpoint performance issues
in Rails applications.
We work on a lot of open source projects ourselves, and in our experience
it can be pretty hard to get contributors to work on application performance
issues. Few contributors consider working on performance problems, and the
ones that might be interested may not even know where to start. By making
performance information more accessible, we hope to inspire potential
contributors to tackle slow parts of your app, and have a good way to
see if their contributions helped.
Once this patch is merged and deloyed*, you will be able to view the
performance data we collected at the [public Skylight dashboard](https://oss.skylight.io/app/applications/UVOwCQJiWlFy).
The dashboard will be accessible to anyone (no Skylight account
required) to make it easy for contributors.
(*Actually, I lied a little. We still need to set the `SKYLIGHT_AUTHENTICATION`
environment variable to the appropiate API key on production, but I
will work with @pushcx on that off-thread.)
Fixes#454
* Upgrade to rails 5.1
- Update versions of dependencies
- Switch before_filter to before_action
- Use render plain rather than render text
* Generate new rails 5.1 scripts
Sphinx's searchd is very buggy, often crashing on rebuilding its
indexes, not starting up, or just spinning at 100% CPU.
It is also a big external dependency that might not be available on
other hosting platforms.
This removes the ability to search both comments and stories at
once, though I don't know how useful that was anyway. We gain
boolean searching and the ability to more carefully craft queries
using particular keywords (in the future) like "user:blah" or
"tag:blah" to narrow things down.
The previous version of `htmlentities` had a duplicate key in one of
its hashes, which produced the following warning:
```
.../htmlentities-4.3.2/lib/htmlentities/mappings/expanded.rb:465:
warning: key "inodot" is duplicated and overwritten on line 466
```
Updating to the latest removes this warning.
Judging from the test suite, the only issue in supporting Ruby 2.2.0+
was with the `mysql2` gem. Updating this to the latest 0.3.x allows
Lobsters to run with newer Rubies.
We can't update to the absolute latest `mysql2` gem without first
updating Rails, which is why I used the pessimistic version constraint
for `mysql2`.