Skip to content

Instantly share code, notes, and snippets.

View wildmaples's full-sized avatar

Maple Ong wildmaples

View GitHub Profile
@wildmaples
wildmaples / forward_proxy_benchmark.rb
Last active January 19, 2021 19:17
Benchmarking `forward_proxy` gem
require 'forward_proxy'
require 'benchmark/ips'
require 'timeout'
require 'webmock'
include WebMock::API
# define a fake TCP server
class FakeTCPServer
def initialize(*)
# who cares
@wildmaples
wildmaples / packwerk_check
Created September 21, 2020 19:58
Sample output for `packwerk check`
/Users/mapleong/src/github.com/Shopify/shopify/components/online_store/app/controllers/shop_controller.rb:123:4
Privacy violation: '::RetailStore' is private to 'components/retail' but referenced from 'components/online_store'.
Is there a public entrypoint in 'components/retail/app/public/' that you can use instead?
Inference details: '::RetailStore' refers to ::RetailStore which seems to be defined in components/retail/app/models/retail_store.rb.
To receive help interpreting or resolving this error message, see: https://github.com/Shopify/packwerk/blob/master/TROUBLESHOOT.md#Troubleshooting-violations
1 offense detected
@wildmaples
wildmaples / deprecated_references.yml
Created September 21, 2020 19:44
List of deprecated references for components/online_store
# This file contains a list of dependencies that are not part of the long term plan for components/shop_mover.
# We should generally work to reduce this list, but not at the expense of actually getting work done.
#
# You can regenerate this file using the following command:
#
# bundle exec packwerk update components/online_store
---
components/retail:
"::RetailStore":
violations:
@wildmaples
wildmaples / package.yml
Created September 21, 2020 19:40
Example package.yml
enforce_privacy: true
enforce_dependencies: true
dependencies:
- components/shop_identity
- components/platform
metadata:
stewards:
- "@online_store"
slack_channels: