Skip to content

Instantly share code, notes, and snippets.

@anaerobeth
Forked from peterwmwong/oo-support.md
Created January 8, 2014 18:22
Show Gist options
  • Save anaerobeth/8321685 to your computer and use it in GitHub Desktop.
Save anaerobeth/8321685 to your computer and use it in GitHub Desktop.

Setup

Git

  1. Download, Install, and setup Git
  2. Get access to https://github.com/opinionlab/oo-support
  • Ask Ray Saller
  1. Clone the the oo-support git repo.
  • > git clone git@github.com:opinionlab/oo-support.git

Chares Proxy

  1. Download http://www.charlesproxy.com/download/

Modifying a client's configuration

  1. Git the latest code
  • > cd /path/to/git/repo
  • > git pull
  1. Navigate to client directory
  • > cd client_sid
  1. Locate all related OO-code files...
  • Configuration: oo_conf.js
  • Engine: oo_engine.min.js
  • CSS: oo_style.css

Fake testing on the client's site

If the clients site and all the pages that need the OO-code are accessible, it maybe possible to test the configuration as if it were deployed on their site. This allow us to flesh out alot of bugs ahead of time and do testing before we send anything to the client. Hopefully to reduce the back and forth and headaches between the client.

The goal is be able to visit our client's website with the OO-code served from our computer. Allowing to quickly make changes and see the results without asking the client to setup, make available and deploy our code everytime we want make changes while developing a solution for them.

To do this we're going to use Charles Proxy to intercept all web requests and only replace the OO-code with the one from our computer.

  1. Open Charles proxy
  2. Tools > Map Local...
  3. Add rules to route all related OO-code files (TODO: add screenshot)
  • Here's an example of mapping the oo_conf.js
    • Map From
      • Protocol:
      • Host: <leave blank or client's domain>
      • Port:
      • Path: */oo_conf.js
    • Map To
      • Local Path:
  1. Click "OK"
  2. Click "OK" again
  3. Open a browser (like Chrome)
  4. Navigate to the client's website
  5. Verify the OO-code from the repo is being used instead of the one from the client's website. Sometimes it's obvious, but if it isn't...
  6. Open Chrome dev tools
  7. Open the "Network" tab
  8. Hit Refresh to populate
  9. Find the web request for an OO-code file (like oo_engine.min.js)
  10. Verify it was found (not 404-ed)
  11. Verify it's the one from the repo * You might need to make small comment or modification to the repo version so you can tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment