Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 20:32

    dry-bot on master

    [devtools] sync (compare)

  • Feb 22 17:27
    dskecse starred dry-rb/dry-monads
  • Feb 21 12:45
    sadjow commented #344
  • Feb 20 17:31
    jswanner commented #141
  • Feb 20 06:15
    lazebny starred dry-rb/dry-types
  • Feb 19 22:35
    solnic commented #141
  • Feb 19 22:32

    solnic on v0.17.0

    (compare)

  • Feb 19 22:32

    solnic on master

    Bump dry-system to 0.17.0 (compare)

  • Feb 19 22:31

    solnic on 141-fix-compat-with-dry-configurable

    Bump dry-system to 0.17.0 (compare)

  • Feb 19 22:31

    dry-bot on master

    [devtools] update changelog.yml… [devtools] sync (compare)

  • Feb 19 22:27

    solnic on 141-fix-compat-with-dry-configurable

    (compare)

  • Feb 19 22:27

    solnic on master

    Fix compatibility with dry-conf… Merge pull request #142 from dr… (compare)

Piotr Solnica
@solnic
:tada:
Adam Davies
@adz
Just in time for tomorrow @timriley? :)
Looks good
Tim Riley
@timriley
@adz Yep, nothing like in-person exposure to 100s of ppl to motivate you πŸ˜…
Adam Davies
@adz
:sparkles: :clap: good luck!
Oskar Szrajer
@gotar
:heart:
Sergey Kukunin
@Kukunin
great update on homepage! documentation really matters
Andy Holland
@AMHOL
:clap: Nice one @timriley, looks really good :)
Oskar Szrajer
@gotar
@timriley about new sql rom instrumentation from dry-web roda, I tried to add it to my project but get error
    notifications.instrument(:sql, name: name.relation, query: dataset.sql) do
      super
    end

  NoMethodError:
    undefined method `instrument' for nil:NilClass
not sure I miss something in my code or it not working at all ;]
Oskar Szrajer
@gotar
so the notification for rom is not set
Piotr Solnica
@solnic
@gotar you need to set it up manually for now
Oskar Szrajer
@gotar
yeah but I more mean dry-web-roda do not do it anywhere, or I miss it
so people will got error i think
Piotr Solnica
@solnic
it does it when you generate a skeleton
it’ll put lib/rom/notifications.rb file
Oskar Szrajer
@gotar
i just generate new one
and there is no lib/rom/notification file
there is lib/rom/instrumentation
but it's the file that cause error
Sergey Kukunin
@Kukunin
I'd like to implement this and send PR: dry-rb/dry-logic#29. Please review and give your ideas
Piotr Solnica
@solnic
@Kukunin sorry man for lack of replies, I’m at RubyConfAU so busy days. I’ll get back to you in a couple days
Sergey Kukunin
@Kukunin
@solnic thanks. I appreciate your help. Good luck on the conf
Tim Riley
@timriley
@gotar I'll check that out now, I'm pretty sure I added those
@gotar do you have a YourApp::Container[:notifications]?
Thanks @AMHOL :D
Oskar Szrajer
@gotar
[5] pry(main)> Athit::Container["notifications"] => #<Dry::Monitor::Notifications:0x0055aae85b7d70 @clock=#<Dry::Monitor::Clock:0x0055aae84c91c0>, @events= {:"rack.request.start"=>#<Dry::Monitor::Event:0x0055aae85b7618 @id=:"rack.request.start", @info={}>, :"rack.request.stop"=>#<Dry::Monitor::Event:0x0055aae85b7578 @id=:"rack.request.stop", @info={}>, :"rack.request.error"=>#<Dry::Monitor::Event:0x0055aae85b74b0 @id=:"rack.request.error", @info={}>, :sql=>#<Dry::Monitor::Event:0x0055aae99ccc20 @id=:sql, @info={}>}, @id=:core, @listeners= {:"rack.request.start"=> [#<Proc:0x0055aae85b6b28@/home/gotar/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/dry-monitor-0.0.2/lib/dry/monitor/rack/logger.rb:33>], :"rack.request.stop"=> [#<Proc:0x0055aae85b6a88@/home/gotar/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/dry-monitor-0.0.2/lib/dry/monitor/rack/logger.rb:37>], :"rack.request.error"=> [#<Proc:0x0055aae85b6948@/home/gotar/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/dry-monitor-0.0.2/lib/dry/monitor/rack/logger.rb:41>], :sql=>[#<Proc:0x0055aae99ccbd0@/home/gotar/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/dry-monitor-0.0.2/lib/dry/monitor/sql/logger.rb:29>]}> [6] pry(main)>
@timriley ^
yes I have
Tim Riley
@timriley
@gotar odd! Would you mind sharing a full stack trace for me?
Oskar Szrajer
@gotar
[5] pry(main)> Main::Container["persistence.repositories.users"][1] NoMethodError: undefined method `instrument' for nil:NilClass from /home/gotar/Programowanie/Athit/lib/rom/instrumentation.rb:14:in `to_a
that's all
those 14 line is: notifications.instrument(:sql, name: name.relation, query: dataset.sql)
and notifications are just nil
Piotr Rybarczyk
@Argonus
Hi, i am using dry-validation and dry-struc gems in project. But i see a problem with boolean values in params, i am receiving it as 'true' or 'false', and bool? validation fails. I need to map them or i just cant find some info in documentation
Nikita Shilnikov
@flash-gordon
@Argonus you need to use Dry::Validation.Form for such coercions
Piotr Rybarczyk
@Argonus
@flash-gordon Thanks, i had to be blind...
Gustavo Caso
@GustavoCaso
Hello everyone
Excited to be here and been able to try the dry-rb gems
Hope to contribute to all this new libraries
Tim Riley
@timriley
Welcome, @GustavoCaso! Looking forward to hearing how they go for you.
@gotar Ah! Now I’m back on a computer, I have a feeling your problem might be that you have a Athit::Container["notifications”], but not a Main::Container[β€œnotifications”].
is your rom bootable dep inside the Athit or Main system?
Oskar Szrajer
@gotar
inside Athit
gotar ~/Programowanie/Athit (master) ~ $ tree system/
system/
β”œβ”€β”€ athit
β”‚   β”œβ”€β”€ application.rb
β”‚   β”œβ”€β”€ assets.rb
β”‚   β”œβ”€β”€ container.rb
β”‚   β”œβ”€β”€ import.rb
β”‚   └── settings.rb
β”œβ”€β”€ boot
β”‚   β”œβ”€β”€ bugsnag.rb
β”‚   β”œβ”€β”€ i18n.rb
β”‚   β”œβ”€β”€ monitor.rb
β”‚   └── rom.rb
└── boot.rb

2 directories, 10 files
@timriley probably you guys will update berg in the (i hope near) feature. So I will check there and compare where I might have a problem
Alejandro E. Babio
@alejandrobabio

Hi, I'm thinking on move business logic to a dry-transaction in a Rails app. As first try I built a class for create a Post:

class Post
  class Container
    extend Dry::Container::Mixin

    register :build_params, -> (params) {
      Dry::Monads.Right(params[:post])
    }

    register :validate, -> (input) {
      if input[:body].nil? || input[:title].nil?
        Dry::Monads.Left(:not_valid)
      else
        Dry::Monads.Right(input)
      end
    }

    register :persist, -> (input) {
      Post.create Dry::Monads.Right(input)
    }
  end

  class CreatePost
    def initialize(params)
      save_user = Dry.Transaction(container: Container) do
        step :build_params
        step :validate
        step :persist
      end
      save_user.call(params)
    end
  end
end

It should create a new Post when it's called with:

Post::CreatePost.new(post: {body: 'ab', title: 'AB'})

But I'm getting the error:

NoMethodError: undefined method `Right' for Dry::Monads:Module
from /home/alejandro/.rvm/gems/ruby-2.3.3@rails501/gems/dry-transaction-0.9.0/lib/dry/transaction/api.rb:40:in `call'

Have you some idea of what I'm doing wrong? I tried to build something pretty similar to the basic example of dry-transaction.

Nikita Shilnikov
@flash-gordon
@alejandrobabio can be easily fixed with require 'dry/monads' :)
Alejandro E. Babio
@alejandrobabio
Good! Thank you!
Nikita Shilnikov
@flash-gordon
not all the monads are required for dry-transaction hence those methods are not required by default