profile
viewpoint
Koen Punt koenpunt Utrecht NL https://koen.pt Full stack web & mobile developer, available for a new challenge.

harvesthq/chosen 22185

Deprecated - Chosen is a library for making long, unwieldy select boxes more friendly.

jpfuentes2/php-activerecord 1314

ActiveRecord implementation for PHP

dannyvankooten/AltoRouter 996

PHP routing class. Lightweight yet flexible. Supports REST, dynamic and reversed routing.

ivalkeen/capistrano-nginx 51

Simple nginx management with capistrano

harvesthq/chosen-package 28

NOTE: This package-manager-friendly version of Chosen is automatically generated from TravisCI. Please send ALL PR's to the canonical Chosen repo:

koenpunt/a11y-service 23

a11y as a service

fetch/php-activerecord 1

ActiveRecord implementation for PHP

koenpunt/AltoRouter 1

Alternative routing class for PHP5.3+, supports REST, reversed routing, dynamic routes and more.

koenpunt/bootstrap-timepicker 1

A simple timepicker component for Twitter Bootstrap

chosen-bot/chosen-no-carrier 0

NO CARRIER - Issue maintainer for Chosen repo

delete branch koenpunt/puma-dev

delete branch : patch-1

delete time in 15 hours

push eventkoenpunt/puma-dev

Koen Punt

commit sha 615ccfd925d3864352abb7ee885553fd45f9b548

Update README.md

view details

push time in 15 hours

PR opened puma/puma-dev

add support for .pumaenv file

Since using .powenv feels wrong, since this is not pow, and .env conflicts with Docker's default .env loading (Docker only supports plain variable assignments), I figured it might be good to have a Puma-named env file.

+5 -0

0 comment

2 changed files

pr created time in 15 hours

push eventkoenpunt/puma-dev

Koen Punt

commit sha 26ff2ef1b6f0ea529724c3b33e288f673864b402

add support for .pumaenv file Since using `.powenv` feels wrong, since this is not pow, and `.env` conflicts with Docker's default `.env` loading (Docker only supports plain variable assignments), I figured it might be good to have a Puma-named env file.

view details

push time in 15 hours

PR opened mollie/mollie-api-node

include `expiresAt` in order creation parameters

According to the documentation you can pass expiresAt when creating an order.

https://docs.mollie.com/reference/v2/orders-api/create-order#parameters

+1 -1

0 comment

1 changed file

pr created time in 2 days

push eventkoenpunt/mollie-api-node

Koen Punt

commit sha 3672a58601d553ad35e4b34eede9adc885572856

include `expiresAt` in order creation parameters According to the documentation you can pass `expiresAt` when creating an order. https://docs.mollie.com/reference/v2/orders-api/create-order#parameters

view details

push time in 2 days

fork koenpunt/ios-empty-application-xcode-template

🙈 An empty iOS application project template without a storyboard for Xcode 11.

fork in 4 days

issue commentrails/rails

Invalid cache results of Active Record records

I'll see if I can make a same app with reproduction, but I think it's going to be difficult, since it is intermittent..

koenpunt

comment created time in 5 days

issue commentrails/rails

Invalid cache results of Active Record records

After having the code running for sometime without using Rails.cache in the controller, the problem arises again.

the issue might be passing a relation to Jbuilder's cache! method.

But that is supposed to work, passing a relation to Jbuilder's cache! method, right?

koenpunt

comment created time in 5 days

issue openedrails/rails

Invalid cache results of Active Record records

Steps to reproduce

I don't know if this is consistently reproducible, but I like to bring this issue under attention to see if someone knows what's going on.

My Rails (6.0.3.1) application has a controller:

class TagsController < ApplicationController
  def batch
    ids = params.require(:ids).split(',').sort
    @tags = Rails.cache.fetch(['tags-batch', ids], expires_in: 1.day) do
      Tag.where('id IN(?)', ids).load
    end
    respond_with @tags
  end
end

With the following views:

# batch.json.jbuilder
json.cache! @tags do
  json.tags @tags, partial: 'tags/tag', as: :tag
end

# _tag.json.jbuilder
json.extract! tag, :id, :body, :slug

And since the tag ids in this batch call are arbitrary, I've added the Rails.cache block around it.

Expected behavior

It should render a JSON object like:

{
  "tags": [
    {
      "id": 2171,
      "body": "mislukt",
      "slug": "mislukt"
    },
    {
      "id": 2961,
      "body": "maandag",
      "slug": "maandag"
    },
    {
      "id": 8791,
      "body": "fail",
      "slug": "fail"
    }
  ]
}

Actual behavior

It sometimes resulted in (note the null for id):

