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
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Ruby devscoop: Issue #11
Big performance improvement for ordinal generation! The power of benchmarks-oriented solutions ! see more
Adding GDPR Compliance to My Rails App and Technical Blog
New data privacy GDPR EU regulations are going live in less than two weeks. In this blog post, I will describe actions I took to add GDPR compliance to my Ruby on Rails SAAS app and this blog itself. [more inside]
Functional Programming in Ruby - Flow Control
How do you deal with the flow of data through your application without resorting to exceptions everywhere? - https://medium.com/@baweaver/functional-programming-in-ruby-flow-control-565bbdcdf2a2
Functional Programming in Ruby - Closures
Closures are a common piece in FP, how do we leverage some of those ideas in Ruby? - https://medium.com/@baweaver/functional-programming-in-ruby-closures-ac80547eb40d
A Simple Regex Language compiler for Rubyists
The srl_ruby gem packs with its latest version 0.4.0 a compiler that transforms text patterns expressed in SRL into plain Ruby Regexps.
The Simple Regex Language (SRL) allows to easily design and write highly readable text patterns without being a regular expression guru.
The srl2ruby compiler even has the option to output both original SRL and its Regexp counterpart so that they can be inserted together in one place in your Ruby source code, easing further the maintenance…
Interested?
Take a look at the project’s README or give the srl_ruby gem a try.
Functional Programming in Ruby - State
State goes beyond immutability, find out how to use this to make more flexible Ruby apps: https://medium.com/@baweaver/functional-programming-in-ruby-state-5e55d40b4e67
InvoicePrinter 1.2 released with bundled server
Print your PDF invoices from any tech stack thanks to the new InvoicePrinter Server. Read the announcement.
An Introduction to Event Sourcing for Rubyists
Video here: https://skillsmatter.com/skillscasts/11903-an-introduction-to-event-sourcing Slides here: https://speakerdeck.com/mottalrd/an-introduction-to-event-sourcing-for-rubyists Code here: https://gist.github.com/mottalrd/52a99a0a67275013df5a66281a4a1b11 Event sourcing is a design pattern to build applications that are domain centric and easy to extend. The pattern is based on the usage of a persistent event log which substitutes the more classical relational database model for Rails applications.
Check out RubyRef
Easier navigation to Ruby documentation by use of subdomain redirects. https://www.rubyref.net/
Yuki & Moto Press - Programming Blockchains Step-by-Step from Scratch (Zero) in Ruby
Hello, I’ve added a new free (online) book to the Yuki & Moto Press Bookshelf. Let’s welcome: Programming Blockchains Step-by-Step from Scratch (Zero) in Ruby. Starting with Crypto Hashes… The contents includes: (Crypto) Hash - (Crypto) Block - (Crypto) Block with Proof-of-Work - Blockchain - Blockchain Broken? - Timestamping - Mining, Mining, Mining - Bitcoin, Bitcoin, Bitcoin - (Crypto) Block with Transactions (Tx) - References / Links. Note: The manuscript source includes many single-file ruby script samples. Happy mining and blockchaining with Ruby. PS: Did you know? You can build online books and bookshelves with ruby - use the jekyll machinery with octobook themes
A pure ruby TensorFlow implementation
https://github.com/jedld/tensor_stream [more inside]
Method Arguments in Ruby: Part I
In this article we’re going to explore the following topics:
Simple gem with a list of professions
Profession is a simple gem with a list of professions (over 1000), for matching and parsing professions in a large body of text. For instance, this was helpful for parsing out Wikipedia articles for a little school project for my kids. Feel free to add more occupations to the list.
How to create a video upload service in Rails - Part I
I’ve finally gotten around to bringing my blog back to life. I wanted to start writing a series piggy backing on a small project I was doing in my spare time, so I started with the first post, which starts off with a basic Rails site capable of uploading and watching videos. Simple stuff. I will continue to expand on this, adding some more fun features. Hopefully its enjoyable. [more inside]
Bits & Blocks Press Bookshelf - Build (Online) Books w/ Jekyll and Octobook Themes
Hello, using jekyll (and github pages) with (remote) octobook themes you can build (online) books from your text w/ markdown formatting. See the latest real-world open-source / open-access example - Bits & Blocks Press Bookshelf (Source) - Free Books about Bitcoins, Blockchains, Contract Scripts ‘n’ More. Happy publishing w/ Jekyll and Octobook themes.
Rails Testing Antipatterns: Models
Learn about common antipatterns in writing tests for Rails applications when testing models: https://semaphoreci.com/blog/2014/01/21/rails-testing-antipatterns-models.html
How to Use The Strategy Design Pattern in Ruby
Make your classes more flexible with the strategy design pattern! You’ll learn how to use it & why in this new article: https://www.rubyguides.com/2018/05/strategy-design-pattern-in-ruby/
records_count gem
useful gem for development https://github.com/igorkasyanchuk/records_count (see how many records you loading from DB without hacks)
Multiple Ways to Change Database Column in Rails
There are several, different approaches to changing the database column in Rails. The article covers changing the column name and the column type, as well as changing the column with the type conversion. Read More
Loading a File in Ruby
The Kernel#load method loads and executes the file passed as parameter. [more inside]
Email with Amazon SES from Rails on EC2
Deliver email with Amazon SES from a Ruby on Rails app hosted on EC2. [more inside]
Passenger app server 5.3.0 released for Ruby, Python & Node.js
Version 5.3.0 of the Passenger application server released, introducing a big overhaul of the error reporting, Ubuntu “Bionic” (18.04) packages, as well as support for the latest stable Nginx (1.14.0): https://blog.phusion.nl/2018/05/09/passenger-5-3-0/
Recent Updates in RubyData
I described the four recent activities in data science field, including SciRuby’s GSoC, mxnet gem, and talks in RubyKaigi 2018. [more inside]