28 Matching Annotations
  1. Last 7 days
  2. Mar 2022
    1. Capybara can get us part of the way there. It allows us to work with an API rather than manipulating the HTML directly, but what it provides isn't an application specific API. It gives us low-level API methods like find, fill_in, and click_button, but it doesn't provide us with high-level methods to do things like "sign in to the app" or "click the Dashboard item in the navigation bar".
    1. # Optionally, you can write a description for the migration, which you can use for # documentation and changelogs. describe 'The _id suffix has been removed from the author property in the Articles API.'
    2. apply_to '/api/v1/articles/:id'
  3. Aug 2021
    1. When people talk about internal DSLs I see two styles: internal minilanguages and language enhancements.
    2. An internal DSL (often called an Embedded DSL) is a DomainSpecificLanguage that is written inside an existing host language. It's a common way of thinking in a number of programming language communities - particularly the Lisp community. It's now gaining a lot of attention as DSLs are a common way of thinking in the rapidly growing Ruby community.
  4. Mar 2021
  5. Feb 2021
    1. In combination with [Track()], the :magnetic_to option allows for a neat way to spawn custom tracks outside of the conventional Railway or FastTrack schema.

      Instead of magnetic_to:, I propose wrapping the steps that are on a separate track in something like...

        DefTrack do :paypal do
          step :charge_paypal
        end
      

      or

        paypal_track = RailwayTrack do :paypal do
          step :charge_paypal
        end
      

      so we can reference it from outputs, like we can with tracks created with Path helper.

    2. Output() in combination with Path() allow very simple modelling for alternive routes.
    3. In both filters, you’re able to rename and coerce variables. This gives you a bit more control than the simpler DSL.
    1. Operations define the flow of their logic using the DSL and implement the particular steps with pure Ruby.
  6. Dec 2020
  7. Nov 2020
    1. I'm thinking of creating something similar to a utility-first CSS framework like Tailwind, here's how it could look like:StyledText( style: [selfAlignRight, padding(8), fontSize(20), fontBold], text: 'hello' )
  8. Oct 2020
  9. Apr 2020
    1. no need to learn a new framework it's just Ruby's syntax + new methods and actually that's one of the reasons Google invented a simple and stupid language called Golang instead of a magical one to prevent developers from doing magic and just shipping features instead of playing with DSLs.
  10. Jun 2018
  11. Jul 2017
  12. Jun 2017
    1. internal dsl in java 8 in three ways:

      1. by Method Chaining
      2. by Nested Functions
      3. by Lambda Expression