{
  "tags": [
    {
      "id": null,
      "body": "mislukt",
      "slug": "mislukt"
    },
    {
      "id": null,
      "body": "maandag",
      "slug": "maandag"
    },
    {
      "id": null,
      "body": "fail",
      "slug": "fail"
    }
  ]
}

Since this is running with multiple instances I'm not entirely sure if this is only happening on a single instance, but what I do know, is that when I remove the Rails.cache block, it works as expected.

System configuration

Rails version: 6.0.3.1

Ruby version: 2.6.5p114

created time in 5 days

delete branch koenpunt/DefinitelyTyped

delete branch : patch-2

delete time in 6 days

delete branch koenpunt/simplecov-html

delete branch : csp

delete time in 8 days

startedbeberlei/env

started time in 8 days

issue commentkoenpunt/php-inflector

Project status

It's not actively developed, but I believe it is still working fine.

peter279k

comment created time in 9 days

pull request commentrspec/rspec-rails

Check if TestCase responds to the fixture_path setter

Yeah I am, fixture_file_upload method doesn't work in my Rails 6 application

koenpunt

comment created time in 9 days

startedvaleriansaliou/sonic

started time in 9 days

issue openedjordwest/news-feed-eradicator

Feature request: Hide stories bar

Having a configuration option to also hide the stories bar from the homepage would be neat.

created time in 9 days

pull request commentrspec/rspec-rails

Check if TestCase responds to the fixture_path setter

I think so, will have a look tonight.

koenpunt

comment created time in 9 days

PR opened rspec/rspec-rails

Check if TestCase responds to the fixture_path setter

The existence of the getter doesn't mean there's also a setter, so this resulted in failures like the following:

