The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
If you need online access to DB in your application (could be useful for QA, bug investigation or cases when you don’t have access to DB by port) you can use this gem: https://github.com/igorkasyanchuk/rails_db . The new version has few fixes, improvements and dependencies upgrades.
Writing tests for background jobs is a lot easier than you might think using Rails’ built-in helpers. You can use them to verify jobs were enqueued with the right arguments and you can also use them to run the jobs inline. Watch the screencast to learn how to test ActiveJob
Underneath (almost) all Ruby web application lies the Rack architecture. With minimal interface, it is simple to write a middleware. Let’s see how to test it: https://tejasbubane.github.io/posts/2019-11-12-unit-testing-rack-middleware/
We will tell you what the Vuex library is and analyze in detail such components as a store, state, getters, mutations, and actions here https://amoniac.eu/blog/post/correct-and-efficient-vuex-using-part-i
We Ruby developers use Rake and Rakefiles for many of our build, test, and deployment scripts. Yet Rake has always felt a bit clumsy, and that shouldn’t be a surprise. It was actually not designed for most of what we use it for. Would a different tool work better? [more inside]
Hello, I’ve put together a date-formats library / gem that lets you read / parse date (and times) from around the world. Let’s try a French date e.g.
DateFormats.parse( 'Lundi 1 Janvier', lang: 'fr') or a Spanish date e.g.
DateFormats.parse( '1 Ene', lang: 'es' ) and so on. Happy date wrangling with ruby. Cheers. Prost. PS: Yes, you can add new (and more) formats using regular expressions / text patterns.
Most of my work time I work with software requirements, and other items based on requirements, like estimations sheets. I write bulk documents and don’t like the behavior of big word processors (MS Word, LibraWriter, etc.) on bulk documents. I created a gem clerq that provides the ability to write big documents in small separate files using Markdown. More information you can get from README
Skunk is a Ruby gem that will combine code quality metrics from Reek; Flay; Flog; and SimpleCov to calculate a Stink Score for a file or set of files. [more inside]