Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 11:48
    timriley synchronize #155
  • 11:48

    timriley on rich-component-dirs-config

    Add component_dirs setting Rem… Scan component file for magic c… Make load_component easier to u… (compare)

  • 11:45
    timriley synchronize #155
  • 11:45

    timriley on rich-component-dirs-config

    Fix wording Add Rubocop rule Clarify names Fixup naming and 4 more (compare)

  • 11:07

    flash-gordon on master

    Add more predicates to mapping (compare)

  • 11:04
    timriley synchronize #155
  • 11:04

    timriley on rich-component-dirs-config

    Use base Dry::Container missing… (compare)

  • 10:56
    timriley synchronize #155
  • 10:56

    timriley on rich-component-dirs-config

    Make load_component easier to u… (compare)

  • 09:49

    dry-bot on master

    [devtools] sync (compare)

  • 09:48

    flash-gordon on master

    Make predicate inference truly … Update changelog.yml (compare)

  • Jan 17 13:25
    flash-gordon review_requested #415
  • Jan 17 13:25
    flash-gordon review_requested #415
  • Jan 17 13:25
    flash-gordon opened #415
  • Jan 17 13:21

    flash-gordon on custom-builder-methods

    Support for custom builder meth… (compare)

  • Jan 17 12:37
    flash-gordon synchronize #413
  • Jan 17 12:37

    flash-gordon on or_nil-extension

    Add Type#or_nil via builders ex… (compare)

  • Jan 17 12:30

    dry-bot on master

    [devtools] sync (compare)

  • Jan 17 12:30

    flash-gordon on master

    Fix changelog (compare)

  • Jan 17 10:28

    dry-bot on master

    [devtools] sync (compare)

Nikita Shilnikov
@flash-gordon
it’s not the point
Markus Unterwaditzer
@untitaker
or at least I thought it did
Nikita Shilnikov
@flash-gordon
you don’t need a mutable interface, that’s why you don’t get it
Markus Unterwaditzer
@untitaker
right, I'm not asking for a mutable interface
Nikita Shilnikov
@flash-gordon
but if you're using other ruby primitives, such as arrays and strings, they're mutable
but since they're more efficient we stick to them
otherwise we would have to go with our own
or freezing everything which is, as I mentioned, is slow
so what we do instead is discouraging
from mutating values
Markus Unterwaditzer
@untitaker
I'll figure something out. But thanks.
Nikita Shilnikov
@flash-gordon
and if you want to enforce immutability it will cost you some performance but can do it
Markus Unterwaditzer
@untitaker
I might have underestimated runtime cost of freeze. I thought it could be O(1)
Nikita Shilnikov
@flash-gordon
I personally only watched a talk by @solnic where he measured this
tldr we just don't mutate anything thus don't have a problem with mutation :)
Piotr Solnica
@solnic
it is too slow, deep freezing kills perf. Do it only with memoized objects that are instantiates once per process
Gustavo Caso
@GustavoCaso
:clap: :clap:
Hamza Khan-Cheema
@hamzakc
Hi, Just a quick question. I am using dry-web-roda and making a API application. I am toying with a few ideas on how to test it. How do other people test API apps? I was playing with the idea of using bacon, but would like to use Rspec. Capybara is not really used to test API's so feature tests are out. The other option is just to use rack-test directly
Oskar Szrajer
@gotar
I use rack-test always
workings great
Hamza Khan-Cheema
@hamzakc
Thanks, I was leaning towards that as well.
you got any links on getting that working with dry-web by any chance
Hamza Khan-Cheema
@hamzakc
isn't that using RSpec
Oskar Szrajer
@gotar
i uses rack-tests too
for requests
I can extract you some tests from my projects
if you want
Hamza Khan-Cheema
@hamzakc
don't want to trouble you :)
i will try and use berg as a template and get it working
thanks for the offer
you tried bacon ?
here you go, spec_helpers. and some tests
using berg as a template is quite hard at the beginning
if you need any more files, tests just ask
I used that combination (rack-test, rspec) for 4-5 different APIs in last few years always working great
Oskar Szrajer
@gotar
https://github.com/gotar/sinatra-rom - some very old repo but shows how to connects rack-test with sinatra (in roda is almost exactly the same) - much easier one
Gustavo Caso
@GustavoCaso
I think using the dry-web-roda cli will build some spec helpers with some sort of configuration already
Here is the one generated for one of my toy project
Oskar Szrajer
@gotar
yeah but it's overkill for API
and do not use rack-test in pure direct way as I remember
Gustavo Caso
@GustavoCaso
Sure
Totally true
Oskar Szrajer
@gotar
one day will be great to have --only-api switch for generator :)
one day
Gustavo Caso
@GustavoCaso
:+1: