├── .gitignore
├── .jshintrc
├── .travis.yml
├── Gruntfile.js
├── LICENSE
├── backbone.queryparams-1.1-shim.js
├── backbone.queryparams.js
├── backbone.queryparams.min.js
├── backbone.queryparams.min.map
├── bower.json
├── lib
└── compiler.jar
├── package.json
├── readme.md
├── release-notes.md
└── test
├── backbone-1.1
├── LICENSE
├── backbone.js
└── test
│ ├── collection.js
│ ├── environment.js
│ ├── events.js
│ ├── index.html
│ ├── model.coffee
│ ├── model.js
│ ├── noconflict.js
│ ├── router.js
│ ├── sync.js
│ └── view.js
├── backbone.query.params-test.js
├── backbone
├── LICENSE
├── backbone.js
└── test
│ ├── collection.js
│ ├── environment.js
│ ├── events.js
│ ├── index.html
│ ├── model.coffee
│ ├── model.js
│ ├── noconflict.js
│ ├── router.js
│ ├── sync.js
│ ├── test-zepto.html
│ ├── vendor
│ ├── jquery.js
│ ├── json2.js
│ ├── qunit.css
│ ├── qunit.js
│ ├── runner.js
│ ├── underscore.js
│ └── zepto-0.6.js
│ └── view.js
├── test-1.1.html
└── test.html
/.gitignore:
--------------------------------------------------------------------------------
1 | .project
2 | .settings
3 | node_modules/
4 | sauce_connect.log*
5 |
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": false,
3 | "esnext": false,
4 | "browser": true,
5 | "bitwise": true,
6 | "curly": true,
7 | "eqeqeq": false,
8 | "forin": true,
9 | "immed": false,
10 | "latedef": false,
11 | "newcap": true,
12 | "noarg": true,
13 | "noempty": true,
14 | "nonew": false,
15 | "plusplus": false,
16 | "regexp": false,
17 | "undef": true,
18 | "unused": true,
19 | "strict": false,
20 | "trailing": true,
21 | "maxparams": 6,
22 | "asi": false,
23 | "boss": false,
24 | "expr": true,
25 | "laxbreak": true,
26 | "loopfunc": true,
27 | "shadow": true,
28 | "nonstandard": true,
29 | "onevar": false,
30 | "predef": [
31 | "_",
32 | "$",
33 | "Backbone",
34 | "deepEqual",
35 | "define",
36 | "equal",
37 | "module",
38 | "require",
39 | "strictEqual",
40 | "test"
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - '0.10'
4 | before_install:
5 | - npm install -g grunt-cli
6 | script:
7 | - grunt --stack travis
8 | email:
9 | on_failure: change
10 | on_success: never
11 | env:
12 | global:
13 | - secure: u5Hj+68KvcfyFbUE7T1KPkl4AVrKsXDg/oTPavTYAC8wPXxnzXUmar3qDNzuL5EKdD8v0d3Noa4o87D09KUiXRMZU4/5msTOpL960Q6OWxH2ON+ZhUqNFlTG6aUsOVzLRTgyT1k3eol+GSebPaXaMMMja2P6Ub1E2rTpNjC+KGk=
14 | - secure: DvHKYDRyw2DczDFhnP9MUTbvu7KBhNWF2eh8w2s1kLmxnFWeBoW4KqrTzAAzHd52XFLc4MtyQLr+YvbMmf9DCSHTOBWrnVfpiW3G0UzoO07WtVoyEihbk8OrxBpe11aafzYpt2+9UpYh6JnOOwLeR0WYCpzNFmP6GIKKlH3gSKA=
15 | cache:
16 | directories:
17 | - node_modules
18 |
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | var childProcess = require('child_process');
2 |
3 | module.exports = function(grunt) {
4 |
5 | grunt.initConfig({
6 | pkg: grunt.file.readJSON('package.json'),
7 |
8 | jshint: {
9 | options: {
10 | jshintrc: '.jshintrc'
11 | },
12 | files: [
13 | 'backbone.queryparams.js',
14 | 'test/*.js'
15 | ]
16 | },
17 |
18 | connect: {
19 | options: {
20 | base: '.',
21 | hostname: '*',
22 | port: 9999
23 | },
24 | server: {},
25 | keepalive: {
26 | options: {
27 | keepalive: true
28 | }
29 | }
30 | },
31 | 'saucelabs-qunit': {
32 | options: {
33 | testname: 'backbone-query-parameters',
34 | build: process.env.TRAVIS_JOB_ID,
35 | detailedError: true,
36 | concurrency: 4
37 | },
38 | 'backbone-1.0': {
39 | options: {
40 | tags: ['1.0'],
41 | urls: [
42 | 'http://localhost:9999/test/test.html'
43 | ],
44 | browsers: [
45 | {browserName: 'chrome'},
46 | {browserName: 'firefox', platform: 'Linux'},
47 | {browserName: 'safari'},
48 | {browserName: 'opera'},
49 | {browserName: 'internet explorer', version: 11, platform: 'Windows 8.1'},
50 | {browserName: 'internet explorer', version: 8, platform: 'XP'}
51 | ]
52 | }
53 | },
54 | 'backbone-1.1': {
55 | options: {
56 | tags: ['1.1'],
57 | urls: [
58 | 'http://localhost:9999/test/test-1.1.html'
59 | ],
60 | browsers: [
61 | // IE8 backbone core tests fail due to the long running script blocker triggering
62 | {browserName: 'chrome'},
63 | {browserName: 'firefox'},
64 | {browserName: 'safari'},
65 | {browserName: 'opera'},
66 | {browserName: 'internet explorer', version: 11, platform: 'Windows 8.1'},
67 | {browserName: 'internet explorer', version: 10, platform: 'Windows 8'},
68 | {browserName: 'internet explorer', version: 9, platform: 'Windows 7'},
69 | ]
70 | }
71 | }
72 | },
73 |
74 | closureCompiler: {
75 | options: {
76 | compilerFile: 'lib/compiler.jar',
77 |
78 | checkModified: true,
79 |
80 | compilerOpts: {
81 | compilation_level: 'SIMPLE_OPTIMIZATIONS',
82 | language_in: 'ECMASCRIPT5',
83 | create_source_map: 'backbone.queryparams.min.map'
84 | }
85 | },
86 |
87 | dist: {
88 | src: 'backbone.queryparams.js',
89 | dest: 'backbone.queryparams.min.js'
90 | }
91 | }
92 | });
93 |
94 | // Load tasks from npm
95 | grunt.loadNpmTasks('grunt-contrib-connect');
96 | grunt.loadNpmTasks('grunt-contrib-jshint');
97 | grunt.loadNpmTasks('grunt-saucelabs');
98 | grunt.loadNpmTasks('grunt-closure-tools');
99 |
100 | grunt.registerTask('sauce', process.env.SAUCE_USERNAME ? ['connect:server', 'saucelabs-qunit:backbone-1.0', 'saucelabs-qunit:backbone-1.1'] : []);
101 |
102 | grunt.registerTask('travis', ['sauce']);
103 |
104 | grunt.registerTask('minify', ['closureCompiler']);
105 |
106 | grunt.registerTask('dev', ['jshint', 'connect:keepalive']);
107 | grunt.registerTask('default', ['jshint', 'minify']);
108 | };
109 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012, Joseph A. Hudson
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of Joseph A. Hudson nor the
12 | names of its contributors may be used to endorse or promote products
13 | derived from this software without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 | DISCLAIMED. IN NO EVENT SHALL JOSEPH A. HUDSON BE LIABLE FOR ANY
19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/backbone.queryparams-1.1-shim.js:
--------------------------------------------------------------------------------
1 | //
2 | // Works around issue introduced in Backbone 1.1 by https://github.com/jashkenas/backbone/pull/2766
3 | //
4 | // This file is unnecessary under Backbone 1.0 and earlier.
5 | //
6 | // Note that https://github.com/jashkenas/backbone/pull/2890 should hopefully make this irrevelant
7 | //
8 | (function (root, factory) {
9 | if (typeof exports === 'object' && root.require) {
10 | module.exports = factory(require("underscore"), require("backbone"));
11 | } else if (typeof define === "function" && define.amd) {
12 | // AMD. Register as an anonymous module.
13 | define(["underscore", "backbone"], function (_, Backbone) {
14 | // Use global variables if the locals are undefined.
15 | return factory(_ || root._, Backbone || root.Backbone);
16 | });
17 | } else {
18 | // RequireJS isn't being used. Assume underscore and backbone are loaded in
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |