├── .gitignore ├── Gruntfile.js ├── LICENSE ├── Makefile ├── Procfile ├── README.md ├── bower.json ├── bower_components ├── backbone.marionette │ ├── .bower.json │ ├── .jshintrc │ ├── .tm_properties │ ├── Gruntfile.js │ ├── addrem │ ├── bower.json │ ├── getdeps │ ├── lib │ │ ├── backbone.marionette.js │ │ ├── backbone.marionette.map │ │ ├── backbone.marionette.min.js │ │ └── core │ │ │ ├── amd │ │ │ ├── backbone.marionette.js │ │ │ └── backbone.marionette.min.js │ │ │ ├── backbone.marionette.js │ │ │ ├── backbone.marionette.map │ │ │ └── backbone.marionette.min.js │ ├── license.txt │ ├── public │ │ └── javascripts │ │ │ ├── backbone.augment.js │ │ │ ├── backbone.babysitter.js │ │ │ ├── backbone.js │ │ │ ├── backbone.wreqr.js │ │ │ ├── jquery.js │ │ │ ├── json2.js │ │ │ └── underscore.js │ ├── readme.md │ ├── src │ │ ├── marionette.application.js │ │ ├── marionette.approuter.js │ │ ├── marionette.bindEntityEvents.js │ │ ├── marionette.callbacks.js │ │ ├── marionette.collectionview.js │ │ ├── marionette.compositeview.js │ │ ├── marionette.controller.js │ │ ├── marionette.domRefresh.js │ │ ├── marionette.helpers.js │ │ ├── marionette.itemview.js │ │ ├── marionette.layout.js │ │ ├── marionette.module.js │ │ ├── marionette.region.js │ │ ├── marionette.regionManager.js │ │ ├── marionette.renderer.js │ │ ├── marionette.templatecache.js │ │ ├── marionette.triggermethod.js │ │ └── marionette.view.js │ └── upgradeGuide.md ├── backbone │ ├── .bower.json │ ├── .gitignore │ ├── .npmignore │ ├── CNAME │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── backbone.js │ ├── bower.json │ ├── component.json │ ├── index.html │ ├── index.js │ └── package.json ├── jasmine │ ├── .bower.json │ ├── .gitignore │ ├── .gitmodules │ ├── .rspec │ ├── .travis.yml │ ├── Contribute.markdown │ ├── Gemfile │ ├── MIT.LICENSE │ ├── README.markdown │ ├── Rakefile │ ├── Release.markdown │ ├── config.rb │ ├── images │ │ └── jasmine_favicon.png │ ├── jasmine-core.gemspec │ ├── jasmine_dev.thor │ ├── jsdoc-template │ │ ├── allclasses.tmpl │ │ ├── allfiles.tmpl │ │ ├── class.tmpl │ │ ├── index.tmpl │ │ ├── publish.js │ │ ├── static │ │ │ ├── default.css │ │ │ ├── header.html │ │ │ └── index.html │ │ └── symbol.tmpl │ ├── jshint │ │ ├── jshint.js │ │ └── run.js │ ├── lib │ │ ├── jasmine-core.rb │ │ └── jasmine-core │ │ │ ├── example │ │ │ ├── SpecRunner.html │ │ │ ├── spec │ │ │ │ ├── PlayerSpec.js │ │ │ │ └── SpecHelper.js │ │ │ └── src │ │ │ │ ├── Player.js │ │ │ │ └── Song.js │ │ │ ├── jasmine-html.js │ │ │ ├── jasmine.css │ │ │ ├── jasmine.js │ │ │ ├── json2.js │ │ │ └── version.rb │ ├── spec │ │ ├── console │ │ │ └── ConsoleReporterSpec.js │ │ ├── core │ │ │ ├── BaseSpec.js │ │ │ ├── CustomMatchersSpec.js │ │ │ ├── EnvSpec.js │ │ │ ├── ExceptionsSpec.js │ │ │ ├── JsApiReporterSpec.js │ │ │ ├── MatchersSpec.js │ │ │ ├── MockClockSpec.js │ │ │ ├── MultiReporterSpec.js │ │ │ ├── NestedResultsSpec.js │ │ │ ├── PrettyPrintSpec.js │ │ │ ├── QueueSpec.js │ │ │ ├── ReporterSpec.js │ │ │ ├── RunnerSpec.js │ │ │ ├── SpecRunningSpec.js │ │ │ ├── SpecSpec.js │ │ │ ├── SpySpec.js │ │ │ ├── SuiteSpec.js │ │ │ ├── UtilSpec.js │ │ │ └── WaitsForBlockSpec.js │ │ ├── html │ │ │ ├── HTMLReporterSpec.js │ │ │ ├── MatchersHtmlSpec.js │ │ │ ├── PrettyPrintHtmlSpec.js │ │ │ └── TrivialReporterSpec.js │ │ ├── jasmine.yml │ │ ├── jasmine_self_test_spec.rb │ │ ├── node_suite.js │ │ ├── runner.html │ │ ├── spec_helper.rb │ │ ├── tasks │ │ │ ├── build_distribution_spec.rb │ │ │ ├── build_github_pages_spec.rb │ │ │ ├── build_standalone_distribution_spec.rb │ │ │ ├── build_standalone_runner_spec.rb │ │ │ ├── count_specs_spec.rb │ │ │ ├── execute_specs_spec.rb │ │ │ ├── jshint_spec.rb │ │ │ ├── release_spec.rb │ │ │ └── version_spec.rb │ │ └── templates │ │ │ ├── runner.html.erb │ │ │ └── script_tag.html.erb │ ├── src │ │ ├── console │ │ │ └── ConsoleReporter.js │ │ ├── core │ │ │ ├── Block.js │ │ │ ├── Env.js │ │ │ ├── JsApiReporter.js │ │ │ ├── Matchers.js │ │ │ ├── MultiReporter.js │ │ │ ├── NestedResults.js │ │ │ ├── PrettyPrinter.js │ │ │ ├── Queue.js │ │ │ ├── Reporter.js │ │ │ ├── Runner.js │ │ │ ├── Spec.js │ │ │ ├── Suite.js │ │ │ ├── WaitsBlock.js │ │ │ ├── WaitsForBlock.js │ │ │ ├── base.js │ │ │ ├── mock-timeout.js │ │ │ └── util.js │ │ ├── html │ │ │ ├── HtmlReporter.js │ │ │ ├── HtmlReporterHelpers.js │ │ │ ├── ReporterView.js │ │ │ ├── SpecView.js │ │ │ ├── SuiteView.js │ │ │ ├── TrivialReporter.js │ │ │ ├── _HTMLReporter.scss │ │ │ ├── _TrivialReporter.scss │ │ │ ├── jasmine.css │ │ │ └── jasmine.scss │ │ ├── templates │ │ │ ├── example_project_jasmine_tags.html.erb │ │ │ ├── version.js.erb │ │ │ └── version.rb.erb │ │ ├── version.js │ │ └── version.json │ └── tasks │ │ ├── docs.rb │ │ ├── jasmine_dev.rb │ │ └── jasmine_dev │ │ ├── base.rb │ │ ├── build_distribution.rb │ │ ├── build_github_pages.rb │ │ ├── build_standalone_distribution.rb │ │ ├── build_standalone_runner.rb │ │ ├── count_specs.rb │ │ ├── execute_specs.rb │ │ ├── js_hint.rb │ │ ├── release.rb │ │ ├── sources.rb │ │ └── version.rb ├── jquery │ ├── .bower.json │ ├── .editorconfig │ ├── .gitattributes │ ├── .gitignore │ ├── .gitmodules │ ├── .jshintrc │ ├── .mailmap │ ├── AUTHORS.txt │ ├── CONTRIBUTING.md │ ├── Gruntfile.js │ ├── MIT-LICENSE.txt │ ├── README.md │ ├── bower.json │ ├── component.json │ ├── composer.json │ ├── jquery-migrate.js │ ├── jquery-migrate.min.js │ ├── jquery.js │ ├── jquery.min.js │ ├── jquery.min.map │ ├── package.json │ ├── speed │ │ ├── benchmark.js │ │ ├── benchmarker.css │ │ ├── benchmarker.js │ │ ├── closest.html │ │ ├── css.html │ │ ├── event.html │ │ ├── filter.html │ │ ├── find.html │ │ ├── index.html │ │ ├── jquery-basis.js │ │ └── slice.vs.concat.html │ ├── src │ │ ├── .jshintrc │ │ ├── ajax.js │ │ ├── ajax │ │ │ ├── jsonp.js │ │ │ ├── script.js │ │ │ └── xhr.js │ │ ├── attributes.js │ │ ├── callbacks.js │ │ ├── core.js │ │ ├── css.js │ │ ├── data.js │ │ ├── deferred.js │ │ ├── deprecated.js │ │ ├── dimensions.js │ │ ├── effects.js │ │ ├── event-alias.js │ │ ├── event.js │ │ ├── exports.js │ │ ├── intro.js │ │ ├── manipulation.js │ │ ├── offset.js │ │ ├── outro.js │ │ ├── queue.js │ │ ├── serialize.js │ │ ├── sizzle-jquery.js │ │ ├── support.js │ │ ├── traversing.js │ │ └── wrap.js │ └── test │ │ ├── .jshintignore │ │ ├── .jshintrc │ │ ├── data │ │ ├── 1x1.jpg │ │ ├── ajax │ │ │ └── unreleasedXHR.html │ │ ├── atom+xml.php │ │ ├── badcall.js │ │ ├── badjson.js │ │ ├── cleanScript.html │ │ ├── core │ │ │ └── cc_on.html │ │ ├── dashboard.xml │ │ ├── dimensions │ │ │ ├── documentLarge.html │ │ │ └── documentSmall.html │ │ ├── echoData.php │ │ ├── echoQuery.php │ │ ├── errorWithJSON.php │ │ ├── errorWithText.php │ │ ├── etag.php │ │ ├── evalScript.php │ │ ├── event │ │ │ ├── focusElem.html │ │ │ ├── longLoadScript.php │ │ │ ├── promiseReady.html │ │ │ └── syncReady.html │ │ ├── headers.php │ │ ├── if_modified_since.php │ │ ├── iframe.html │ │ ├── jquery-1.9.1.ajax_xhr.min.js │ │ ├── json.php │ │ ├── json_obj.js │ │ ├── jsonp.php │ │ ├── manipulation │ │ │ └── iframe-denied.html │ │ ├── name.html │ │ ├── name.php │ │ ├── nocontent.php │ │ ├── offset │ │ │ ├── absolute.html │ │ │ ├── body.html │ │ │ ├── fixed.html │ │ │ ├── relative.html │ │ │ ├── scroll.html │ │ │ ├── static.html │ │ │ └── table.html │ │ ├── params_html.php │ │ ├── readywaitasset.js │ │ ├── readywaitloader.js │ │ ├── script.php │ │ ├── selector │ │ │ ├── html5_selector.html │ │ │ └── sizzle_cache.html │ │ ├── statusText.php │ │ ├── support │ │ │ ├── bodyBackground.html │ │ │ ├── boxSizing.html │ │ │ ├── csp.js │ │ │ ├── csp.php │ │ │ ├── shrinkWrapBlocks.html │ │ │ └── testElementCrash.html │ │ ├── test.html │ │ ├── test.js │ │ ├── test.php │ │ ├── test2.html │ │ ├── test3.html │ │ ├── testinit.js │ │ ├── testrunner.js │ │ ├── testsuite.css │ │ ├── text.php │ │ ├── ua.txt │ │ ├── with_fries.xml │ │ └── with_fries_over_jsonp.php │ │ ├── delegatetest.html │ │ ├── hovertest.html │ │ ├── index.html │ │ ├── jquery.js │ │ ├── localfile.html │ │ ├── networkerror.html │ │ ├── readywait.html │ │ ├── unit │ │ ├── ajax.js │ │ ├── attributes.js │ │ ├── callbacks.js │ │ ├── core.js │ │ ├── css.js │ │ ├── data.js │ │ ├── deferred.js │ │ ├── deprecated.js │ │ ├── dimensions.js │ │ ├── effects.js │ │ ├── event.js │ │ ├── exports.js │ │ ├── manipulation.js │ │ ├── offset.js │ │ ├── queue.js │ │ ├── selector.js │ │ ├── serialize.js │ │ ├── support.js │ │ ├── traversing.js │ │ └── wrap.js │ │ └── xhtml.php └── underscore │ ├── .bower.json │ ├── .gitignore │ ├── .travis.yml │ ├── CNAME │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── Rakefile │ ├── docs │ ├── docco.css │ ├── favicon.ico │ ├── images │ │ ├── background.png │ │ └── underscore.png │ ├── public │ │ ├── fonts │ │ │ ├── aller-bold.eot │ │ │ ├── aller-bold.ttf │ │ │ ├── aller-bold.woff │ │ │ ├── aller-light.eot │ │ │ ├── aller-light.ttf │ │ │ ├── aller-light.woff │ │ │ ├── novecento-bold.eot │ │ │ ├── novecento-bold.ttf │ │ │ └── novecento-bold.woff │ │ └── stylesheets │ │ │ └── normalize.css │ └── underscore.html │ ├── favicon.ico │ ├── index.html │ ├── package.json │ ├── test │ ├── arrays.js │ ├── chaining.js │ ├── collections.js │ ├── functions.js │ ├── index.html │ ├── objects.js │ ├── speed.js │ ├── utility.js │ └── vendor │ │ ├── jquery.js │ │ ├── jslitmus.js │ │ ├── qunit.css │ │ ├── qunit.js │ │ └── runner.js │ ├── underscore-min.js │ ├── underscore-min.map │ └── underscore.js ├── carousel_server.js ├── client ├── img │ └── loading.gif ├── requires │ ├── backbone.marionette │ │ └── js │ │ │ └── backbone.marionette.js │ ├── backbone │ │ └── js │ │ │ └── backbone.js │ ├── jquery │ │ └── js │ │ │ └── jquery.js │ └── underscore │ │ └── js │ │ └── underscore.js ├── spec │ ├── app.test.js │ └── views │ │ └── add.test.js ├── src │ ├── app.js │ ├── collections │ │ ├── events.js │ │ └── services.js │ ├── controller.js │ ├── main.js │ ├── models │ │ ├── event.js │ │ ├── server.js │ │ └── service.js │ ├── router.js │ └── views │ │ ├── add_event.js │ │ ├── add_service.js │ │ ├── event_details.js │ │ ├── events.js │ │ ├── home.js │ │ ├── service_details.js │ │ └── services.js ├── styles │ ├── epg.css │ ├── less │ │ └── main.less │ ├── messages.css │ └── reset.css └── templates │ ├── add_event.hbs │ ├── add_service.hbs │ ├── event_details.hbs │ ├── event_row.hbs │ ├── events.hbs │ ├── events_table.hbs │ ├── home.hbs │ ├── service_details.hbs │ ├── service_item.hbs │ ├── service_row.hbs │ └── services.hbs ├── conf.json ├── controllers ├── events.js ├── home.js └── services.js ├── data ├── .gitignore └── events │ └── .gitignore ├── eitupdater_server.js ├── importer ├── ftp_importer.js └── reportv_dataprovider.js ├── importer_server.js ├── karma.conf.js ├── lib ├── carousel.js └── epg.js ├── models.js ├── monit ├── carousel.sh ├── eitupdater.sh ├── gui.sh ├── importer.sh ├── monitrc └── status.sh ├── package.json ├── perl-vars.sh ├── profiler.js ├── public ├── css │ └── openepg.css ├── img │ └── loading.gif └── js │ └── openepg.js ├── routes.js ├── server.js ├── status_client.js ├── status_server.js ├── test ├── 01-epg.js ├── conf.json └── utils.js └── views ├── index.handlebars └── layouts └── main.handlebars /.gitignore: -------------------------------------------------------------------------------- 1 | /.fuse_hidden* 2 | cherryEPG.tgz 3 | cherryepg/ 4 | *.db 5 | node_modules/ 6 | .netbeans.xml 7 | build/ 8 | perl/ 9 | uninstall.pl 10 | importer/*.gz 11 | importer/check.json 12 | *.ts 13 | status.json -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node server.js 2 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "openepg", 3 | "version": "0.0.1", 4 | "private": true, 5 | "dependencies": { 6 | "backbone.marionette": "~1.4.1", 7 | "jquery": "~1.10.2", 8 | "underscore": "~1.5.2", 9 | "backbone": "~1.1.0" 10 | }, 11 | "devDependencies": { 12 | "jasmine": "~1.3.1" 13 | }, 14 | "exportsOverride": { 15 | "jquery": { 16 | "js": "jquery.js" 17 | }, 18 | "underscore": { 19 | "js": "underscore.js" 20 | }, 21 | "backbone": { 22 | "js": "backbone.js" 23 | }, 24 | "backbone.marionette": { 25 | "js": "lib/backbone.marionette.js" 26 | }, 27 | "jasmine": {} 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /bower_components/backbone.marionette/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backbone.marionette", 3 | "description": "Make your Backbone.js apps dance with a composite application architecture!", 4 | "url": "http://marionettejs.org", 5 | "main": "./lib/backbone.marionette.js", 6 | "version": "1.4.1", 7 | "keywords": [ 8 | "backbone", 9 | "framework", 10 | "client", 11 | "browser", 12 | "composite" 13 | ], 14 | "author": { 15 | "name": "Derick Bailey", 16 | "email": "derickbailey@gmail.com" 17 | }, 18 | "contributors": [ 19 | { 20 | "name": "Jarrod Overson", 21 | "email": "jsoverson@gmail.com" 22 | }, 23 | { 24 | "name": "Tony Abou-Assaleh", 25 | "email": "taa@eits.ca" 26 | }, 27 | { 28 | "name": "Matt Briggs", 29 | "email": "matt@mattbriggs.net" 30 | }, 31 | { 32 | "name": "Ruben Vreeken", 33 | "email": "ruben.vreeken@gmail.com" 34 | }, 35 | { 36 | "name": "Brian Mann", 37 | "email": "brian@backbonerails.com" 38 | } 39 | ], 40 | "ignore": [ 41 | "docs", 42 | "reports", 43 | "spec", 44 | ".gitignore", 45 | ".travis.yml", 46 | "build", 47 | "build.cmd", 48 | "CONTRIBUTING.md", 49 | "changelog.md", 50 | "package.json" 51 | ], 52 | "dependencies": { 53 | "backbone": "~1.1.0", 54 | "underscore": "~1.5.1" 55 | }, 56 | "devDependencies": { 57 | "backbone.babysitter": "~0.0.6", 58 | "backbone.wreqr": "~0.2.0" 59 | }, 60 | "homepage": "https://github.com/marionettejs/backbone.marionette", 61 | "_release": "1.4.1", 62 | "_resolution": { 63 | "type": "version", 64 | "tag": "v1.4.1", 65 | "commit": "8de3c733e9ef4070f4b248d4708c1551a05038eb" 66 | }, 67 | "_source": "git://github.com/marionettejs/backbone.marionette.git", 68 | "_target": "~1.4.1", 69 | "_originalSource": "backbone.marionette" 70 | } -------------------------------------------------------------------------------- /bower_components/backbone.marionette/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqeqeq": true, 4 | "immed": false, 5 | "latedef": true, 6 | "newcap": true, 7 | "noarg": true, 8 | "sub": true, 9 | "undef": true, 10 | "boss": true, 11 | "eqnull": true, 12 | "browser": true, 13 | "globals": { 14 | "jQuery": true, 15 | "Backbone": true, 16 | "_": true, 17 | "Marionette": true, 18 | "$": true, 19 | "slice": true, 20 | "throwError": true 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /bower_components/backbone.marionette/.tm_properties: -------------------------------------------------------------------------------- 1 | tabSize = 2 2 | softTabs = true -------------------------------------------------------------------------------- /bower_components/backbone.marionette/addrem: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | git remote add $1 git://github.com/$1/backbone.marionette 3 | git fetch $1 4 | -------------------------------------------------------------------------------- /bower_components/backbone.marionette/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "backbone.marionette", 3 | "description" : "Make your Backbone.js apps dance with a composite application architecture!", 4 | "url" : "http://marionettejs.org", 5 | "main" : "./lib/backbone.marionette.js", 6 | "version" : "1.4.1", 7 | 8 | "keywords" : [ 9 | "backbone", 10 | "framework", 11 | "client", 12 | "browser", 13 | "composite" 14 | ], 15 | 16 | "author": { 17 | "name" : "Derick Bailey", 18 | "email" : "derickbailey@gmail.com" 19 | }, 20 | 21 | "contributors" : [ 22 | { 23 | "name" : "Jarrod Overson", 24 | "email" : "jsoverson@gmail.com" 25 | }, 26 | { 27 | "name" : "Tony Abou-Assaleh", 28 | "email" : "taa@eits.ca" 29 | }, 30 | { 31 | "name" : "Matt Briggs", 32 | "email" : "matt@mattbriggs.net" 33 | }, 34 | { 35 | "name" : "Ruben Vreeken", 36 | "email" : "ruben.vreeken@gmail.com" 37 | }, 38 | { 39 | "name" : "Brian Mann", 40 | "email" : "brian@backbonerails.com" 41 | } 42 | ], 43 | 44 | "ignore": [ 45 | "docs", 46 | "reports", 47 | "spec", 48 | ".gitignore", 49 | ".travis.yml", 50 | "build", 51 | "build.cmd", 52 | "CONTRIBUTING.md", 53 | "changelog.md", 54 | "package.json" 55 | ], 56 | 57 | "dependencies" : { 58 | "backbone": "~1.1.0", 59 | "underscore": "~1.5.1" 60 | }, 61 | "devDependencies": { 62 | "backbone.babysitter": "~0.0.6", 63 | "backbone.wreqr": "~0.2.0" 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /bower_components/backbone.marionette/getdeps: -------------------------------------------------------------------------------- 1 | echo "UPDATING MARIONETTE.JS DEPENDENCIES..." 2 | 3 | curl https://raw.github.com/douglascrockford/JSON-js/master/json2.js > public/javascripts/json2.js 4 | curl http://underscorejs.org/underscore.js > public/javascripts/underscore.js 5 | curl http://backbonejs.org/backbone.js > public/javascripts/backbone.js 6 | curl http://code.jquery.com/jquery.js > public/javascripts/jquery.js 7 | curl https://raw.github.com/marionettejs/backbone.wreqr/master/lib/backbone.wreqr.js > public/javascripts/backbone.wreqr.js 8 | curl https://raw.github.com/marionettejs/backbone.babysitter/master/lib/backbone.babysitter.js > public/javascripts/backbone.babysitter.js 9 | -------------------------------------------------------------------------------- /bower_components/backbone.marionette/license.txt: -------------------------------------------------------------------------------- 1 | MarionetteJS is distributed under [MIT license](http://mutedsolutions.mit-license.org/). 2 | -------------------------------------------------------------------------------- /bower_components/backbone.marionette/public/javascripts/backbone.augment.js: -------------------------------------------------------------------------------- 1 | (function (root, factory) { 2 | if (typeof define === 'function' && define.amd) { 3 | // AMD. Register as an anonymous module. 4 | define(['backbone'], factory); 5 | } else { 6 | // Browser globals 7 | factory(root.Backbone); 8 | } 9 | }(this, function (Backbone) { 10 | "use strict"; 11 | 12 | function augment(/* augments... */) { 13 | var self = this; 14 | for (var i = 0; i < arguments.length; i++) { 15 | var aug = arguments[i]; 16 | if (aug && aug.augment) { 17 | self = aug.augment(self); 18 | } 19 | } 20 | return self; 21 | } 22 | 23 | Backbone.Model.augment = Backbone.Collection.augment = Backbone.View.augment = augment; 24 | 25 | return augment; 26 | })); 27 | -------------------------------------------------------------------------------- /bower_components/backbone.marionette/src/marionette.callbacks.js: -------------------------------------------------------------------------------- 1 | // Callbacks 2 | // --------- 3 | 4 | // A simple way of managing a collection of callbacks 5 | // and executing them at a later point in time, using jQuery's 6 | // `Deferred` object. 7 | Marionette.Callbacks = function(){ 8 | this._deferred = Marionette.$.Deferred(); 9 | this._callbacks = []; 10 | }; 11 | 12 | _.extend(Marionette.Callbacks.prototype, { 13 | 14 | // Add a callback to be executed. Callbacks added here are 15 | // guaranteed to execute, even if they are added after the 16 | // `run` method is called. 17 | add: function(callback, contextOverride){ 18 | this._callbacks.push({cb: callback, ctx: contextOverride}); 19 | 20 | this._deferred.done(function(context, options){ 21 | if (contextOverride){ context = contextOverride; } 22 | callback.call(context, options); 23 | }); 24 | }, 25 | 26 | // Run all registered callbacks with the context specified. 27 | // Additional callbacks can be added after this has been run 28 | // and they will still be executed. 29 | run: function(options, context){ 30 | this._deferred.resolve(context, options); 31 | }, 32 | 33 | // Resets the list of callbacks to be run, allowing the same list 34 | // to be run multiple times - whenever the `run` method is called. 35 | reset: function(){ 36 | var callbacks = this._callbacks; 37 | this._deferred = Marionette.$.Deferred(); 38 | this._callbacks = []; 39 | 40 | _.each(callbacks, function(cb){ 41 | this.add(cb.cb, cb.ctx); 42 | }, this); 43 | } 44 | }); 45 | 46 | -------------------------------------------------------------------------------- /bower_components/backbone.marionette/src/marionette.controller.js: -------------------------------------------------------------------------------- 1 | // Marionette Controller 2 | // --------------------- 3 | // 4 | // A multi-purpose object to use as a controller for 5 | // modules and routers, and as a mediator for workflow 6 | // and coordination of other objects, views, and more. 7 | Marionette.Controller = function(options){ 8 | this.triggerMethod = Marionette.triggerMethod; 9 | this.options = options || {}; 10 | 11 | if (_.isFunction(this.initialize)){ 12 | this.initialize(this.options); 13 | } 14 | }; 15 | 16 | Marionette.Controller.extend = Marionette.extend; 17 | 18 | // Controller Methods 19 | // -------------- 20 | 21 | // Ensure it can trigger events with Backbone.Events 22 | _.extend(Marionette.Controller.prototype, Backbone.Events, { 23 | close: function(){ 24 | this.stopListening(); 25 | this.triggerMethod("close"); 26 | this.unbind(); 27 | } 28 | }); 29 | -------------------------------------------------------------------------------- /bower_components/backbone.marionette/src/marionette.domRefresh.js: -------------------------------------------------------------------------------- 1 | // DOMRefresh 2 | // ---------- 3 | // 4 | // Monitor a view's state, and after it has been rendered and shown 5 | // in the DOM, trigger a "dom:refresh" event every time it is 6 | // re-rendered. 7 | 8 | Marionette.MonitorDOMRefresh = (function(){ 9 | // track when the view has been shown in the DOM, 10 | // using a Marionette.Region (or by other means of triggering "show") 11 | function handleShow(view){ 12 | view._isShown = true; 13 | triggerDOMRefresh(view); 14 | } 15 | 16 | // track when the view has been rendered 17 | function handleRender(view){ 18 | view._isRendered = true; 19 | triggerDOMRefresh(view); 20 | } 21 | 22 | // Trigger the "dom:refresh" event and corresponding "onDomRefresh" method 23 | function triggerDOMRefresh(view){ 24 | if (view._isShown && view._isRendered){ 25 | if (_.isFunction(view.triggerMethod)){ 26 | view.triggerMethod("dom:refresh"); 27 | } 28 | } 29 | } 30 | 31 | // Export public API 32 | return function(view){ 33 | view.listenTo(view, "show", function(){ 34 | handleShow(view); 35 | }); 36 | 37 | view.listenTo(view, "render", function(){ 38 | handleRender(view); 39 | }); 40 | }; 41 | })(); 42 | -------------------------------------------------------------------------------- /bower_components/backbone.marionette/src/marionette.helpers.js: -------------------------------------------------------------------------------- 1 | // Helpers 2 | // ------- 3 | 4 | // For slicing `arguments` in functions 5 | var protoSlice = Array.prototype.slice; 6 | function slice(args) { 7 | return protoSlice.call(args); 8 | } 9 | 10 | function throwError(message, name) { 11 | var error = new Error(message); 12 | error.name = name || 'Error'; 13 | throw error; 14 | } 15 | 16 | // Marionette.extend 17 | // ----------------- 18 | 19 | // Borrow the Backbone `extend` method so we can use it as needed 20 | Marionette.extend = Backbone.Model.extend; 21 | 22 | // Marionette.getOption 23 | // -------------------- 24 | 25 | // Retrieve an object, function or other value from a target 26 | // object or its `options`, with `options` taking precedence. 27 | Marionette.getOption = function(target, optionName){ 28 | if (!target || !optionName){ return; } 29 | var value; 30 | 31 | if (target.options && (optionName in target.options) && (target.options[optionName] !== undefined)){ 32 | value = target.options[optionName]; 33 | } else { 34 | value = target[optionName]; 35 | } 36 | 37 | return value; 38 | }; 39 | -------------------------------------------------------------------------------- /bower_components/backbone.marionette/src/marionette.renderer.js: -------------------------------------------------------------------------------- 1 | // Renderer 2 | // -------- 3 | 4 | // Render a template with data by passing in the template 5 | // selector and the data to render. 6 | Marionette.Renderer = { 7 | 8 | // Render a template with data. The `template` parameter is 9 | // passed to the `TemplateCache` object to retrieve the 10 | // template function. Override this method to provide your own 11 | // custom rendering and template handling for all of Marionette. 12 | render: function(template, data){ 13 | 14 | if (!template) { 15 | var error = new Error("Cannot render the template since it's false, null or undefined."); 16 | error.name = "TemplateNotFoundError"; 17 | throw error; 18 | } 19 | 20 | var templateFunc; 21 | if (typeof template === "function"){ 22 | templateFunc = template; 23 | } else { 24 | templateFunc = Marionette.TemplateCache.get(template); 25 | } 26 | 27 | return templateFunc(data); 28 | } 29 | }; 30 | 31 | -------------------------------------------------------------------------------- /bower_components/backbone.marionette/src/marionette.triggermethod.js: -------------------------------------------------------------------------------- 1 | // Trigger an event and/or a corresponding method name. Examples: 2 | // 3 | // `this.triggerMethod("foo")` will trigger the "foo" event and 4 | // call the "onFoo" method. 5 | // 6 | // `this.triggerMethod("foo:bar") will trigger the "foo:bar" event and 7 | // call the "onFooBar" method. 8 | Marionette.triggerMethod = (function(){ 9 | 10 | // split the event name on the : 11 | var splitter = /(^|:)(\w)/gi; 12 | 13 | // take the event section ("section1:section2:section3") 14 | // and turn it in to uppercase name 15 | function getEventName(match, prefix, eventName) { 16 | return eventName.toUpperCase(); 17 | } 18 | 19 | // actual triggerMethod name 20 | var triggerMethod = function(event) { 21 | // get the method name from the event name 22 | var methodName = 'on' + event.replace(splitter, getEventName); 23 | var method = this[methodName]; 24 | 25 | // trigger the event, if a trigger method exists 26 | if(_.isFunction(this.trigger)) { 27 | this.trigger.apply(this, arguments); 28 | } 29 | 30 | // call the onMethodName if it exists 31 | if (_.isFunction(method)) { 32 | // pass all arguments, except the event name 33 | return method.apply(this, _.tail(arguments)); 34 | } 35 | }; 36 | 37 | return triggerMethod; 38 | })(); 39 | -------------------------------------------------------------------------------- /bower_components/backbone/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backbone", 3 | "version": "1.1.2", 4 | "main": "backbone.js", 5 | "dependencies": { 6 | "underscore": ">=1.5.0" 7 | }, 8 | "ignore": [ 9 | "backbone-min.js", 10 | "docs", 11 | "examples", 12 | "test", 13 | "*.yml", 14 | "*.map", 15 | ".html", 16 | "*.ico" 17 | ], 18 | "homepage": "https://github.com/jashkenas/backbone", 19 | "_release": "1.1.2", 20 | "_resolution": { 21 | "type": "version", 22 | "tag": "1.1.2", 23 | "commit": "53f77901a4ea9c7cf75d3db93ddddf491998d90f" 24 | }, 25 | "_source": "git://github.com/jashkenas/backbone.git", 26 | "_target": "~1.1.0", 27 | "_originalSource": "backbone" 28 | } -------------------------------------------------------------------------------- /bower_components/backbone/.gitignore: -------------------------------------------------------------------------------- 1 | raw 2 | *.sw? 3 | .DS_Store 4 | node_modules 5 | bower_components 6 | -------------------------------------------------------------------------------- /bower_components/backbone/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | Rakefile 3 | docs/ 4 | raw/ 5 | examples/ 6 | index.html 7 | .jshintrc 8 | -------------------------------------------------------------------------------- /bower_components/backbone/CNAME: -------------------------------------------------------------------------------- 1 | backbonejs.org 2 | 3 | -------------------------------------------------------------------------------- /bower_components/backbone/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## How to Open a Backbone.js Ticket 2 | 3 | * Do not use tickets to ask for help with (debugging) your application. Ask on 4 | the [mailing list](https://groups.google.com/forum/#!forum/backbonejs), 5 | in the IRC channel (`#documentcloud` on Freenode), or if you understand your 6 | specific problem, on [StackOverflow](http://stackoverflow.com/questions/tagged/backbone.js). 7 | 8 | * Before you open a ticket or send a pull request, 9 | [search](https://github.com/jashkenas/backbone/issues) for previous 10 | discussions about the same feature or issue. Add to the earlier ticket if you 11 | find one. 12 | 13 | * Before sending a pull request for a feature or bug fix, be sure to have 14 | [tests](http://backbonejs.org/test/). 15 | 16 | * Use the same coding style as the rest of the 17 | [codebase](https://github.com/jashkenas/backbone/blob/master/backbone.js). 18 | 19 | * In your pull request, do not add documentation or rebuild the minified 20 | `backbone-min.js` file. We'll do that before cutting a new release. 21 | 22 | * All pull requests should be made to the `master` branch. 23 | -------------------------------------------------------------------------------- /bower_components/backbone/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2014 Jeremy Ashkenas, DocumentCloud 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /bower_components/backbone/README.md: -------------------------------------------------------------------------------- 1 | ____ __ __ 2 | /\ _`\ /\ \ /\ \ __ 3 | \ \ \ \ \ __ ___\ \ \/'\\ \ \____ ___ ___ __ /\_\ ____ 4 | \ \ _ <' /'__`\ /'___\ \ , < \ \ '__`\ / __`\ /' _ `\ /'__`\ \/\ \ /',__\ 5 | \ \ \ \ \/\ \ \.\_/\ \__/\ \ \\`\\ \ \ \ \/\ \ \ \/\ \/\ \/\ __/ __ \ \ \/\__, `\ 6 | \ \____/\ \__/.\_\ \____\\ \_\ \_\ \_,__/\ \____/\ \_\ \_\ \____\/\_\_\ \ \/\____/ 7 | \/___/ \/__/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/_/\/_/\/____/\/_/\ \_\ \/___/ 8 | \ \____/ 9 | \/___/ 10 | (_'_______________________________________________________________________________'_) 11 | (_.———————————————————————————————————————————————————————————————————————————————._) 12 | 13 | 14 | Backbone supplies structure to JavaScript-heavy applications by providing models key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing application over a RESTful JSON interface. 15 | 16 | For Docs, License, Tests, pre-packed downloads, and everything else, really, see: 17 | http://backbonejs.org 18 | 19 | To suggest a feature, report a bug, or general discussion: 20 | http://github.com/jashkenas/backbone/issues 21 | 22 | Backbone is an open-sourced component of DocumentCloud: 23 | https://github.com/documentcloud 24 | 25 | Many thanks to our contributors: 26 | http://github.com/jashkenas/backbone/contributors 27 | 28 | Special thanks to Robert Kieffer for the original philosophy behind Backbone. 29 | http://github.com/broofa 30 | -------------------------------------------------------------------------------- /bower_components/backbone/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "backbone", 3 | "version" : "1.1.2", 4 | "main" : "backbone.js", 5 | "dependencies" : { 6 | "underscore" : ">=1.5.0" 7 | }, 8 | "ignore" : ["backbone-min.js", "docs", "examples", "test", "*.yml", "*.map", ".html", "*.ico"] 9 | } 10 | -------------------------------------------------------------------------------- /bower_components/backbone/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "backbone", 3 | "version" : "1.1.2", 4 | "description" : "Give your JS App some Backbone with Models, Views, Collections, and Events.", 5 | "keywords" : ["model", "view", "controller", "router", "server", "client", "browser"], 6 | "repo" : "jashkenas/backbone", 7 | "dependencies" : { 8 | "jashkenas/underscore" : "*" 9 | }, 10 | "main" : "backbone.js", 11 | "scripts" : ["backbone.js"], 12 | "license" : "MIT" 13 | } 14 | -------------------------------------------------------------------------------- /bower_components/backbone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./backbone'); 2 | -------------------------------------------------------------------------------- /bower_components/backbone/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "backbone", 3 | "description" : "Give your JS App some Backbone with Models, Views, Collections, and Events.", 4 | "url" : "http://backbonejs.org", 5 | "keywords" : ["model", "view", "controller", "router", "server", "client", "browser"], 6 | "author" : "Jeremy Ashkenas ", 7 | "dependencies" : { 8 | "underscore" : ">=1.5.0" 9 | }, 10 | "devDependencies": { 11 | "phantomjs": "1.9.0-1", 12 | "docco": "0.6.1", 13 | "coffee-script": "1.6.1" 14 | }, 15 | "scripts": { 16 | "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true && coffee test/model.coffee", 17 | "build": "uglifyjs backbone.js --mangle --source-map backbone-min.map -o backbone-min.js", 18 | "doc": "docco backbone.js && docco examples/todos/todos.js examples/backbone.localstorage.js", 19 | "lint": "jsl -nofilelisting -nologo -conf docs/jsl.conf -process backbone.js" 20 | }, 21 | "main" : "backbone.js", 22 | "version" : "1.1.2", 23 | "license" : "MIT", 24 | "repository": { 25 | "type": "git", 26 | "url": "https://github.com/jashkenas/backbone.git" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /bower_components/jasmine/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jasmine", 3 | "homepage": "https://github.com/pivotal/jasmine", 4 | "version": "1.3.1", 5 | "_release": "1.3.1", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "v1.3.1", 9 | "commit": "fadd494cab99b75c2885f4e9becee582b11b6fcc" 10 | }, 11 | "_source": "git://github.com/pivotal/jasmine.git", 12 | "_target": "~1.3.1", 13 | "_originalSource": "jasmine" 14 | } -------------------------------------------------------------------------------- /bower_components/jasmine/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .svn/ 3 | .DS_Store 4 | site/ 5 | .bundle/ 6 | .pairs 7 | .rvmrc 8 | *.gem 9 | .bundle 10 | tags 11 | Gemfile.lock 12 | pkg/* 13 | .sass-cache/* 14 | src/html/.sass-cache/* -------------------------------------------------------------------------------- /bower_components/jasmine/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "pages"] 2 | path = pages 3 | url = https://github.com/pivotal/jasmine.git 4 | -------------------------------------------------------------------------------- /bower_components/jasmine/.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | -------------------------------------------------------------------------------- /bower_components/jasmine/.travis.yml: -------------------------------------------------------------------------------- 1 | # before_script: 2 | # - "sh -e /etc/init.d/xvfb start" 3 | before_install: 4 | - "export DISPLAY=:99.0" 5 | - "sh -e /etc/init.d/xvfb start"# 6 | script: "DISPLAY=:99.0 bundle exec rake jasmine_core_spec" 7 | 8 | rvm: 9 | - "1.9.3" 10 | -------------------------------------------------------------------------------- /bower_components/jasmine/Gemfile: -------------------------------------------------------------------------------- 1 | source :rubygems 2 | gem "rake" 3 | gem "jasmine", git: 'https://github.com/pivotal/jasmine-gem.git' 4 | 5 | unless ENV["TRAVIS"] 6 | group :debug do 7 | gem 'debugger' 8 | end 9 | end 10 | 11 | gemspec 12 | -------------------------------------------------------------------------------- /bower_components/jasmine/MIT.LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2011 Pivotal Labs 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /bower_components/jasmine/README.markdown: -------------------------------------------------------------------------------- 1 | [Jasmine](http://pivotal.github.com/jasmine/) 2 | 3 | ======= 4 | **A JavaScript Testing Framework** 5 | 6 | Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, [Node.js](http://nodejs.org) projects, or anywhere that JavaScript can run. 7 | 8 | Documentation & guides live here: [http://pivotal.github.com/jasmine/](http://pivotal.github.com/jasmine/) 9 | 10 | 11 | ## Support 12 | 13 | * Search past discussions: [http://groups.google.com/group/jasmine-js](http://groups.google.com/group/jasmine-js) 14 | * Send an email to the list: [jasmine-js@googlegroups.com](jasmine-js@googlegroups.com) 15 | * View the project backlog at Pivotal Tracker: [http://www.pivotaltracker.com/projects/10606](http://www.pivotaltracker.com/projects/10606) 16 | * Follow us on Twitter: [@JasmineBDD](http://twitter.com/JasmineBDD) 17 | 18 | 19 | ## Maintainers 20 | 21 | * [Davis W. Frank](mailto:dwfrank@pivotallabs.com), Pivotal Labs 22 | * [Rajan Agaskar](mailto:rajan@pivotallabs.com), Pivotal Labs 23 | * [Christian Williams](mailto:antixian666@gmail.com), Square 24 | 25 | Copyright (c) 2008-2012 Pivotal Labs. This software is licensed under the MIT License. 26 | -------------------------------------------------------------------------------- /bower_components/jasmine/config.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Compass configuration file - for building Jasmine's 'final CSS files 3 | # 4 | 5 | # Require any additional compass plugins here. 6 | 7 | # Set this to the root of your project when deployed: 8 | http_path = "/" 9 | css_dir = "src/html" 10 | sass_dir = "src/html" 11 | images_dir = "images" 12 | javascripts_dir = "javascripts" 13 | 14 | # You can select your preferred output style here (can be overridden via the command line): 15 | # output_style = :expanded or :nested or :compact or :compressed 16 | output_style = :compact 17 | 18 | # To enable relative paths to assets via compass helper functions. Uncomment: 19 | # relative_assets = true 20 | 21 | # To disable debugging comments that display the original location of your selectors. Uncomment: 22 | line_comments = false 23 | 24 | 25 | # If you prefer the indented syntax, you might want to regenerate this 26 | # project again passing --syntax sass, or you can uncomment this: 27 | # preferred_syntax = :sass 28 | # and then run: 29 | # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass 30 | -------------------------------------------------------------------------------- /bower_components/jasmine/images/jasmine_favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/jasmine/images/jasmine_favicon.png -------------------------------------------------------------------------------- /bower_components/jasmine/jasmine-core.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | $:.push File.expand_path("../lib", __FILE__) 3 | require "jasmine-core/version" 4 | 5 | Gem::Specification.new do |s| 6 | s.name = "jasmine-core" 7 | s.version = Jasmine::Core::VERSION 8 | s.platform = Gem::Platform::RUBY 9 | s.authors = ["Rajan Agaskar", "Davis W. Frank", "Christian Williams"] 10 | s.summary = %q{JavaScript BDD framework} 11 | s.description = %q{Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.} 12 | s.email = %q{jasmine-js@googlegroups.com} 13 | s.homepage = "http://pivotal.github.com/jasmine" 14 | s.rubyforge_project = "jasmine-core" 15 | s.license = "MIT" 16 | 17 | s.files = Dir.glob("./lib/**/*") + Dir.glob("./lib/jasmine-core/spec/**/*.js") 18 | s.require_paths = ["lib"] 19 | s.add_development_dependency "json_pure", ">= 1.4.3" 20 | s.add_development_dependency "tilt" 21 | s.add_development_dependency "sass" 22 | s.add_development_dependency "compass" 23 | s.add_development_dependency "ragaskar-jsdoc_helper" 24 | s.add_development_dependency "rspec" 25 | s.add_development_dependency "fuubar" 26 | s.add_development_dependency "awesome_print" 27 | s.add_development_dependency "thor" 28 | s.add_development_dependency "nokogiri" 29 | s.add_development_dependency "redcarpet", "1.7" 30 | s.add_development_dependency "rocco" 31 | s.add_development_dependency "rdiscount" 32 | end 33 | -------------------------------------------------------------------------------- /bower_components/jasmine/jasmine_dev.thor: -------------------------------------------------------------------------------- 1 | require "#{File.expand_path(File.dirname(__FILE__))}/tasks/jasmine_dev" -------------------------------------------------------------------------------- /bower_components/jasmine/jsdoc-template/allclasses.tmpl: -------------------------------------------------------------------------------- 1 |
{+new Link().toFile("index.html").withText("Class Index")+} 2 | | {+new Link().toFile("files.html").withText("File Index")+}
3 |
4 |

