Skip to content

Instantly share code, notes, and snippets.

@rwaldron
Created November 11, 2010 16:20

Revisions

  1. rwaldron revised this gist Sep 1, 2011. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,9 @@

    $ sudo /etc/init.d/apache2 start

    # Remy Sharp has a created a useful node based web server for use wherever node.js is available:

    https://github.com/remy/servedir


    # If you do not have git installed, check these out:
  2. rwaldron renamed this gist Aug 17, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. rwaldron renamed this gist Aug 17, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. rwaldron renamed this gist Aug 17, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. rwaldron revised this gist Aug 17, 2011. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -174,7 +174,11 @@

    # Example:

    http://localhost/jquery/test/?css:
    http://localhost/jquery/test/?filter=css

    or default MAMP:

    http://localhost:8888/test/?filter=css

    # this will only run the "css" module tests. This will significantly
    # speed up your development and debugging.
  6. rwaldron revised this gist Aug 17, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -188,9 +188,9 @@ http://localhost/jquery/test/?css:
    ** Supported Browsers :

    Chrome Current - 1
    Safari 3+
    Firefox 3.6.x, 5.0.x
    Firefox 3.6.x, 5.0.x, 6.0.x
    IE 6, 7, 8, 9
    Safari 5.0.x
    Opera Current - 1


  7. rwaldron revised this gist Aug 15, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -189,8 +189,8 @@ http://localhost/jquery/test/?css:

    Chrome Current - 1
    Safari 3+
    Firefox 3.6.x, 4.0.x, 5.0.x
    IE 6,7,8,9
    Firefox 3.6.x, 5.0.x
    IE 6, 7, 8, 9
    Opera Current - 1


  8. rwaldron revised this gist Jun 13, 2011. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -187,11 +187,11 @@ http://localhost/jquery/test/?css:

    ** Supported Browsers :

    Chrome Current-1
    Chrome Current - 1
    Safari 3+
    Firefox 3.0.12, 3.5, 3.6, 4
    IE 6, 7, 8, 9
    Opera Current-1
    Firefox 3.6.x, 4.0.x, 5.0.x
    IE 6,7,8,9
    Opera Current - 1



  9. rwaldron revised this gist Apr 27, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -137,7 +137,7 @@

    # Once you've staged all of your changed files, go ahead and commit them

    $ git commit -m "Bug #####; Brief description of fix"
    $ git commit -m "Brief description of fix, enhancement, whatevs. Fixes #####"

    # For a multiple line commit message, leave off the `-m "description"`.
    # You will then be led into vi to complete your commit message.
  10. rwaldron revised this gist Apr 11, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -190,7 +190,7 @@ http://localhost/jquery/test/?css:
    Chrome Current-1
    Safari 3+
    Firefox 3.0.12, 3.5, 3.6, 4
    IE 6+ (Will not fix IE9 bugs until real release)
    IE 6, 7, 8, 9
    Opera Current-1


  11. rwaldron revised this gist Apr 4, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    # There are some assumptions made here, one being that you're
    # set up with some form of "localhost" http server and that it's running.
    # - http://www.mamp.info/en/mamp/
    # - sudo apt-get install apache
    # - sudo apt-get install apache2

    # Get it running:
    # On Mac:
  12. rwaldron revised this gist Apr 3, 2011. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@
    # Specifically you'll probably end up doing something like this:


    $ git clone https://github.com/ry/node.git
    $ git clone https://github.com/joyent/node.git

    $ cd node

    @@ -41,6 +41,9 @@

    $ sudo make install

    # With homebrew on OSX, you can also:

    $ brew install node

    # Create a fork of the jQuery repo on github at http://github.com/jquery/jquery

  13. rwaldron revised this gist Jan 26, 2011. 1 changed file with 21 additions and 0 deletions.
    21 changes: 21 additions & 0 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -21,6 +21,27 @@
    # - http://help.github.com/linux-git-installation/


    # NEW!
    # If you do not have NodeJS installed please download the
    # code and follow the build instructions on your system:

    # - http://nodejs.org/#download
    # - http://nodejs.org/#build
    #
    # Specifically you'll probably end up doing something like this:


    $ git clone https://github.com/ry/node.git

    $ cd node

    $ ./configure

    $ make

    $ sudo make install


    # Create a fork of the jQuery repo on github at http://github.com/jquery/jquery


  14. rwaldron revised this gist Jan 10, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -167,7 +167,7 @@ Chrome Current-1
    Safari 3+
    Firefox 3.0.12, 3.5, 3.6, 4
    IE 6+ (Will not fix IE9 bugs until real release)
    Opera Current
    Opera Current-1



  15. rwaldron revised this gist Dec 22, 2010. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -115,6 +115,9 @@

    $ git commit -m "Bug #####; Brief description of fix"

    # For a multiple line commit message, leave off the `-m "description"`.
    # You will then be led into vi to complete your commit message.

    # Then, push your branch with the bug fix commits to your github fork

    $ git push origin -u bug_####
  16. rwaldron revised this gist Dec 22, 2010. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -21,6 +21,8 @@
    # - http://help.github.com/linux-git-installation/


    # Create a fork of the jQuery repo on github at http://github.com/jquery/jquery


    # Change directory to your web root directory, whatever that might be:

  17. rwaldron revised this gist Dec 22, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -162,7 +162,7 @@ Chrome Current-1
    Safari 3+
    Firefox 3.0.12, 3.5, 3.6, 4
    IE 6+ (Will not fix IE9 bugs until real release)
    Opera 11+
    Opera Current



  18. rwaldron revised this gist Dec 22, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -162,7 +162,7 @@ Chrome Current-1
    Safari 3+
    Firefox 3.0.12, 3.5, 3.6, 4
    IE 6+ (Will not fix IE9 bugs until real release)
    Opera 10.60+
    Opera 11+



  19. rwaldron revised this gist Nov 23, 2010. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -124,7 +124,11 @@





    # To send a Pull Request for your patch, go to http://github.com/you/jquery
    # Click "Switch Branches" and select the branch that has your patch.
    # Once the branch is loaded, click on "Pull Request". Be sure to include the
    # ticket #### in the subject, along with a brief description.



    @@ -144,7 +148,9 @@
    http://localhost/jquery/test/?css:

    # this will only run the "css" module tests. This will significantly
    # speed up your time spent debugging.
    # speed up your development and debugging.



    # ALWAYS RUN THE FULL SUITE BEFORE COMMITTING AND PUSHING A PATCH!!!
    # jQuery supports the following:
  20. rwaldron revised this gist Nov 23, 2010. 1 changed file with 14 additions and 6 deletions.
    20 changes: 14 additions & 6 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -120,18 +120,26 @@

    # Before you tackle your next bug patch, return to the master:

    # git checkout master
    $ git checkout master









    # Test Suite Tips...

    # During the process writing you patch and your ticket, you can narrow
    # the test suite down to the module you are testing by either double clicking
    # the title of the test or appending it to the url. The follwing examples
    # assume you're working on a local repo, hosted on your localhost server.
    # for example:
    # During the process of writing your patch, you will run the test suite MANY times.
    # You can speed up the process by narrowing the running test suite down to the
    # module you are testing by either double clicking the title of the test or
    # appending it to the url. The follwing examples assume you're working on a
    # local repo, hosted on your localhost server.


    # Example:

    http://localhost/jquery/test/?css:

  21. rwaldron revised this gist Nov 23, 2010. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -71,7 +71,8 @@


    # NEVER write your patches to the master branch - it gets messy (I say this from experience!)
    # Writing patches: Use a branch!
    #
    # ALWAYS USE A "TOPIC" BRANCH! Like so...
    #
    # #### = the ticket #

  22. rwaldron revised this gist Nov 23, 2010. 1 changed file with 18 additions and 3 deletions.
    21 changes: 18 additions & 3 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,24 @@
    # Tips for jQuery Bug Patching

    # There are some assumptions made here, one being that you're
    # set up with some form of "localhost" http server.
    # set up with some form of "localhost" http server and that it's running.
    # - http://www.mamp.info/en/mamp/
    # - sudo apt-get install apache

    # Get it running:
    # On Mac:

    $ python -m SimpleHTTPServer

    # On Linux:

    $ sudo /etc/init.d/apache2 start



    # If you do not have git installed, check these out:
    # - http://help.github.com/linux-git-installation/
    # - http://help.github.com/mac-git-installation/
    # - http://help.github.com/linux-git-installation/



    @@ -44,7 +54,12 @@
    # Open the jQuery test suite in a browser (I use Google Chrome,
    # change this to your preferred browser).


    # Linux
    $ google-chrome http://localhost/jquery/test

    # Mac
    $ open http://localhost/jquery/test


    # Success! You just built and tested jQuery!
    @@ -55,7 +70,7 @@
    # Fixing a bug from a ticket filed at bugs.jquery.com:


    # Never write your patches to the master branch - it gets messy (I say this from experience!)
    # NEVER write your patches to the master branch - it gets messy (I say this from experience!)
    # Writing patches: Use a branch!
    #
    # #### = the ticket #
  23. rwaldron revised this gist Nov 23, 2010. 1 changed file with 5 additions and 6 deletions.
    11 changes: 5 additions & 6 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -66,14 +66,13 @@

    # Create and checkout a new branch that includes the ticket #

    $ git branch bug_####
    $ git checkout bug_####

    # Alternate version:

    $ git checkout -b bug_####


    # ( Explanation: this useful command will:
    # "checkout" a "-b" (branch) by the name of "bug_####"
    # or create it if it doesn't exist )


    # Now you're on branch: bug_####

    # Open up files and make changes
  24. rwaldron revised this gist Nov 23, 2010. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,10 @@
    # Tips for jQuery Bug Patching

    # There are some assumptions made here, one being that you're
    # set up with a LAMP or MAMP running a "localhost" http server.
    # set up with some form of "localhost" http server.
    # - http://www.mamp.info/en/mamp/
    # - sudo apt-get install apache


    # If you do not have git installed, check these out:
    # - http://help.github.com/linux-git-installation/
  25. rwaldron revised this gist Nov 23, 2010. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -130,4 +130,8 @@ Chrome Current-1
    Safari 3+
    Firefox 3.0.12, 3.5, 3.6, 4
    IE 6+ (Will not fix IE9 bugs until real release)
    Opera 10.60+
    Opera 10.60+



    # Feel free to add YOUR tips in the comment section below!
  26. rwaldron revised this gist Nov 23, 2010. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -34,6 +34,10 @@

    $ make

    # I like to run "make clean" before any bug fixing sessions
    # This ensures that you're running the most recent Sizzle and QUnit


    # Open the jQuery test suite in a browser (I use Google Chrome,
    # change this to your preferred browser).

  27. rwaldron revised this gist Nov 23, 2010. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -96,6 +96,10 @@
    $ git push origin -u bug_####


    # Before you tackle your next bug patch, return to the master:

    # git checkout master




  28. rwaldron revised this gist Nov 23, 2010. 1 changed file with 51 additions and 29 deletions.
    80 changes: 51 additions & 29 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -9,76 +9,98 @@



    # cd to your web root directory, whatever that might be:

    # Change directory to your web root directory, whatever that might be:

    $ cd /path/to/your/www/root/


    # clone your jQuery fork to work locally

    # Clone your jQuery fork to work locally

    $ git clone git@github.com:username/jquery.git


    # cd to the newly created dir jquery/
    # Change directory to the newly created dir jquery/

    $ cd jquery

    # Add the jQuery master as a remote, I label mine "upstream"

    $ git remote add upstream git://github.com/jquery/jquery.git

    # Get in the habit of pulling in the "upstream" master to stay
    # up to date as jQuery receives new commits

    $ git pull upstream master

    # Build the jQuery source

    $ make

    # Open the jQuery test suite in a browser (I use Google Chrome,
    # change this to your preferred browser).

    $ firefox http://localhost/jquery/test
    $ google-chrome http://localhost/jquery/test


    # Success! You just built and tested jQuery!

    #BAM!


    # Additional Stuff That IS Really Useful:

    # Overcome your emotional attachment to your local jquery repo
    $ git pull upstream master --force
    # or just...
    $ git pull upstream master
    # Fixing a bug from a ticket filed at bugs.jquery.com:

    # Never write your patches to the master branch - it gets messy.

    # Never write your patches to the master branch - it gets messy (I say this from experience!)
    # Writing patches: Use a branch!
    # XXXX = the ticket #
    #
    # #### = the ticket #

    # Make sure you start with your up-to-date master

    $ git branch bug_XXXX
    $ git checkout bug_XXXX
    $ git checkout master

    # or...
    # Create and checkout a new branch that includes the ticket #

    $ git checkout -b bug_XXXX
    $ git branch bug_####
    $ git checkout bug_####

    #now you're on branch: bug_XXXX
    # Alternate version:

    $ git checkout -b bug_####


    # Now you're on branch: bug_####

    # Open up files and make changes
    # Open up the corresponding /test/unit/file.js and add unit tests

    # Open up the corresponding /test/unit/?????.js and add unit tests

    # Run http://localhost/jquery/test --> ALL TESTS MUST PASS **

    # Once you're satisfied with your patch...

    # stage the files to be tracked:
    $ git add filename
    # Stage the files to be tracked:


    $ git add filename

    # (you can use "git status" to list the files you've changed)


    # ( I recommend NEVER, EVER using "git add . " )

    # Once you've staged all of your changed files, go ahead and commit them

    $ git commit -m "Bug #####; Brief description of fix"

    # Then, push your branch with the bug fix commits to your github fork

    $ git push origin -u bug_####


    # (I recommend NEVER, EVER using "git add . ")

    $ git commit -m "Bug #XXXX; Brief description of fix"

    # this pushes your newly created branch and the commits to your github fork
    $ git push origin -u bug_XXXX

    # Test Suite Tips...

    # Test suite tips...
    # During the process writing you patch and your ticket, you can narrow
    # the test suite down to the module you are testing by either double clicking
    # the title of the test or appending it to the url. The follwing examples
  29. rwaldron revised this gist Nov 23, 2010. 1 changed file with 29 additions and 8 deletions.
    37 changes: 29 additions & 8 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -1,20 +1,41 @@
    # Tips for jQuery Bug Patching

    # assuming you're set up with a LAMP or MAMP running a http://localhost
    # There are some assumptions made here, one being that you're
    # set up with a LAMP or MAMP running a "localhost" http server.

    $ cd /path/to/your/www/root/
    # If you do not have git installed, check these out:
    # - http://help.github.com/linux-git-installation/
    # - http://help.github.com/mac-git-installation/

    $ git clone git@github.com:username/jquery.git

    $ cd jquery

    $ git remote add upstream git://github.com/jquery/jquery.git
    # cd to your web root directory, whatever that might be:

    $ git pull upstream master

    $ make
    $ cd /path/to/your/www/root/


    # clone your jQuery fork to work locally


    $ git clone git@github.com:username/jquery.git


    # cd to the newly created dir jquery/

    $ cd jquery


    $ git remote add upstream git://github.com/jquery/jquery.git


    $ git pull upstream master


    $ make

    $ firefox http://localhost/jquery/test

    $ firefox http://localhost/jquery/test


    #BAM!
  30. rwaldron created this gist Nov 11, 2010.
    82 changes: 82 additions & 0 deletions jquery-patching-tips.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,82 @@
    # Tips for jQuery Bug Patching

    # assuming you're set up with a LAMP or MAMP running a http://localhost

    $ cd /path/to/your/www/root/

    $ git clone git@github.com:username/jquery.git

    $ cd jquery

    $ git remote add upstream git://github.com/jquery/jquery.git

    $ git pull upstream master

    $ make

    $ firefox http://localhost/jquery/test


    #BAM!


    # Additional Stuff That IS Really Useful:

    # Overcome your emotional attachment to your local jquery repo
    $ git pull upstream master --force
    # or just...
    $ git pull upstream master

    # Never write your patches to the master branch - it gets messy.

    # Writing patches: Use a branch!
    # XXXX = the ticket #

    $ git branch bug_XXXX
    $ git checkout bug_XXXX

    # or...

    $ git checkout -b bug_XXXX

    #now you're on branch: bug_XXXX

    # Open up files and make changes
    # Open up the corresponding /test/unit/file.js and add unit tests
    # Run http://localhost/jquery/test --> ALL TESTS MUST PASS **
    # Once you're satisfied with your patch...

    # stage the files to be tracked:
    $ git add filename

    # (I recommend NEVER, EVER using "git add . ")

    $ git commit -m "Bug #XXXX; Brief description of fix"

    # this pushes your newly created branch and the commits to your github fork
    $ git push origin -u bug_XXXX


    # Test suite tips...
    # During the process writing you patch and your ticket, you can narrow
    # the test suite down to the module you are testing by either double clicking
    # the title of the test or appending it to the url. The follwing examples
    # assume you're working on a local repo, hosted on your localhost server.
    # for example:

    http://localhost/jquery/test/?css:

    # this will only run the "css" module tests. This will significantly
    # speed up your time spent debugging.

    # ALWAYS RUN THE FULL SUITE BEFORE COMMITTING AND PUSHING A PATCH!!!
    # jQuery supports the following:


    ** Supported Browsers :

    Chrome Current-1
    Safari 3+
    Firefox 3.0.12, 3.5, 3.6, 4
    IE 6+ (Will not fix IE9 bugs until real release)
    Opera 10.60+