jazz-jss 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +44 -19
- data/bin/jazz +20 -8
- data/lib/jazz/cli.rb +73 -9
- data/lib/jazz/generators/controller/controller.rb +22 -0
- data/lib/jazz/generators/controller/templates/controller.js +38 -0
- data/lib/jazz/generators/helper/helper.rb +22 -0
- data/lib/jazz/generators/helper/templates/helper.js +6 -0
- data/lib/jazz/generators/model/model.rb +50 -0
- data/lib/jazz/generators/model/templates/database.js +14 -0
- data/lib/jazz/generators/model/templates/fixture.js +10 -0
- data/{templates → lib/jazz/generators/model/templates}/model.js +9 -12
- data/lib/jazz/generators/project/project.rb +27 -0
- data/{templates/app_root/development/app/assets/javascripts/application.js → lib/jazz/generators/project/templates/app_root/JEMFILE.js} +0 -0
- data/{templates/app_root/development/app/assets/stylesheets/application.css → lib/jazz/generators/project/templates/app_root/app/assets/javascripts/application.js} +0 -0
- data/{templates/view_create.html → lib/jazz/generators/project/templates/app_root/app/assets/stylesheets/application.sass} +0 -0
- data/lib/jazz/generators/project/templates/app_root/app/controllers/application_controller.js +9 -0
- data/{templates/app_root/development → lib/jazz/generators/project/templates/app_root}/app/helpers/application_helper.js +0 -1
- data/lib/jazz/generators/project/templates/app_root/app/scenarios/application_scenario.js +13 -0
- data/lib/jazz/generators/project/templates/app_root/app/views/layouts/index.handlebars +1 -0
- data/lib/jazz/generators/project/templates/app_root/config/boot.js +23 -0
- data/lib/jazz/generators/project/templates/app_root/config/routes.js +6 -0
- data/{templates/view_index.html → lib/jazz/generators/project/templates/app_root/db/fixtures/touch} +0 -0
- data/lib/jazz/generators/project/templates/app_root/index.html +11 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/_.js +9 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/controller/_.js +1 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/controller/controller.js +22 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/core/_.js +1 -0
- data/{dist/jazz/lib → lib/jazz/generators/project/templates/app_root/lib/jazz/lib/core}/core.js +0 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/database/_.js +3 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/database/database.js +10 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/database/finder.js +41 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/database/modifier.js +10 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/helper/_.js +2 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/helper/helper.js +49 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/helper/underscore.js +13 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/model/_.js +4 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/model/conditional.js +3 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/model/finder.js +21 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/model/model.js +23 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/model/modifier.js +44 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/route/_.js +1 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/route/route.js +115 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/scenario/_.js +2 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/scenario/initialize_scenarios/application.js +3 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/scenario/scenario.js +13 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/view/_.js +1 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/view/view.js +39 -0
- data/{dist/handlebars → lib/jazz/generators/project/templates/app_root/vendor}/handlebars.js +0 -0
- data/{dist/hashchange → lib/jazz/generators/project/templates/app_root/vendor}/hashchange.js +0 -0
- data/{dist/jquery → lib/jazz/generators/project/templates/app_root/vendor}/jquery.js +0 -0
- data/lib/jazz/generators/project/templates/app_root/vendor/simplemodal.js +698 -0
- data/lib/jazz/generators/project/templates/app_root/vendor/tipTip.js +191 -0
- data/{dist/underscore → lib/jazz/generators/project/templates/app_root/vendor}/underscore.js +0 -0
- data/lib/jazz/generators/project/templates/application.js +12 -0
- data/lib/jazz/generators/scaffold/scaffold.rb +73 -0
- data/lib/jazz/generators/scaffold/templates/controller.js +49 -0
- data/lib/jazz/generators/scaffold/templates/database.js +14 -0
- data/lib/jazz/generators/scaffold/templates/fixture.js +10 -0
- data/lib/jazz/generators/scaffold/templates/helper.js +6 -0
- data/lib/jazz/generators/scaffold/templates/model.js +13 -0
- data/lib/jazz/generators/scaffold/templates/scenario.js +7 -0
- data/lib/jazz/generators/scaffold/templates/view_edit.handlebars +6 -0
- data/lib/jazz/generators/scaffold/templates/view_form.handlebars +12 -0
- data/lib/jazz/generators/scaffold/templates/view_index.handlebars +27 -0
- data/lib/jazz/generators/scaffold/templates/view_new.handlebars +5 -0
- data/lib/jazz/generators/scaffold/templates/view_show.handlebars +10 -0
- data/lib/jazz/generators/scenario/scenario.rb +22 -0
- data/lib/jazz/generators/scenario/templates/scenario.js +7 -0
- data/lib/jazz/rack/config.ru +16 -0
- data/lib/jazz/sprockets/templates/handlebars.rb +30 -0
- metadata +120 -234
- data/dist/jazz/lib/controller.js +0 -17
- data/dist/jazz/lib/db.js +0 -41
- data/dist/jazz/lib/helper.js +0 -38
- data/dist/jazz/lib/model.js +0 -95
- data/dist/jazz/lib/route.js +0 -74
- data/dist/jazz/lib/view.js +0 -1
- data/dist/jazz/module.js +0 -15
- data/dist/require/order.js +0 -180
- data/dist/require/require.js +0 -31
- data/dist/require/template.js +0 -98
- data/lib/jazz.rb +0 -12
- data/lib/jazz/app_detector.rb +0 -70
- data/lib/jazz/app_generator.rb +0 -41
- data/lib/jazz/controller_generator.rb +0 -34
- data/lib/jazz/helper_generator.rb +0 -30
- data/lib/jazz/model_generator.rb +0 -27
- data/lib/jazz/scaffold_generator.rb +0 -49
- data/templates/app_root/Rakefile +0 -11
- data/templates/app_root/development/app/controllers/application_controller.js +0 -11
- data/templates/app_root/development/config/glue.js +0 -9
- data/templates/app_root/development/config/routes.js +0 -5
- data/templates/app_root/scripts/build.js +0 -30
- data/templates/app_root/scripts/r.js/LICENSE +0 -58
- data/templates/app_root/scripts/r.js/README.md +0 -177
- data/templates/app_root/scripts/r.js/build/build.js +0 -26
- data/templates/app_root/scripts/r.js/build/buildebug.sh +0 -4
- data/templates/app_root/scripts/r.js/build/example.build.js +0 -296
- data/templates/app_root/scripts/r.js/build/jslib/blank.js +0 -4
- data/templates/app_root/scripts/r.js/build/jslib/build.js +0 -952
- data/templates/app_root/scripts/r.js/build/jslib/commandLine.js +0 -23
- data/templates/app_root/scripts/r.js/build/jslib/commonJs.js +0 -152
- data/templates/app_root/scripts/r.js/build/jslib/env.js +0 -47
- data/templates/app_root/scripts/r.js/build/jslib/lang.js +0 -49
- data/templates/app_root/scripts/r.js/build/jslib/logger.js +0 -58
- data/templates/app_root/scripts/r.js/build/jslib/node.js +0 -106
- data/templates/app_root/scripts/r.js/build/jslib/node/args.js +0 -20
- data/templates/app_root/scripts/r.js/build/jslib/node/file.js +0 -263
- data/templates/app_root/scripts/r.js/build/jslib/node/load.js +0 -17
- data/templates/app_root/scripts/r.js/build/jslib/node/optimize.js +0 -10
- data/templates/app_root/scripts/r.js/build/jslib/node/print.js +0 -16
- data/templates/app_root/scripts/r.js/build/jslib/optimize.js +0 -279
- data/templates/app_root/scripts/r.js/build/jslib/opto.build.js +0 -11
- data/templates/app_root/scripts/r.js/build/jslib/parse.js +0 -590
- data/templates/app_root/scripts/r.js/build/jslib/pragma.js +0 -251
- data/templates/app_root/scripts/r.js/build/jslib/requirePatch.js +0 -286
- data/templates/app_root/scripts/r.js/build/jslib/rhino.js +0 -22
- data/templates/app_root/scripts/r.js/build/jslib/rhino/args.js +0 -21
- data/templates/app_root/scripts/r.js/build/jslib/rhino/file.js +0 -244
- data/templates/app_root/scripts/r.js/build/jslib/rhino/load.js +0 -12
- data/templates/app_root/scripts/r.js/build/jslib/rhino/optimize.js +0 -100
- data/templates/app_root/scripts/r.js/build/jslib/rhino/print.js +0 -12
- data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/README.md +0 -16
- data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/index.js +0 -21
- data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/parse-js.js +0 -1342
- data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/process.js +0 -2005
- data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/squeeze-more.js +0 -55
- data/templates/app_root/scripts/r.js/build/jslib/x.js +0 -243
- data/templates/app_root/scripts/r.js/build/tests/all.js +0 -47
- data/templates/app_root/scripts/r.js/build/tests/allj.sh +0 -3
- data/templates/app_root/scripts/r.js/build/tests/alln.sh +0 -18
- data/templates/app_root/scripts/r.js/build/tests/anonSimple.build.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/buildUtils.js +0 -19
- data/templates/app_root/scripts/r.js/build/tests/builds.js +0 -489
- data/templates/app_root/scripts/r.js/build/tests/circular.build.js +0 -18
- data/templates/app_root/scripts/r.js/build/tests/convert.js +0 -18
- data/templates/app_root/scripts/r.js/build/tests/css.build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/css/common/common.css +0 -4
- data/templates/app_root/scripts/r.js/build/tests/css/master.css +0 -10
- data/templates/app_root/scripts/r.js/build/tests/css/sub/sub1.css +0 -7
- data/templates/app_root/scripts/r.js/build/tests/cssTestCompare.css +0 -13
- data/templates/app_root/scripts/r.js/build/tests/end.frag +0 -3
- data/templates/app_root/scripts/r.js/build/tests/expected/unoExcludeShallow.js +0 -23
- data/templates/app_root/scripts/r.js/build/tests/exports.build.js +0 -12
- data/templates/app_root/scripts/r.js/build/tests/hasTestModule.build.js +0 -10
- data/templates/app_root/scripts/r.js/build/tests/hasTestModule.js +0 -30
- data/templates/app_root/scripts/r.js/build/tests/http/httpBuild.js +0 -70
- data/templates/app_root/scripts/r.js/build/tests/http/main.html +0 -28
- data/templates/app_root/scripts/r.js/build/tests/http/scripts/main.js +0 -18
- data/templates/app_root/scripts/r.js/build/tests/http/scripts/one.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/http/scripts/three.js +0 -5
- data/templates/app_root/scripts/r.js/build/tests/http/scripts/two.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/i18n.build.js +0 -17
- data/templates/app_root/scripts/r.js/build/tests/indexBuilder.build.js +0 -8
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/a.js +0 -17
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/b.js +0 -8
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/c.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/d.js +0 -5
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/expected.js +0 -36
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/node_modules/amdefine/LICENSE +0 -58
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/node_modules/amdefine/amdefine.js +0 -188
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/node_modules/amdefine/package.json +0 -21
- data/templates/app_root/scripts/r.js/build/tests/lib/comments/bang.js +0 -10
- data/templates/app_root/scripts/r.js/build/tests/lib/comments/build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/comments/expected.js +0 -9
- data/templates/app_root/scripts/r.js/build/tests/lib/comments/license.js +0 -13
- data/templates/app_root/scripts/r.js/build/tests/lib/dotpackage/scripts/app.build.js +0 -15
- data/templates/app_root/scripts/r.js/build/tests/lib/dotpackage/scripts/main-expected.js +0 -13
- data/templates/app_root/scripts/r.js/build/tests/lib/dotpackage/scripts/main.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/lib/empty/build.js +0 -13
- data/templates/app_root/scripts/r.js/build/tests/lib/empty/expected.js +0 -8
- data/templates/app_root/scripts/r.js/build/tests/lib/empty/main.js +0 -1
- data/templates/app_root/scripts/r.js/build/tests/lib/empty/sub1.js +0 -1
- data/templates/app_root/scripts/r.js/build/tests/lib/empty/sub2.js +0 -1
- data/templates/app_root/scripts/r.js/build/tests/lib/nameInsertion/build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/nameInsertion/expected.js +0 -12
- data/templates/app_root/scripts/r.js/build/tests/lib/nameInsertion/main.js +0 -9
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/build.js +0 -8
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/expected.js +0 -47
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/main.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/modules/four.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/modules/one.js +0 -9
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/modules/three.js +0 -14
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/modules/two.js +0 -5
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/a.js +0 -12
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/b.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/buildWithCE.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/c.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/d.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/e.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/expected-built.js +0 -36
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/expected-builtWithCE.js +0 -42
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/main.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/top.js +0 -10
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/a.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/b.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNeedAll.js +0 -9
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNeedB.js +0 -11
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNeedC.js +0 -11
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNeedD.js +0 -11
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNested.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/c.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/d.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-built.js +0 -21
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNeedAll.js +0 -31
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNeedB.js +0 -24
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNeedC.js +0 -24
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNeedD.js +0 -25
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNested.js +0 -31
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/main.js +0 -17
- data/templates/app_root/scripts/r.js/build/tests/lib/plugins/build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/plugins/converter.js +0 -11
- data/templates/app_root/scripts/r.js/build/tests/lib/plugins/main.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/plugins/plug.js +0 -29
- data/templates/app_root/scripts/r.js/build/tests/lib/plugins/util.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/nameOnly.build.js +0 -10
- data/templates/app_root/scripts/r.js/build/tests/nodeAll.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/nodeOptimize.js +0 -12
- data/templates/app_root/scripts/r.js/build/tests/nodeOptimizeNoCallback.js +0 -10
- data/templates/app_root/scripts/r.js/build/tests/order.build.js +0 -16
- data/templates/app_root/scripts/r.js/build/tests/override/override.js +0 -36
- data/templates/app_root/scripts/r.js/build/tests/packages.build.js +0 -59
- data/templates/app_root/scripts/r.js/build/tests/parse.js +0 -103
- data/templates/app_root/scripts/r.js/build/tests/simple.build.js +0 -13
- data/templates/app_root/scripts/r.js/build/tests/simpleNamespace.build.js +0 -17
- data/templates/app_root/scripts/r.js/build/tests/start.frag +0 -4
- data/templates/app_root/scripts/r.js/build/tests/text.build.js +0 -16
- data/templates/app_root/scripts/r.js/build/tests/textExclude.build.js +0 -16
- data/templates/app_root/scripts/r.js/dist.js +0 -95
- data/templates/app_root/scripts/r.js/dist/README.md +0 -6
- data/templates/app_root/scripts/r.js/dist/r-1.0.0.js +0 -9042
- data/templates/app_root/scripts/r.js/dist/r-edge.js +0 -9191
- data/templates/app_root/scripts/r.js/dist/r.js +0 -9099
- data/templates/app_root/scripts/r.js/lib/closure/COPYING +0 -202
- data/templates/app_root/scripts/r.js/lib/closure/README +0 -292
- data/templates/app_root/scripts/r.js/lib/closure/compiler.jar +0 -0
- data/templates/app_root/scripts/r.js/lib/rhino/LICENSE +0 -4
- data/templates/app_root/scripts/r.js/lib/rhino/js.jar +0 -0
- data/templates/app_root/scripts/r.js/require.js +0 -1952
- data/templates/app_root/scripts/r.js/tasks.txt +0 -2
- data/templates/app_root/scripts/r.js/tests/all.js +0 -49
- data/templates/app_root/scripts/r.js/tests/allNode.js +0 -3
- data/templates/app_root/scripts/r.js/tests/allj.sh +0 -1
- data/templates/app_root/scripts/r.js/tests/alln.sh +0 -2
- data/templates/app_root/scripts/r.js/tests/alpha.js +0 -3
- data/templates/app_root/scripts/r.js/tests/beta.js +0 -6
- data/templates/app_root/scripts/r.js/tests/doh/LICENSE +0 -195
- data/templates/app_root/scripts/r.js/tests/doh/README +0 -12
- data/templates/app_root/scripts/r.js/tests/doh/_browserRunner.js +0 -855
- data/templates/app_root/scripts/r.js/tests/doh/_nodeRunner.js +0 -20
- data/templates/app_root/scripts/r.js/tests/doh/_rhinoRunner.js +0 -17
- data/templates/app_root/scripts/r.js/tests/doh/_sounds/LICENSE +0 -10
- data/templates/app_root/scripts/r.js/tests/doh/_sounds/doh.wav +0 -0
- data/templates/app_root/scripts/r.js/tests/doh/_sounds/dohaaa.wav +0 -0
- data/templates/app_root/scripts/r.js/tests/doh/_sounds/woohoo.wav +0 -0
- data/templates/app_root/scripts/r.js/tests/doh/runner.html +0 -316
- data/templates/app_root/scripts/r.js/tests/doh/runner.js +0 -1499
- data/templates/app_root/scripts/r.js/tests/doh/runner.sh +0 -3
- data/templates/app_root/scripts/r.js/tests/doh/small_logo.png +0 -0
- data/templates/app_root/scripts/r.js/tests/node/canvasTest.js +0 -39
- data/templates/app_root/scripts/r.js/tests/node/embedded/README.md +0 -15
- data/templates/app_root/scripts/r.js/tests/node/embedded/coffee/foo.coffee +0 -1
- data/templates/app_root/scripts/r.js/tests/node/embedded/main.js +0 -13
- data/templates/app_root/scripts/r.js/tests/node/embedded/scripts/bar.js +0 -13
- data/templates/app_root/scripts/r.js/tests/node/index.js +0 -11
- data/templates/app_root/scripts/r.js/tests/node/tests/alpha/foo.js +0 -6
- data/templates/app_root/scripts/r.js/tests/node/tests/alpha/hello.html +0 -9
- data/templates/app_root/scripts/r.js/tests/node/tests/foo.js +0 -3
- data/templates/app_root/scripts/r.js/tests/node/tests/server.js +0 -11
- data/templates/app_root/scripts/r.js/tests/relative.js +0 -10
- data/templates/app_root/scripts/r.js/tests/sub/betaSub.js +0 -3
- data/templates/application.js +0 -7
- data/templates/boot.js +0 -42
- data/templates/controller.js +0 -19
- data/templates/db.js +0 -14
- data/templates/helper.js +0 -9
- data/templates/index.html +0 -9
- data/templates/scaffold_controller.js +0 -19
- data/templates/view_show.html +0 -0
- data/templates/view_update.html +0 -0
data/dist/require/require.js
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
RequireJS 0.27.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
3
|
-
Available via the MIT or new BSD license.
|
4
|
-
see: http://github.com/jrburke/requirejs for details
|
5
|
-
*/
|
6
|
-
var requirejs,require,define;
|
7
|
-
(function(){function J(a){return M.call(a)==="[object Function]"}function E(a){return M.call(a)==="[object Array]"}function Z(a,c,i){for(var j in c)if(!(j in K)&&(!(j in a)||i))a[j]=c[j];return d}function N(a,c,d){a=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+a);if(d)a.originalError=d;return a}function $(a,c,d){var j,k,q;for(j=0;q=c[j];j++){q=typeof q==="string"?{name:q}:q;k=q.location;if(d&&(!k||k.indexOf("/")!==0&&k.indexOf(":")===-1))k=d+"/"+(k||q.name);a[q.name]={name:q.name,location:k||
|
8
|
-
q.name,main:(q.main||"main").replace(da,"").replace(aa,"")}}}function V(a,c){a.holdReady?a.holdReady(c):c?a.readyWait+=1:a.ready(!0)}function ea(a){function c(b,h){var e,s;if(b&&b.charAt(0)==="."&&h){p.pkgs[h]?h=[h]:(h=h.split("/"),h=h.slice(0,h.length-1));e=b=h.concat(b.split("/"));var a;for(s=0;a=e[s];s++)if(a===".")e.splice(s,1),s-=1;else if(a==="..")if(s===1&&(e[2]===".."||e[0]===".."))break;else s>0&&(e.splice(s-1,2),s-=2);s=p.pkgs[e=b[0]];b=b.join("/");s&&b===e+"/"+s.main&&(b=e)}return b}function i(b,
|
9
|
-
h){var e=b?b.indexOf("!"):-1,a=null,d=h?h.name:null,f=b,l,i;e!==-1&&(a=b.substring(0,e),b=b.substring(e+1,b.length));a&&(a=c(a,d));b&&(a?l=(e=n[a])&&e.normalize?e.normalize(b,function(b){return c(b,d)}):c(b,d):(l=c(b,d),i=E[l],i||(i=g.nameToUrl(l,null,h),E[l]=i)));return{prefix:a,name:l,parentMap:h,url:i,originalName:f,fullName:a?a+"!"+(l||""):l}}function j(){var b=!0,h=p.priorityWait,e,a;if(h){for(a=0;e=h[a];a++)if(!t[e]){b=!1;break}b&&delete p.priorityWait}return b}function k(b,h,e){return function(){var a=
|
10
|
-
ga.call(arguments,0),c;if(e&&J(c=a[a.length-1]))c.__requireJsBuild=!0;a.push(h);return b.apply(null,a)}}function q(b,h){var e=k(g.require,b,h);Z(e,{nameToUrl:k(g.nameToUrl,b),toUrl:k(g.toUrl,b),defined:k(g.requireDefined,b),specified:k(g.requireSpecified,b),isBrowser:d.isBrowser});return e}function o(b){var h,e,a;a=b.callback;var c=b.map,f=c.fullName,l=b.deps,fa=b.listeners;if(a&&J(a)){if(p.catchError.define)try{e=d.execCb(f,b.callback,l,n[f])}catch(j){h=j}else e=d.execCb(f,b.callback,l,n[f]);if(f)b.cjsModule&&
|
11
|
-
b.cjsModule.exports!==void 0?e=n[f]=b.cjsModule.exports:e===void 0&&b.usingExports?e=n[f]:(n[f]=e,F[f]&&(Q[f]=!0))}else f&&(e=n[f]=a,F[f]&&(Q[f]=!0));if(C[b.id])delete C[b.id],b.isDone=!0,g.waitCount-=1,g.waitCount===0&&(I=[]);delete R[f];if(d.onResourceLoad&&!b.placeholder)d.onResourceLoad(g,c,b.depArray);if(h)return e=(f?i(f).url:"")||h.fileName||h.sourceURL,a=h.moduleTree,h=N("defineerror",'Error evaluating module "'+f+'" at location "'+e+'":\n'+h+"\nfileName:"+e+"\nlineNumber: "+(h.lineNumber||
|
12
|
-
h.line),h),h.moduleName=f,h.moduleTree=a,d.onError(h);for(h=0;a=fa[h];h++)a(e)}function r(b,h){return function(a){b.depDone[h]||(b.depDone[h]=!0,b.deps[h]=a,b.depCount-=1,b.depCount||o(b))}}function v(b,h){var a=h.map,c=a.fullName,i=a.name,f=L[b]||(L[b]=n[b]),l;if(!h.loading)h.loading=!0,l=function(b){h.callback=function(){return b};o(h);t[h.id]=!0},l.fromText=function(b,a){var h=O;t[b]=!1;g.scriptCount+=1;g.fake[b]=!0;h&&(O=!1);d.exec(a);h&&(O=!0);g.completeLoad(b)},c in n?l(n[c]):f.load(i,q(a.parentMap,
|
13
|
-
!0),l,p)}function w(b){C[b.id]||(C[b.id]=b,I.push(b),g.waitCount+=1)}function B(b){this.listeners.push(b)}function u(b,h){var a=b.fullName,c=b.prefix,d=c?L[c]||(L[c]=n[c]):null,f,l;a&&(f=R[a]);if(!f&&(l=!0,f={id:(c&&!d?M++ +"__p@:":"")+(a||"__r@"+M++),map:b,depCount:0,depDone:[],depCallbacks:[],deps:[],listeners:[],add:B},y[f.id]=!0,a&&(!c||L[c])))R[a]=f;c&&!d?(a=u(i(c),!0),a.add(function(){var a=i(b.originalName,b.parentMap),a=u(a,!0);f.placeholder=!0;a.add(function(b){f.callback=function(){return b};
|
14
|
-
o(f)})})):l&&h&&(t[f.id]=!1,g.paused.push(f),w(f));return f}function x(b,a,e,c){var b=i(b,c),d=b.name,f=b.fullName,l=u(b),j=l.id,k=l.deps,m;if(f){if(f in n||t[j]===!0||f==="jquery"&&p.jQuery&&p.jQuery!==e().fn.jquery)return;y[j]=!0;t[j]=!0;f==="jquery"&&e&&S(e())}l.depArray=a;l.callback=e;for(e=0;e<a.length;e++)if(j=a[e])j=i(j,d?b:c),m=j.fullName,a[e]=m,m==="require"?k[e]=q(b):m==="exports"?(k[e]=n[f]={},l.usingExports=!0):m==="module"?l.cjsModule=k[e]={id:d,uri:d?g.nameToUrl(d,null,c):void 0,exports:n[f]}:
|
15
|
-
m in n&&!(m in C)&&(!(f in F)||f in F&&Q[m])?k[e]=n[m]:(f in F&&(F[m]=!0,delete n[m],T[j.url]=!1),l.depCount+=1,l.depCallbacks[e]=r(l,e),u(j,!0).add(l.depCallbacks[e]));l.depCount?w(l):o(l)}function m(b){x.apply(null,b)}function z(b,a){if(!b.isDone){var e=b.map.fullName,c=b.depArray,d,f,g,j;if(e){if(a[e])return n[e];a[e]=!0}if(c)for(d=0;d<c.length;d++)if(f=c[d])if((g=i(f).prefix)&&(j=C[g])&&z(j,a),(g=C[f])&&!g.isDone&&t[f])f=z(g,a),b.depCallbacks[d](f);return e?n[e]:void 0}}function A(){var b=p.waitSeconds*
|
16
|
-
1E3,a=b&&g.startTime+b<(new Date).getTime(),b="",e=!1,c=!1,i;if(!(g.pausedCount>0)){if(p.priorityWait)if(j())D();else return;for(i in t)if(!(i in K)&&(e=!0,!t[i]))if(a)b+=i+" ";else{c=!0;break}if(e||g.waitCount){if(a&&b)return i=N("timeout","Load timeout for modules: "+b),i.requireType="timeout",i.requireModules=b,d.onError(i);if(c||g.scriptCount){if((G||ba)&&!W)W=setTimeout(function(){W=0;A()},50)}else{if(g.waitCount){for(H=0;b=I[H];H++)z(b,{});g.paused.length&&D();X<5&&(X+=1,A())}X=0;d.checkReadyState()}}}}
|
17
|
-
var g,D,p={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},catchError:{}},P=[],y={require:!0,exports:!0,module:!0},E={},n={},t={},C={},I=[],T={},M=0,R={},L={},F={},Q={},Y=0;S=function(b){if(!g.jQuery&&(b=b||(typeof jQuery!=="undefined"?jQuery:null))&&!(p.jQuery&&b.fn.jquery!==p.jQuery)&&("holdReady"in b||"readyWait"in b))if(g.jQuery=b,m(["jquery",[],function(){return jQuery}]),g.scriptCount)V(b,!0),g.jQueryIncremented=!0};D=function(){var b,a,c,i,k,f;Y+=1;if(g.scriptCount<=0)g.scriptCount=0;for(;P.length;)if(b=
|
18
|
-
P.shift(),b[0]===null)return d.onError(N("mismatch","Mismatched anonymous define() module: "+b[b.length-1]));else m(b);if(!p.priorityWait||j())for(;g.paused.length;){k=g.paused;g.pausedCount+=k.length;g.paused=[];for(i=0;b=k[i];i++)a=b.map,c=a.url,f=a.fullName,a.prefix?v(a.prefix,b):!T[c]&&!t[f]&&(d.load(g,f,c),T[c]=!0);g.startTime=(new Date).getTime();g.pausedCount-=k.length}Y===1&&A();Y-=1};g={contextName:a,config:p,defQueue:P,waiting:C,waitCount:0,specified:y,loaded:t,urlMap:E,urlFetched:T,scriptCount:0,
|
19
|
-
defined:n,paused:[],pausedCount:0,plugins:L,needFullExec:F,fake:{},fullExec:Q,managerCallbacks:R,makeModuleMap:i,normalize:c,configure:function(b){var a,c,d;b.baseUrl&&b.baseUrl.charAt(b.baseUrl.length-1)!=="/"&&(b.baseUrl+="/");a=p.paths;d=p.pkgs;Z(p,b,!0);if(b.paths){for(c in b.paths)c in K||(a[c]=b.paths[c]);p.paths=a}if((a=b.packagePaths)||b.packages){if(a)for(c in a)c in K||$(d,a[c],c);b.packages&&$(d,b.packages);p.pkgs=d}if(b.priority)c=g.requireWait,g.requireWait=!1,g.takeGlobalQueue(),D(),
|
20
|
-
g.require(b.priority),D(),g.requireWait=c,p.priorityWait=b.priority;if(b.deps||b.callback)g.require(b.deps||[],b.callback)},requireDefined:function(b,a){return i(b,a).fullName in n},requireSpecified:function(b,a){return i(b,a).fullName in y},require:function(b,c,e){if(typeof b==="string"){if(J(c))return d.onError(N("requireargs","Invalid require call"));if(d.get)return d.get(g,b,c);c=i(b,c);b=c.fullName;return!(b in n)?d.onError(N("notloaded","Module name '"+c.fullName+"' has not been loaded yet for context: "+
|
21
|
-
a)):n[b]}(b&&b.length||c)&&x(null,b,c,e);if(!g.requireWait)for(;!g.scriptCount&&g.paused.length;)g.takeGlobalQueue(),D();return g.require},takeGlobalQueue:function(){U.length&&(ha.apply(g.defQueue,[g.defQueue.length-1,0].concat(U)),U=[])},completeLoad:function(b){var a;for(g.takeGlobalQueue();P.length;)if(a=P.shift(),a[0]===null){a[0]=b;break}else if(a[0]===b)break;else m(a),a=null;a?m(a):m([b,[],b==="jquery"&&typeof jQuery!=="undefined"?function(){return jQuery}:null]);S();d.isAsync&&(g.scriptCount-=
|
22
|
-
1);D();d.isAsync||(g.scriptCount-=1)},toUrl:function(b,a){var c=b.lastIndexOf("."),d=null;c!==-1&&(d=b.substring(c,b.length),b=b.substring(0,c));return g.nameToUrl(b,d,a)},nameToUrl:function(b,a,e){var i,j,f,l,k=g.config,b=c(b,e&&e.fullName);if(d.jsExtRegExp.test(b))a=b+(a?a:"");else{i=k.paths;j=k.pkgs;e=b.split("/");for(l=e.length;l>0;l--)if(f=e.slice(0,l).join("/"),i[f]){e.splice(0,l,i[f]);break}else if(f=j[f]){b=b===f.name?f.location+"/"+f.main:f.location;e.splice(0,l,b);break}a=e.join("/")+(a||
|
23
|
-
".js");a=(a.charAt(0)==="/"||a.match(/^\w+:/)?"":k.baseUrl)+a}return k.urlArgs?a+((a.indexOf("?")===-1?"?":"&")+k.urlArgs):a}};g.jQueryCheck=S;g.resume=D;return g}function ia(){var a,c,d;if(m&&m.readyState==="interactive")return m;a=document.getElementsByTagName("script");for(c=a.length-1;c>-1&&(d=a[c]);c--)if(d.readyState==="interactive")return m=d;return null}var ja=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,ka=/require\(\s*["']([^'"\s]+)["']\s*\)/g,da=/^\.\//,aa=/\.js$/,M=Object.prototype.toString,r=Array.prototype,
|
24
|
-
ga=r.slice,ha=r.splice,G=!!(typeof window!=="undefined"&&navigator&&document),ba=!G&&typeof importScripts!=="undefined",la=G&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,ca=typeof opera!=="undefined"&&opera.toString()==="[object Opera]",K={},u={},U=[],m=null,X=0,O=!1,d,r={},I,w,x,y,v,z,A,H,B,S,W;if(typeof define==="undefined"){if(typeof requirejs!=="undefined")if(J(requirejs))return;else r=requirejs,requirejs=void 0;typeof require!=="undefined"&&!J(require)&&(r=require,
|
25
|
-
require=void 0);d=requirejs=function(a,c,d){var j="_",k;!E(a)&&typeof a!=="string"&&(k=a,E(c)?(a=c,c=d):a=[]);if(k&&k.context)j=k.context;d=u[j]||(u[j]=ea(j));k&&d.configure(k);return d.require(a,c)};d.config=function(a){return d(a)};require||(require=d);d.toUrl=function(a){return u._.toUrl(a)};d.version="0.27.0";d.jsExtRegExp=/^\/|:|\?|\.js$/;w=d.s={contexts:u,skipAsync:{}};if(d.isAsync=d.isBrowser=G)if(x=w.head=document.getElementsByTagName("head")[0],y=document.getElementsByTagName("base")[0])x=
|
26
|
-
w.head=y.parentNode;d.onError=function(a){throw a;};d.load=function(a,c,i){d.resourcesReady(!1);a.scriptCount+=1;d.attach(i,a,c);if(a.jQuery&&!a.jQueryIncremented)V(a.jQuery,!0),a.jQueryIncremented=!0};define=function(a,c,d){var j,k;typeof a!=="string"&&(d=c,c=a,a=null);E(c)||(d=c,c=[]);!a&&!c.length&&J(d)&&d.length&&(d.toString().replace(ja,"").replace(ka,function(a,d){c.push(d)}),c=(d.length===1?["require"]:["require","exports","module"]).concat(c));if(O&&(j=I||ia()))a||(a=j.getAttribute("data-requiremodule")),
|
27
|
-
k=u[j.getAttribute("data-requirecontext")];(k?k.defQueue:U).push([a,c,d])};define.amd={multiversion:!0,plugins:!0,jQuery:!0};d.exec=function(a){return eval(a)};d.execCb=function(a,c,d,j){return c.apply(j,d)};d.addScriptToDom=function(a){I=a;y?x.insertBefore(a,y):x.appendChild(a);I=null};d.onScriptLoad=function(a){var c=a.currentTarget||a.srcElement,i;if(a.type==="load"||c&&la.test(c.readyState))m=null,a=c.getAttribute("data-requirecontext"),i=c.getAttribute("data-requiremodule"),u[a].completeLoad(i),
|
28
|
-
c.detachEvent&&!ca?c.detachEvent("onreadystatechange",d.onScriptLoad):c.removeEventListener("load",d.onScriptLoad,!1)};d.attach=function(a,c,i,j,k,m){var o;if(G)return j=j||d.onScriptLoad,o=c&&c.config&&c.config.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),o.type=k||"text/javascript",o.charset="utf-8",o.async=!w.skipAsync[a],c&&o.setAttribute("data-requirecontext",c.contextName),o.setAttribute("data-requiremodule",i),o.attachEvent&&
|
29
|
-
!ca?(O=!0,m?o.onreadystatechange=function(){if(o.readyState==="loaded")o.onreadystatechange=null,o.attachEvent("onreadystatechange",j),m(o)}:o.attachEvent("onreadystatechange",j)):o.addEventListener("load",j,!1),o.src=a,m||d.addScriptToDom(o),o;else ba&&(importScripts(a),c.completeLoad(i));return null};if(G){v=document.getElementsByTagName("script");for(H=v.length-1;H>-1&&(z=v[H]);H--){if(!x)x=z.parentNode;if(A=z.getAttribute("data-main")){if(!r.baseUrl)v=A.split("/"),z=v.pop(),v=v.length?v.join("/")+
|
30
|
-
"/":"./",r.baseUrl=v,A=z.replace(aa,"");r.deps=r.deps?r.deps.concat(A):[A];break}}}d.checkReadyState=function(){var a=w.contexts,c;for(c in a)if(!(c in K)&&a[c].waitCount)return;d.resourcesReady(!0)};d.resourcesReady=function(a){var c,i;d.resourcesDone=a;if(d.resourcesDone)for(i in a=w.contexts,a)if(!(i in K)&&(c=a[i],c.jQueryIncremented))V(c.jQuery,!1),c.jQueryIncremented=!1};d.pageLoaded=function(){if(document.readyState!=="complete")document.readyState="complete"};if(G&&document.addEventListener&&
|
31
|
-
!document.readyState)document.readyState="loading",window.addEventListener("load",d.pageLoaded,!1);d(r);if(d.isAsync&&typeof setTimeout!=="undefined")B=w.contexts[r.context||"_"],B.requireWait=!0,setTimeout(function(){B.requireWait=!1;B.takeGlobalQueue();B.jQueryCheck();B.scriptCount||B.resume();d.checkReadyState()},0)}})();
|
data/dist/require/template.js
DELETED
@@ -1,98 +0,0 @@
|
|
1
|
-
// Define the TEMPLATE PLUG-IN.
|
2
|
-
define(
|
3
|
-
function(){
|
4
|
-
|
5
|
-
|
6
|
-
// I load the given resource.
|
7
|
-
var loadResource = function(
|
8
|
-
resourceName,
|
9
|
-
parentRequire,
|
10
|
-
callback,
|
11
|
-
config
|
12
|
-
){
|
13
|
-
|
14
|
-
// Parse the resource - extract the path to the template
|
15
|
-
// file and the class name of the script.
|
16
|
-
var resourceConfig = parseResource( resourceName );
|
17
|
-
|
18
|
-
// Get the path to the template file.
|
19
|
-
var resourcePath = resourceConfig.resourcePath;
|
20
|
-
|
21
|
-
// Get the class name of the script tag (with our markup).
|
22
|
-
var templateClass = resourceConfig.templateClass;
|
23
|
-
|
24
|
-
|
25
|
-
// Load the template class.
|
26
|
-
parentRequire(
|
27
|
-
[
|
28
|
-
("text!" + resourcePath)
|
29
|
-
],
|
30
|
-
function( templateContent ){
|
31
|
-
|
32
|
-
// Wrap the template content in a DIV tag just
|
33
|
-
// to make sure we have a parent element.
|
34
|
-
templateContent = (
|
35
|
-
"<div>" + templateContent + "</div>"
|
36
|
-
);
|
37
|
-
|
38
|
-
// Create the templates node.
|
39
|
-
var templates = $( templateContent );
|
40
|
-
|
41
|
-
// Get the template that was requrested by the
|
42
|
-
// class name.
|
43
|
-
var targetTemplate = templates.find( "script." + templateClass );
|
44
|
-
|
45
|
-
// Create a jQuery DOM element out of the
|
46
|
-
// template markup and pass it back to the
|
47
|
-
// loader.
|
48
|
-
callback(
|
49
|
-
$( targetTemplate.html() )
|
50
|
-
);
|
51
|
-
|
52
|
-
}
|
53
|
-
);
|
54
|
-
|
55
|
-
};
|
56
|
-
|
57
|
-
|
58
|
-
// When the resource name is passed to this plugin, it is in
|
59
|
-
// the form of:
|
60
|
-
//
|
61
|
-
// resourcePath:className
|
62
|
-
//
|
63
|
-
// ... where resourcePath is the path to the HTML file that
|
64
|
-
// contains our templates and className is the class attribute
|
65
|
-
// of the Script tag that contains our template markup.
|
66
|
-
var parseResource = function( resourceName ){
|
67
|
-
|
68
|
-
// Split the resource into parts.
|
69
|
-
var resourceParts = resourceName.split( ":" );
|
70
|
-
|
71
|
-
// Get the resource path to our HTML file.
|
72
|
-
var resourcePath = resourceParts[ 0 ];
|
73
|
-
|
74
|
-
// Get the class name of our template markup container.
|
75
|
-
var templateClass = resourceParts[ 1 ];
|
76
|
-
|
77
|
-
// Return the resource configuration.
|
78
|
-
return({
|
79
|
-
resourcePath: resourcePath,
|
80
|
-
templateClass: templateClass
|
81
|
-
});
|
82
|
-
|
83
|
-
};
|
84
|
-
|
85
|
-
|
86
|
-
// --------------------------------------------------- //
|
87
|
-
// --------------------------------------------------- //
|
88
|
-
|
89
|
-
|
90
|
-
// Return the public API for the plugin. The only required
|
91
|
-
// function in the plugin API is the load() function.
|
92
|
-
return({
|
93
|
-
load: loadResource
|
94
|
-
});
|
95
|
-
|
96
|
-
|
97
|
-
}
|
98
|
-
);
|
data/lib/jazz.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'json'
|
3
|
-
require 'thor'
|
4
|
-
require 'thor/group'
|
5
|
-
require 'active_support/inflector'
|
6
|
-
|
7
|
-
require 'jazz/app_detector'
|
8
|
-
require 'jazz/app_generator'
|
9
|
-
require 'jazz/cli'
|
10
|
-
require 'jazz/controller_generator'
|
11
|
-
require 'jazz/model_generator'
|
12
|
-
require 'jazz/scaffold_generator'
|
data/lib/jazz/app_detector.rb
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
module Jazz
|
2
|
-
|
3
|
-
module AppDetector
|
4
|
-
|
5
|
-
def new_app_path
|
6
|
-
@new_app_path ||= if rack_app?
|
7
|
-
$stdout.puts "public folder detected, installing to public/javascripts"
|
8
|
-
'public/javascripts'
|
9
|
-
else
|
10
|
-
name
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def app_path
|
15
|
-
@app_path ||= if rack_app?
|
16
|
-
$stdout.puts "public folder detected, installing to public/javascripts"
|
17
|
-
'public/javascripts'
|
18
|
-
else
|
19
|
-
'.'
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def public_path
|
24
|
-
@public_path ||= if rack_app?
|
25
|
-
'public'
|
26
|
-
else
|
27
|
-
'.'
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
def prefix
|
32
|
-
'/public/' if rack_app?
|
33
|
-
end
|
34
|
-
|
35
|
-
def rack_app?
|
36
|
-
File.exists?('public')
|
37
|
-
end
|
38
|
-
|
39
|
-
def generate_controller
|
40
|
-
template "templates/controller.js", "#{app_path}/app/controllers/#{name.downcase.pluralize}_controller.js"
|
41
|
-
end
|
42
|
-
|
43
|
-
def generate_model
|
44
|
-
template "templates/model.js", "#{app_path}/app/models/#{name.downcase}.js"
|
45
|
-
end
|
46
|
-
|
47
|
-
def generate_db
|
48
|
-
template "templates/db.js", "#{app_path}/db/create_#{name.downcase.pluralize}.js"
|
49
|
-
end
|
50
|
-
|
51
|
-
def generate_helper
|
52
|
-
template "templates/helper.js", "#{app_path}/app/helpers/#{name.downcase.pluralize}_helper.js"
|
53
|
-
end
|
54
|
-
|
55
|
-
def generate_views
|
56
|
-
empty_directory "#{app_path}/app/views/#{name.downcase.pluralize}"
|
57
|
-
template "templates/view_create.html", "#{app_path}/app/views/#{name.downcase.pluralize}/create.html"
|
58
|
-
template "templates/view_index.html", "#{app_path}/app/views/#{name.downcase.pluralize}/index.html"
|
59
|
-
template "templates/view_show.html", "#{app_path}/app/views/#{name.downcase.pluralize}/show.html"
|
60
|
-
template "templates/view_update.html", "#{app_path}/app/views/#{name.downcase.pluralize}/update.html"
|
61
|
-
end
|
62
|
-
|
63
|
-
def generate_glue
|
64
|
-
@files = Dir.glob('db/*') + Dir.glob('app/models/*') + Dir.glob('app/helpers/*') + Dir.glob('app/controllers/*')
|
65
|
-
template "templates/boot.js", "#{app_path}/config/boot.js", {:force => true}
|
66
|
-
end
|
67
|
-
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
data/lib/jazz/app_generator.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
module Jazz
|
2
|
-
class AppGenerator < Thor::Group
|
3
|
-
include Thor::Actions
|
4
|
-
include Jazz::AppDetector
|
5
|
-
|
6
|
-
desc "Creates a new Jazz app"
|
7
|
-
|
8
|
-
argument :name
|
9
|
-
|
10
|
-
def self.source_root
|
11
|
-
File.join(File.dirname(__FILE__), '..', '..')
|
12
|
-
end
|
13
|
-
|
14
|
-
def greeting
|
15
|
-
$stdout.puts "Creating new Jazz app #{name}"
|
16
|
-
end
|
17
|
-
|
18
|
-
def build_the_app
|
19
|
-
directory "templates/app_root", new_app_path
|
20
|
-
directory 'dist/jazz', "#{new_app_path}/development/lib/jazz"
|
21
|
-
directory 'dist/hashchange', "#{new_app_path}/development/vendor/hashchange"
|
22
|
-
directory 'dist/jquery', "#{new_app_path}/development/vendor/jquery"
|
23
|
-
directory 'dist/handlebars', "#{new_app_path}/development/vendor/handlebars"
|
24
|
-
directory 'dist/require', "#{new_app_path}/development/vendor/require"
|
25
|
-
directory 'dist/underscore', "#{new_app_path}/development/vendor/underscore"
|
26
|
-
|
27
|
-
template "templates/application.js", "#{new_app_path}/development/config/application.js"
|
28
|
-
template "templates/index.html", "#{new_app_path}/development/index.html"
|
29
|
-
|
30
|
-
@files = ['app/helpers/application_helper.js', 'app/controllers/application_controller.js']
|
31
|
-
|
32
|
-
template "templates/boot.js", "#{new_app_path}/development/config/boot.js", {:force => true}
|
33
|
-
|
34
|
-
end
|
35
|
-
|
36
|
-
def farewell
|
37
|
-
$stdout.puts "Thank you for installing Jazz"
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|
41
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
module Jazz
|
2
|
-
class ControllerGenerator < Thor::Group
|
3
|
-
include Thor::Actions
|
4
|
-
include Jazz::AppDetector
|
5
|
-
|
6
|
-
desc "Creates a new Jazz controller"
|
7
|
-
|
8
|
-
argument :name
|
9
|
-
|
10
|
-
def self.source_root
|
11
|
-
File.join(File.dirname(__FILE__), '..', '..')
|
12
|
-
end
|
13
|
-
|
14
|
-
def greeting
|
15
|
-
$stdout.puts "Creating new Jazz controller #{name.pluralize}Controller"
|
16
|
-
end
|
17
|
-
|
18
|
-
def build_the_controller
|
19
|
-
generate_controller
|
20
|
-
end
|
21
|
-
|
22
|
-
def build_the_views
|
23
|
-
generate_views
|
24
|
-
end
|
25
|
-
|
26
|
-
def build_the_glue
|
27
|
-
generate_glue
|
28
|
-
end
|
29
|
-
|
30
|
-
def farewell
|
31
|
-
$stdout.puts "Your controller is ready to rule!"
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
module Jazz
|
2
|
-
class HelperGenerator < Thor::Group
|
3
|
-
include Thor::Actions
|
4
|
-
include Jazz::AppDetector
|
5
|
-
|
6
|
-
desc "Creates a new Jazz helper"
|
7
|
-
|
8
|
-
argument :name
|
9
|
-
|
10
|
-
def self.source_root
|
11
|
-
File.join(File.dirname(__FILE__), '..', '..')
|
12
|
-
end
|
13
|
-
|
14
|
-
def greeting
|
15
|
-
$stdout.puts "Creating new Jazz helper #{name.pluralize}Helper"
|
16
|
-
end
|
17
|
-
|
18
|
-
def build_the_helper
|
19
|
-
generate_helper
|
20
|
-
end
|
21
|
-
|
22
|
-
def build_the_glue
|
23
|
-
generate_glue
|
24
|
-
end
|
25
|
-
|
26
|
-
def farewell
|
27
|
-
$stdout.puts "Your helper is ready to rule!"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
data/lib/jazz/model_generator.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
module Jazz
|
2
|
-
class ModelGenerator < Thor::Group
|
3
|
-
include Thor::Actions
|
4
|
-
include Jazz::AppDetector
|
5
|
-
|
6
|
-
desc "Creates a new Jazz model"
|
7
|
-
argument :name
|
8
|
-
argument :attrs, :type => :array
|
9
|
-
|
10
|
-
def self.source_root
|
11
|
-
File.join(File.dirname(__FILE__), '..', '..')
|
12
|
-
end
|
13
|
-
|
14
|
-
def greeting
|
15
|
-
$stdout.puts "Creating new Jazz model #{name}"
|
16
|
-
end
|
17
|
-
|
18
|
-
def build_the_model
|
19
|
-
generate_model
|
20
|
-
generate_db
|
21
|
-
end
|
22
|
-
|
23
|
-
def farewell
|
24
|
-
$stdout.puts "Your model is ready to rock!"
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
module Jazz
|
2
|
-
class ScaffoldGenerator < Thor::Group
|
3
|
-
include Thor::Actions
|
4
|
-
include Jazz::AppDetector
|
5
|
-
|
6
|
-
desc "Creates a new Jazz scaffold"
|
7
|
-
|
8
|
-
argument :name
|
9
|
-
argument :attrs, :type => :array
|
10
|
-
|
11
|
-
def self.source_root
|
12
|
-
File.join(File.dirname(__FILE__), '..', '..')
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.destination_root
|
16
|
-
"#{name}"
|
17
|
-
end
|
18
|
-
|
19
|
-
def greeting
|
20
|
-
$stdout.puts "Creating new Jazz scaffold, model controller and views for #{name}"
|
21
|
-
end
|
22
|
-
|
23
|
-
def build_the_model
|
24
|
-
generate_model
|
25
|
-
generate_db
|
26
|
-
end
|
27
|
-
|
28
|
-
def build_the_controller
|
29
|
-
generate_controller
|
30
|
-
end
|
31
|
-
|
32
|
-
def build_the_views
|
33
|
-
generate_views
|
34
|
-
end
|
35
|
-
|
36
|
-
def build_the_helper
|
37
|
-
generate_helper
|
38
|
-
end
|
39
|
-
|
40
|
-
def build_the_glue
|
41
|
-
generate_glue
|
42
|
-
end
|
43
|
-
|
44
|
-
def farewell
|
45
|
-
$stdout.puts "Your scaffold is ready to rumble!"
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
end
|
data/templates/app_root/Rakefile
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'rake'
|
4
|
-
require 'rubygems'
|
5
|
-
|
6
|
-
namespace :build do
|
7
|
-
desc "Build compressed release (osx)"
|
8
|
-
task :osx do
|
9
|
-
system('java -classpath scripts/r.js/lib/rhino/js.jar:scripts/r.js/lib/closure/compiler.jar org.mozilla.javascript.tools.shell.Main scripts/r.js/dist/r.js -o scripts/build.js')
|
10
|
-
end
|
11
|
-
end
|