Classes

5 | 17 |
-------------------------------------------------------------------------------- /bower_components/jasmine/jsdoc-template/allfiles.tmpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | {! Link.base = ""; /* all generated links will be relative to this */ !} 7 | JsDoc Reference - File Index 8 | 9 | 10 | 13 | 14 | 15 | 16 | {+include("static/header.html")+} 17 | 18 |
19 | {+publish.classesIndex+} 20 |
21 | 22 |
23 |

File Index

24 | 25 | 26 |
27 |

{+new Link().toSrc(item.alias).withText(item.name)+}

28 | {+resolveLinks(summarize(item.desc))+} 29 |
30 | 31 |
Author:
32 |
{+item.author+}
33 |
34 | 35 |
Version:
36 |
{+item.version+}
37 |
38 | {! var locations = item.comment.getTag('location').map(function($){return $.toString().replace(/(^\$ ?| ?\$$)/g, '').replace(/^HeadURL: https:/g, 'http:');}) !} 39 | 40 |
Location:
41 | 42 |
{+location+}
43 |
44 |
45 |
46 |
47 |
48 |
49 | 50 |
51 |
52 | ©{+JSDOC.opt.D.copyright+}
53 | Documentation generated by JsDoc Toolkit {+JSDOC.VERSION+} on {+new Date()+} 54 |
55 | 56 | -------------------------------------------------------------------------------- /bower_components/jasmine/jsdoc-template/index.tmpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | JsDoc Reference - Index 8 | 9 | 10 | 13 | 14 | 15 | 16 | {+include("static/header.html")+} 17 | 18 |
19 | {+publish.classesIndex+} 20 |
21 | 22 |
23 |