1) Admin::CollectionsController POST #create creates a record
     Failure/Error: banner_image: fixture_file_upload('alpaca.jpg', 'image/jpg')

     NoMethodError:
       undefined method `fixture_path=' for ActionController::TestCase:Class
       Did you mean?  fixture_path
+1 -1

0 comment

1 changed file

pr created time in 9 days

push eventkoenpunt/rspec-rails

Koen Punt

commit sha bf83411248472e20966c35b5e801ab08641a616e

check if TestCase responds to the fixture_path setter The existence of the getter doesn't mean there's also a setter

view details

push time in 9 days

issue commentjpfuentes2/php-activerecord

php-activerecord 1.2

There's 1.2-dev branch that probably contains the latest code.

techprogrammer

comment created time in 13 days

delete tag unitedwardrobe/graphql-middleware-error-handler

delete tag : v0.3.0

delete time in 22 days

push eventunitedwardrobe/graphql-middleware-error-handler

Koen Punt

commit sha 243082f5700b4e671b8d9ae7b70caa5119ddd979

make return value of the error handler optional

view details

Koen Punt

commit sha 02a5dbfb97318777646d9c6440c13528e0410e2c

0.4.1

view details

push time in 22 days

created tagunitedwardrobe/graphql-middleware-error-handler

tagv0.3.0

Generic GraphQL middleware to handle errors that happen in resolvers.

created time in 22 days

created tagunitedwardrobe/graphql-middleware-error-handler

tagv0.4.1

Generic GraphQL middleware to handle errors that happen in resolvers.

created time in 22 days

created tagunitedwardrobe/graphql-middleware-error-handler

tagv0.4.0

Generic GraphQL middleware to handle errors that happen in resolvers.

created time in 22 days

delete tag unitedwardrobe/graphql-middleware-error-handler

delete tag : v0.4.0

delete time in 22 days

delete tag unitedwardrobe/graphql-middleware-error-handler

delete tag : v0.3.0

delete time in 22 days

created tagunitedwardrobe/graphql-middleware-error-handler

tagv0.4.0

Generic GraphQL middleware to handle errors that happen in resolvers.

created time in 22 days

push eventunitedwardrobe/graphql-middleware-error-handler

Koen Punt

commit sha f8d8b6c55a5108704fadca25e036013e130a677c

update dependencies

view details

Koen Punt

commit sha c53aa413b3f06f6ad567a030342a28544559ea1a

add prepublish script

view details

Koen Punt

commit sha 73fe1f1a6611edd9970d7738f652df73baa6c3cb

0.4.0

view details

push time in 22 days

Pull request review commentDefinitelyTyped/DefinitelyTyped

apple-signin-api: Make client config properties optional, add nonce

 declare namespace AppleSignInAPI {     }     // https://developer.apple.com/documentation/signinwithapplejs/authi     interface AuthI {-        init: (config: ClientConfigI) => Promise<void>;-        signIn: (signInConfig?: ClientConfigI) => Promise<SignInResponseI | SignInErrorI>;+        init: (config: ClientConfigI) => void;+        signIn: (signInConfig?: ClientConfigI) => Promise<SignInResponseI>;

The error type of a promise can't be specified, and it will never resolve with the error, so having the type specified doesn't do anything.

koenpunt

comment created time in 22 days

Pull request review commentDefinitelyTyped/DefinitelyTyped

apple-signin-api: Make client config properties optional, add nonce

 declare namespace AppleSignInAPI {     }     // https://developer.apple.com/documentation/signinwithapplejs/authi     interface AuthI {-        init: (config: ClientConfigI) => Promise<void>;-        signIn: (signInConfig?: ClientConfigI) => Promise<SignInResponseI | SignInErrorI>;+        init: (config: ClientConfigI) => void;+        signIn: (signInConfig?: ClientConfigI) => Promise<SignInResponseI>;         renderButton: () => void;     }     // https://developer.apple.com/documentation/signinwithapplejs/clientconfigi     interface ClientConfigI {-        clientId: string;-        redirectURI: string;-        scope: string;-        state: string;-        usePopup: boolean;+        clientId?: string;+        redirectURI?: string;+        scope?: string;+        state?: string;+        nonce?: string;+        usePopup?: boolean;

All these options are optional, because they can also be specified in meta tags: https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/configuring_your_webpage_for_sign_in_with_apple#3235722

koenpunt

comment created time in 22 days

push eventkoenpunt/DefinitelyTyped

Koen Punt

commit sha a7092549d39217e81d54845a968622e9c184394f

[apple-signin-api] Make client config properties optional, add nonce

view details

push time in 22 days

push eventkoenpunt/DefinitelyTyped

Yves Kaufmann

commit sha b24f548fb1303da206249f29d87a2062e9f17a51

🤖 Merge PR #44647 [koa-router] Fix: Param context type don't follows router context type by @yveskaufmann The context parameter of the param method, don't takes the Context type of the router into account, but it is always the default context. This leads to the type errors, if you try to access a customer properties from the context.

view details

Eloy Durán

commit sha ec53e42ae41f202f1f83bea94126a717a1848414

[react-native] Remove accessibilityStates (#44717) This was removed in v0.62: https://github.com/facebook/react-native/commit/7b35f427fd66cb0f36921b992095fe5b3c14d8b9

view details

Alan Kenyon

commit sha fc8478c7cc45f20eff9295e6ccef0e394f4e81be

updates to type def's and tests (#44682)

view details

Koen Punt

commit sha d7038fd83e7fe39e527c7d778f6d71acc3497c39

[apple-signin-api] Make client config properties optional, add nonce

view details

Koen Punt

commit sha 94ad7505cf45b6b403490351643a7243d800cd84

[apple-signin-api] update tests

view details

push time in 22 days

push eventkoenpunt/DefinitelyTyped

Koen Punt

commit sha b1dee3dcc1ff27738dc57d9d5b11510ad4fa0787

[apple-signin-api] Make client config properties optional, add nonce

view details

Koen Punt

commit sha ed618f09bcdc675bbb1220c76657cffd7eabcccf

[apple-signin-api] update tests

view details

push time in 22 days

push eventunitedwardrobe/graphql-middleware-error-handler

Koen Punt

commit sha ac0204f6d465e3b31c57e3b751c44be070b93609

fix option descriptions

view details

push time in 22 days

created tagunitedwardrobe/graphql-middleware-error-handler

tagv0.3.0

Generic GraphQL middleware to handle errors that happen in resolvers.

created time in 22 days

push eventunitedwardrobe/graphql-middleware-error-handler

Koen Punt

commit sha c33099008d3f62b949366e6221b690a4ebd077ff

0.3.0

view details

push time in 22 days

delete branch unitedwardrobe/graphql-middleware-error-handler

delete branch : async-handling

delete time in 22 days

push eventunitedwardrobe/graphql-middleware-error-handler

Rem Smiers

commit sha cf05f2275729911386a0bf3281e0327b89bed06d

Support asynchronous error handling (#2)

view details

push time in 22 days

PR merged unitedwardrobe/graphql-middleware-error-handler

Support asynchronous error handling

This PR allows the error handler to be asynchronous. This can be useful for handlers that alter the error, middleware that needs to run before returning the error and makes testing asynchronous error middleware easier.

+6 -3

4 comments

1 changed file

remq

pr closed time in 22 days

PR opened DefinitelyTyped/DefinitelyTyped

apple-signin-api: Make client config properties optional, add nonce

Please fill in this template.

  • [x] Use a meaningful title for the pull request. Include the name of the package modified.
  • [ ] Test the change in your own code. (Compile and run.)
  • [ ] Add or edit tests to reflect the change. (Run with npm test.)
  • [x] Follow the advice from the readme.
  • [x] Avoid common mistakes.
  • [ ] Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If adding a new definition:

  • [x] The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • [x] If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
  • [x] Create it with dts-gen --dt, not by basing it on an existing project.
  • [x] Represents shape of module/library correctly
  • [x] tslint.json should be present and it shouldn't have any additional or disabling of rules. Just content as { "extends": "dtslint/dt.json" }. If for reason the some rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.
  • [x] tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

If changing an existing definition:

  • [ ] Provide a URL to documentation or source code which provides context for the suggested changes: <<url here>>
  • [ ] If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • [ ] Include tests for your changes
  • [ ] If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.

If removing a declaration:

  • [ ] If a package was never on DefinitelyTyped, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • [ ] Delete the package's directory.
  • [ ] Add it to notNeededPackages.json.
+10 -6

0 comment

1 changed file

pr created time in 22 days

push eventkoenpunt/DefinitelyTyped

Koen Punt

commit sha 121fd015fd732202e3018f8614f15aaef8354e56

Make client config properties optional, add nonce

view details

push time in 22 days

pull request commentDefinitelyTyped/DefinitelyTyped

Add definitions for apple-signin-api

I've now added a custom declaration, but I think it's supposed to work straight away?

declare var AppleID: AppleSignInAPI.AppleID;
voidpumpkin

comment created time in 23 days

pull request commentDefinitelyTyped/DefinitelyTyped

Add definitions for apple-signin-api

Thanks for this, but how am I supposed to use this?

voidpumpkin

comment created time in 23 days

pull request commentunitedwardrobe/graphql-middleware-error-handler

Support asynchronous error handling

It isn't. You're right, awaiting that function shouldn't be necessary.

It is, since you can modify the error in the handler, and then if it's not awaited, the error is passed on without the modifications.

remq

comment created time in 24 days

pull request commentunitedwardrobe/graphql-middleware-error-handler

Support asynchronous error handling

Would it be possible to add a description to this PR?

remq

comment created time in a month

PR opened GriffinLedingham/php-apple-signin

restore composer package name

this was probably unintentionally changed

+1 -1

0 comment

1 changed file

pr created time in a month

push eventkoenpunt/php-apple-signin

Koen Punt

commit sha b5b192c80779d79ef6bcfd8ae5787efe709816af

restore composer package name this was probably unintentionally changed

view details

push time in a month

PR opened koenpunt/php-apple-signin

add client id methods
+8 -0

0 comment

1 changed file

pr created time in a month

create barnchkoenpunt/php-apple-signin

branch : client-id

created branch time in a month

fork koenpunt/php-apple-signin

🗝 Decode Apple Sign In client tokens in PHP

fork in a month

issue closeddannyvankooten/AltoRouter

How to implement put,delete method?

How to use other method such as put,delete and patch. I tried several times but failed. Could you give me an example of put and patch method ?

My Code:

       $router->map('PUT','/employee/update/[i:id]', 'EmployeeController@update');

Form:

         <form method="post" action="//127.0.0.1/employee/update/1">
               <input type="hidden" name="_method" value="put" />
               <input type="text" name="age" value="25" />
               <input type="submit" value="Update" />
         </form>

But it works when I changed router map put to post.

closed time in a month

kabircse

startedrobertofrontado/SwiftDI

started time in a month

push eventkoenpunt/covid19-cli

Koen Punt

commit sha 7ccb293495d1a04e89cab3a9eb2b47d06370887b

remove duplicate `cd` from build steps

view details

push time in 2 months

fork koenpunt/covid19-cli

Corona Virus (Covid 19) BASH Tracking CLI

fork in 2 months

issue commentunitedwardrobe/imgproxy-node

Documentation

Thank you for this. It would probably be best to add these as docblocks to the methods in builder, and generate documentation from it, instead of manually writing it out in the README.

(why string?)

Because dpr can be a float, but float precision in javascript sucks.

Grawl

comment created time in 2 months

pull request commentfacebook/react

Filter certain DOM attributes (e.g. src) if value is empty string

I'm wondering why it would be necessary to filter these?

bvaughn

comment created time in 2 months

starteddeliverybot/deliverybot

started time in 2 months

pull request commentnaoufal/react-native-safari-view

Adding new functionalities

I don't feel much for adding the functionality of hiding the view, since it's a too specific use case, and some would even call it a hack.

And for the isInit method, wouldn't it be more efficient to keep track of that in the JS code of where you're consuming this library?

gilador

comment created time in 2 months

startedapollographql/apollo-ios

started time in 2 months

delete branch koenpunt/puma-dev

delete branch : patch-1

delete time in 2 months

more