profile
viewpoint
Ben Sheldon [he/him] bensheldon San Francisco, CA http://island94.org

bensheldon/adopt-an-institution 3

A Ruby on Rails application that allows citizens to "adopt" civic infrastructure, such as fire hydrants.

bensheldon/broadbandusa-scraper 2

Converts the BroadbandUSA BIP/BTOP database into a useable TSV

bensheldon/311labs 1

Pushing the boundaries of civic data - one service request at a time.

bensheldon/alexandmelisa 1

Wedding website for my bro

bensheldon/alltherightpeople 1

A participatory-planning tool for small nonprofits and community entrepreneurs.

bensheldon/backbonetutorials 1

As single page apps and large scale javascript applications become more prominent on the web, useful resources for those developers who are jumping the ship are crucial.

bensheldon/badgemanship 1

A dumb project tracking karma and badges

created repositorymrotondo/advent-of-code-2020

created time in 13 hours

startedcnuernber/libjulia-clj

started time in a day

PR opened bensheldon/good_job

Fix job ordering.

In Rails 6.1 it throws error: Query method called with non-attribute argument(s): "COALESCE(scheduled_at, created_at) DESC" It was printing a warning about it in Rails 6.0.

Sorry for not including spec - I had issues with setting up system specs.

BTW, Rails 6.1 is around the corner https://weblog.rubyonrails.org/2020/12/1/Rails-6-1-rc2-release/ so I guess we could extend appraisal to 6.1

+1 -1

0 comment

1 changed file

pr created time in a day

startednektos/act

started time in 2 days

startedosresearch/papercraft

started time in 3 days

startedankane/tensorflow

started time in 4 days

pull request commentbensheldon/good_job

UI: Admin UI with filters and space efficient layout

@zealot128 Thank you for the contribution. This is a very nice improvement.

I have two suggestions, but I'm willing to merge this as is and accept the improvements as later PRs:

1. I think the filters should always be visible, even if there are no jobs. Currently they disappear if a filter is selected that results in no jobs.

2. When a filter is selected, the link button should be in an active state with `active` class

@bensheldon Good suggestions! I've updated the branch. It now looks like this:

Bildschirmfoto 2020-11-29 um 14 23 16

zealot128

comment created time in 4 days

startedbensheldon/good_job

started time in 6 days

startedbensheldon/good_job

started time in 8 days

startedbensheldon/good_job

started time in 8 days

startedko1/ruby

started time in 8 days

startedamatsuda/heavens_door

started time in 9 days

startedlalitkapoor/github-changes

started time in 9 days

startedmist64/geowrite

started time in 10 days

Pull request review commentbensheldon/good_job

UI: Admin UI with filters and space efficient layout

 module GoodJob   class DashboardsController < GoodJob::BaseController+    class JobFilter+      attr_accessor :params+      def initialize(params)+        @params = params+      end++      def last+        @last ||= jobs.last+      end++      def jobs+        sql = GoodJob::Job.display_all(after_scheduled_at: params[:after_scheduled_at], after_id: params[:after_id])+          .limit(params.fetch(:limit, 10))+        if params[:job_class]+          sql = sql.where("serialized_params->>'job_class' = ?", params[:job_class])+        end+        if params[:state]+          case params[:state]+          when 'finished'+            sql = sql.finished+          when 'unfinished'+            sql = sql.unfinished+          when 'errors'+            sql = sql.where.not(error: nil).count

oh, copy&paste error from the facets. fixed it.

zealot128

comment created time in 11 days

Pull request review commentbensheldon/good_job

UI: Admin UI with filters and space efficient layout

 module GoodJob   class DashboardsController < GoodJob::BaseController+    class JobFilter+      attr_accessor :params+      def initialize(params)+        @params = params+      end++      def last+        @last ||= jobs.last+      end++      def jobs+        sql = GoodJob::Job.display_all(after_scheduled_at: params[:after_scheduled_at], after_id: params[:after_id])+          .limit(params.fetch(:limit, 10))+        if params[:job_class]+          sql = sql.where("serialized_params->>'job_class' = ?", params[:job_class])+        end+        if params[:state]+          case params[:state]+          when 'finished'+            sql = sql.finished+          when 'unfinished'+            sql = sql.unfinished+          when 'errors'+            sql = sql.where.not(error: nil).count

I believe the count should not be added

zealot128

comment created time in 11 days

PR opened bensheldon/good_job

UI: Admin UI with filters and space efficient layout

Happy to see a basic admin layout. Some changes I might propose

  • container-fluid instead of container - Very useful for larger tables..., table-sm to preserve whitespace for a more space efficient table
  • Basic filter for: Job classes and finished/unfinished fields

Not sure where to put the filter ruby class from the code perspective.

Bildschirmfoto 2020-11-22 um 20 10 36

+79 -8

0 comment

4 changed files

pr created time in 11 days

fork zealot128/good_job

Multithreaded, Postgres-based, ActiveJob backend for Ruby on Rails.

fork in 11 days

startedacademind/clean-code-course-code

started time in 11 days

startedupptime/upptime

started time in 14 days

startedbensheldon/good_job

started time in 15 days

startedrack/rack-attack

started time in 15 days

startedbensheldon/good_job

started time in 18 days

startedbensheldon/good_job

started time in 18 days

startedbensheldon/good_job

started time in 21 days

startedbensheldon/good_job

started time in 21 days

startedbensheldon/good_job

started time in 21 days

startedbensheldon/good_job

started time in 21 days

fork mchristen/good_job

Multithreaded, Postgres-based, ActiveJob backend for Ruby on Rails.

fork in 22 days

startedbensheldon/good_job

started time in 22 days

more