Class Index

24 | 25 | 26 |
27 |

{+(new Link().toSymbol(thisClass.alias))+}

28 | {+resolveLinks(summarize(thisClass.classDesc))+} 29 |
30 |
31 |
32 | 33 |
34 |
35 | ©{+JSDOC.opt.D.copyright+}
36 | Documentation generated by JsDoc Toolkit {+JSDOC.VERSION+} on {+new Date()+} 37 |
38 | 39 | -------------------------------------------------------------------------------- /bower_components/jasmine/jsdoc-template/static/header.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bower_components/jasmine/jsdoc-template/static/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | Generated Javascript Documentation 7 | 8 | 9 | 10 | 11 | 12 | <body> 13 | <p> 14 | This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. 15 | </p> 16 | </body> 17 | 18 | 19 | -------------------------------------------------------------------------------- /bower_components/jasmine/jsdoc-template/symbol.tmpl: -------------------------------------------------------------------------------- 1 | 2 | {+data.name+} 3 | {+data.memberOf+} 4 | {+data.isStatic+} 5 | {+data.isa+} 6 | {+data.desc+} 7 | {+data.classDesc+} 8 | 9 | 10 | 11 | {+method.name+} 12 | {+method.memberOf+} 13 | {+method.isStatic+} 14 | {+method.desc+} 15 | 16 | 17 | {+param.type+} 18 | {+param.name+} 19 | {+param.desc+} 20 | {+param.defaultValue+} 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | {+property.name+} 29 | {+property.memberOf+} 30 | {+property.isStatic+} 31 | {+property.desc+} 32 | {+property.type+} 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /bower_components/jasmine/lib/jasmine-core.rb: -------------------------------------------------------------------------------- 1 | module Jasmine 2 | module Core 3 | class << self 4 | def path 5 | File.join(File.dirname(__FILE__), "jasmine-core") 6 | end 7 | 8 | def js_files 9 | (["jasmine.js"] + Dir.glob(File.join(path, "*.js"))).map { |f| File.basename(f) }.uniq 10 | end 11 | 12 | SPEC_TYPES = ["core", "html", "node"] 13 | 14 | def core_spec_files 15 | spec_files("core") 16 | end 17 | 18 | def html_spec_files 19 | spec_files("html") 20 | end 21 | 22 | def node_spec_files 23 | spec_files("node") 24 | end 25 | 26 | def spec_files(type) 27 | raise ArgumentError.new("Unrecognized spec type") unless SPEC_TYPES.include?(type) 28 | (Dir.glob(File.join(path, "spec", type, "*.js"))).map { |f| File.join("spec", type, File.basename(f)) }.uniq 29 | end 30 | 31 | def css_files 32 | Dir.glob(File.join(path, "*.css")).map { |f| File.basename(f) } 33 | end 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /bower_components/jasmine/lib/jasmine-core/example/SpecRunner.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Jasmine Spec Runner 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /bower_components/jasmine/lib/jasmine-core/example/spec/PlayerSpec.js: -------------------------------------------------------------------------------- 1 | describe("Player", function() { 2 | var player; 3 | var song; 4 | 5 | beforeEach(function() { 6 | player = new Player(); 7 | song = new Song(); 8 | }); 9 | 10 | it("should be able to play a Song", function() { 11 | player.play(song); 12 | expect(player.currentlyPlayingSong).toEqual(song); 13 | 14 | //demonstrates use of custom matcher 15 | expect(player).toBePlaying(song); 16 | }); 17 | 18 | describe("when song has been paused", function() { 19 | beforeEach(function() { 20 | player.play(song); 21 | player.pause(); 22 | }); 23 | 24 | it("should indicate that the song is currently paused", function() { 25 | expect(player.isPlaying).toBeFalsy(); 26 | 27 | // demonstrates use of 'not' with a custom matcher 28 | expect(player).not.toBePlaying(song); 29 | }); 30 | 31 | it("should be possible to resume", function() { 32 | player.resume(); 33 | expect(player.isPlaying).toBeTruthy(); 34 | expect(player.currentlyPlayingSong).toEqual(song); 35 | }); 36 | }); 37 | 38 | // demonstrates use of spies to intercept and test method calls 39 | it("tells the current song if the user has made it a favorite", function() { 40 | spyOn(song, 'persistFavoriteStatus'); 41 | 42 | player.play(song); 43 | player.makeFavorite(); 44 | 45 | expect(song.persistFavoriteStatus).toHaveBeenCalledWith(true); 46 | }); 47 | 48 | //demonstrates use of expected exceptions 49 | describe("#resume", function() { 50 | it("should throw an exception if song is already playing", function() { 51 | player.play(song); 52 | 53 | expect(function() { 54 | player.resume(); 55 | }).toThrow("song is already playing"); 56 | }); 57 | }); 58 | }); -------------------------------------------------------------------------------- /bower_components/jasmine/lib/jasmine-core/example/spec/SpecHelper.js: -------------------------------------------------------------------------------- 1 | beforeEach(function() { 2 | this.addMatchers({ 3 | toBePlaying: function(expectedSong) { 4 | var player = this.actual; 5 | return player.currentlyPlayingSong === expectedSong && 6 | player.isPlaying; 7 | } 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /bower_components/jasmine/lib/jasmine-core/example/src/Player.js: -------------------------------------------------------------------------------- 1 | function Player() { 2 | } 3 | Player.prototype.play = function(song) { 4 | this.currentlyPlayingSong = song; 5 | this.isPlaying = true; 6 | }; 7 | 8 | Player.prototype.pause = function() { 9 | this.isPlaying = false; 10 | }; 11 | 12 | Player.prototype.resume = function() { 13 | if (this.isPlaying) { 14 | throw new Error("song is already playing"); 15 | } 16 | 17 | this.isPlaying = true; 18 | }; 19 | 20 | Player.prototype.makeFavorite = function() { 21 | this.currentlyPlayingSong.persistFavoriteStatus(true); 22 | }; -------------------------------------------------------------------------------- /bower_components/jasmine/lib/jasmine-core/example/src/Song.js: -------------------------------------------------------------------------------- 1 | function Song() { 2 | } 3 | 4 | Song.prototype.persistFavoriteStatus = function(value) { 5 | // something complicated 6 | throw new Error("not yet implemented"); 7 | }; -------------------------------------------------------------------------------- /bower_components/jasmine/lib/jasmine-core/version.rb: -------------------------------------------------------------------------------- 1 | module Jasmine 2 | module Core 3 | VERSION = "1.3.1" 4 | end 5 | end 6 | 7 | -------------------------------------------------------------------------------- /bower_components/jasmine/spec/core/BaseSpec.js: -------------------------------------------------------------------------------- 1 | describe("base.js", function() { 2 | describe("jasmine.MessageResult", function() { 3 | it("#toString should pretty-print and concatenate each part of the message", function() { 4 | var values = ["log", "message", 123, {key: "value"}, "FTW!"]; 5 | var messageResult = new jasmine.MessageResult(values); 6 | expect(messageResult.toString()).toEqual("log message 123 { key : 'value' } FTW!"); 7 | }); 8 | }); 9 | 10 | describe("jasmine.log", function() { 11 | it("should accept n arguments", function() { 12 | spyOn(jasmine.getEnv().currentSpec, 'log'); 13 | jasmine.log(1, 2, 3); 14 | expect(jasmine.getEnv().currentSpec.log).toHaveBeenCalledWith(1, 2, 3); 15 | }); 16 | }); 17 | 18 | describe("jasmine.getGlobal", function() { 19 | it("should return the global object", function() { 20 | var globalObject = (function() { 21 | return this; 22 | })(); 23 | 24 | expect(jasmine.getGlobal()).toBe(globalObject); 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /bower_components/jasmine/spec/core/MockClockSpec.js: -------------------------------------------------------------------------------- 1 | describe("MockClock", function () { 2 | 3 | beforeEach(function() { 4 | jasmine.Clock.useMock(); 5 | }); 6 | 7 | describe("setTimeout", function () { 8 | it("should mock the clock when useMock is in a beforeEach", function() { 9 | var expected = false; 10 | setTimeout(function() { 11 | expected = true; 12 | }, 30000); 13 | expect(expected).toBe(false); 14 | jasmine.Clock.tick(30001); 15 | expect(expected).toBe(true); 16 | }); 17 | }); 18 | 19 | describe("setInterval", function () { 20 | it("should mock the clock when useMock is in a beforeEach", function() { 21 | var interval = 0; 22 | setInterval(function() { 23 | interval++; 24 | }, 30000); 25 | expect(interval).toEqual(0); 26 | jasmine.Clock.tick(30001); 27 | expect(interval).toEqual(1); 28 | jasmine.Clock.tick(30001); 29 | expect(interval).toEqual(2); 30 | jasmine.Clock.tick(1); 31 | expect(interval).toEqual(2); 32 | }); 33 | }); 34 | 35 | it("shouldn't complain if you call jasmine.Clock.useMock() more than once", function() { 36 | jasmine.Clock.useMock(); 37 | }); 38 | }); 39 | -------------------------------------------------------------------------------- /bower_components/jasmine/spec/core/MultiReporterSpec.js: -------------------------------------------------------------------------------- 1 | describe("jasmine.MultiReporter", function() { 2 | var multiReporter, fakeReporter1, fakeReporter2; 3 | 4 | beforeEach(function() { 5 | multiReporter = new jasmine.MultiReporter(); 6 | fakeReporter1 = jasmine.createSpyObj("fakeReporter1", ["reportSpecResults"]); 7 | fakeReporter2 = jasmine.createSpyObj("fakeReporter2", ["reportSpecResults", "reportRunnerStarting"]); 8 | multiReporter.addReporter(fakeReporter1); 9 | multiReporter.addReporter(fakeReporter2); 10 | }); 11 | 12 | it("should support all the method calls that jasmine.Reporter supports", function() { 13 | var delegate = {}; 14 | multiReporter.addReporter(delegate); 15 | 16 | this.addMatchers({ 17 | toDelegateMethod: function(methodName) { 18 | delegate[methodName] = jasmine.createSpy(methodName); 19 | this.actual[methodName]("whatever argument"); 20 | 21 | return delegate[methodName].wasCalled && 22 | delegate[methodName].mostRecentCall.args.length == 1 && 23 | delegate[methodName].mostRecentCall.args[0] == "whatever argument"; 24 | } 25 | }); 26 | 27 | expect(multiReporter).toDelegateMethod('reportRunnerStarting'); 28 | expect(multiReporter).toDelegateMethod('reportRunnerResults'); 29 | expect(multiReporter).toDelegateMethod('reportSuiteResults'); 30 | expect(multiReporter).toDelegateMethod('reportSpecStarting'); 31 | expect(multiReporter).toDelegateMethod('reportSpecResults'); 32 | expect(multiReporter).toDelegateMethod('log'); 33 | }); 34 | 35 | it("should delegate to any and all subreporters", function() { 36 | multiReporter.reportSpecResults('blah', 'foo'); 37 | expect(fakeReporter1.reportSpecResults).toHaveBeenCalledWith('blah', 'foo'); 38 | expect(fakeReporter2.reportSpecResults).toHaveBeenCalledWith('blah', 'foo'); 39 | }); 40 | 41 | it("should quietly skip delegating to any subreporters which lack the given method", function() { 42 | multiReporter.reportRunnerStarting('blah', 'foo'); 43 | expect(fakeReporter2.reportRunnerStarting).toHaveBeenCalledWith('blah', 'foo'); 44 | }); 45 | }); -------------------------------------------------------------------------------- /bower_components/jasmine/spec/core/QueueSpec.js: -------------------------------------------------------------------------------- 1 | describe("jasmine.Queue", function() { 2 | it("should not call itself recursively, so we don't get stack overflow errors", function() { 3 | var queue = new jasmine.Queue(new jasmine.Env()); 4 | queue.add(new jasmine.Block(null, function() {})); 5 | queue.add(new jasmine.Block(null, function() {})); 6 | queue.add(new jasmine.Block(null, function() {})); 7 | queue.add(new jasmine.Block(null, function() {})); 8 | 9 | var nestCount = 0; 10 | var maxNestCount = 0; 11 | var nextCallCount = 0; 12 | queue.next_ = function() { 13 | nestCount++; 14 | if (nestCount > maxNestCount) maxNestCount = nestCount; 15 | 16 | jasmine.Queue.prototype.next_.apply(queue, arguments); 17 | nestCount--; 18 | }; 19 | 20 | queue.start(); 21 | expect(maxNestCount).toEqual(1); 22 | }); 23 | }); -------------------------------------------------------------------------------- /bower_components/jasmine/spec/core/ReporterSpec.js: -------------------------------------------------------------------------------- 1 | describe('jasmine.Reporter', function() { 2 | var env; 3 | 4 | 5 | beforeEach(function() { 6 | env = new jasmine.Env(); 7 | env.updateInterval = 0; 8 | }); 9 | 10 | it('should get called from the test runner', function() { 11 | env.describe('Suite for JSON Reporter with Callbacks', function () { 12 | env.it('should be a test', function() { 13 | this.runs(function () { 14 | this.expect(true).toEqual(true); 15 | }); 16 | }); 17 | env.it('should be a failing test', function() { 18 | this.runs(function () { 19 | this.expect(false).toEqual(true); 20 | }); 21 | }); 22 | }); 23 | env.describe('Suite for JSON Reporter with Callbacks 2', function () { 24 | env.it('should be a test', function() { 25 | this.runs(function () { 26 | this.expect(true).toEqual(true); 27 | }); 28 | }); 29 | 30 | }); 31 | 32 | var foo = 0; 33 | var bar = 0; 34 | var baz = 0; 35 | 36 | env.addReporter({ 37 | reportSpecResults: function() { 38 | foo++; 39 | }, 40 | reportSuiteResults: function() { 41 | bar++; 42 | }, 43 | reportRunnerResults: function() { 44 | baz++; 45 | } 46 | }); 47 | 48 | var runner = env.currentRunner(); 49 | runner.execute(); 50 | 51 | expect(foo).toEqual(3); // 'foo was expected to be 3, was ' + foo); 52 | expect(bar).toEqual(2); // 'bar was expected to be 2, was ' + bar); 53 | expect(baz).toEqual(1); // 'baz was expected to be 1, was ' + baz); 54 | }); 55 | 56 | }); -------------------------------------------------------------------------------- /bower_components/jasmine/spec/core/UtilSpec.js: -------------------------------------------------------------------------------- 1 | describe("jasmine.util", function() { 2 | describe("extend", function () { 3 | it("should add properies to a destination object ", function() { 4 | var destination = {baz: 'baz'}; 5 | jasmine.util.extend(destination, { 6 | foo: 'foo', bar: 'bar' 7 | }); 8 | expect(destination).toEqual({foo: 'foo', bar: 'bar', baz: 'baz'}); 9 | }); 10 | 11 | it("should replace properies that already exist on a destination object", function() { 12 | var destination = {foo: 'foo'}; 13 | jasmine.util.extend(destination, { 14 | foo: 'bar' 15 | }); 16 | expect(destination).toEqual({foo: 'bar'}); 17 | jasmine.util.extend(destination, { 18 | foo: null 19 | }); 20 | expect(destination).toEqual({foo: null}); 21 | }); 22 | }); 23 | 24 | describe("isArray_", function() { 25 | it("should return true if the argument is an array", function() { 26 | expect(jasmine.isArray_([])).toBe(true); 27 | expect(jasmine.isArray_(['a'])).toBe(true); 28 | }); 29 | 30 | it("should return false if the argument is not an array", function() { 31 | expect(jasmine.isArray_(undefined)).toBe(false); 32 | expect(jasmine.isArray_({})).toBe(false); 33 | expect(jasmine.isArray_(function() {})).toBe(false); 34 | expect(jasmine.isArray_('foo')).toBe(false); 35 | expect(jasmine.isArray_(5)).toBe(false); 36 | expect(jasmine.isArray_(null)).toBe(false); 37 | }); 38 | }); 39 | }); 40 | -------------------------------------------------------------------------------- /bower_components/jasmine/spec/html/MatchersHtmlSpec.js: -------------------------------------------------------------------------------- 1 | describe("MatchersSpec - HTML Dependent", function () { 2 | var env, spec; 3 | 4 | beforeEach(function() { 5 | env = new jasmine.Env(); 6 | env.updateInterval = 0; 7 | 8 | var suite = env.describe("suite", function() { 9 | spec = env.it("spec", function() { 10 | }); 11 | }); 12 | spyOn(spec, 'addMatcherResult'); 13 | 14 | this.addMatchers({ 15 | toPass: function() { 16 | return lastResult().passed(); 17 | }, 18 | toFail: function() { 19 | return !lastResult().passed(); 20 | } 21 | }); 22 | }); 23 | 24 | function match(value) { 25 | return spec.expect(value); 26 | } 27 | 28 | function lastResult() { 29 | return spec.addMatcherResult.mostRecentCall.args[0]; 30 | } 31 | 32 | it("toEqual with DOM nodes", function() { 33 | var nodeA = document.createElement('div'); 34 | var nodeB = document.createElement('div'); 35 | expect((match(nodeA).toEqual(nodeA))).toPass(); 36 | expect((match(nodeA).toEqual(nodeB))).toFail(); 37 | }); 38 | }); -------------------------------------------------------------------------------- /bower_components/jasmine/spec/html/PrettyPrintHtmlSpec.js: -------------------------------------------------------------------------------- 1 | describe("jasmine.pp (HTML Dependent)", function () { 2 | it("should stringify HTML nodes properly", function() { 3 | var sampleNode = document.createElement('div'); 4 | sampleNode.innerHTML = 'foobar'; 5 | expect(jasmine.pp(sampleNode)).toEqual("HTMLNode"); 6 | expect(jasmine.pp({foo: sampleNode})).toEqual("{ foo : HTMLNode }"); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /bower_components/jasmine/spec/jasmine.yml: -------------------------------------------------------------------------------- 1 | jasmine_dir: 2 | - 'src' 3 | #This 'magic' inclusion order allows the travis build to pass. 4 | #TODO: search for the correct files to include to prevent 5 | jasmine_files: 6 | - 'core/base.js' 7 | - 'core/util.js' 8 | - 'core/Reporter.js' 9 | #end of known dependencies 10 | - 'core/Env.js' 11 | - 'core/Block.js' 12 | - 'core/JsApiReporter.js' 13 | - 'core/Matchers.js' 14 | - 'core/mock-timeout.js' 15 | - 'core/MultiReporter.js' 16 | - 'core/NestedResults.js' 17 | - 'core/PrettyPrinter.js' 18 | - 'core/Queue.js' 19 | - 'core/Runner.js' 20 | - 'core/Spec.js' 21 | - 'core/Suite.js' 22 | - 'core/WaitsBlock.js' 23 | - 'core/WaitsForBlock.js' 24 | - 'html/HtmlReporterHelpers.js' 25 | - 'html/HtmlReporter.js' 26 | - '**/*.js' 27 | jasmine_css_files: 28 | - 'html/jasmine.css' 29 | src_files: 30 | stylesheets: 31 | helpers: 32 | - 'helpers/**/*.js' 33 | spec_files: 34 | - '**/*[Ss]pec.js' 35 | src_dir: 36 | spec_dir: 37 | - 'spec' 38 | 39 | 40 | -------------------------------------------------------------------------------- /bower_components/jasmine/spec/jasmine_self_test_spec.rb: -------------------------------------------------------------------------------- 1 | require 'jasmine' 2 | 3 | Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'jasmine.yml')) 4 | config = Jasmine.config 5 | server = Jasmine::Server.new(config.port, Jasmine::Application.app(config)) 6 | driver = Jasmine::SeleniumDriver.new(config.browser, "#{config.host}:#{config.port}/") 7 | 8 | t = Thread.new do 9 | begin 10 | server.start 11 | rescue ChildProcess::TimeoutError 12 | end 13 | # # ignore bad exits 14 | end 15 | t.abort_on_exception = true 16 | Jasmine::wait_for_listener(config.port, "jasmine server") 17 | puts "jasmine server started." 18 | 19 | results_processor = Jasmine::ResultsProcessor.new(config) 20 | results = Jasmine::Runners::HTTP.new(driver, results_processor, config.result_batch_size).run 21 | formatter = Jasmine::RspecFormatter.new 22 | formatter.format_results(results) 23 | 24 | -------------------------------------------------------------------------------- /bower_components/jasmine/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | # This file was generated by the `rspec --init` command. Conventionally, all 2 | # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. 3 | # Require this file using `require "spec_helper.rb"` to ensure that it is only 4 | # loaded once. 5 | # 6 | # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration 7 | RSpec.configure do |config| 8 | config.treat_symbols_as_metadata_keys_with_true_values = true 9 | config.run_all_when_everything_filtered = true 10 | config.filter_run :focus 11 | end 12 | 13 | require 'awesome_print' 14 | require 'tmpdir' 15 | require 'nokogiri' 16 | 17 | def project_root 18 | File.join(File.expand_path(File.dirname(__FILE__)), '..') 19 | end 20 | 21 | require "#{project_root}/tasks/jasmine_dev" 22 | 23 | def capture_output(capture = true) 24 | if capture 25 | output = StringIO.new 26 | $stdout = output 27 | end 28 | yield 29 | if capture 30 | output.string 31 | end 32 | ensure 33 | $stdout = STDOUT 34 | end 35 | 36 | def reset_dir(dir) 37 | FileUtils.rm_r dir if File.exists?(dir) 38 | FileUtils.mkdir_p dir 39 | end 40 | 41 | def jasmine_version 42 | version = jasmine_version_object 43 | 44 | version_string = "#{version['major']}.#{version['minor']}.#{version['build']}" 45 | version_string += ".rc#{version['release_candidate']}" if version['release_candidate'] 46 | version_string 47 | end 48 | 49 | def jasmine_version_object 50 | @version_object ||= JSON.parse(File.read(File.join(JasmineDev.project_root, 'src', 'version.json'))) 51 | end -------------------------------------------------------------------------------- /bower_components/jasmine/spec/tasks/build_distribution_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper.rb' 2 | 3 | describe "Build Jasmine task" do 4 | 5 | let(:jasmine_core_dir) { "#{Dir.tmpdir}/jasmine-core" } 6 | let(:jasmine_dev) { JasmineDev.new } 7 | 8 | before do 9 | reset_dir jasmine_core_dir 10 | @output = capture_output { jasmine_dev.build_distribution jasmine_core_dir } 11 | end 12 | 13 | it "should say that JSHint is running" do 14 | @output.should match(/Running JSHint/) 15 | @output.should match(/Jasmine JSHint PASSED/) 16 | end 17 | 18 | it "should tell the developer it is building the distribution" do 19 | @output.should match(/Building Jasmine distribution/) 20 | end 21 | 22 | it "should build jasmine.js in the destination directory" do 23 | File.exist?("#{jasmine_core_dir}/jasmine.js").should be_true 24 | end 25 | 26 | it "should build jasmine-html.js in the destination directory" do 27 | File.exist?("#{jasmine_core_dir}/jasmine-html.js").should be_true 28 | end 29 | 30 | it "should build jasmine.css" do 31 | File.exist?("#{jasmine_core_dir}/jasmine.css").should be_true 32 | end 33 | end -------------------------------------------------------------------------------- /bower_components/jasmine/spec/tasks/build_github_pages_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper.rb' 2 | 3 | describe "Build Github Pages task" do 4 | 5 | let(:pages_dir) { File.join(Dir.tmpdir, 'pages') } 6 | let(:jasmine_dev) { JasmineDev.new } 7 | 8 | before do 9 | reset_dir pages_dir 10 | end 11 | 12 | describe "when the Github pages submodule is not present" do 13 | before do 14 | jasmine_dev.should_receive(:has_pages_submodule?).and_return(false) 15 | 16 | @output = capture_output { jasmine_dev.build_github_pages pages_dir } 17 | end 18 | 19 | it "should tell the user the task is running" do 20 | @output.should match(/Building Github Pages/) 21 | end 22 | 23 | it "should prompt the user to install the submodule" do 24 | @output.should match(/Submodule for Github Pages isn't present/) 25 | end 26 | end 27 | 28 | describe "when the Github pages submodule is present" do 29 | before do 30 | jasmine_dev.should_receive(:has_pages_submodule?).and_return(true) 31 | 32 | @output = capture_output { jasmine_dev.build_github_pages pages_dir } 33 | end 34 | 35 | it "should tell the user the task is running" do 36 | @output.should match(/Building Github Pages/) 37 | end 38 | 39 | it "should copy the latest jasmine files to the pages dir" do 40 | ['jasmine.js', 'jasmine.css', 'jasmine-html.js'].each do |lib_file| 41 | source = File.read(File.join(project_root, 'lib', 'jasmine-core', lib_file)) 42 | dest = File.read(File.join(pages_dir, 'lib', lib_file)) 43 | 44 | source.should == dest 45 | end 46 | end 47 | 48 | it "should build a new page" do 49 | @output.should match(/rocco/) 50 | File.exist?(File.join(pages_dir, 'introduction.html')).should be_true 51 | end 52 | 53 | it "should copy the rocco output to index.html" do 54 | introduction = File.read(File.join(pages_dir, 'introduction.html')) 55 | index = File.read(File.join(pages_dir, 'index.html')) 56 | 57 | index.should == introduction 58 | end 59 | end 60 | end -------------------------------------------------------------------------------- /bower_components/jasmine/spec/tasks/count_specs_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper.rb' 2 | 3 | describe "Spec counting task" do 4 | 5 | let(:jasmine_dev) { JasmineDev.new } 6 | 7 | before do 8 | @output = capture_output { jasmine_dev.count_specs } 9 | end 10 | 11 | it "should tell the developer that the specs are being counted" do 12 | @output.should match(/Counting specs/) 13 | end 14 | 15 | it "should report the number of specs that will run in node" do 16 | @output.should match(/\d+ \e\[0mspecs for Node.js/) 17 | end 18 | 19 | it "should report the number of specs that will run in the browser" do 20 | @output.should match(/\d+ \e\[0mspecs for Browser/) 21 | end 22 | 23 | it "should remind the developer to check the count" do 24 | @output.should match(/Please verify/) 25 | end 26 | end -------------------------------------------------------------------------------- /bower_components/jasmine/spec/tasks/jshint_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper.rb' 2 | 3 | describe "JSHint task" do 4 | 5 | let(:tmp_dir) { "#{Dir.tmpdir}/jasmine_tasks_test" } 6 | let(:jasmine_dev) { JasmineDev.new } 7 | 8 | before do 9 | reset_dir tmp_dir 10 | end 11 | 12 | describe "when Node is not present" do 13 | before do 14 | jasmine_dev.should_receive(:has_node?).and_return(false) 15 | @output = capture_output { jasmine_dev.js_hint } 16 | end 17 | 18 | it "should not tell the user that lint is running" do 19 | @output.should_not match(/Running JSHint/) 20 | end 21 | 22 | it "should prompt the user to install Node" do 23 | @output.should match(/Node\.js is required/) 24 | end 25 | end 26 | 27 | describe "when Node is present" do 28 | before do 29 | jasmine_dev.should_receive(:has_node?).and_return(true) 30 | 31 | @output = capture_output { jasmine_dev.js_hint } 32 | end 33 | 34 | it "should tell the user that lint is running" do 35 | @output.should match(/Running JSHint/) 36 | @output.should match(/Jasmine JSHint PASSED/) 37 | end 38 | end 39 | end -------------------------------------------------------------------------------- /bower_components/jasmine/spec/tasks/release_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper.rb' 2 | 3 | describe "Release task" do 4 | 5 | let(:jasmine_dev) { JasmineDev.new } 6 | 7 | describe "when the pages submodule is not present" do 8 | before do 9 | jasmine_dev.should_receive(:has_pages_submodule?).and_return(false) 10 | 11 | @output = capture_output { jasmine_dev.release_prep } 12 | end 13 | 14 | it "should tell the user the task is running" do 15 | @output.should match(/Building Release/) 16 | end 17 | 18 | it "should prompt the user to install the submodule" do 19 | @output.should match(/Submodule for Github Pages isn't present/) 20 | end 21 | end 22 | 23 | describe "when the pages submodule is present" do 24 | before do 25 | JasmineDev.any_instance.should_receive(:write_version_files) 26 | JasmineDev.any_instance.should_receive(:build_distribution) 27 | JasmineDev.any_instance.should_receive(:build_standalone_distribution) 28 | JasmineDev.any_instance.should_receive(:build_github_pages) 29 | 30 | jasmine_dev.should_receive(:has_pages_submodule?).and_return(true) 31 | 32 | @output = capture_output { jasmine_dev.release_prep } 33 | end 34 | 35 | it "should tell the user the task is running" do 36 | @output.should match(/Building Release/) 37 | end 38 | end 39 | end -------------------------------------------------------------------------------- /bower_components/jasmine/spec/tasks/version_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper.rb' 2 | 3 | describe "Version tasks" do 4 | 5 | let(:jasmine_dev) { JasmineDev.new } 6 | 7 | describe "write_version_files" do 8 | 9 | before do 10 | @output = capture_output { jasmine_dev.write_version_files } 11 | end 12 | 13 | it "should tell the user that the task has started" do 14 | @output.should match(/Building version files/) 15 | end 16 | 17 | it "should build the version.js file" do 18 | js_version = File.read(File.join(project_root, 'src', 'version.js')) 19 | js_version.should match(%Q{"build": #{jasmine_version_object["build"]}}) 20 | js_version.should match(%Q{"minor": #{jasmine_version_object["minor"]}}) 21 | js_version.should match(%Q{"build": #{jasmine_version_object["build"]}}) 22 | 23 | if jasmine_version_object["release_candidate"] 24 | js_version.should match(%Q{"release_candidate": #{jasmine_version_object["release_candidate"]}}) 25 | end 26 | 27 | js_version.should match(/"revision": \d+/) 28 | end 29 | 30 | it "should build the jasmine-core ruby gem version" do 31 | ruby_version = File.read(File.join(project_root, 'lib', 'jasmine-core', 'version.rb')) 32 | ruby_version.should match(%Q{VERSION = "#{jasmine_version}"}) 33 | end 34 | end 35 | 36 | describe "display_version" do 37 | describe "when Node.js is not present" do 38 | before do 39 | @output = capture_output { jasmine_dev.display_version } 40 | end 41 | 42 | it "should display a version header" do 43 | @output.should match(/Current version/) 44 | end 45 | 46 | it "should display the current version Object" do 47 | @output.should match(/Display version: \e\[33m\d+\.\d+\.\d+/) 48 | end 49 | 50 | it "should display the current version string" do 51 | @output.should match(/\{ "major": \d+, "minor": \d+, "build": \d+/) 52 | end 53 | end 54 | end 55 | end -------------------------------------------------------------------------------- /bower_components/jasmine/spec/templates/runner.html.erb: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | <%= title %> 6 | 7 | <%= favicon %> 8 | <%= jasmine_tags %> 9 | 10 | 11 | <%= source_tags %> 12 | 13 | 14 | <%= spec_file_tags %> 15 | 16 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /bower_components/jasmine/spec/templates/script_tag.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/core/Block.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Blocks are functions with executable code that make up a spec. 3 | * 4 | * @constructor 5 | * @param {jasmine.Env} env 6 | * @param {Function} func 7 | * @param {jasmine.Spec} spec 8 | */ 9 | jasmine.Block = function(env, func, spec) { 10 | this.env = env; 11 | this.func = func; 12 | this.spec = spec; 13 | }; 14 | 15 | jasmine.Block.prototype.execute = function(onComplete) { 16 | if (!jasmine.CATCH_EXCEPTIONS) { 17 | this.func.apply(this.spec); 18 | } 19 | else { 20 | try { 21 | this.func.apply(this.spec); 22 | } catch (e) { 23 | this.spec.fail(e); 24 | } 25 | } 26 | onComplete(); 27 | }; 28 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/core/MultiReporter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @constructor 3 | */ 4 | jasmine.MultiReporter = function() { 5 | this.subReporters_ = []; 6 | }; 7 | jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter); 8 | 9 | jasmine.MultiReporter.prototype.addReporter = function(reporter) { 10 | this.subReporters_.push(reporter); 11 | }; 12 | 13 | (function() { 14 | var functionNames = [ 15 | "reportRunnerStarting", 16 | "reportRunnerResults", 17 | "reportSuiteResults", 18 | "reportSpecStarting", 19 | "reportSpecResults", 20 | "log" 21 | ]; 22 | for (var i = 0; i < functionNames.length; i++) { 23 | var functionName = functionNames[i]; 24 | jasmine.MultiReporter.prototype[functionName] = (function(functionName) { 25 | return function() { 26 | for (var j = 0; j < this.subReporters_.length; j++) { 27 | var subReporter = this.subReporters_[j]; 28 | if (subReporter[functionName]) { 29 | subReporter[functionName].apply(subReporter, arguments); 30 | } 31 | } 32 | }; 33 | })(functionName); 34 | } 35 | })(); 36 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/core/NestedResults.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults 3 | * 4 | * @constructor 5 | */ 6 | jasmine.NestedResults = function() { 7 | /** 8 | * The total count of results 9 | */ 10 | this.totalCount = 0; 11 | /** 12 | * Number of passed results 13 | */ 14 | this.passedCount = 0; 15 | /** 16 | * Number of failed results 17 | */ 18 | this.failedCount = 0; 19 | /** 20 | * Was this suite/spec skipped? 21 | */ 22 | this.skipped = false; 23 | /** 24 | * @ignore 25 | */ 26 | this.items_ = []; 27 | }; 28 | 29 | /** 30 | * Roll up the result counts. 31 | * 32 | * @param result 33 | */ 34 | jasmine.NestedResults.prototype.rollupCounts = function(result) { 35 | this.totalCount += result.totalCount; 36 | this.passedCount += result.passedCount; 37 | this.failedCount += result.failedCount; 38 | }; 39 | 40 | /** 41 | * Adds a log message. 42 | * @param values Array of message parts which will be concatenated later. 43 | */ 44 | jasmine.NestedResults.prototype.log = function(values) { 45 | this.items_.push(new jasmine.MessageResult(values)); 46 | }; 47 | 48 | /** 49 | * Getter for the results: message & results. 50 | */ 51 | jasmine.NestedResults.prototype.getItems = function() { 52 | return this.items_; 53 | }; 54 | 55 | /** 56 | * Adds a result, tracking counts (total, passed, & failed) 57 | * @param {jasmine.ExpectationResult|jasmine.NestedResults} result 58 | */ 59 | jasmine.NestedResults.prototype.addResult = function(result) { 60 | if (result.type != 'log') { 61 | if (result.items_) { 62 | this.rollupCounts(result); 63 | } else { 64 | this.totalCount++; 65 | if (result.passed()) { 66 | this.passedCount++; 67 | } else { 68 | this.failedCount++; 69 | } 70 | } 71 | } 72 | this.items_.push(result); 73 | }; 74 | 75 | /** 76 | * @returns {Boolean} True if everything below passed 77 | */ 78 | jasmine.NestedResults.prototype.passed = function() { 79 | return this.passedCount === this.totalCount; 80 | }; 81 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/core/Reporter.js: -------------------------------------------------------------------------------- 1 | /** No-op base class for Jasmine reporters. 2 | * 3 | * @constructor 4 | */ 5 | jasmine.Reporter = function() { 6 | }; 7 | 8 | //noinspection JSUnusedLocalSymbols 9 | jasmine.Reporter.prototype.reportRunnerStarting = function(runner) { 10 | }; 11 | 12 | //noinspection JSUnusedLocalSymbols 13 | jasmine.Reporter.prototype.reportRunnerResults = function(runner) { 14 | }; 15 | 16 | //noinspection JSUnusedLocalSymbols 17 | jasmine.Reporter.prototype.reportSuiteResults = function(suite) { 18 | }; 19 | 20 | //noinspection JSUnusedLocalSymbols 21 | jasmine.Reporter.prototype.reportSpecStarting = function(spec) { 22 | }; 23 | 24 | //noinspection JSUnusedLocalSymbols 25 | jasmine.Reporter.prototype.reportSpecResults = function(spec) { 26 | }; 27 | 28 | //noinspection JSUnusedLocalSymbols 29 | jasmine.Reporter.prototype.log = function(str) { 30 | }; 31 | 32 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/core/Runner.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Runner 3 | * 4 | * @constructor 5 | * @param {jasmine.Env} env 6 | */ 7 | jasmine.Runner = function(env) { 8 | var self = this; 9 | self.env = env; 10 | self.queue = new jasmine.Queue(env); 11 | self.before_ = []; 12 | self.after_ = []; 13 | self.suites_ = []; 14 | }; 15 | 16 | jasmine.Runner.prototype.execute = function() { 17 | var self = this; 18 | if (self.env.reporter.reportRunnerStarting) { 19 | self.env.reporter.reportRunnerStarting(this); 20 | } 21 | self.queue.start(function () { 22 | self.finishCallback(); 23 | }); 24 | }; 25 | 26 | jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) { 27 | beforeEachFunction.typeName = 'beforeEach'; 28 | this.before_.splice(0,0,beforeEachFunction); 29 | }; 30 | 31 | jasmine.Runner.prototype.afterEach = function(afterEachFunction) { 32 | afterEachFunction.typeName = 'afterEach'; 33 | this.after_.splice(0,0,afterEachFunction); 34 | }; 35 | 36 | 37 | jasmine.Runner.prototype.finishCallback = function() { 38 | this.env.reporter.reportRunnerResults(this); 39 | }; 40 | 41 | jasmine.Runner.prototype.addSuite = function(suite) { 42 | this.suites_.push(suite); 43 | }; 44 | 45 | jasmine.Runner.prototype.add = function(block) { 46 | if (block instanceof jasmine.Suite) { 47 | this.addSuite(block); 48 | } 49 | this.queue.add(block); 50 | }; 51 | 52 | jasmine.Runner.prototype.specs = function () { 53 | var suites = this.suites(); 54 | var specs = []; 55 | for (var i = 0; i < suites.length; i++) { 56 | specs = specs.concat(suites[i].specs()); 57 | } 58 | return specs; 59 | }; 60 | 61 | jasmine.Runner.prototype.suites = function() { 62 | return this.suites_; 63 | }; 64 | 65 | jasmine.Runner.prototype.topLevelSuites = function() { 66 | var topLevelSuites = []; 67 | for (var i = 0; i < this.suites_.length; i++) { 68 | if (!this.suites_[i].parentSuite) { 69 | topLevelSuites.push(this.suites_[i]); 70 | } 71 | } 72 | return topLevelSuites; 73 | }; 74 | 75 | jasmine.Runner.prototype.results = function() { 76 | return this.queue.results(); 77 | }; 78 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/core/WaitsBlock.js: -------------------------------------------------------------------------------- 1 | jasmine.WaitsBlock = function(env, timeout, spec) { 2 | this.timeout = timeout; 3 | jasmine.Block.call(this, env, null, spec); 4 | }; 5 | 6 | jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block); 7 | 8 | jasmine.WaitsBlock.prototype.execute = function (onComplete) { 9 | if (jasmine.VERBOSE) { 10 | this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...'); 11 | } 12 | this.env.setTimeout(function () { 13 | onComplete(); 14 | }, this.timeout); 15 | }; 16 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/core/WaitsForBlock.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A block which waits for some condition to become true, with timeout. 3 | * 4 | * @constructor 5 | * @extends jasmine.Block 6 | * @param {jasmine.Env} env The Jasmine environment. 7 | * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true. 8 | * @param {Function} latchFunction A function which returns true when the desired condition has been met. 9 | * @param {String} message The message to display if the desired condition hasn't been met within the given time period. 10 | * @param {jasmine.Spec} spec The Jasmine spec. 11 | */ 12 | jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) { 13 | this.timeout = timeout || env.defaultTimeoutInterval; 14 | this.latchFunction = latchFunction; 15 | this.message = message; 16 | this.totalTimeSpentWaitingForLatch = 0; 17 | jasmine.Block.call(this, env, null, spec); 18 | }; 19 | jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block); 20 | 21 | jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10; 22 | 23 | jasmine.WaitsForBlock.prototype.execute = function(onComplete) { 24 | if (jasmine.VERBOSE) { 25 | this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen')); 26 | } 27 | var latchFunctionResult; 28 | try { 29 | latchFunctionResult = this.latchFunction.apply(this.spec); 30 | } catch (e) { 31 | this.spec.fail(e); 32 | onComplete(); 33 | return; 34 | } 35 | 36 | if (latchFunctionResult) { 37 | onComplete(); 38 | } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) { 39 | var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen'); 40 | this.spec.fail({ 41 | name: 'timeout', 42 | message: message 43 | }); 44 | 45 | this.abort = true; 46 | onComplete(); 47 | } else { 48 | this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT; 49 | var self = this; 50 | this.env.setTimeout(function() { 51 | self.execute(onComplete); 52 | }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT); 53 | } 54 | }; 55 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/core/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @namespace 3 | */ 4 | jasmine.util = {}; 5 | 6 | /** 7 | * Declare that a child class inherit it's prototype from the parent class. 8 | * 9 | * @private 10 | * @param {Function} childClass 11 | * @param {Function} parentClass 12 | */ 13 | jasmine.util.inherit = function(childClass, parentClass) { 14 | /** 15 | * @private 16 | */ 17 | var subclass = function() { 18 | }; 19 | subclass.prototype = parentClass.prototype; 20 | childClass.prototype = new subclass(); 21 | }; 22 | 23 | jasmine.util.formatException = function(e) { 24 | var lineNumber; 25 | if (e.line) { 26 | lineNumber = e.line; 27 | } 28 | else if (e.lineNumber) { 29 | lineNumber = e.lineNumber; 30 | } 31 | 32 | var file; 33 | 34 | if (e.sourceURL) { 35 | file = e.sourceURL; 36 | } 37 | else if (e.fileName) { 38 | file = e.fileName; 39 | } 40 | 41 | var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString(); 42 | 43 | if (file && lineNumber) { 44 | message += ' in ' + file + ' (line ' + lineNumber + ')'; 45 | } 46 | 47 | return message; 48 | }; 49 | 50 | jasmine.util.htmlEscape = function(str) { 51 | if (!str) return str; 52 | return str.replace(/&/g, '&') 53 | .replace(//g, '>'); 55 | }; 56 | 57 | jasmine.util.argsToArray = function(args) { 58 | var arrayOfArgs = []; 59 | for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]); 60 | return arrayOfArgs; 61 | }; 62 | 63 | jasmine.util.extend = function(destination, source) { 64 | for (var property in source) destination[property] = source[property]; 65 | return destination; 66 | }; 67 | 68 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/html/HtmlReporterHelpers.js: -------------------------------------------------------------------------------- 1 | jasmine.HtmlReporterHelpers = {}; 2 | 3 | jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) { 4 | var el = document.createElement(type); 5 | 6 | for (var i = 2; i < arguments.length; i++) { 7 | var child = arguments[i]; 8 | 9 | if (typeof child === 'string') { 10 | el.appendChild(document.createTextNode(child)); 11 | } else { 12 | if (child) { 13 | el.appendChild(child); 14 | } 15 | } 16 | } 17 | 18 | for (var attr in attrs) { 19 | if (attr == "className") { 20 | el[attr] = attrs[attr]; 21 | } else { 22 | el.setAttribute(attr, attrs[attr]); 23 | } 24 | } 25 | 26 | return el; 27 | }; 28 | 29 | jasmine.HtmlReporterHelpers.getSpecStatus = function(child) { 30 | var results = child.results(); 31 | var status = results.passed() ? 'passed' : 'failed'; 32 | if (results.skipped) { 33 | status = 'skipped'; 34 | } 35 | 36 | return status; 37 | }; 38 | 39 | jasmine.HtmlReporterHelpers.appendToSummary = function(child, childElement) { 40 | var parentDiv = this.dom.summary; 41 | var parentSuite = (typeof child.parentSuite == 'undefined') ? 'suite' : 'parentSuite'; 42 | var parent = child[parentSuite]; 43 | 44 | if (parent) { 45 | if (typeof this.views.suites[parent.id] == 'undefined') { 46 | this.views.suites[parent.id] = new jasmine.HtmlReporter.SuiteView(parent, this.dom, this.views); 47 | } 48 | parentDiv = this.views.suites[parent.id].element; 49 | } 50 | 51 | parentDiv.appendChild(childElement); 52 | }; 53 | 54 | 55 | jasmine.HtmlReporterHelpers.addHelpers = function(ctor) { 56 | for(var fn in jasmine.HtmlReporterHelpers) { 57 | ctor.prototype[fn] = jasmine.HtmlReporterHelpers[fn]; 58 | } 59 | }; 60 | 61 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/html/SuiteView.js: -------------------------------------------------------------------------------- 1 | jasmine.HtmlReporter.SuiteView = function(suite, dom, views) { 2 | this.suite = suite; 3 | this.dom = dom; 4 | this.views = views; 5 | 6 | this.element = this.createDom('div', { className: 'suite' }, 7 | this.createDom('a', { className: 'description', href: jasmine.HtmlReporter.sectionLink(this.suite.getFullName()) }, this.suite.description) 8 | ); 9 | 10 | this.appendToSummary(this.suite, this.element); 11 | }; 12 | 13 | jasmine.HtmlReporter.SuiteView.prototype.status = function() { 14 | return this.getSpecStatus(this.suite); 15 | }; 16 | 17 | jasmine.HtmlReporter.SuiteView.prototype.refresh = function() { 18 | this.element.className += " " + this.status(); 19 | }; 20 | 21 | jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SuiteView); 22 | 23 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/html/jasmine.scss: -------------------------------------------------------------------------------- 1 | @import "HTMLReporter"; 2 | @import "TrivialReporter"; -------------------------------------------------------------------------------- /bower_components/jasmine/src/templates/example_project_jasmine_tags.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/templates/version.js.erb: -------------------------------------------------------------------------------- 1 | 2 | jasmine.version_= { 3 | "major": <%= major %>, 4 | "minor": <%= minor %>, 5 | "build": <%= build %>, 6 | "revision": <%= revision %><%= %Q{,\n "release_candidate": #{release_candidate}} if release_candidate %> 7 | }; 8 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/templates/version.rb.erb: -------------------------------------------------------------------------------- 1 | module Jasmine 2 | module Core 3 | VERSION = "<%= "#{major}.#{minor}.#{build}" %><%= ".rc#{release_candidate}" if release_candidate %>" 4 | end 5 | end 6 | 7 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/version.js: -------------------------------------------------------------------------------- 1 | 2 | jasmine.version_= { 3 | "major": 1, 4 | "minor": 3, 5 | "build": 1, 6 | "revision": 1354556913 7 | }; 8 | -------------------------------------------------------------------------------- /bower_components/jasmine/src/version.json: -------------------------------------------------------------------------------- 1 | { 2 | "major": 1, 3 | "minor": 3, 4 | "build": 1 5 | } 6 | -------------------------------------------------------------------------------- /bower_components/jasmine/tasks/docs.rb: -------------------------------------------------------------------------------- 1 | desc "Build jasmine documentation" 2 | task :doc => :require_pages_submodule do 3 | puts 'Creating Jasmine Documentation' 4 | require 'rubygems' 5 | require 'jsdoc_helper' 6 | 7 | FileUtils.rm_r "pages/jsdoc", :force => true 8 | 9 | JsdocHelper::Rake::Task.new(:lambda_jsdoc) do |t| 10 | t[:files] = core_sources + html_sources + console_sources 11 | t[:options] = "-a" 12 | t[:out] = "pages/jsdoc" 13 | # JsdocHelper bug: template must be relative to the JsdocHelper gem, ick 14 | t[:template] = File.join("../".*(100), Dir::getwd, "jsdoc-template") 15 | end 16 | Rake::Task[:lambda_jsdoc].invoke 17 | end 18 | -------------------------------------------------------------------------------- /bower_components/jasmine/tasks/jasmine_dev.rb: -------------------------------------------------------------------------------- 1 | require 'thor' 2 | require 'json' 3 | require 'tilt' 4 | require 'ostruct' 5 | 6 | $:.unshift(File.join(File.dirname(__FILE__), "jasmine_dev")) 7 | 8 | require "base" 9 | require "sources" 10 | require "js_hint" 11 | require "build_distribution" 12 | require "build_github_pages" 13 | require "build_standalone_distribution" 14 | require "build_standalone_runner" 15 | require "count_specs" 16 | require "execute_specs" 17 | require "release" 18 | require "version" -------------------------------------------------------------------------------- /bower_components/jasmine/tasks/jasmine_dev/base.rb: -------------------------------------------------------------------------------- 1 | class JasmineDev < Thor 2 | include Thor::Actions 3 | 4 | def self.source_root 5 | File.dirname(__FILE__) 6 | end 7 | 8 | def self.source_paths 9 | [ 10 | File.join(JasmineDev.project_root, 'lib', 'jasmine-core'), 11 | JasmineDev.project_root 12 | ] 13 | end 14 | 15 | def self.project_root 16 | File.join(JasmineDev.source_root, '..', '..') 17 | end 18 | 19 | def self.spacer 20 | "\n--------------------" 21 | end 22 | 23 | no_tasks do 24 | # allows merged stdout in test with low-harassment 25 | def run_with_output(*run_args) 26 | say run *run_args 27 | end 28 | 29 | def node_installed? 30 | return true if has_node? 31 | 32 | say "Node.js is required to develop Jasmine. Please visit http://nodejs.org to install.", 33 | :red 34 | false 35 | end 36 | 37 | def has_node? 38 | run "which node", :verbose => false, :capture => true 39 | $?.exitstatus == 0 40 | end 41 | 42 | def pages_submodule_installed? 43 | return true if has_pages_submodule? 44 | 45 | say "Submodule for Github Pages isn't present. Run git submodule update --init", 46 | :red 47 | false 48 | end 49 | 50 | def has_pages_submodule? 51 | File.exist?(File.join(JasmineDev.project_root, 'pages', 'index.html')) 52 | end 53 | end 54 | end 55 | -------------------------------------------------------------------------------- /bower_components/jasmine/tasks/jasmine_dev/build_distribution.rb: -------------------------------------------------------------------------------- 1 | class JasmineDev < Thor 2 | 3 | desc "build_distribution", "Build Jasmine js & css files" 4 | def build_distribution(directory = "./lib/jasmine-core") 5 | invoke :js_hint 6 | 7 | say JasmineDev.spacer 8 | 9 | say "Building Jasmine distribution from source into #{directory}", :cyan 10 | 11 | say 'Building JavaScript...', :yellow 12 | 13 | inside directory do 14 | create_file "jasmine.js", 15 | concat_contents_of(jasmine_js_paths), 16 | :force => true 17 | create_file "jasmine-html.js", 18 | concat_contents_of(jasmine_html_js_paths), 19 | :force => true 20 | end 21 | 22 | say 'Building CSS...', :yellow 23 | 24 | run "compass compile", :capture => true 25 | 26 | copy_file File.join("#{JasmineDev.project_root}", 'src', 'html', 'jasmine.css'), 27 | File.join(directory, 'jasmine.css') 28 | end 29 | 30 | no_tasks do 31 | def jasmine_js_paths 32 | paths = JasmineDev::JASMINE_SOURCES[:core].collect do |f| 33 | File.join(JasmineDev.project_root, 'src', 'core', f) 34 | end 35 | 36 | paths << File.join(JasmineDev.project_root, 'src', 'version.js') 37 | paths 38 | end 39 | 40 | def jasmine_html_js_paths 41 | JasmineDev::JASMINE_SOURCES[:html].collect do |f| 42 | File.join(JasmineDev.project_root, 'src', 'html', f) 43 | end 44 | end 45 | 46 | def concat_contents_of(paths) 47 | paths.inject("") do |string, path| 48 | string << File.read(path) 49 | string 50 | end 51 | end 52 | end 53 | end -------------------------------------------------------------------------------- /bower_components/jasmine/tasks/jasmine_dev/build_github_pages.rb: -------------------------------------------------------------------------------- 1 | class JasmineDev < Thor 2 | 3 | desc "build_github_pages", "Build static pages for pivotal.github.com/jasmine" 4 | def build_github_pages(pages_dir = File.expand_path(File.join('.', 'pages'))) 5 | say JasmineDev.spacer 6 | 7 | say "Building Github Pages...", :cyan 8 | 9 | return unless pages_submodule_installed? 10 | 11 | project_lib_dir = File.join(JasmineDev.project_root, 'lib', 'jasmine-core') 12 | 13 | pages_lib_dir = File.join(pages_dir, 'lib') 14 | FileUtils.rm_r(pages_lib_dir) if File.exist?(pages_lib_dir) 15 | 16 | ['jasmine.js', 'jasmine-html.js', 'jasmine.css'].each do |file| 17 | copy_file File.join(project_lib_dir, file), File.join(pages_lib_dir, file) 18 | end 19 | 20 | inside File.join(JasmineDev.project_root, 'pages', 'src') do 21 | run_with_output "bundle exec rocco -l js introduction.js -t layout.mustache -o #{pages_dir}" 22 | end 23 | 24 | inside pages_dir do 25 | copy_file File.join(pages_dir,'introduction.html'), File.join(pages_dir,'index.html') 26 | end 27 | end 28 | end -------------------------------------------------------------------------------- /bower_components/jasmine/tasks/jasmine_dev/build_standalone_distribution.rb: -------------------------------------------------------------------------------- 1 | class JasmineDev < Thor 2 | include Thor::Actions 3 | 4 | desc "build_standalone_distribution", "Build Jasmine standalone distribution" 5 | def build_standalone_distribution(download_dir = File.expand_path(File.join('.', 'pages', 'downloads'))) 6 | invoke :build_distribution 7 | 8 | say JasmineDev.spacer 9 | 10 | say "Building standalone distribution...", :cyan 11 | 12 | say "Staging files...", :yellow 13 | 14 | lib_files.each do |f| 15 | copy_file f, File.join(standalone_temp_dir, 'lib', "jasmine-#{version_string}", f) 16 | end 17 | 18 | ['src', 'spec'].each do |dir| 19 | directory File.join('lib', 'jasmine-core', 'example', dir), 20 | File.join(standalone_temp_dir, dir) 21 | end 22 | 23 | invoke :build_standalone_runner 24 | 25 | say "Zipping distribution...", :yellow 26 | 27 | inside standalone_temp_dir do 28 | run_with_output "zip -rq ../jasmine-standalone-#{version_string}.zip ." 29 | 30 | say "Copying Zip file to downloads directory", :yellow 31 | run "mkdir -p #{download_dir}" 32 | run "cp ../jasmine-standalone-#{version_string}.zip #{download_dir}/" 33 | end 34 | 35 | end 36 | 37 | no_tasks do 38 | def standalone_temp_dir 39 | @standalone_temp_dir ||= File.join(Dir.tmpdir, 'jasmine_standalone', "jasmine-standalone-#{version_string}") 40 | end 41 | 42 | def lib_files 43 | %w{ jasmine.js jasmine-html.js jasmine.css MIT.LICENSE } 44 | end 45 | 46 | def example_path 47 | File.join('lib', "jasmine-#{version_string}") 48 | end 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /bower_components/jasmine/tasks/jasmine_dev/build_standalone_runner.rb: -------------------------------------------------------------------------------- 1 | class JasmineDev < Thor 2 | include Thor::Actions 3 | 4 | desc "build_standalone_runner", "Build HTML spec runner for Jasmine standalone distribution" 5 | 6 | def build_standalone_runner 7 | say JasmineDev.spacer 8 | 9 | say "Building standalone runner HTML...", :cyan 10 | 11 | create_file File.join(standalone_temp_dir, 'SpecRunner.html') do 12 | template = Tilt.new(File.join('spec', 'templates','runner.html.erb')) 13 | 14 | scope = OpenStruct.new(:title => "Jasmine Spec Runner", 15 | :favicon => example_favicon, 16 | :jasmine_tags => example_jasmine_tags, 17 | :source_tags => example_source_tags, 18 | :spec_file_tags => example_spec_tags) 19 | template.render(scope) 20 | end 21 | end 22 | 23 | no_tasks do 24 | def standalone_temp_dir 25 | @standalone_temp_dir ||= File.join(Dir.tmpdir, 'jasmine_standalone', "jasmine-standalone-#{version_string}") 26 | end 27 | 28 | def example_path 29 | File.join('lib', "jasmine-#{version_string}") 30 | end 31 | 32 | def example_favicon 33 | %Q{} 34 | end 35 | 36 | def script_tags_for(files) 37 | srcs = (files.is_a?(String) ? [files] : files) 38 | srcs.inject([]) do |tags, file| 39 | tags << %Q{} 40 | tags 41 | end.join("\n ") 42 | end 43 | 44 | def example_jasmine_tags 45 | tags = %Q{} 46 | tags << "\n " 47 | tags << script_tags_for(["#{example_path}/jasmine.js", "#{example_path}/jasmine-html.js"]) 48 | tags 49 | end 50 | 51 | def example_source_tags 52 | script_tags_for ['src/Player.js', 'src/Song.js'] 53 | end 54 | 55 | def example_spec_tags 56 | script_tags_for ['spec/SpecHelper.js', 'spec/PlayerSpec.js'] 57 | end 58 | end 59 | end 60 | -------------------------------------------------------------------------------- /bower_components/jasmine/tasks/jasmine_dev/count_specs.rb: -------------------------------------------------------------------------------- 1 | class JasmineDev < Thor 2 | 3 | desc "count_specs", "Count the number of specs for each test runner" 4 | def count_specs 5 | say JasmineDev.spacer 6 | say "Counting specs...", :cyan 7 | 8 | core_spec_count = count_specs_in(File.join('spec', 'core')) 9 | console_spec_count = count_specs_in(File.join('spec', 'console')) 10 | html_spec_count = count_specs_in(File.join('spec', 'html')) 11 | 12 | say "#{(core_spec_count + console_spec_count).to_s} ", :yellow 13 | say "specs for Node.js runner (exclude DOM-related specs)" 14 | say "#{(core_spec_count + console_spec_count + html_spec_count).to_s} ", :yellow 15 | say "specs for Browser runner (all specs)" 16 | say "\n" 17 | say "Please verify that these numbers match the runner output." 18 | end 19 | 20 | no_tasks do 21 | def count_specs_in(relative_path) 22 | files = Dir.glob(File.join(JasmineDev.project_root, relative_path, '*.js')) 23 | files.inject(0) do |count, file| 24 | File.read(file).scan(/\sit\s*\(/) { |s| count += 1 } 25 | count 26 | end 27 | end 28 | end 29 | end -------------------------------------------------------------------------------- /bower_components/jasmine/tasks/jasmine_dev/execute_specs.rb: -------------------------------------------------------------------------------- 1 | class JasmineDev < Thor 2 | 3 | desc "execute_specs_in_node", "Run all relevant specs in Node.js" 4 | 5 | def execute_specs_in_node 6 | return unless node_installed? 7 | 8 | invoke :build_distribution 9 | invoke :count_specs 10 | 11 | say JasmineDev.spacer 12 | 13 | say "Running all appropriate specs via Node.js...", :cyan 14 | 15 | with_color_option = STDOUT.isatty ? "--color" : "--noColor" 16 | 17 | run_with_output "node spec/node_suite.js #{with_color_option}", :capture => true 18 | end 19 | 20 | desc "execute_specs_in_browser", "Run all relevent specs in your default browser" 21 | 22 | def execute_specs_in_browser 23 | invoke :build_distribution 24 | invoke :count_specs 25 | 26 | say JasmineDev.spacer 27 | 28 | say "Running all appropriate specs via the default web browser...", :cyan 29 | 30 | open_specs_in_browser 31 | end 32 | 33 | desc "execute_specs", "Run all of Jasmine's JavaScript specs" 34 | 35 | def execute_specs 36 | invoke :execute_specs_in_node 37 | invoke :execute_specs_in_browser 38 | end 39 | 40 | no_tasks do 41 | def open_specs_in_browser 42 | require 'rbconfig' 43 | 44 | case Object.const_get(defined?(RbConfig) ? :RbConfig : :Config)::CONFIG['host_os'] 45 | when /linux/ 46 | run "xdg-open spec/runner.html" 47 | else 48 | run "open spec/runner.html" 49 | end 50 | end 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /bower_components/jasmine/tasks/jasmine_dev/js_hint.rb: -------------------------------------------------------------------------------- 1 | class JasmineDev < Thor 2 | 3 | desc "js_hint", "Run Jasmine source through JSHint" 4 | def js_hint 5 | say JasmineDev.spacer 6 | 7 | return unless node_installed? 8 | 9 | say "Running JSHint on Jasmine source and specs...", :cyan 10 | 11 | run_with_output "node jshint/run.js", :capture => true 12 | end 13 | end -------------------------------------------------------------------------------- /bower_components/jasmine/tasks/jasmine_dev/release.rb: -------------------------------------------------------------------------------- 1 | class JasmineDev < Thor 2 | 3 | desc 'release_prep', "Update version and build distributions" 4 | def release_prep 5 | say JasmineDev.spacer 6 | 7 | say "Building Release...", :cyan 8 | 9 | return unless pages_submodule_installed? 10 | 11 | invoke :write_version_files 12 | invoke :build_distribution 13 | invoke :build_standalone_distribution 14 | invoke :build_github_pages 15 | end 16 | end -------------------------------------------------------------------------------- /bower_components/jasmine/tasks/jasmine_dev/sources.rb: -------------------------------------------------------------------------------- 1 | class JasmineDev < Thor 2 | JASMINE_SOURCES = { 3 | :core => [ 4 | "base.js", 5 | "util.js", 6 | "Env.js", 7 | "Reporter.js", 8 | "Block.js", 9 | "JsApiReporter.js", 10 | "Matchers.js", 11 | "mock-timeout.js", 12 | "MultiReporter.js", 13 | "NestedResults.js", 14 | "PrettyPrinter.js", 15 | "Queue.js", 16 | "Runner.js", 17 | "Spec.js", 18 | "Suite.js", 19 | "WaitsBlock.js", 20 | "WaitsForBlock.js" 21 | ], 22 | 23 | :html => [ 24 | "HtmlReporterHelpers.js", 25 | "HtmlReporter.js", 26 | "ReporterView.js", 27 | "SpecView.js", 28 | "SuiteView.js", 29 | "TrivialReporter.js" 30 | ] 31 | } 32 | end 33 | -------------------------------------------------------------------------------- /bower_components/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "1.10.2", 4 | "description": "jQuery component", 5 | "keywords": [ 6 | "jquery", 7 | "component" 8 | ], 9 | "main": "jquery.js", 10 | "license": "MIT", 11 | "homepage": "https://github.com/jquery/jquery", 12 | "_release": "1.10.2", 13 | "_resolution": { 14 | "type": "version", 15 | "tag": "1.10.2", 16 | "commit": "16b079b164d62bd807c612806842a13bf9b04d17" 17 | }, 18 | "_source": "git://github.com/jquery/jquery.git", 19 | "_target": "~1.10.2", 20 | "_originalSource": "jquery" 21 | } -------------------------------------------------------------------------------- /bower_components/jquery/.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | 7 | [*] 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | 13 | # Tabs in JS unless otherwise specified 14 | [**.js] 15 | indent_style = tab 16 | 17 | [Makefile] 18 | indent_style = tab 19 | 20 | 21 | [speed/**.html] 22 | indent_style = tab 23 | 24 | [speed/**.css] 25 | indent_style = tab 26 | 27 | [speed/benchmarker.js] 28 | indent_style = space 29 | indent_size = 2 30 | 31 | 32 | [test/**.xml] 33 | indent_style = tab 34 | 35 | [test/**.php] 36 | indent_style = tab 37 | 38 | [test/**.html] 39 | indent_style = tab 40 | 41 | [test/**.css] 42 | indent_style = space 43 | indent_size = 8 44 | -------------------------------------------------------------------------------- /bower_components/jquery/.gitattributes: -------------------------------------------------------------------------------- 1 | * eol=lf 2 | *.jar binary 3 | -------------------------------------------------------------------------------- /bower_components/jquery/.gitignore: -------------------------------------------------------------------------------- 1 | src/selector-sizzle.js 2 | src/selector.js 3 | dist 4 | .project 5 | .settings 6 | *~ 7 | *.diff 8 | *.patch 9 | /*.html 10 | .DS_Store 11 | dist/.destination.json 12 | dist/.sizecache.json 13 | build/.sizecache.json 14 | node_modules 15 | -------------------------------------------------------------------------------- /bower_components/jquery/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/sizzle"] 2 | path = src/sizzle 3 | url = git://github.com/jquery/sizzle.git 4 | [submodule "test/qunit"] 5 | path = test/qunit 6 | url = git://github.com/jquery/qunit.git 7 | -------------------------------------------------------------------------------- /bower_components/jquery/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "boss": true, 3 | "curly": true, 4 | "eqeqeq": true, 5 | "eqnull": true, 6 | "expr": true, 7 | "immed": true, 8 | "noarg": true, 9 | "onevar": true, 10 | "quotmark": "double", 11 | "smarttabs": true, 12 | "trailing": true, 13 | "undef": true, 14 | "unused": true, 15 | 16 | "node": true 17 | } -------------------------------------------------------------------------------- /bower_components/jquery/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2013 jQuery Foundation and other contributors 2 | http://jquery.com/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /bower_components/jquery/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "1.10.2", 4 | "description": "jQuery component", 5 | "keywords": [ 6 | "jquery", 7 | "component" 8 | ], 9 | "main": "jquery.js", 10 | "license": "MIT" 11 | } 12 | -------------------------------------------------------------------------------- /bower_components/jquery/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "repo": "components/jquery", 4 | "version": "1.10.2", 5 | "description": "jQuery component", 6 | "keywords": [ 7 | "jquery", 8 | "component" 9 | ], 10 | "main": "jquery.js", 11 | "scripts": [ 12 | "jquery.js" 13 | ], 14 | "license": "MIT" 15 | } 16 | -------------------------------------------------------------------------------- /bower_components/jquery/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "components/jquery", 3 | "description": "jQuery JavaScript Library", 4 | "type": "component", 5 | "homepage": "http://jquery.com", 6 | "license": "MIT", 7 | "support": { 8 | "irc": "irc://irc.freenode.org/jquery", 9 | "issues": "http://bugs.jquery.com", 10 | "forum": "http://forum.jquery.com", 11 | "wiki": "http://docs.jquery.com/", 12 | "source": "https://github.com/jquery/jquery" 13 | }, 14 | "authors": [ 15 | { 16 | "name": "John Resig", 17 | "email": "jeresig@gmail.com" 18 | } 19 | ], 20 | "require": { 21 | "robloach/component-installer": "*" 22 | }, 23 | "extra": { 24 | "component": { 25 | "scripts": [ 26 | "jquery.js" 27 | ], 28 | "files": [ 29 | "jquery.min.js", 30 | "jquery-migrate.js", 31 | "jquery-migrate.min.js" 32 | ] 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /bower_components/jquery/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "title": "jQuery", 4 | "description": "JavaScript library for DOM operations", 5 | "version": "1.10.2", 6 | "homepage": "http://jquery.com", 7 | "author": { 8 | "name": "jQuery Foundation and other contributors", 9 | "url": "https://github.com/jquery/jquery/blob/master/AUTHORS.txt" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/jquery/jquery.git" 14 | }, 15 | "bugs": { 16 | "url": "http://bugs.jquery.com" 17 | }, 18 | "licenses": [ 19 | { 20 | "type": "MIT", 21 | "url": "https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt" 22 | } 23 | ], 24 | "dependencies": {}, 25 | "devDependencies": { 26 | "grunt-compare-size": "~0.4.0", 27 | "grunt-git-authors": "1.2.0", 28 | "grunt-update-submodules": "0.2.0", 29 | "grunt-contrib-watch": "0.3.1", 30 | "grunt-contrib-jshint": "0.3.0", 31 | "grunt-contrib-uglify": "0.2.0", 32 | "grunt": "0.4.1", 33 | "gzip-js": "0.3.1", 34 | "testswarm": "~1.1.0", 35 | "archiver": "~0.4.2" 36 | }, 37 | "keywords": [] 38 | } 39 | -------------------------------------------------------------------------------- /bower_components/jquery/speed/benchmark.js: -------------------------------------------------------------------------------- 1 | // Runs a function many times without the function call overhead 2 | function benchmark(fn, times, name){ 3 | fn = fn.toString(); 4 | var s = fn.indexOf('{')+1, 5 | e = fn.lastIndexOf('}'); 6 | fn = fn.substring(s,e); 7 | 8 | return benchmarkString(fn, times, name); 9 | } 10 | 11 | function benchmarkString(fn, times, name) { 12 | var fn = new Function("i", "var t=new Date; while(i--) {" + fn + "}; return new Date - t")(times) 13 | fn.displayName = name || "benchmarked"; 14 | return fn; 15 | } 16 | -------------------------------------------------------------------------------- /bower_components/jquery/speed/benchmarker.css: -------------------------------------------------------------------------------- 1 | 2 | .dialog { 3 | margin-bottom: 1em; 4 | } 5 | a.expand { 6 | background: #e3e3e3; 7 | } 8 | 9 | div#time-test { 10 | font-family: Arial, Helvetica, sans-serif; 11 | font-size: 62.5%; 12 | } 13 | 14 | td.test button { 15 | float: right; 16 | } 17 | 18 | table { 19 | border: 1px solid #000; 20 | } 21 | 22 | table td, table th { 23 | border: 1px solid #000; 24 | padding: 10px; 25 | } 26 | 27 | td.winner { 28 | background-color: #cfc; 29 | } 30 | 31 | td.tie { 32 | background-color: #ffc; 33 | } 34 | 35 | td.fail { 36 | background-color: #f99; 37 | font-weight: bold; 38 | text-align: center; 39 | } 40 | 41 | tfoot td { 42 | text-align: center; 43 | } 44 | 45 | #time-test { 46 | margin: 1em 0; 47 | padding: .5em; 48 | background: #e3e3e3; 49 | } 50 | #time-taken { 51 | font-weight: bold; 52 | } 53 | 54 | span.wins { 55 | color: #330; 56 | } 57 | 58 | span.fails { 59 | color: #900; 60 | } 61 | 62 | div.buttons { 63 | margin-top: 10px; 64 | margin-bottom: 10px; 65 | } 66 | -------------------------------------------------------------------------------- /bower_components/jquery/speed/closest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Test .closest() Performance 5 | 6 | 7 | 8 | 9 | 25 | 26 | 27 |
28 |

Hello

29 |
30 |
31 |

lorem ipsum

32 |

dolor sit amet

33 |
34 |
35 |
36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /bower_components/jquery/speed/event.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Test Event Handling Performance 5 | 6 | 7 | 8 | 9 | 53 | 54 | 55 |

Move the mouse, please!

56 |

57 | 58 | 59 | -------------------------------------------------------------------------------- /bower_components/jquery/speed/slice.vs.concat.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bower_components/jquery/src/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "boss": true, 3 | "curly": true, 4 | "eqeqeq": true, 5 | "eqnull": true, 6 | "expr": true, 7 | "immed": true, 8 | "noarg": true, 9 | "onevar": true, 10 | "quotmark": "double", 11 | "smarttabs": true, 12 | "trailing": true, 13 | "undef": true, 14 | "unused": true, 15 | 16 | "evil": true, 17 | "sub": true, 18 | 19 | "browser": true, 20 | "wsh": true, 21 | 22 | "globals": { 23 | "define": true, 24 | "module": true, 25 | "jQuery": true 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /bower_components/jquery/src/deprecated.js: -------------------------------------------------------------------------------- 1 | // Limit scope pollution from any deprecated API 2 | // (function() { 3 | 4 | // The number of elements contained in the matched element set 5 | jQuery.fn.size = function() { 6 | return this.length; 7 | }; 8 | 9 | jQuery.fn.andSelf = jQuery.fn.addBack; 10 | 11 | // })(); 12 | -------------------------------------------------------------------------------- /bower_components/jquery/src/dimensions.js: -------------------------------------------------------------------------------- 1 | // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 2 | jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { 3 | jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { 4 | // margin is only for outerHeight, outerWidth 5 | jQuery.fn[ funcName ] = function( margin, value ) { 6 | var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), 7 | extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); 8 | 9 | return jQuery.access( this, function( elem, type, value ) { 10 | var doc; 11 | 12 | if ( jQuery.isWindow( elem ) ) { 13 | // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there 14 | // isn't a whole lot we can do. See pull request at this URL for discussion: 15 | // https://github.com/jquery/jquery/pull/764 16 | return elem.document.documentElement[ "client" + name ]; 17 | } 18 | 19 | // Get document width or height 20 | if ( elem.nodeType === 9 ) { 21 | doc = elem.documentElement; 22 | 23 | // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest 24 | // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. 25 | return Math.max( 26 | elem.body[ "scroll" + name ], doc[ "scroll" + name ], 27 | elem.body[ "offset" + name ], doc[ "offset" + name ], 28 | doc[ "client" + name ] 29 | ); 30 | } 31 | 32 | return value === undefined ? 33 | // Get width or height on the element, requesting but not forcing parseFloat 34 | jQuery.css( elem, type, extra ) : 35 | 36 | // Set width or height on the element 37 | jQuery.style( elem, type, value, extra ); 38 | }, type, chainable ? margin : undefined, chainable, null ); 39 | }; 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /bower_components/jquery/src/event-alias.js: -------------------------------------------------------------------------------- 1 | jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + 2 | "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 3 | "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { 4 | 5 | // Handle event binding 6 | jQuery.fn[ name ] = function( data, fn ) { 7 | return arguments.length > 0 ? 8 | this.on( name, null, data, fn ) : 9 | this.trigger( name ); 10 | }; 11 | }); 12 | 13 | jQuery.fn.extend({ 14 | hover: function( fnOver, fnOut ) { 15 | return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 16 | }, 17 | 18 | bind: function( types, data, fn ) { 19 | return this.on( types, null, data, fn ); 20 | }, 21 | unbind: function( types, fn ) { 22 | return this.off( types, null, fn ); 23 | }, 24 | 25 | delegate: function( selector, types, data, fn ) { 26 | return this.on( types, selector, data, fn ); 27 | }, 28 | undelegate: function( selector, types, fn ) { 29 | // ( namespace ) or ( selector, types [, fn] ) 30 | return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); 31 | } 32 | }); 33 | -------------------------------------------------------------------------------- /bower_components/jquery/src/exports.js: -------------------------------------------------------------------------------- 1 | if ( typeof module === "object" && module && typeof module.exports === "object" ) { 2 | // Expose jQuery as module.exports in loaders that implement the Node 3 | // module pattern (including browserify). Do not create the global, since 4 | // the user will be storing it themselves locally, and globals are frowned 5 | // upon in the Node module world. 6 | module.exports = jQuery; 7 | } else { 8 | // Otherwise expose jQuery to the global object as usual 9 | window.jQuery = window.$ = jQuery; 10 | 11 | // Register as a named AMD module, since jQuery can be concatenated with other 12 | // files that may use define, but not via a proper concatenation script that 13 | // understands anonymous AMD modules. A named AMD is safest and most robust 14 | // way to register. Lowercase jquery is used because AMD module names are 15 | // derived from file names, and jQuery is normally delivered in a lowercase 16 | // file name. Do this after creating the global so that if an AMD module wants 17 | // to call noConflict to hide this version of jQuery, it will work. 18 | if ( typeof define === "function" && define.amd ) { 19 | define( "jquery", [], function () { return jQuery; } ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /bower_components/jquery/src/intro.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery JavaScript Library v@VERSION 3 | * http://jquery.com/ 4 | * 5 | * Includes Sizzle.js 6 | * http://sizzlejs.com/ 7 | * 8 | * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors 9 | * Released under the MIT license 10 | * http://jquery.org/license 11 | * 12 | * Date: @DATE 13 | */ 14 | (function( window, undefined ) { 15 | 16 | // Can't do this because several apps including ASP.NET trace 17 | // the stack via arguments.caller.callee and Firefox dies if 18 | // you try to trace through "use strict" call chains. (#13335) 19 | // Support: Firefox 18+ 20 | //"use strict"; 21 | -------------------------------------------------------------------------------- /bower_components/jquery/src/outro.js: -------------------------------------------------------------------------------- 1 | 2 | })( window ); 3 | -------------------------------------------------------------------------------- /bower_components/jquery/src/sizzle-jquery.js: -------------------------------------------------------------------------------- 1 | jQuery.find = Sizzle; 2 | jQuery.expr = Sizzle.selectors; 3 | jQuery.expr[":"] = jQuery.expr.pseudos; 4 | jQuery.unique = Sizzle.uniqueSort; 5 | jQuery.text = Sizzle.getText; 6 | jQuery.isXMLDoc = Sizzle.isXML; 7 | jQuery.contains = Sizzle.contains; 8 | -------------------------------------------------------------------------------- /bower_components/jquery/src/wrap.js: -------------------------------------------------------------------------------- 1 | jQuery.fn.extend({ 2 | wrapAll: function( html ) { 3 | if ( jQuery.isFunction( html ) ) { 4 | return this.each(function(i) { 5 | jQuery(this).wrapAll( html.call(this, i) ); 6 | }); 7 | } 8 | 9 | if ( this[0] ) { 10 | // The elements to wrap the target around 11 | var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); 12 | 13 | if ( this[0].parentNode ) { 14 | wrap.insertBefore( this[0] ); 15 | } 16 | 17 | wrap.map(function() { 18 | var elem = this; 19 | 20 | while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { 21 | elem = elem.firstChild; 22 | } 23 | 24 | return elem; 25 | }).append( this ); 26 | } 27 | 28 | return this; 29 | }, 30 | 31 | wrapInner: function( html ) { 32 | if ( jQuery.isFunction( html ) ) { 33 | return this.each(function(i) { 34 | jQuery(this).wrapInner( html.call(this, i) ); 35 | }); 36 | } 37 | 38 | return this.each(function() { 39 | var self = jQuery( this ), 40 | contents = self.contents(); 41 | 42 | if ( contents.length ) { 43 | contents.wrapAll( html ); 44 | 45 | } else { 46 | self.append( html ); 47 | } 48 | }); 49 | }, 50 | 51 | wrap: function( html ) { 52 | var isFunction = jQuery.isFunction( html ); 53 | 54 | return this.each(function(i) { 55 | jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); 56 | }); 57 | }, 58 | 59 | unwrap: function() { 60 | return this.parent().each(function() { 61 | if ( !jQuery.nodeName( this, "body" ) ) { 62 | jQuery( this ).replaceWith( this.childNodes ); 63 | } 64 | }).end(); 65 | } 66 | }); 67 | -------------------------------------------------------------------------------- /bower_components/jquery/test/.jshintignore: -------------------------------------------------------------------------------- 1 | qunit/ 2 | data/badjson.js 3 | data/jquery-1.9.1.ajax_xhr.min.js 4 | -------------------------------------------------------------------------------- /bower_components/jquery/test/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "boss": true, 3 | "curly": true, 4 | "eqeqeq": true, 5 | "eqnull": true, 6 | "expr": true, 7 | "immed": true, 8 | "noarg": true, 9 | "onevar": true, 10 | "quotmark": "double", 11 | "smarttabs": true, 12 | "trailing": true, 13 | "undef": true, 14 | "unused": true, 15 | 16 | "evil": true, 17 | "sub": true, 18 | 19 | "browser": true, 20 | "devel": true, 21 | "wsh": true, 22 | 23 | "predef": [ 24 | "DOMParser", 25 | "jQuery", 26 | "QUnit", 27 | "module", 28 | "ok", 29 | "equal", 30 | "test", 31 | "asyncTest", 32 | "notEqual", 33 | "deepEqual", 34 | "strictEqual", 35 | "notStrictEqual", 36 | "start", 37 | "stop", 38 | "expect", 39 | "raises", 40 | "ajaxTest", 41 | "testIframe", 42 | "testIframeWithCallback", 43 | "createDashboardXML", 44 | "createXMLFragment", 45 | "moduleTeardown", 46 | "testFoo", 47 | "url", 48 | "t", 49 | "q", 50 | "amdDefined", 51 | "fireNative", 52 | "Globals", 53 | "hasPHP", 54 | "isLocal", 55 | "originaljQuery", 56 | "$", 57 | "original$", 58 | "externalHost" 59 | ] 60 | } 61 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/1x1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/jquery/test/data/1x1.jpg -------------------------------------------------------------------------------- /bower_components/jquery/test/data/ajax/unreleasedXHR.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Attempt to block tests because of dangling XHR requests (IE) 6 | 7 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/atom+xml.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/badcall.js: -------------------------------------------------------------------------------- 1 | undefined(); 2 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/badjson.js: -------------------------------------------------------------------------------- 1 | {bad: toTheBone} 2 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/cleanScript.html: -------------------------------------------------------------------------------- 1 | 6 | 11 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/core/cc_on.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/dashboard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/dimensions/documentLarge.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | 13 |
14 | 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/dimensions/documentSmall.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 17 |
18 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/echoData.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/echoQuery.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/errorWithJSON.php: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/evalScript.php: -------------------------------------------------------------------------------- 1 | ok( "" === "GET", "request method is " ); -------------------------------------------------------------------------------- /bower_components/jquery/test/data/event/focusElem.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | .focus() (activeElement access #13393) 6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/event/longLoadScript.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/event/promiseReady.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Test case for jQuery ticket #11470 6 | 7 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/event/syncReady.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Test case for jQuery ticket #10067 6 | 7 | 8 | 9 | 10 | 15 | 16 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/headers.php: -------------------------------------------------------------------------------- 1 | $value ) { 10 | 11 | $key = str_replace( "_" , "-" , substr( $key , 0 , 5 ) == "HTTP_" ? substr( $key , 5 ) : $key ); 12 | $headers[ $key ] = $value; 13 | 14 | } 15 | 16 | foreach( explode( "_" , $_GET[ "keys" ] ) as $key ) { 17 | echo "$key: " . @$headers[ strtoupper( $key ) ] . "\n"; 18 | } 19 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/if_modified_since.php: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/iframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | iframe 4 | 5 | 6 |
span text
7 | 8 | 9 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/json.php: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/json_obj.js: -------------------------------------------------------------------------------- 1 | { "data": {"lang": "en", "length": 25} } 2 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/jsonp.php: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/manipulation/iframe-denied.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | body 6 | 7 | 8 |
9 | 10 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/name.html: -------------------------------------------------------------------------------- 1 | ERROR 2 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/name.php: -------------------------------------------------------------------------------- 1 | $xml$result"; 12 | die(); 13 | } 14 | $name = $_REQUEST['name']; 15 | if($name == 'foo') { 16 | echo "bar"; 17 | die(); 18 | } else if($name == 'peter') { 19 | echo "pan"; 20 | die(); 21 | } 22 | 23 | echo 'ERROR '; 24 | ?> -------------------------------------------------------------------------------- /bower_components/jquery/test/data/nocontent.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/offset/absolute.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | absolute 7 | 18 | 19 | 29 | 30 | 31 |
absolute-1 32 |
absolute-1-1 33 |
absolute-1-1-1
34 |
35 |
36 |
absolute-2
37 |
Has absolute position but no values set for the location ('auto').
38 |
39 |

Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.

40 | 41 | 42 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/offset/body.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | body 7 | 12 | 13 | 21 | 22 | 23 |
24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/offset/fixed.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | fixed 7 | 15 | 16 | 25 | 26 | 27 |
28 |
29 |
30 |
31 |
32 |

Click the white box to move the marker to it.

33 | 34 | 35 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/offset/relative.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | relative 7 | 13 | 14 | 24 | 25 | 26 |
27 |
28 |
29 |

Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.

30 | 31 | 32 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/offset/scroll.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | scroll 7 | 16 | 17 | 28 | 29 | 30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |

Click the white box to move the marker to it.

38 | 39 | 40 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/offset/static.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | static 7 | 13 | 14 | 24 | 25 | 26 |
27 |
28 |
29 |

Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.

30 | 31 | 32 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/offset/table.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | table 7 | 13 | 14 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
th-1th-2th-3
td-1td-2td-3
40 |
41 |

Click the white box to move the marker to it.

42 | 43 | 44 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/params_html.php: -------------------------------------------------------------------------------- 1 |
2 | $value ) 4 | echo "$value"; 5 | ?> 6 |
7 |
8 | $value ) 10 | echo "$value"; 11 | ?> 12 |
-------------------------------------------------------------------------------- /bower_components/jquery/test/data/readywaitasset.js: -------------------------------------------------------------------------------- 1 | var delayedMessage = "It worked!"; 2 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/readywaitloader.js: -------------------------------------------------------------------------------- 1 | // Simple script loader that uses jQuery.readyWait via jQuery.holdReady() 2 | 3 | //Hold on jQuery! 4 | jQuery.holdReady(true); 5 | 6 | var readyRegExp = /^(complete|loaded)$/; 7 | 8 | function assetLoaded( evt ){ 9 | var node = evt.currentTarget || evt.srcElement; 10 | if ( evt.type === "load" || readyRegExp.test(node.readyState) ) { 11 | jQuery.holdReady(false); 12 | } 13 | } 14 | 15 | setTimeout( function() { 16 | var script = document.createElement("script"); 17 | script.type = "text/javascript"; 18 | if ( script.addEventListener ) { 19 | script.addEventListener( "load", assetLoaded, false ); 20 | } else { 21 | script.attachEvent( "onreadystatechange", assetLoaded ); 22 | } 23 | script.src = "data/readywaitasset.js"; 24 | document.getElementsByTagName("head")[0].appendChild(script); 25 | }, 2000 ); 26 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/script.php: -------------------------------------------------------------------------------- 1 | 11 | ok( true, "Script executed correctly." ); 12 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/selector/sizzle_cache.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery selector - sizzle cache 6 | 7 | 8 | 14 | 15 | 16 | 17 |
18 | Worlds collide 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/statusText.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/support/bodyBackground.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17 | 18 | 19 |
20 | 21 |
22 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/support/boxSizing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/support/csp.js: -------------------------------------------------------------------------------- 1 | jQuery(function() { 2 | parent.iframeCallback( jQuery.support ); 3 | }); 4 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/support/csp.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | CSP Test Page 16 | 17 | 18 | 19 | 20 |

CSP Test Page

21 | 22 | 23 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/support/shrinkWrapBlocks.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 |
15 | 16 |
17 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/support/testElementCrash.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/test.html: -------------------------------------------------------------------------------- 1 | html text
2 | 6 | 7 | blabla 8 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/test.js: -------------------------------------------------------------------------------- 1 | this.testBar = "bar"; 2 | jQuery("#ap").html("bar"); 3 | ok( true, "test.js executed"); 4 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/test.php: -------------------------------------------------------------------------------- 1 | html text
2 | 6 | 7 | blabla -------------------------------------------------------------------------------- /bower_components/jquery/test/data/test2.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/test3.html: -------------------------------------------------------------------------------- 1 |
This is a user
2 |
This is a user
3 |
This is a teacher
4 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/text.php: -------------------------------------------------------------------------------- 1 | Lorem ipsum dolor sit amet 2 | consectetuer adipiscing elit 3 | Sed lorem leo 4 | lorem leo consectetuer adipiscing elit 5 | Sed lorem leo 6 | rhoncus sit amet 7 | elementum at 8 | bibendum at, eros 9 | Cras at mi et tortor egestas vestibulum 10 | sed Cras at mi vestibulum 11 | Phasellus sed felis sit amet 12 | orci dapibus semper. 13 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/with_fries.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 1 14 | 15 | 16 | 17 | 18 | foo 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /bower_components/jquery/test/data/with_fries_over_jsonp.php: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /bower_components/jquery/test/jquery.js: -------------------------------------------------------------------------------- 1 | // Use the right jQuery source in iframe tests 2 | document.write( " 19 | 36 | 37 | 38 |

39 | jQuery Network Error Test for Firefox 40 |

41 |
42 | This is a test page for 43 | 44 | #8135 45 | 46 | which was reported in Firefox when accessing properties 47 | of an XMLHttpRequest object after a network error occurred. 48 |
49 |
Take the following steps:
50 |
    51 |
  1. 52 | make sure you accessed this page through a web server, 53 |
  2. 54 |
  3. 55 | stop the web server, 56 |
  4. 57 |
  5. 58 | open the console, 59 |
  6. 60 |
  7. 61 | click this 62 | 63 | , 64 |
  8. 65 |
  9. 66 | wait for both requests to fail. 67 |
  10. 68 |
69 |
70 | Test passes if you get two log lines: 71 | 79 |
80 |
81 | Test fails if the browser notifies an exception. 82 |
83 | 84 | 85 | -------------------------------------------------------------------------------- /bower_components/jquery/test/readywait.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | jQuery.holdReady Test 11 | 12 | 17 | 18 | 19 | 21 | 22 | 23 | 34 | 35 | 36 |

37 | jQuery.holdReady Test 38 |

39 |

40 | This is a test page for jQuery.readyWait and jQuery.holdReady, 41 | see 42 | #6781 43 | and 44 | #8803. 45 |

46 |

47 | Test for jQuery.holdReady, which can be used 48 | by plugins and other scripts to indicate something 49 | important to the page is still loading and needs 50 | to block the DOM ready callbacks that are registered 51 | with jQuery. 52 |

53 |

54 | Script loaders are the most likely kind of script 55 | to use jQuery.holdReady, but it could be used by 56 | other things like a script that loads a CSS file 57 | and wants to pause the DOM ready callbacks. 58 |

59 |

60 | Expected Result: The text 61 | It Worked! 62 | appears below after about 2 seconds. 63 |

64 |

65 | If there is an error in the console, 66 | or the text does not show up, then the test failed. 67 |

68 |
69 | 70 | 71 | -------------------------------------------------------------------------------- /bower_components/jquery/test/unit/deprecated.js: -------------------------------------------------------------------------------- 1 | module("deprecated", { teardown: moduleTeardown }); 2 | 3 | if ( jQuery.fn.size ) { 4 | test("size()", function() { 5 | expect(1); 6 | equal( jQuery("#qunit-fixture p").size(), 6, "Get Number of Elements Found" ); 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /bower_components/jquery/test/unit/exports.js: -------------------------------------------------------------------------------- 1 | module("exports", { teardown: moduleTeardown }); 2 | 3 | test("amdModule", function() { 4 | expect(1); 5 | 6 | equal( jQuery, amdDefined, "Make sure defined module matches jQuery" ); 7 | }); 8 | -------------------------------------------------------------------------------- /bower_components/jquery/test/xhtml.php: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /bower_components/underscore/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "underscore", 3 | "homepage": "https://github.com/jashkenas/underscore", 4 | "version": "1.5.2", 5 | "_release": "1.5.2", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "1.5.2", 9 | "commit": "101c10a60019fe870d21868835f65c25d64968fc" 10 | }, 11 | "_source": "git://github.com/jashkenas/underscore.git", 12 | "_target": "~1.5.2", 13 | "_originalSource": "underscore" 14 | } -------------------------------------------------------------------------------- /bower_components/underscore/.gitignore: -------------------------------------------------------------------------------- 1 | raw 2 | node_modules 3 | -------------------------------------------------------------------------------- /bower_components/underscore/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | notifications: 5 | email: false 6 | -------------------------------------------------------------------------------- /bower_components/underscore/CNAME: -------------------------------------------------------------------------------- 1 | underscorejs.org 2 | -------------------------------------------------------------------------------- /bower_components/underscore/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## How to contribute to Underscore.js 2 | 3 | * Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/underscore/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. 4 | 5 | * Before sending a pull request for a feature, be sure to have [tests](http://underscorejs.org/test/). 6 | 7 | * Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/underscore/blob/master/underscore.js). 8 | 9 | * In your pull request, do not add documentation or re-build the minified `underscore-min.js` file. We'll do those things before cutting a new release. 10 | -------------------------------------------------------------------------------- /bower_components/underscore/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative 2 | Reporters & Editors 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /bower_components/underscore/README.md: -------------------------------------------------------------------------------- 1 | __ 2 | /\ \ __ 3 | __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____ 4 | /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\ 5 | \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\ 6 | \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/ 7 | \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/ 8 | \ \____/ 9 | \/___/ 10 | 11 | Underscore.js is a utility-belt library for JavaScript that provides 12 | support for the usual functional suspects (each, map, reduce, filter...) 13 | without extending any core JavaScript objects. 14 | 15 | For Docs, License, Tests, and pre-packed downloads, see: 16 | http://underscorejs.org 17 | 18 | Underscore is an open-sourced component of DocumentCloud: 19 | https://github.com/documentcloud 20 | 21 | Many thanks to our contributors: 22 | https://github.com/jashkenas/underscore/contributors 23 | -------------------------------------------------------------------------------- /bower_components/underscore/Rakefile: -------------------------------------------------------------------------------- 1 | desc "Use Uglify JS to compress Underscore.js" 2 | task :build do 3 | sh "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m --source-map underscore-min.map -o underscore-min.js" 4 | end 5 | 6 | desc "Build the docco documentation" 7 | task :doc do 8 | sh "docco underscore.js" 9 | end 10 | 11 | -------------------------------------------------------------------------------- /bower_components/underscore/docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/docs/favicon.ico -------------------------------------------------------------------------------- /bower_components/underscore/docs/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/docs/images/background.png -------------------------------------------------------------------------------- /bower_components/underscore/docs/images/underscore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/docs/images/underscore.png -------------------------------------------------------------------------------- /bower_components/underscore/docs/public/fonts/aller-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/docs/public/fonts/aller-bold.eot -------------------------------------------------------------------------------- /bower_components/underscore/docs/public/fonts/aller-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/docs/public/fonts/aller-bold.ttf -------------------------------------------------------------------------------- /bower_components/underscore/docs/public/fonts/aller-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/docs/public/fonts/aller-bold.woff -------------------------------------------------------------------------------- /bower_components/underscore/docs/public/fonts/aller-light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/docs/public/fonts/aller-light.eot -------------------------------------------------------------------------------- /bower_components/underscore/docs/public/fonts/aller-light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/docs/public/fonts/aller-light.ttf -------------------------------------------------------------------------------- /bower_components/underscore/docs/public/fonts/aller-light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/docs/public/fonts/aller-light.woff -------------------------------------------------------------------------------- /bower_components/underscore/docs/public/fonts/novecento-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/docs/public/fonts/novecento-bold.eot -------------------------------------------------------------------------------- /bower_components/underscore/docs/public/fonts/novecento-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/docs/public/fonts/novecento-bold.ttf -------------------------------------------------------------------------------- /bower_components/underscore/docs/public/fonts/novecento-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/docs/public/fonts/novecento-bold.woff -------------------------------------------------------------------------------- /bower_components/underscore/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/bower_components/underscore/favicon.ico -------------------------------------------------------------------------------- /bower_components/underscore/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "underscore", 3 | "description" : "JavaScript's functional programming helper library.", 4 | "homepage" : "http://underscorejs.org", 5 | "keywords" : ["util", "functional", "server", "client", "browser"], 6 | "author" : "Jeremy Ashkenas ", 7 | "repository" : {"type": "git", "url": "git://github.com/jashkenas/underscore.git"}, 8 | "main" : "underscore.js", 9 | "version" : "1.5.2", 10 | "devDependencies": { 11 | "phantomjs": "1.9.0-1" 12 | }, 13 | "scripts": { 14 | "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true" 15 | }, 16 | "licenses": [ 17 | { 18 | "type": "MIT", 19 | "url": "https://raw.github.com/jashkenas/underscore/master/LICENSE" 20 | } 21 | ], 22 | "files" : ["underscore.js", "underscore-min.js", "LICENSE"] 23 | } 24 | -------------------------------------------------------------------------------- /bower_components/underscore/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Underscore Test Suite 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |

Underscore Speed Suite

29 |

30 | A representative sample of the functions are benchmarked here, to provide 31 | a sense of how fast they might run in different browsers. 32 | Each iteration runs on an array of 1000 elements.

33 | For example, the 'intersection' test measures the number of times you can 34 | find the intersection of two thousand-element arrays in one second. 35 |

36 |
37 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /carousel_server.js: -------------------------------------------------------------------------------- 1 | var Carousel = require('./lib/carousel') 2 | , conf = require('./conf') 3 | , carousel = new Carousel(conf.epg) 4 | , status = require("./status_client")('carousel') 5 | ; 6 | 7 | status.set('status', 'running', function() { 8 | console.log("Starting carousel"); 9 | carousel.start(); 10 | }); 11 | -------------------------------------------------------------------------------- /client/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/client/img/loading.gif -------------------------------------------------------------------------------- /client/spec/app.test.js: -------------------------------------------------------------------------------- 1 | var App = require('../src/app.js'), 2 | Marionette = require('backbone.marionette'); 3 | 4 | describe('App', function() { 5 | var app = new App(); 6 | it('should have a start function', function() { 7 | expect(app.start).toBeDefined(); 8 | }); 9 | 10 | describe('app.start', function() { 11 | beforeEach(function() { 12 | app.start(); 13 | }); 14 | 15 | it('should define a core Marionette application', function() { 16 | var marionetteApp = new Marionette.Application(); 17 | expect(typeof(App.core)).toEqual(typeof(marionetteApp)); 18 | }); 19 | 20 | it('should have a views object', function() { 21 | expect(App.views).toBeDefined(); 22 | }); 23 | 24 | it('should have a data object', function() { 25 | expect(App.data).toBeDefined(); 26 | }); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /client/spec/views/add.test.js: -------------------------------------------------------------------------------- 1 | var AddView = require('../../src/views/add_service.js'), 2 | $ = require('jquery'); 3 | 4 | describe('view:add', function() { 5 | var addView = new AddView(); 6 | 7 | beforeEach(function() { 8 | spyOn(addView, 'save'); 9 | }); 10 | 11 | it('should have a save function', function() { 12 | expect(addView.save).toBeDefined(); 13 | }); 14 | 15 | //dont worry about catching the event - just test the functionality 16 | //of the event handler 17 | 18 | // it('should trigger the save function on click', function() { 19 | // addView.render(); 20 | // addView.$el.find('a.save-button').trigger('click'); 21 | // //expect the save method to have been called... 22 | // }); 23 | }); 24 | -------------------------------------------------------------------------------- /client/src/collections/events.js: -------------------------------------------------------------------------------- 1 | var Backbone = require('backbone') 2 | , EventModel = require('../models/event') 3 | ; 4 | 5 | module.exports = EventCollection = Backbone.Collection.extend({ 6 | model: EventModel, 7 | url: '/api/events' 8 | }); 9 | -------------------------------------------------------------------------------- /client/src/collections/services.js: -------------------------------------------------------------------------------- 1 | var Backbone = require('backbone') 2 | , ServiceModel = require('../models/service') 3 | ; 4 | 5 | module.exports = ServiceCollection = Backbone.Collection.extend({ 6 | model: ServiceModel, 7 | url: '/api/services', 8 | comparator: function(col) { 9 | return (col.get('comment')); 10 | } 11 | }); 12 | -------------------------------------------------------------------------------- /client/src/main.js: -------------------------------------------------------------------------------- 1 | var App = require('./app'); 2 | var epg = new App(); 3 | epg.start(); 4 | -------------------------------------------------------------------------------- /client/src/models/event.js: -------------------------------------------------------------------------------- 1 | var Backbone = require('backbone') 2 | ; 3 | 4 | module.exports = EventModel = Backbone.Model.extend({ 5 | idAttribute: 'id', 6 | urlRoot: 'api/events' 7 | }); 8 | -------------------------------------------------------------------------------- /client/src/models/server.js: -------------------------------------------------------------------------------- 1 | var Backbone = require('backbone') 2 | ; 3 | 4 | module.exports = ServerModel = Backbone.Model.extend({ 5 | idAttribute: 'id', 6 | urlRoot: 'server' 7 | }); 8 | -------------------------------------------------------------------------------- /client/src/models/service.js: -------------------------------------------------------------------------------- 1 | var Backbone = require('backbone') 2 | ; 3 | 4 | module.exports = ServiceModel = Backbone.Model.extend({ 5 | idAttribute: 'serviceId', 6 | urlRoot: 'api/services' 7 | }); 8 | -------------------------------------------------------------------------------- /client/src/router.js: -------------------------------------------------------------------------------- 1 | var Marionette = require('backbone.marionette') 2 | ; 3 | 4 | module.exports = Router = Marionette.AppRouter.extend({ 5 | appRoutes: { 6 | '' : 'home', 7 | 'listServices' : 'listServices', 8 | 'serviceDetails/:id' : 'serviceDetails', 9 | 'addService' : 'addService', 10 | 'listEvents' : 'listEvents', 11 | 'eventDetails/:id' : 'eventDetails', 12 | 'addEvent' : 'addEvent' 13 | } 14 | }); 15 | -------------------------------------------------------------------------------- /client/src/views/event_details.js: -------------------------------------------------------------------------------- 1 | var Marionette = require('backbone.marionette') 2 | ; 3 | 4 | module.exports = EventDetailsView = Marionette.ItemView.extend({ 5 | template: require('../../templates/event_details.hbs'), 6 | className: "form-container", 7 | events: { 8 | 'click a.back': 'goBack', 9 | 'click a.submit-button': 'deleteEvent' 10 | }, 11 | 12 | goBack: function(e) { 13 | e.preventDefault(); 14 | window.App.controller.home(); 15 | }, 16 | deleteEvent: function(e) { 17 | e.preventDefault(); 18 | 19 | 20 | // this will actually send a DELETE to the server: 21 | this.model.destroy( 22 | { 23 | success: function() { 24 | console.log("Funciono"); 25 | window.App.data.events.remove(this.model); 26 | window.App.controller.listEvents(); 27 | window.App.core.vent.trigger('app:showmessage', 'success', 'Success', 'Event deleted succesfully'); 28 | }, 29 | error: function(model, xhr) { 30 | var err = JSON.parse(xhr.responseText); 31 | console.log("Fallo:", err.error); 32 | 33 | window.App.core.vent.trigger('app:showmessage', 'error', 'Error deleting event', err.error); 34 | } 35 | }); 36 | 37 | } 38 | }); 39 | -------------------------------------------------------------------------------- /client/src/views/home.js: -------------------------------------------------------------------------------- 1 | var Marionette = require('backbone.marionette') 2 | ; 3 | 4 | module.exports = HomeView = Marionette.ItemView.extend({ 5 | template: require('../../templates/home.hbs'), 6 | className: "form-container", 7 | initialize: function() { 8 | this.model.fetch(); 9 | }, 10 | events: { 11 | 'click a.back': 'goBack', 12 | 'click a.submit-button': 'updateEit' 13 | }, 14 | 15 | goBack: function(e) { 16 | e.preventDefault(); 17 | window.App.controller.home(); 18 | }, 19 | updateEit: function(e) { 20 | e.preventDefault(); 21 | this.model.save({}, 22 | { 23 | success: function(model) { 24 | window.App.data.server = model; 25 | window.App.controller.home(); 26 | window.App.core.vent.trigger('app:showmessage', 'success', 'Success', 'EIT updated succesfully'); 27 | }, 28 | error: function(model, xhr) { 29 | var err = JSON.parse(xhr.responseText); 30 | console.log("Fallo:", err.error); 31 | 32 | window.App.core.vent.trigger('app:showmessage', 'error', 'Error updating EIT', err.error); 33 | } 34 | }); 35 | 36 | } 37 | }); -------------------------------------------------------------------------------- /client/src/views/service_details.js: -------------------------------------------------------------------------------- 1 | var Marionette = require('backbone.marionette') 2 | ; 3 | 4 | module.exports = ServiceDetailsView = Marionette.ItemView.extend({ 5 | template: require('../../templates/service_details.hbs'), 6 | className: "form-container", 7 | events: { 8 | 'click a.back': 'goBack', 9 | 'click a.submit-button': 'enableService' 10 | }, 11 | 12 | goBack: function(e) { 13 | e.preventDefault(); 14 | window.App.controller.home(); 15 | }, 16 | enableService: function(e) { 17 | e.preventDefault(); 18 | 19 | window.App.core.vent.trigger('app:showloading'); 20 | this.model.save({}, 21 | { 22 | wait: true, 23 | success: function(model) { 24 | console.log("Funciono"); 25 | window.App.core.vent.trigger('app:hideloading'); 26 | window.App.controller.listServices(); 27 | window.App.core.vent.trigger('app:showmessage', 'success', 'Success', 'Service enabled/disabled succesfully'); 28 | }, 29 | error: function(model, xhr) { 30 | var err = JSON.parse(xhr.responseText); 31 | console.log("Fallo:", err.error); 32 | window.App.core.vent.trigger('app:hideloading'); 33 | window.App.core.vent.trigger('app:showmessage', 'error', 'Error enabling/disabling service', err.error); 34 | } 35 | }); 36 | 37 | } 38 | }); 39 | -------------------------------------------------------------------------------- /client/src/views/services.js: -------------------------------------------------------------------------------- 1 | var Marionette = require('backbone.marionette') 2 | ; 3 | 4 | var itemView = Marionette.ItemView.extend({ 5 | template: require('../../templates/service_row.hbs'), 6 | tagName: "tr", 7 | initialize: function() { 8 | this.listenTo(this.model, 'change', this.render); 9 | }, 10 | events: { 11 | 'click': 'showDetails' 12 | }, 13 | 14 | showDetails: function() { 15 | window.App.core.vent.trigger('app:log', 'Services View: showDetails hit.'); 16 | window.App.controller.serviceDetails(this.model.id); 17 | } 18 | }); 19 | 20 | module.exports = ServicesView = Marionette.CompositeView.extend({ 21 | tagName: "table", 22 | template: require('../../templates/services.hbs'), 23 | className: "EpgTable", 24 | initialize: function() { 25 | this.listenTo(this.collection, 'change', this.render); 26 | }, 27 | appendHtml: function(collectionView, itemView){ 28 | collectionView.$("tbody").append(itemView.el); 29 | }, 30 | itemView: itemView 31 | }); 32 | 33 | -------------------------------------------------------------------------------- /client/styles/less/main.less: -------------------------------------------------------------------------------- 1 | body { padding: 10px; font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; } 2 | 3 | a { color: #00B7FF; } 4 | h1 { font-size: 2em; font-weight: bold; margin-bottom: 1em;} 5 | strong { font-weight: bold; } 6 | label { display: block; float: left; width: 120px; clear: left; } 7 | .clear { clear: both; } 8 | 9 | #content { height: 300px; } 10 | 11 | .service_small, .service_full { cursor: pointer; width: 260px; float: left; border: solid 1px #c0c0c0; padding: 5px; margin-right: 10px; margin-bottom: 10px; } 12 | .service_small:hover { border: solid 1px blue;} 13 | .service_small img { float: left; width: 45px; height: 45px; margin-right: 5px; } 14 | 15 | .service_full { float: none; height: 325px;} 16 | .service_full img { margin-left: 5px; } 17 | 18 | .add_service label { display: inline-block; width: 120px; float: left; clear: left; } 19 | 20 | #output {margin-top: 2em; font-size: .9em; border: solid 1px #c0c0c0; background-color: #f0f0f0; padding: 5px;} 21 | #output li {margin-left: 30px; list-style-type: decimal;} 22 | -------------------------------------------------------------------------------- /client/styles/messages.css: -------------------------------------------------------------------------------- 1 | .message{ 2 | background-size: 40px 40px; 3 | background-image: linear-gradient(135deg, rgba(255, 255, 255, .05) 25%, transparent 25%, 4 | transparent 50%, rgba(255, 255, 255, .05) 50%, rgba(255, 255, 255, .05) 75%, 5 | transparent 75%, transparent); 6 | box-shadow: inset 0 -1px 0 rgba(255,255,255,.4); 7 | width: 100%; 8 | border: 1px solid; 9 | color: #fff; 10 | padding: 15px; 11 | position: fixed; 12 | _position: absolute; 13 | text-shadow: 0 1px 0 rgba(0,0,0,.5); 14 | animation: animate-bg 5s linear infinite; 15 | } 16 | 17 | .info{ 18 | background-color: #4ea5cd; 19 | border-color: #3b8eb5; 20 | } 21 | 22 | .error{ 23 | background-color: #de4343; 24 | border-color: #c43d3d; 25 | } 26 | 27 | .warning{ 28 | background-color: #eaaf51; 29 | border-color: #d99a36; 30 | } 31 | 32 | .success{ 33 | background-color: #61b832; 34 | border-color: #55a12c; 35 | } 36 | 37 | .message h3{ 38 | margin: 0 0 5px 0; 39 | font-size: 1.5em; 40 | } 41 | 42 | .message p{ 43 | margin: 0; 44 | } 45 | 46 | @keyframes animate-bg { 47 | from { 48 | background-position: 0 0; 49 | } 50 | to { 51 | background-position: -80px 0; 52 | } 53 | } 54 | 55 | .loading { 56 | color:#555; 57 | border-radius:10px; 58 | font-family:Tahoma,Geneva,Arial,sans-serif;font-size:11px; 59 | padding:10px 10px; 60 | margin:10px; 61 | width: 128px; 62 | height: 128px; 63 | background:#ffffff url('../img/loading.gif') no-repeat 10px 10px; 64 | border:3px solid #a6ca8a; 65 | position: absolute; 66 | left: 43%; 67 | top: 50%; 68 | } -------------------------------------------------------------------------------- /client/styles/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v2.0 | 20110126 3 | License: none (public domain) 4 | */ 5 | 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td, 15 | article, aside, canvas, details, embed, 16 | figure, figcaption, footer, header, hgroup, 17 | menu, nav, output, ruby, section, summary, 18 | time, mark, audio, video { 19 | margin: 0; 20 | padding: 0; 21 | border: 0; 22 | font-size: 100%; 23 | font: inherit; 24 | vertical-align: baseline; 25 | } 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, hgroup, menu, nav, section { 29 | display: block; 30 | } 31 | body { 32 | line-height: 1; 33 | } 34 | ol, ul { 35 | list-style: none; 36 | } 37 | blockquote, q { 38 | quotes: none; 39 | } 40 | blockquote:before, blockquote:after, 41 | q:before, q:after { 42 | content: ''; 43 | content: none; 44 | } 45 | table { 46 | border-collapse: collapse; 47 | border-spacing: 0; 48 | } -------------------------------------------------------------------------------- /client/templates/add_event.hbs: -------------------------------------------------------------------------------- 1 |

New Event

2 |
3 |
Service
4 |
5 |
Start
6 |
7 |
Duration
8 |
9 |
10 |
Title
11 |
12 |
Synopsis
13 |
14 |
15 |
16 | Delete Event 17 |
-------------------------------------------------------------------------------- /client/templates/event_row.hbs: -------------------------------------------------------------------------------- 1 | {{start}} 2 | {{duration}} 3 | {{service.comment}} 4 | {{title}} 5 | {{synopsis}} -------------------------------------------------------------------------------- /client/templates/events.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
Service
4 |
5 |
6 |
7 |
-------------------------------------------------------------------------------- /client/templates/events_table.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | Start 4 | 5 | 6 | Duration 7 | 8 | 9 | Service 10 | 11 | 12 | Title 13 | 14 | 15 | Synopsis 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /client/templates/home.hbs: -------------------------------------------------------------------------------- 1 |

Server Status

2 |
3 |
GUI Started:
{{guiStarted}} 4 | 5 |
GUI Status:
{{guiStatus}} 6 |
7 |
Carousel Started:
{{carouselStarted}} 8 | 9 |
Carousel Status:
{{carouselStatus}} 10 |
11 |
Importer Started:
{{importerStarted}} 12 | 13 |
Importer Status:
{{importerStatus}} 14 |
15 |
Importer Last Run:
{{importerLastRun}} 16 | 17 |
Importer Next Run:
{{importerNextRun}} 18 |
19 |
EIT Updater Started:
{{eitUpdaterStarted}} 20 | 21 |
EIT Updater Status:
{{eitUpdaterStatus}} 22 |
23 |
EIT Updater Last Run:
{{eitUpdaterLastRun}} 24 | 25 |
EIT Updater Next Run:
{{eitUpdaterNextRun}} 26 |
27 |
28 | Update EIT 29 |
-------------------------------------------------------------------------------- /client/templates/service_details.hbs: -------------------------------------------------------------------------------- 1 |

Service Details

2 |
3 |
PID
4 |
5 |
Signal ID
6 |
7 |
Original Network ID
8 |
9 |
10 |
Transport Stream ID
11 |
12 |
Comment
13 |
14 |
15 |
16 | Enable/Disable 17 |
-------------------------------------------------------------------------------- /client/templates/service_item.hbs: -------------------------------------------------------------------------------- 1 | {{comment}} -------------------------------------------------------------------------------- /client/templates/service_row.hbs: -------------------------------------------------------------------------------- 1 | {{pid}} 2 | {{signalId}} 3 | {{originalNetworkId}} 4 | {{transportStreamId}} 5 | {{comment}} 6 | {{#if enabled}} Si {{else}} No {{/if}} -------------------------------------------------------------------------------- /client/templates/services.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | PID 4 | 5 | 6 | Signal ID 7 | 8 | 9 | Original Network ID 10 | 11 | 12 | Transport Stream ID 13 | 14 | 15 | Comment 16 | 17 | 18 | Enabled 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "epg" : { 3 | "epg_db" : "eit.db", 4 | "pid" : 18, 5 | "scheduled_hours" : 24, 6 | "eit_interval" : 30, 7 | "carousel_db" : "carousel.db", 8 | "ts_host" : "239.0.0.1", 9 | "ts_port" : 1234 10 | }, 11 | "importer" : { 12 | "type" : "ftp_importer", 13 | "options" : { 14 | "host" : "your.host.com", 15 | "user" : "your.user", 16 | "pass" : "your.pass", 17 | "data_provider" : "reportv_dataprovider", 18 | "import_dir" : "./importer", 19 | "interval_hours" : 1, 20 | "timezone" : "-3:00", 21 | "files" : { 22 | "services" : "file1", 23 | "programs" : "file2", 24 | "scheds" : "file3" 25 | } 26 | }, 27 | "max_memory_mb" : 2048 28 | }, 29 | "eit_updater" : { 30 | "interval_hours" : 0.08, 31 | "retry_interval_minutes" : 0, 32 | "profile" : false, 33 | "forceCarousel" : false, 34 | "profiler_interval" : 0, 35 | "max_memory_mb" : 2048 36 | }, 37 | "status" : { 38 | "port" : 5004 39 | }, 40 | "gui" : { 41 | "port" : 3300 42 | } 43 | } -------------------------------------------------------------------------------- /controllers/home.js: -------------------------------------------------------------------------------- 1 | var models = require('../models') 2 | ; 3 | 4 | module.exports = { 5 | index: function(req, res) { 6 | res.render('index'); 7 | }, 8 | get: function(req, res) { 9 | models.Server.get(function(err, server) { 10 | if (err) { 11 | res.json(400, {error: err.message}); 12 | } else { 13 | res.json(server); 14 | } 15 | }); 16 | }, 17 | updateEit: function(req, res) { 18 | models.Server.updateEit(function(err, result) { 19 | if (err) { 20 | res.json(400, {error: err.message}); 21 | } else { 22 | res.json(result); 23 | } 24 | }); 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /controllers/services.js: -------------------------------------------------------------------------------- 1 | var models = require('../models'); 2 | 3 | module.exports = { 4 | index: function(req, res) { 5 | models.Service.find({}, function(err, data) { 6 | res.json(data); 7 | }); 8 | }, 9 | getById: function(req, res) { 10 | models.Service.find({ serviceId: req.params.id }, function(err, service) { 11 | if (err) { 12 | res.json(400, {error: err.message}); 13 | } else { 14 | res.json(service); 15 | } 16 | }); 17 | }, 18 | add: function(req, res) { 19 | models.Service.add(req.body, function(err, service) { 20 | if (err) { 21 | res.json(400, {error: err.message}); 22 | } else { 23 | res.json(service); 24 | } 25 | }); 26 | }, 27 | update: function(req, res) { 28 | console.log(req.body); 29 | models.Service.update(req.body.id, req.body, function(err, updated) { 30 | if (err) { 31 | res.json(400, {error: err.message}); 32 | } else { 33 | res.json(updated); 34 | } 35 | }); 36 | }, 37 | enable: function(req, res) { 38 | models.Service.enable(req.params.id, function(err1, result) { 39 | if (err1) 40 | res.json(400, {error: err1.message}); 41 | else 42 | res.json(result); 43 | }); 44 | } 45 | }; 46 | -------------------------------------------------------------------------------- /data/.gitignore: -------------------------------------------------------------------------------- 1 | *.json 2 | -------------------------------------------------------------------------------- /data/events/.gitignore: -------------------------------------------------------------------------------- 1 | *.json -------------------------------------------------------------------------------- /importer_server.js: -------------------------------------------------------------------------------- 1 | var _ = require('underscore') 2 | , Epg = require('./lib/epg') 3 | , conf = require('./conf') 4 | , epg = new Epg(conf.epg) 5 | , importer = require('./importer/' + conf.importer.type)(conf.importer.options) 6 | , status = require('./status_client')('importer') 7 | , moment = require('moment') 8 | ; 9 | 10 | importer.on("error", function(err) { 11 | console.error("Error importing data", err); 12 | // status.set('status', 'error'); 13 | }); 14 | importer.on("services", function(services) { 15 | console.log("Received services from importer"); 16 | epg.addServices(services); 17 | }); 18 | importer.on("events", function(events) { 19 | console.log("Received events from importer"); 20 | epg.addEvents(events); 21 | console.log("Updating EIT after import"); 22 | var ret = epg.updateEit(); 23 | if (ret) { 24 | console.log("EIT updated, updating Carousel"); 25 | epg.updateCarousel(); 26 | } 27 | importer.importFinished(); 28 | var mem = process.memoryUsage(); 29 | var memMB = mem.rss / 1048576; 30 | console.log("Memory used:", memMB, "MB"); 31 | if (memMB > conf.importer.max_memory_mb) { 32 | console.log("Exceeded limit of", conf.importer.max_memory_mb, "MB, exiting..."); 33 | process.exit(); 34 | } 35 | }); 36 | importer.on("run", function() { 37 | console.log("Starting import"); 38 | status.set('status', 'running'); 39 | }); 40 | importer.on("done", function() { 41 | console.log("Import finished"); 42 | status.set('status', 'idle'); 43 | status.set('lastRun', moment().toISOString()); 44 | status.set('nextRun', moment().add(importer.options.interval_hours, 'hours').toISOString()); 45 | }); 46 | 47 | status.set('status', 'running', function() { 48 | console.log("Starting importer"); 49 | importer.run(); 50 | }); 51 | 52 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Thu Dec 12 2013 21:30:26 GMT-0500 (EST) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path, that will be used to resolve files and exclude 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | frameworks: ['jasmine'], 13 | 14 | 15 | // list of files / patterns to load in the browser 16 | // NOTE: do NOT include jasmine here because grunt-karma already does 17 | files: [ 18 | 'build/vendor.js', 19 | 'build/tests.js', 20 | ], 21 | 22 | 23 | // list of files to exclude 24 | exclude: [ 25 | 26 | ], 27 | 28 | 29 | // test results reporter to use 30 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' 31 | reporters: ['progress'], 32 | 33 | 34 | // web server port 35 | port: 9876, 36 | 37 | 38 | // enable / disable colors in the output (reporters and logs) 39 | colors: true, 40 | 41 | 42 | // level of logging 43 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 44 | logLevel: config.LOG_INFO, 45 | 46 | 47 | // enable / disable watching file and executing tests whenever any file changes 48 | autoWatch: false, 49 | 50 | 51 | // Start these browsers, currently available: 52 | // - Chrome 53 | // - ChromeCanary 54 | // - Firefox 55 | // - Opera (has to be installed with `npm install karma-opera-launcher`) 56 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`) 57 | // - PhantomJS 58 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`) 59 | browsers: ['PhantomJS'], 60 | 61 | 62 | // If browser does not capture in given timeout [ms], kill it 63 | captureTimeout: 60000, 64 | 65 | 66 | // Continuous Integration mode 67 | // if true, it capture browsers, run tests and exit 68 | singleRun: true 69 | }); 70 | }; 71 | -------------------------------------------------------------------------------- /monit/carousel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | NOWT=$(date +"%Y%m%d%H%M%S") 3 | 4 | case $1 in 5 | start) 6 | sleep 3; 7 | cd /home/pi/openepg/; 8 | echo $$ > /home/pi/carousel.pid; 9 | exec 2>&1 make NODE=/usr/bin/node serve_carousel 1>/home/pi/carousel-$NOWT.out; 10 | ;; 11 | stop) 12 | GPID=$(cat /home/pi/carousel.pid); 13 | for PID in $(pstree -pn $GPID |grep -o "([[:digit:]]*)" |grep -o "[[:digit:]]*") 14 | do 15 | kill -9 $PID; 16 | done; 17 | rm /home/pi/carousel.pid; 18 | ;; 19 | *) 20 | echo "usage: carousel.sh {start|stop}" ;; 21 | esac 22 | exit 0 23 | -------------------------------------------------------------------------------- /monit/eitupdater.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | NOWT=$(date +"%Y%m%d%H%M%S") 3 | 4 | case $1 in 5 | start) 6 | sleep 3; 7 | cd /home/pi/openepg/; 8 | echo $$ > /home/pi/eitupdater.pid; 9 | exec 2>&1 make NODE=/usr/bin/node serve_eitupdater 1>/home/pi/eitupdater-$NOWT.out; 10 | ;; 11 | stop) 12 | GPID=$(cat /home/pi/eitupdater.pid); 13 | for PID in $(pstree -pn $GPID |grep -o "([[:digit:]]*)" |grep -o "[[:digit:]]*") 14 | do 15 | kill -9 $PID; 16 | done; 17 | rm /home/pi/eitupdater.pid; 18 | ;; 19 | *) 20 | echo "usage: eitupdater.sh {start|stop}" ;; 21 | esac 22 | exit 0 -------------------------------------------------------------------------------- /monit/gui.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | NOWT=$(date +"%Y%m%d%H%M%S") 3 | 4 | case $1 in 5 | start) 6 | sleep 3; 7 | cd /home/pi/openepg/; 8 | echo $$ > /home/pi/gui.pid; 9 | exec 2>&1 make NODE=/usr/bin/node serve_gui 1>/home/pi/gui-$NOWT.out; 10 | ;; 11 | stop) 12 | GPID=$(cat /home/pi/gui.pid); 13 | for PID in $(pstree -pn $GPID |grep -o "([[:digit:]]*)" |grep -o "[[:digit:]]*") 14 | do 15 | kill -9 $PID; 16 | done; 17 | rm /home/pi/gui.pid; 18 | ;; 19 | *) 20 | echo "usage: gui.sh {start|stop}" ;; 21 | esac 22 | exit 0 -------------------------------------------------------------------------------- /monit/importer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | NOWT=$(date +"%Y%m%d%H%M%S") 3 | 4 | case $1 in 5 | start) 6 | sleep 3; 7 | cd /home/pi/openepg/; 8 | echo $$ > /home/pi/importer.pid; 9 | exec 2>&1 make NODE=/usr/bin/node serve_importer 1>/home/pi/importer-$NOWT.out; 10 | ;; 11 | stop) 12 | GPID=$(cat /home/pi/importer.pid); 13 | for PID in $(pstree -pn $GPID |grep -o "([[:digit:]]*)" |grep -o "[[:digit:]]*") 14 | do 15 | kill -9 $PID; 16 | done; 17 | rm /home/pi/importer.pid; 18 | ;; 19 | *) 20 | echo "usage: importer.sh {start|stop}" ;; 21 | esac 22 | exit 0 -------------------------------------------------------------------------------- /monit/status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | NOWT=$(date +"%Y%m%d%H%M%S") 3 | 4 | case $1 in 5 | start) 6 | sleep 3; 7 | cd /home/pi/openepg/; 8 | echo $$ > /home/pi/status.pid; 9 | exec 2>&1 make NODE=/usr/bin/node serve_status 1>/home/pi/status-$NOWT.out; 10 | ;; 11 | stop) 12 | GPID=$(cat /home/pi/status.pid); 13 | for PID in $(pstree -pn $GPID |grep -o "([[:digit:]]*)" |grep -o "[[:digit:]]*") 14 | do 15 | kill -9 $PID; 16 | done; 17 | rm /home/pi/status.pid; 18 | ;; 19 | *) 20 | echo "usage: status.sh {start|stop}" ;; 21 | esac 22 | exit 0 23 | -------------------------------------------------------------------------------- /perl-vars.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | _DIR=$("pwd") 3 | empty= 4 | space=$empty $empty 5 | _PATH="$_DIR/perl/lib/bin${PATH+:}${PATH}"; export PATH=$_PATH; 6 | _PERL5LIB="$_DIR/perl/lib/lib/perl5${PERL5LIB+:}${PERL5LIB}"; export PERL5LIB=$_PERL5LIB; 7 | _PERL_LOCAL_LIB_ROOT="$_DIR/perl/lib${PERL_LOCAL_LIB_ROOT+:}${PERL_LOCAL_LIB_ROOT}"; export PERL_LOCAL_LIB_ROOT=$_PERL_LOCAL_LIB_ROOT; 8 | _PERL_MB_OPT="--install_base$space\"$_DIR/perl/lib\""; export PERL_MB_OPT=$_PERL_MB_OPT; 9 | _PERL_MM_OPT="INSTALL_BASE=$_DIR/perl/lib"; export PERL_MM_OPT=$_PERL_MM_OPT; 10 | -------------------------------------------------------------------------------- /profiler.js: -------------------------------------------------------------------------------- 1 | var util = require('util') 2 | , memwatch = require('memwatch') 3 | ; 4 | 5 | function profiler() { 6 | this.intervalPid = false; 7 | this.heapDiff = false; 8 | }; 9 | 10 | profiler.prototype.init = function(profile) { 11 | if (profile) { 12 | memwatch.on('leak', function(info) { 13 | console.log("Leak info", info); 14 | }); 15 | memwatch.on('stats', function(info) { 16 | console.log("Mem stats", info); 17 | }); 18 | } 19 | }; 20 | 21 | profiler.prototype.getMemoryUsage = function() { 22 | return util.inspect(process.memoryUsage()); 23 | }; 24 | 25 | profiler.prototype.printMemoryUsage = function(doProfile) { 26 | if (doProfile) 27 | console.log(this.getMemoryUsage()); 28 | }; 29 | 30 | profiler.prototype.initInterval = function(doProfile) { 31 | if (doProfile) { 32 | var self = this; 33 | this.initInterval = setInterval(function() { 34 | self.printMemoryUsage(true); 35 | }, 5000); 36 | } 37 | }; 38 | 39 | profiler.prototype.cancelInterval = function() { 40 | if (this.intervalPid) 41 | clearInterval(this.intervalPid); 42 | }; 43 | 44 | profiler.prototype.initHeapDiff = function(doProfile) { 45 | if (doProfile) 46 | this.heapDiff = new memwatch.HeapDiff(); 47 | }; 48 | 49 | profiler.prototype.finishHeapDiff = function() { 50 | if (this.heapDiff) { 51 | var diff = this.heapDiff.end(); 52 | console.log("Heap Diff", JSON.stringify(diff, null, 4)); 53 | this.heapDiff = false; 54 | } 55 | }; 56 | 57 | exports = module.exports = function() { 58 | return new profiler(); 59 | }; -------------------------------------------------------------------------------- /public/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avcsa/openepg/4fcc367507b1b96820e03096d424f8ee905c6e0f/public/img/loading.gif -------------------------------------------------------------------------------- /routes.js: -------------------------------------------------------------------------------- 1 | var home = require('./controllers/home') 2 | , services = require('./controllers/services') 3 | , events = require('./controllers/events') 4 | ; 5 | 6 | module.exports.initialize = function(app) { 7 | app.get('/', home.index); 8 | app.get('/server', home.get); 9 | app.get('/server/:id', home.get); 10 | app.put('/server/:id', home.updateEit); 11 | app.get('/api/services', services.index); 12 | app.get('/api/services/:id', services.getById); 13 | app.post('/api/services', services.add); 14 | // app.put('/api/services', services.update); 15 | app.put('/api/services/:id', services.enable); 16 | app.get('/api/events', events.index); 17 | app.get('/api/events/:id', events.getById); 18 | app.post('/api/events', events.add); 19 | // app.put('/api/events', events.update); 20 | app.delete('/api/events/:id', events.delete); 21 | }; -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | var express = require('express') 2 | , http = require('http') 3 | , path = require('path') 4 | , routes = require('./routes') 5 | , exphbs = require('express3-handlebars') 6 | , app = express() 7 | , conf = require('./conf').gui 8 | ; 9 | 10 | app.set('port', conf.port); 11 | app.set('views', __dirname + '/views'); 12 | app.engine('handlebars', exphbs({ 13 | defaultLayout: 'main', 14 | layoutsDir: app.get('views') + '/layouts' 15 | })); 16 | app.set('view engine', 'handlebars'); 17 | 18 | app.use(express.logger('dev')); 19 | app.use(express.json()); 20 | app.use(express.urlencoded()); 21 | app.use(express.methodOverride()); 22 | app.use(express.cookieParser('openepg-will-rull-the-world')); 23 | app.use(app.router); 24 | app.use('/', express.static(path.join(__dirname, 'public'))); 25 | 26 | // development only 27 | if ('development' === app.get('env')) { 28 | app.use(express.errorHandler()); 29 | } 30 | 31 | //connect to the db server: 32 | //routes list: 33 | routes.initialize(app); 34 | 35 | //finally boot up the server: 36 | http.createServer(app).listen(app.get('port'), function() { 37 | console.log('Server up: http://localhost:' + app.get('port')); 38 | }); 39 | 40 | -------------------------------------------------------------------------------- /status_client.js: -------------------------------------------------------------------------------- 1 | var dnode = require('dnode') 2 | , conf = require('./conf').status 3 | ; 4 | 5 | function status_client(module) { 6 | this.module = module; 7 | this.d = dnode.connect(conf.port); 8 | this.serverUp = false; 9 | var self = this; 10 | this.d.on('remote', function(remote) { 11 | self.server = remote; 12 | self.server.register(self.module, process.pid, function(status) { 13 | console.log("Registration complete", status); 14 | self.status = status; 15 | self.serverUp = true; 16 | }); 17 | }); 18 | } 19 | 20 | status_client.prototype.set = function(prop, value, callback) { 21 | if (this.serverUp) { 22 | console.log("Setting property", prop, value); 23 | this.server.set(this.module, prop, value, callback); 24 | } else { 25 | console.log("Server still not up, waiting..."); 26 | var self = this; 27 | setTimeout(function() { 28 | console.log("Checking if server up..."); 29 | self.set(prop, value, callback); 30 | }, 500); 31 | } 32 | }; 33 | 34 | status_client.prototype.getStatus = function(callback) { 35 | this.server.get(callback); 36 | }; 37 | 38 | exports = module.exports = function(module) { 39 | return new status_client(module); 40 | }; -------------------------------------------------------------------------------- /test/conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "timezone" : "-3:00", 3 | "epg_db" : "eit-test.db", 4 | "pid" : 18, 5 | "scheduled_hours": 24, 6 | "eit_interval" : 30, 7 | "carousel_db" : "carousel-test.db", 8 | "ts_host" : "239.1.0.1", 9 | "ts_port" : 12345 10 | } -------------------------------------------------------------------------------- /test/utils.js: -------------------------------------------------------------------------------- 1 | var dbName = require('./conf').epg_db 2 | , fs = require('fs') 3 | ; 4 | 5 | function utils(){}; 6 | 7 | utils.prototype.deleteDb = function(done) { 8 | if (fs.existsSync(process.cwd() + "/" + dbName)) 9 | fs.unlinkSync(process.cwd() + "/" + dbName); 10 | done(); 11 | }; 12 | 13 | exports = module.exports = function() { 14 | return new utils(); 15 | }; -------------------------------------------------------------------------------- /views/index.handlebars: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /views/layouts/main.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Open EPG 5 | 6 | 7 | 8 |
9 |

FYI, something just happened!

10 |

This is just an info notification message.

11 |
12 | 13 |
14 |

Ups, an error ocurred

15 |

This is just an error notification message.

16 |
17 | 18 |
19 |

Wait, I must warn you!

20 |

This is just a warning notification message.

21 |
22 | 23 |
24 |

Congrats, you did it!

25 |

This is just a success notification message.

26 |
27 | 39 |
40 |
41 |
42 | {{{body}}} 43 |
44 | 45 | 46 | 47 | 48 | --------------------------------------------------------------------------------