Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Stephen Dolan
    @stephendolan
    PR should be RTM, in that case! I did test locally with the env flag, and even added a helpful message to the VSCode plugin when it gets a 503!
    Paul Smith
    @paulcsmith
    Wonderful!! Looking now
    Stephen Dolan
    @stephendolan
    Nevermind... into CI/CD land I go! The dev server needs to be running for the GitHub action to work
    Michael Lang
    @mwlang

    @jwoertink After some investigating, it seems Avram connects on host rather than local for Posgres. So the solution to get password-less DB connections working was to add this to my pg_hba.conf

    local   all             mwlang                                  peer
    host    all             mwlang          127.0.0.1/32            peer

    which was kind of unexpected that both are needed because I would expect localhost as the hostname to resolve to the local entry always.

    3 replies
    At any rate, once I solved the password issue, I hit upon the next hurdle and that is createdb is running and is looking for template0 even though the test database already exists.
    Unhandled exception: It looks like Postgres is not running.
    
    Message from Postgres:
    
      createdb: error: could not connect to database template1: could not connect to server: Connection refused
            Is the server running on host "localhost" (127.0.0.1) and accepting
            TCP/IP connections on port 5432?
    N Atta Kusi Adusei
    @akadusei
    Hi everyone, I just released Shield v0.1.0. Shield is a comprehensive security solution for Lucky framework: https://github.com/grottopress/shield
    Michael Lang
    @mwlang
    actually, strike that. with both local and host entries in the HBA file, not even psql is able to connect...still diagnosing.
    Michael Lang
    @mwlang
    @akadusei to use this shield, do we need to delete the auth pages that Lucky installs when we first set up our project or is this to augment all that?
    N Atta Kusi Adusei
    @akadusei
    @mwlang Lucky's generated auth pages are designed to be used with Authentic, I believe. If that's the case, you would need to remove them, to use Shield. You can skip auth when generating a new project with the --no-auth flag, thus: lucky init.custom my_app --no-auth
    Michael Lang
    @mwlang
    That is worth documenting in your README or other docs so it's very clear.
    N Atta Kusi Adusei
    @akadusei
    @mwlang I agree. Will work on that. Thanks.
    Michael Lang
    @mwlang
    with some more experimenting, apparently order of entries matter, so moving my specific user up in the HBA file to just under the first one for postgres resulted in successfully being able to connect w/o password.
    host    all             mwlang          127.0.0.1/32            trust
    also, using trust instead of peer as I was previously
    Paul Smith
    @paulcsmith
    @mwlang wow that sounds pretty complex. Once you get it all working would you mind opening an issue on the website repo? I think it’d be good to note that this is a potential solution for Linux users
    Sorry it’s being such a pain to get working!
    Michael Lang
    @mwlang
    LOL This one's not Lucky's fault. And honestly, I haven't had to modify a postgres HBA file in almost 8 years
    Jeremy Woertink
    @jwoertink
    nice! @akadusei Thanks for sharing!
    N Atta Kusi Adusei
    @akadusei
    @jwoertink You welcome :-)
    Ghost
    @ghost~56ba344de610378809c0a277
    @akadusei Is it easy to migrate a project based on authentic to shield?
    N Atta Kusi Adusei
    @akadusei
    @snadon I can't tell from experience. (:facepalm: I should have thought about this). What I intend to do the coming week, is build a basic Lucky app based on Authentic, and try to migrate to Shield. I'll update the documentation to reflect what I learn.
    Stephen Dolan
    @stephendolan
    Have any of y'all successfully created a wrapper Component for a link in Lucky? I've been trying with something like what's below, but it's trying to match the union type to a signature in Lucky::LinkHelpers rather than each individual type and throwing a compile error :(
    class UI::CardActionHeader < BaseComponent
      needs title : String
      needs link_text : String
      needs link_target : Lucky::Action.class | Lucky::RouteHelper | String
    
      def render
        div class: "-ml-4 -mt-2 flex items-center justify-between flex-wrap sm:flex-no-wrap" do
          div class: "ml-4 mt-2" do
            h3 class: "text-lg leading-6 font-medium text-gray-900" do
              text title
            end
          end
          div class: "ml-4 mt-2 flex-shrink-0" do
            span class: "inline-flex rounded-md shadow-sm" do
              link link_text, to: link_target, class: "a lot of classes"
            end
          end
        end
      end
    end
    Ends up throwing this:
    web          |  15 | link link_text, to: link_target, class: "a lot of classes"
    web          |       ^---
    web          | Error: no overload matches 'UI::CardActionHeader#link' with types String, to: (Lucky::Action.class | Lucky::RouteHelper | String), class: String
    web          |
    web          | Overloads are:
    web          |  - Lucky::LinkHelpers#link(text, to : Lucky::RouteHelper, attrs : Array(Symbol) = [] of Symbol, **html_options)
    web          |  - Lucky::LinkHelpers#link(text, to : Lucky::Action.class, attrs : Array(Symbol) = [] of Symbol, **html_options)
    web          |  - Lucky::LinkHelpers#link(to : Lucky::RouteHelper, attrs : Array(Symbol) = [] of Symbol, **html_options, &block)
    web          |  - Lucky::LinkHelpers#link(to : Lucky::Action.class, attrs : Array(Symbol) = [] of Symbol, **html_options, &block)
    web          |  - Lucky::LinkHelpers#link(to : Lucky::RouteHelper, attrs : Array(Symbol) = [] of Symbol, **html_options)
    web          |  - Lucky::LinkHelpers#link(to : Lucky::Action.class, attrs : Array(Symbol) = [] of Symbol, **html_options)
    web          |  - Lucky::LinkHelpers#link(text, to : String, attrs : Array(Symbol) = [] of Symbol, **html_options)
    web          |  - Lucky::LinkHelpers#link(to : String, attrs : Array(Symbol) = [] of Symbol, **html_options, &block)
    Matthew McGarvey
    @matthewmcgarvey
    I've been shown Laravel's Telescope tool and it makes me all the more excited for Breeze :tada: :tada: :tada: :tada:
    Håkan Nylén
    @confact
    @stephendolan if you find a solution to that please tell me. Got the same issue when I want to loop through links for navigation :D
    Stephen Dolan
    @stephendolan
    I did figure it out! Not to do exactly that, but another way to accomplish the same thing. Going to be posting a LuckyCast on it in the next week or so!
    Paul Smith
    @paulcsmith
    @stephendolan @confact This is what I was going to recommend (not tested yet) https://gist.github.com/paulcsmith/180bf202509b926c914e92bd137700de
    Similar pattern to Shared::Field. This allows you to pass any option you want and use other methods like a or button instead of link. But I haven't test yet so not sure. Might be worth exploring. Looking forward to seeing what you came up with @stephendolan!
    D'oh I totally misrememebered what I read from your snippet yesterday, but the gist is that you can pass a block to with_defaults and that seems to work pretty well!
    Paul Smith
    @paulcsmith
    @stephendolan Updated gist with a slightly different pattern. This is more "composalbe" in that you can pass in any button you want, or list of buttons, etc. https://gist.github.com/paulcsmith/180bf202509b926c914e92bd137700de
    So you pass in a Proc for the actiosn and use a Button component to share common classes
    LMK what you think and if that even works for what you're trying to do :P
    3 replies
    Stephen Dolan
    @stephendolan
    Here's the first LuckyCast that actually may help out some folks that frequent the Gitter on named slots: https://www.youtube.com/watch?v=KoiKOD63tRQ
    Still experimenting with tone, editing, and length, but pretty happy with how concise this one felt! Enjoy!
    Edward Loveall
    @edwardloveall
    nice work @stephendolan
    Paul Smith
    @paulcsmith
    Nice! I loved it! I enjoy that the page looks nice and was pretty surprised wehn all of a sudden the dashboard looked like a real (and beautiful dashboard!)
    I think maybe lining to what a Proc is and what the Void part is would be cool, but even as-is I think it is super helpful. Nice work!
    Stephen Dolan
    @stephendolan
    Ty! Haha yeah, all thanks to tailwindui.com :P
    Jeremy Woertink
    @jwoertink
    Wow! I love that these are short and sweet, but so clear and easy to digest
    Stephen Dolan
    @stephendolan
    I think I have to hit some arbitrary YouTube milestone to link out to external links (right now I can only link to vids), but I have a Trello card for diving into Procs and plan to add a little link in this video once it's published :)
    Jeremy Woertink
    @jwoertink
    Stephen Dolan
    @stephendolan
    No idea that even existed, thanks @jwoertink !
    It's hard because I'm not sure how much to "spam" the Crystal community at large with Lucky-specific screencasts
    (Don't worry, I'll have no mercy on this chat :wink: )
    Jeremy Woertink
    @jwoertink
    Yeah, if you look through that forum, you'll see other youtube vids that get posted. I'd say posting one a week would keep wanting more, and not make people feel overwhelmed
    yeah, spam our chat with these! :rocket:
    Stephen Dolan
    @stephendolan
    Cool, that's been the strategy so far! With work and house renovations I wouldn't be able to crank out more than one per week anyways :smile:
    But maybe one day....
    Paul Smith
    @paulcsmith
    @stephendolan Yeah I'd post to the Crystal stuff. Lucky is cool so Crystal people should like it :P 😂
    Also I'd be curious to hear what you think of the gist I posted. I haven't used it or the version you posted so I'd be very curious to hear which one you prefer and why so we can help explain the different approaches and pros/cons
    2 replies
    Paul Smith
    @paulcsmith
    @stephendolan in reference to https://gist.github.com/paulcsmith/180bf202509b926c914e92bd137700de where I used with_defaults similar to the Shared::Field component. This way the classes are set automatically which I think is kinda cool