sproutit-sproutcore 1.0.0.20090407205609
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Buildfile +115 -0
- data/History.txt +7 -0
- data/README.txt +102 -0
- data/Rakefile +54 -0
- data/Todo.txt +1 -0
- data/bin/sc-build +13 -0
- data/bin/sc-build-number +13 -0
- data/bin/sc-gen +13 -0
- data/bin/sc-init +13 -0
- data/bin/sc-manifest +13 -0
- data/bin/sc-server +13 -0
- data/bin/sproutcore +14 -0
- data/buildtasks/build.rake +73 -0
- data/buildtasks/entry.rake +59 -0
- data/buildtasks/manifest.rake +469 -0
- data/buildtasks/render.rake +21 -0
- data/buildtasks/target.rake +42 -0
- data/gen/Buildfile +16 -0
- data/gen/app/Buildfile +36 -0
- data/gen/app/README +1 -0
- data/gen/app/USAGE +13 -0
- data/gen/app/templates/apps/{target_name}/core.js +27 -0
- data/gen/app/templates/apps/{target_name}/english.lproj/loading.rhtml +9 -0
- data/gen/app/templates/apps/{target_name}/english.lproj/main_page.js +22 -0
- data/gen/app/templates/apps/{target_name}/english.lproj/strings.js +15 -0
- data/gen/app/templates/apps/{target_name}/main.js +30 -0
- data/gen/controller/Buildfile +18 -0
- data/gen/controller/README +1 -0
- data/gen/controller/USAGE +13 -0
- data/gen/controller/templates/controllers/{filename}.js +18 -0
- data/gen/controller/templates/tests/controllers/{filename}.js +15 -0
- data/gen/framework/Buildfile +36 -0
- data/gen/framework/README +1 -0
- data/gen/framework/USAGE +13 -0
- data/gen/framework/templates/frameworks/{target_name}/core.js +21 -0
- data/gen/framework/templates/frameworks/{target_name}/english.lproj/strings.js +15 -0
- data/gen/language/Buildfile +26 -0
- data/gen/language/README +1 -0
- data/gen/language/USAGE +13 -0
- data/gen/language/templates/{filename}/strings.js +14 -0
- data/gen/model/Buildfile +16 -0
- data/gen/model/README +1 -0
- data/gen/model/USAGE +15 -0
- data/gen/model/templates/fixtures/{filename}.js +35 -0
- data/gen/model/templates/models/{filename}.js +19 -0
- data/gen/model/templates/tests/models/{filename}.js +15 -0
- data/gen/project/Buildfile +45 -0
- data/gen/project/INIT +3 -0
- data/gen/project/README +1 -0
- data/gen/project/USAGE +2 -0
- data/gen/project/templates/{filename}/Buildfile +7 -0
- data/gen/project/templates/{filename}/README +7 -0
- data/gen/test/Buildfile +25 -0
- data/gen/test/README +1 -0
- data/gen/test/USAGE +12 -0
- data/gen/test/templates/tests/{filename}.js +15 -0
- data/gen/theme/Buildfile +36 -0
- data/gen/theme/README +1 -0
- data/gen/theme/USAGE +13 -0
- data/gen/theme/templates/themes/{target_name}/english.lproj/strings.js +15 -0
- data/gen/view/Buildfile +18 -0
- data/gen/view/README +1 -0
- data/gen/view/USAGE +13 -0
- data/gen/view/templates/tests/views/{filename}.js +15 -0
- data/gen/view/templates/views/{filename}.js +18 -0
- data/lib/sproutcore.rb +130 -0
- data/lib/sproutcore/builders/base.rb +79 -0
- data/lib/sproutcore/builders/combine.rb +37 -0
- data/lib/sproutcore/builders/html.rb +177 -0
- data/lib/sproutcore/builders/javascript.rb +55 -0
- data/lib/sproutcore/builders/minify.rb +67 -0
- data/lib/sproutcore/builders/sass.rb +55 -0
- data/lib/sproutcore/builders/strings.rb +44 -0
- data/lib/sproutcore/builders/stylesheet.rb +40 -0
- data/lib/sproutcore/builders/test.rb +58 -0
- data/lib/sproutcore/builders/test_index.rb +26 -0
- data/lib/sproutcore/buildfile.rb +483 -0
- data/lib/sproutcore/buildfile/build_task.rb +33 -0
- data/lib/sproutcore/buildfile/buildfile_dsl.rb +162 -0
- data/lib/sproutcore/buildfile/cloneable.rb +34 -0
- data/lib/sproutcore/buildfile/early_time.rb +29 -0
- data/lib/sproutcore/buildfile/invocation_chain.rb +64 -0
- data/lib/sproutcore/buildfile/namespace.rb +33 -0
- data/lib/sproutcore/buildfile/string_ext.rb +198 -0
- data/lib/sproutcore/buildfile/task.rb +304 -0
- data/lib/sproutcore/buildfile/task_arguments.rb +86 -0
- data/lib/sproutcore/buildfile/task_manager.rb +193 -0
- data/lib/sproutcore/deprecated/view_helper.rb +662 -0
- data/lib/sproutcore/helpers/capture_helper.rb +30 -0
- data/lib/sproutcore/helpers/cssmin.rb +202 -0
- data/lib/sproutcore/helpers/dom_id_helper.rb +21 -0
- data/lib/sproutcore/helpers/entry_sorter.rb +105 -0
- data/lib/sproutcore/helpers/packed_optimizer.rb +102 -0
- data/lib/sproutcore/helpers/static_helper.rb +268 -0
- data/lib/sproutcore/helpers/tag_helper.rb +117 -0
- data/lib/sproutcore/helpers/text_helper.rb +303 -0
- data/lib/sproutcore/models/generator.rb +493 -0
- data/lib/sproutcore/models/hash_struct.rb +109 -0
- data/lib/sproutcore/models/manifest.rb +342 -0
- data/lib/sproutcore/models/manifest_entry.rb +232 -0
- data/lib/sproutcore/models/project.rb +270 -0
- data/lib/sproutcore/models/target.rb +403 -0
- data/lib/sproutcore/rack/builder.rb +269 -0
- data/lib/sproutcore/rack/dev.rb +51 -0
- data/lib/sproutcore/rack/docs.rb +24 -0
- data/lib/sproutcore/rack/proxy.rb +92 -0
- data/lib/sproutcore/rack/service.rb +141 -0
- data/lib/sproutcore/rack/test_runner.rb +24 -0
- data/lib/sproutcore/render_engines/erubis.rb +55 -0
- data/lib/sproutcore/render_engines/haml.rb +39 -0
- data/lib/sproutcore/tools.rb +311 -0
- data/lib/sproutcore/tools/build.rb +80 -0
- data/lib/sproutcore/tools/build_number.rb +23 -0
- data/lib/sproutcore/tools/gen.rb +99 -0
- data/lib/sproutcore/tools/init.rb +40 -0
- data/lib/sproutcore/tools/manifest.rb +84 -0
- data/lib/sproutcore/tools/server.rb +45 -0
- data/spec/buildtasks/build/copy_spec.rb +60 -0
- data/spec/buildtasks/build/spec_helper.rb +36 -0
- data/spec/buildtasks/manifest/catalog_spec.rb +48 -0
- data/spec/buildtasks/manifest/hide_buildfiles_spec.rb +125 -0
- data/spec/buildtasks/manifest/localize_spec.rb +97 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/combine_spec.rb +246 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/css_spec.rb +87 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/html_spec.rb +175 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/javascript_spec.rb +65 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/minify_spec.rb +70 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/packed_spec.rb +152 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/sass_spec.rb +98 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb +64 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/tests_spec.rb +163 -0
- data/spec/buildtasks/manifest/prepare_spec.rb +43 -0
- data/spec/buildtasks/manifest/spec_helper.rb +35 -0
- data/spec/buildtasks/target_spec.rb +214 -0
- data/spec/fixtures/builder_tests/Buildfile +15 -0
- data/spec/fixtures/builder_tests/apps/combine_test/a.js +1 -0
- data/spec/fixtures/builder_tests/apps/combine_test/b.js +1 -0
- data/spec/fixtures/builder_tests/apps/combine_test/c.js +1 -0
- data/spec/fixtures/builder_tests/apps/combine_test/english.lproj/a.css +1 -0
- data/spec/fixtures/builder_tests/apps/combine_test/english.lproj/b.css +1 -0
- data/spec/fixtures/builder_tests/apps/combine_test/english.lproj/c.css +1 -0
- data/spec/fixtures/builder_tests/apps/html_test/english.lproj/bar1_sample.rhtml +2 -0
- data/spec/fixtures/builder_tests/apps/html_test/english.lproj/erb_sample.html.erb +1 -0
- data/spec/fixtures/builder_tests/apps/html_test/english.lproj/icons/image.png +0 -0
- data/spec/fixtures/builder_tests/apps/html_test/english.lproj/image.jpg +0 -0
- data/spec/fixtures/builder_tests/apps/html_test/english.lproj/rhtml_sample.rhtml +1 -0
- data/spec/fixtures/builder_tests/apps/html_test/english.lproj/strings.js +4 -0
- data/spec/fixtures/builder_tests/apps/html_test/english.lproj/style.css +0 -0
- data/spec/fixtures/builder_tests/apps/html_test/french.lproj/french-icons/fr.png +0 -0
- data/spec/fixtures/builder_tests/apps/html_test/french.lproj/strings.js +4 -0
- data/spec/fixtures/builder_tests/apps/html_test/lib/layout_template.rhtml +1 -0
- data/spec/fixtures/builder_tests/apps/html_test/scripts.js +0 -0
- data/spec/fixtures/builder_tests/apps/javascript_test/sc_static.js +15 -0
- data/spec/fixtures/builder_tests/apps/javascript_test/sc_super.js +4 -0
- data/spec/fixtures/builder_tests/apps/javascript_test/strings.js +7 -0
- data/spec/fixtures/builder_tests/apps/sass_test/sample.sass +3 -0
- data/spec/fixtures/builder_tests/apps/strings_test/lproj/strings.js +8 -0
- data/spec/fixtures/builder_tests/apps/stylesheet_test/build_directives.css +9 -0
- data/spec/fixtures/builder_tests/apps/stylesheet_test/sc_static.css +12 -0
- data/spec/fixtures/builder_tests/apps/test_test/lib/alt_layout.rhtml +1 -0
- data/spec/fixtures/builder_tests/apps/test_test/lib/test_layout.rhtml +3 -0
- data/spec/fixtures/builder_tests/apps/test_test/tests/qunit_test.js +1 -0
- data/spec/fixtures/builder_tests/apps/test_test/tests/qunit_test2.js +1 -0
- data/spec/fixtures/builder_tests/apps/test_test/tests/rhtml_test.rhtml +4 -0
- data/spec/fixtures/builder_tests/frameworks/debug/core.js +0 -0
- data/spec/fixtures/builder_tests/frameworks/debug/english.lproj/dummy.css +0 -0
- data/spec/fixtures/builder_tests/frameworks/qunit/core.js +0 -0
- data/spec/fixtures/builder_tests/frameworks/qunit/english.lproj/dummy.css +0 -0
- data/spec/fixtures/builder_tests/frameworks/req_target_1/english.lproj/req_style_1.css +0 -0
- data/spec/fixtures/builder_tests/frameworks/req_target_1/english.lproj/strings.js +4 -0
- data/spec/fixtures/builder_tests/frameworks/req_target_1/english.lproj/test.rhtml +1 -0
- data/spec/fixtures/builder_tests/frameworks/req_target_1/req_js_1.js +0 -0
- data/spec/fixtures/builder_tests/frameworks/req_target_2/english.lproj/req_style_2.css +0 -0
- data/spec/fixtures/builder_tests/frameworks/req_target_2/english.lproj/test.rhtml +1 -0
- data/spec/fixtures/builder_tests/frameworks/req_target_2/javascript.js +1 -0
- data/spec/fixtures/builder_tests/frameworks/req_target_2/lib/alt_layout.rhtml +0 -0
- data/spec/fixtures/builder_tests/frameworks/req_target_2/req_js_2.js +0 -0
- data/spec/fixtures/builder_tests/themes/sample_theme/Buildfile +1 -0
- data/spec/fixtures/buildfiles/basic/Buildfile +16 -0
- data/spec/fixtures/buildfiles/basic/task_module.rake +6 -0
- data/spec/fixtures/buildfiles/installed/Buildfile +7 -0
- data/spec/fixtures/buildfiles/installed/Buildfile2 +5 -0
- data/spec/fixtures/buildfiles/project_test/Buildfile +4 -0
- data/spec/fixtures/buildfiles/project_test/not_project/Buildfile +2 -0
- data/spec/fixtures/buildfiles/project_test/not_project/child/PLACEHOLDER +0 -0
- data/spec/fixtures/entry_for_project/Buildfile +1 -0
- data/spec/fixtures/entry_for_project/apps/test_app/entry.txt +0 -0
- data/spec/fixtures/entry_for_project/apps/test_app/frameworks/nested/PLACEHOLDER +0 -0
- data/spec/fixtures/entry_for_project/frameworks/shared/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/custom/Buildfile +8 -0
- data/spec/fixtures/find_targets/custom/bars/bar1/bars/bar1/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/custom/bars/bar1/bars/bar2/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/custom/bars/bar1/foos/foo1/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/custom/bars/bar1/foos/foo2/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/custom/foos/custom_foos/Buildfile +5 -0
- data/spec/fixtures/find_targets/custom/foos/custom_foos/custom_foodir/foo1/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/custom/foos/custom_foos/custom_foodir/foo2/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/custom/foos/custom_foos/foos/not_foo1/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/custom/foos/foo1/bars/bar1/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/custom/foos/foo1/bars/bar2/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/nested/Buildfile +8 -0
- data/spec/fixtures/find_targets/nested/apps/app1/Buildfile +1 -0
- data/spec/fixtures/find_targets/nested/apps/app1/apps/nested_app/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/standard/Apps/app1/frameworks/framework1/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/standard/Apps/app1/frameworks/framework2/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/standard/clients/client1/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/standard/frameworks/framework1/frameworks/framework1/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/standard/frameworks/framework2/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/standard/themes/theme1/PLACEHOLDER +0 -0
- data/spec/fixtures/find_targets/standard/themes/theme2/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/caps_long_names/English.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/caps_long_names/FreNCH.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/caps_long_names/UnknOWN.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/long_names/english.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/long_names/french.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/long_names/german.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/long_names/italian.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/long_names/japanese.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/long_names/spanish.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/long_names/unknown.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/no_names/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/short_names/de.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/short_names/en-CA.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/short_names/en-GB.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/short_names/en-US.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/short_names/en.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/short_names/es.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/short_names/foo.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/short_names/fr.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/short_names/it.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/languages/apps/short_names/ja.lproj/PLACEHOLDER +0 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/1.js +1 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/B.js +1 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/a.js +1 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/a/a.js +1 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/a/b.js +1 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/b/a.js +1 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/c.js +1 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/core.js +1 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/B.css +0 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/a.css +0 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/a/a.css +0 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/a/b.css +0 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/b/a.css +0 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/english.lproj/c.css +0 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/lproj/strings.js +1 -0
- data/spec/fixtures/ordered_entries/apps/no_requires/utils.js +1 -0
- data/spec/fixtures/ordered_entries/apps/with_requires/a.js +2 -0
- data/spec/fixtures/ordered_entries/apps/with_requires/b.js +3 -0
- data/spec/fixtures/ordered_entries/apps/with_requires/c.js +2 -0
- data/spec/fixtures/ordered_entries/apps/with_requires/english.lproj/a.css +2 -0
- data/spec/fixtures/ordered_entries/apps/with_requires/english.lproj/b.css +2 -0
- data/spec/fixtures/ordered_entries/apps/with_requires/english.lproj/c.css +2 -0
- data/spec/fixtures/ordered_entries/apps/with_requires/english.lproj/d.js +1 -0
- data/spec/fixtures/real_world/Buildfile +12 -0
- data/spec/fixtures/real_world/apps/account/README +1 -0
- data/spec/fixtures/real_world/apps/calendar/README +1 -0
- data/spec/fixtures/real_world/apps/contacts/README_BEFORE_EDITING +1 -0
- data/spec/fixtures/real_world/apps/files/README +1 -0
- data/spec/fixtures/real_world/apps/mail/README +1 -0
- data/spec/fixtures/real_world/apps/mobile_photos/README +1 -0
- data/spec/fixtures/real_world/apps/photos/README +1 -0
- data/spec/fixtures/real_world/apps/uploader/README +1 -0
- data/spec/fixtures/real_world/frameworks/core_files/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/core_photos/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/shared/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/Buildfile +26 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/README +1 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/apps/docs/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/apps/test_runner/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/core.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/debug/debug-resource.html +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/debug/sample_debug.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/demo2.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/debug/sample_debug-loc.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/demo.css +4 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/demo.html +1 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/demo2.sass +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/file_extension_test.haml +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/file_extension_test.html.erb +1 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/file_extension_test.rhtml +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/fixtures/sample_fixtures-loc.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/has_require.css +4 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/no_require.css +1 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/no_sc_resource.rhtml +1 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/protocols/sample-loc.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/sc_resource.css +6 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/sc_resource.rhtml +3 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/strings.js +1 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/english.lproj/tests/sample-loc.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/fixtures/sample-json-fixture.json +1 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/fixtures/sample_fixtures.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/application/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/costello/core.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/data_store/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/debug/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/desktop/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/empty_theme/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/foundation/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/mobile/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/qunit/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/frameworks/uploader/PLACEHOLDER +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/french.lproj/french-resource.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/french.lproj/strings.js +1 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/german.lproj/german-resource.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/german.lproj/strings.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/has_require.js +4 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/lib/index.html +1 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/no_require.js +1 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/protocols/sample.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/sc_resource.js +6 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/tests/nested/sample1.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/tests/nested/sample2.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/tests/sample.js +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/tests/sample.rhtml +1 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/themes/standard_theme/README +0 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/views/view.js +1 -0
- data/spec/fixtures/real_world/generators/sample_custom/Buildfile +0 -0
- data/spec/fixtures/real_world/generators/sample_custom/templates/{filename}.js +1 -0
- data/spec/fixtures/recursive_project/Buildfile +8 -0
- data/spec/fixtures/recursive_project/frameworks/sproutcore/frameworks/costello/PLACEHOLDER +0 -0
- data/spec/lib/builders/combine_spec.rb +67 -0
- data/spec/lib/builders/html_spec.rb +577 -0
- data/spec/lib/builders/javascript_spec.rb +81 -0
- data/spec/lib/builders/sass_spec.rb +43 -0
- data/spec/lib/builders/spec_helper.rb +30 -0
- data/spec/lib/builders/strings_spec.rb +52 -0
- data/spec/lib/builders/stylesheet_spec.rb +63 -0
- data/spec/lib/builders/test_index_spec.rb +44 -0
- data/spec/lib/builders/test_spec.rb +135 -0
- data/spec/lib/buildfile/config_for_spec.rb +81 -0
- data/spec/lib/buildfile/define_spec.rb +59 -0
- data/spec/lib/buildfile/dup_spec.rb +65 -0
- data/spec/lib/buildfile/invoke_spec.rb +130 -0
- data/spec/lib/buildfile/load_spec.rb +49 -0
- data/spec/lib/buildfile/task/dup_spec.rb +55 -0
- data/spec/lib/buildfile/task_defined_spec.rb +17 -0
- data/spec/lib/buildfile_commands/build_task_spec.rb +19 -0
- data/spec/lib/buildfile_commands/config_spec.rb +97 -0
- data/spec/lib/buildfile_commands/import_spec.rb +17 -0
- data/spec/lib/buildfile_commands/namespace_spec.rb +18 -0
- data/spec/lib/buildfile_commands/proxies_spec.rb +38 -0
- data/spec/lib/buildfile_commands/replace_task_spec.rb +29 -0
- data/spec/lib/buildfile_commands/task_spec.rb +36 -0
- data/spec/lib/helpers/packing_optimizer/optimize_spec.rb +26 -0
- data/spec/lib/models/hash_struct/deep_clone_spec.rb +27 -0
- data/spec/lib/models/hash_struct/has_options_spec.rb +32 -0
- data/spec/lib/models/hash_struct/hash_spec.rb +64 -0
- data/spec/lib/models/hash_struct/merge_spec.rb +26 -0
- data/spec/lib/models/hash_struct/method_missing.rb +41 -0
- data/spec/lib/models/manifest/add_entry_spec.rb +36 -0
- data/spec/lib/models/manifest/add_transform_spec.rb +90 -0
- data/spec/lib/models/manifest/build_spec.rb +78 -0
- data/spec/lib/models/manifest/entry_for_spec.rb +94 -0
- data/spec/lib/models/manifest/find_entry.rb +84 -0
- data/spec/lib/models/manifest/prepare_spec.rb +62 -0
- data/spec/lib/models/manifest_entry/cacheable_url_spec.rb +31 -0
- data/spec/lib/models/manifest_entry/prepare_spec.rb +54 -0
- data/spec/lib/models/project/add_target_spec.rb +44 -0
- data/spec/lib/models/project/buildfile_spec.rb +35 -0
- data/spec/lib/models/project/find_targets_for_spec.rb +77 -0
- data/spec/lib/models/project/load_nearest_project_spec.rb +23 -0
- data/spec/lib/models/project/target_for_spec.rb +33 -0
- data/spec/lib/models/project/targets_spec.rb +62 -0
- data/spec/lib/models/target/compute_build_number_spec.rb +125 -0
- data/spec/lib/models/target/config_spec.rb +30 -0
- data/spec/lib/models/target/expand_required_targets_spec.rb +48 -0
- data/spec/lib/models/target/installed_languages_spec.rb +47 -0
- data/spec/lib/models/target/lproj_for_spec.rb +38 -0
- data/spec/lib/models/target/manifest_for_spec.rb +42 -0
- data/spec/lib/models/target/parent_target_spec.rb +21 -0
- data/spec/lib/models/target/prepare_spec.rb +53 -0
- data/spec/lib/models/target/required_targets_spec.rb +119 -0
- data/spec/lib/models/target/target_for_spec.rb +56 -0
- data/spec/lib/tools/build_number_spec.rb +28 -0
- data/spec/lib/tools/gen_spec.rb +207 -0
- data/spec/lib/tools/tools_spec.rb +78 -0
- data/spec/spec_helper.rb +138 -0
- data/sproutcore.gemspec +47 -0
- data/vendor/github_gem_lint.rb +22 -0
- data/vendor/yui-compressor/yuicompressor-2.4.2.jar +0 -0
- metadata +1084 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# ===========================================================================
|
2
|
+
# SC::Target Buildtasks
|
3
|
+
# copyright 2008, Sprout Systems, Inc. and Apple, Inc. all rights reserved
|
4
|
+
# ===========================================================================
|
5
|
+
|
6
|
+
# Tasks invoked to actually render a single HTML file. Works much like a
|
7
|
+
# build task but also expects a CONTEXT variable that contains the html
|
8
|
+
# context.
|
9
|
+
namespace :render do
|
10
|
+
|
11
|
+
desc "renders erubis including .rhtml and .html.erb files"
|
12
|
+
task :erubis do
|
13
|
+
CONTEXT.compile SC::RenderEngine::Erubis.new(CONTEXT), SRC_PATH
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "renders haml files"
|
17
|
+
task :haml do
|
18
|
+
CONTEXT.compile SC::RenderEngine::Haml.new(CONTEXT), SRC_PATH
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# ===========================================================================
|
2
|
+
# SC::Target Buildtasks
|
3
|
+
# copyright 2008, Sprout Systems, Inc. and Apple, Inc. all rights reserved
|
4
|
+
# ===========================================================================
|
5
|
+
|
6
|
+
# Tasks invoked while building Target objects. You can override these methods
|
7
|
+
# in your buildfiles.
|
8
|
+
namespace :target do
|
9
|
+
|
10
|
+
# Invoked whenever a new target is created to prepare standard properties
|
11
|
+
# needed on the build system. Extend this task to add other standard
|
12
|
+
# properties
|
13
|
+
task :prepare do
|
14
|
+
|
15
|
+
# use url_root config or merge url_prefix + target_name
|
16
|
+
TARGET.url_root = CONFIG.url_root ||
|
17
|
+
[nil, CONFIG.url_prefix, TARGET.target_name].join('/').gsub(/\/+/,'/')
|
18
|
+
|
19
|
+
# use index_root config or merge index_prefix + target_name
|
20
|
+
TARGET.index_root = CONFIG.index_root ||
|
21
|
+
[nil, CONFIG.index_prefix, TARGET.target_name].join('/').gsub(/\/+/, '/')
|
22
|
+
|
23
|
+
# Split all of these paths in case we are on windows...
|
24
|
+
TARGET.build_root = File.expand_path(CONFIG.build_root ||
|
25
|
+
File.join(PROJECT.project_root.to_s,
|
26
|
+
(CONFIG.build_prefix || '').to_s.split('/'),
|
27
|
+
(CONFIG.url_prefix || '').to_s.split('/'),
|
28
|
+
TARGET.target_name.to_s.split('/')))
|
29
|
+
|
30
|
+
TARGET.staging_root = File.expand_path(CONFIG.staging_root ||
|
31
|
+
File.join(PROJECT.project_root.to_s,
|
32
|
+
(CONFIG.staging_prefix || '').to_s.split('/'),
|
33
|
+
(CONFIG.url_prefix || '').to_s.split('/'),
|
34
|
+
TARGET.target_name.to_s))
|
35
|
+
|
36
|
+
TARGET.build_number = TARGET.compute_build_number
|
37
|
+
|
38
|
+
# The target is loadable if it is an app
|
39
|
+
TARGET.loadable = TARGET.target_type == :app
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
data/gen/Buildfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# This is the root buildfile shared by all generators. It defines the basic
|
2
|
+
# built-in tasks needed for all generators to function.
|
3
|
+
|
4
|
+
namespace :generator do
|
5
|
+
|
6
|
+
desc "prepares the generator by performing any added pre-processing"
|
7
|
+
task :prepare
|
8
|
+
|
9
|
+
desc "builds the generator, copying files to the build root"
|
10
|
+
task :build do
|
11
|
+
GENERATOR.each_template do |filename, src_path, dst_path|
|
12
|
+
GENERATOR.copy_file src_path, dst_path
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
data/gen/app/Buildfile
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# ==========================================================================
|
2
|
+
# Generator: APP
|
3
|
+
# Copyright: ©2006-2009 Sprout Systems, Inc. and contributors
|
4
|
+
# portions copyright ©2009 Apple, Inc.
|
5
|
+
# ==========================================================================
|
6
|
+
|
7
|
+
namespace :generator do
|
8
|
+
|
9
|
+
# Require a project then make sure the build root is always the project
|
10
|
+
# root.
|
11
|
+
task :prepare do
|
12
|
+
GENERATOR.requires! :target_project
|
13
|
+
|
14
|
+
# if the target name has a slash in it, then we are trying to create a
|
15
|
+
# nested target. extract the final part (since this is the target name)
|
16
|
+
# and then set the build root to the parent target.
|
17
|
+
if GENERATOR.target_name && GENERATOR.target_name =~ /\//
|
18
|
+
parent_target_name = GENERATOR.target_name.split('/')
|
19
|
+
GENERATOR.target_name = parent_target_name.pop
|
20
|
+
|
21
|
+
parent_target_name = parent_target_name * "/"
|
22
|
+
project = GENERATOR.target_project
|
23
|
+
|
24
|
+
GENERATOR.parent_target_name = parent_target_name
|
25
|
+
GENERATOR.parent_target = project.target_for(parent_target_name)
|
26
|
+
GENERATOR.requires! :parent_target, :parent_target_name
|
27
|
+
|
28
|
+
GENERATOR.build_root = GENERATOR.parent_target.source_root
|
29
|
+
|
30
|
+
# otherwise just use project_root
|
31
|
+
else
|
32
|
+
GENERATOR.build_root = GENERATOR.target_project.project_root
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
data/gen/app/README
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Your application target is now ready to use!
|
data/gen/app/USAGE
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
app - Create a new SproutCore application target.
|
2
|
+
|
3
|
+
USAGE:
|
4
|
+
|
5
|
+
sc-gen app AppName [--filename=FILENAME] [--target=TARGET_NAME]
|
6
|
+
|
7
|
+
DISCUSSION:
|
8
|
+
|
9
|
+
This generator will create a new SproutCore application for a particular project. You should pass as the first parameter your AppName you want to create. For example:
|
10
|
+
|
11
|
+
sc-gen app Todos
|
12
|
+
|
13
|
+
defines a new application called Todos in the file apps/todos/ .
|
@@ -0,0 +1,27 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: <%= namespace %>
|
3
|
+
// Copyright: ©<%= Time.now.year %> My Company, Inc.
|
4
|
+
// ==========================================================================
|
5
|
+
/*globals <%= namespace %> */
|
6
|
+
|
7
|
+
/** @namespace
|
8
|
+
|
9
|
+
My cool new app. Describe your application.
|
10
|
+
|
11
|
+
@extends SC.Object
|
12
|
+
*/
|
13
|
+
<%= namespace %> = SC.Object.create(
|
14
|
+
/** @scope <%= namespace %>.prototype */ {
|
15
|
+
|
16
|
+
NAMESPACE: '<%= namespace %>',
|
17
|
+
VERSION: '0.1.0',
|
18
|
+
|
19
|
+
// This is your application store. You will use this store to access all
|
20
|
+
// of your model data. You can also set a data source on this store to
|
21
|
+
// connect to a backend server. The default setup below connects the store
|
22
|
+
// to any fixtures you define.
|
23
|
+
store: SC.Store.create().from(SC.Record.fixtures)
|
24
|
+
|
25
|
+
// TODO: Add global constants or singleton objects needed by your app here.
|
26
|
+
|
27
|
+
}) ;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%% content_for :loading do %>
|
2
|
+
<%% # Any HTML in this file will be visible on screen while your page loads
|
3
|
+
# its application JavaScript. SproutCore applications are optimized for
|
4
|
+
# caching and startup very fast, so your users will often only see this
|
5
|
+
# content for a brief moment on their first app load, if at all.
|
6
|
+
%>
|
7
|
+
<p class="loading">Loading...<p>
|
8
|
+
|
9
|
+
<%% end %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: <%= namespace %> - mainPage
|
3
|
+
// Copyright: ©<%= Time.now.year %> My Company, Inc.
|
4
|
+
// ==========================================================================
|
5
|
+
/*globals <%= namespace %> */
|
6
|
+
|
7
|
+
// This page describes the main user interface for your application.
|
8
|
+
<%= namespace %>.mainPage = SC.Page.design({
|
9
|
+
|
10
|
+
// The main pane is made visible on screen as soon as your app is loaded.
|
11
|
+
// Add childViews to this pane for views to display immediately on page
|
12
|
+
// load.
|
13
|
+
mainPane: SC.MainPane.design({
|
14
|
+
childViews: 'labelView'.w(),
|
15
|
+
|
16
|
+
labelView: SC.LabelView.design({
|
17
|
+
layout: { centerX: 0, centerY: 0, width: 100, height: 18 },
|
18
|
+
tagName: "h1", value: "Hello World"
|
19
|
+
})
|
20
|
+
})
|
21
|
+
|
22
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: <%= namespace %> Strings
|
3
|
+
// Copyright: ©<%= Time.now.year %> My Company, Inc.
|
4
|
+
// ==========================================================================
|
5
|
+
/*globals <%= namespace %> */
|
6
|
+
|
7
|
+
// Place strings you want to localize here. In your app, use the key and
|
8
|
+
// localize it using "key string".loc(). HINT: For your key names, use the
|
9
|
+
// english string with an underscore in front. This way you can still see
|
10
|
+
// how your UI will look and you'll notice right away when something needs a
|
11
|
+
// localized string added to this file!
|
12
|
+
//
|
13
|
+
SC.stringsFor('English', {
|
14
|
+
// "_String Key": "Localized String"
|
15
|
+
}) ;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: <%= namespace %>
|
3
|
+
// Copyright: ©<%= Time.now.year %> My Company, Inc.
|
4
|
+
// ==========================================================================
|
5
|
+
/*globals <%= namespace %> */
|
6
|
+
|
7
|
+
// This is the function that will start your app running. The default
|
8
|
+
// implementation will load any fixtures you have created then instantiate
|
9
|
+
// your controllers and awake the elements on your page.
|
10
|
+
//
|
11
|
+
// As you develop your application you will probably want to override this.
|
12
|
+
// See comments for some pointers on what to do next.
|
13
|
+
//
|
14
|
+
<%= namespace %>.main = function main() {
|
15
|
+
|
16
|
+
// Step 1: Instantiate Your Views
|
17
|
+
// The default code here will make the mainPane for your application visible
|
18
|
+
// on screen. If you app gets any level of complexity, you will probably
|
19
|
+
// create multiple pages and panes.
|
20
|
+
<%= namespace %>.getPath('mainPage.mainPane').append() ;
|
21
|
+
|
22
|
+
// Step 2. Set the content property on your primary controller.
|
23
|
+
// This will make your app come alive!
|
24
|
+
|
25
|
+
// TODO: Set the content property on your primary controller
|
26
|
+
// ex: <%= class_name %>.contactsController.set('content',<%= class_name %>.contacts);
|
27
|
+
|
28
|
+
} ;
|
29
|
+
|
30
|
+
function main() { <%= namespace %>.main(); }
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# ==========================================================================
|
2
|
+
# Generator: Controller
|
3
|
+
# Copyright: ©2006-2009 Sprout Systems, Inc. and contributors
|
4
|
+
# portions copyright ©2009 Apple, Inc.
|
5
|
+
# ==========================================================================
|
6
|
+
|
7
|
+
namespace :generator do
|
8
|
+
|
9
|
+
# - Verify required properties are present
|
10
|
+
# - Accept second argument as base class
|
11
|
+
# - If file name ends in "_controller", strip it off
|
12
|
+
task :prepare do
|
13
|
+
GENERATOR.requires! :target_project, :target, :namespace, :class_name
|
14
|
+
GENERATOR.base_class_name ||= GENERATOR.arguments[2]
|
15
|
+
GENERATOR.filename = GENERATOR.filename.sub(/_controller$/,'')
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Your controller is now ready to use!
|
@@ -0,0 +1,13 @@
|
|
1
|
+
model - Create a new controller class in your SproutCore app.
|
2
|
+
|
3
|
+
USAGE:
|
4
|
+
|
5
|
+
sc-gen controller AppName.ClassNameController [--filename=FILENAME] [--target=TARGET_NAME]
|
6
|
+
|
7
|
+
DISCUSSION:
|
8
|
+
|
9
|
+
This generator will create a new SproutCore controller file in your app. You should pass as the first parameter your AppName.ClassNameController combination you want to create. For example:
|
10
|
+
|
11
|
+
sc-gen controller Todos.TaskController
|
12
|
+
|
13
|
+
defines a new class called Todos.TaskController in the file apps/todos/controllers/task.js .
|
@@ -0,0 +1,18 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: <%= namespace_instance_name %>
|
3
|
+
// Copyright: ©<%= Time.now.year %> My Company, Inc.
|
4
|
+
// ==========================================================================
|
5
|
+
/*globals <%= namespace %> */
|
6
|
+
|
7
|
+
/** @class
|
8
|
+
|
9
|
+
(Document Your Controller Here)
|
10
|
+
|
11
|
+
@extends <%= base_class_name || 'SC.Object' %>
|
12
|
+
*/
|
13
|
+
<%= namespace_instance_name %> = <%= base_class_name || 'SC.Object' %>.create(
|
14
|
+
/** @scope <%= namespace_instance_name %>.prototype */ {
|
15
|
+
|
16
|
+
// TODO: Add your own code here.
|
17
|
+
|
18
|
+
}) ;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: <%= namespace_instance_name %> Unit Test
|
3
|
+
// Copyright: ©<%= Time.now.year %> My Company, Inc.
|
4
|
+
// ==========================================================================
|
5
|
+
/*globals <%= namespace %> module test ok equals same stop start */
|
6
|
+
|
7
|
+
module("<%= namespace_instance_name %>");
|
8
|
+
|
9
|
+
// TODO: Replace with real unit test for <%= namespace_instance_name %>
|
10
|
+
test("test description", function() {
|
11
|
+
var expected = "test";
|
12
|
+
var result = "test";
|
13
|
+
equals(result, expected, "test should equal test");
|
14
|
+
});
|
15
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# ==========================================================================
|
2
|
+
# Generator: Framework
|
3
|
+
# Copyright: ©2006-2009 Sprout Systems, Inc. and contributors
|
4
|
+
# portions copyright ©2009 Apple, Inc.
|
5
|
+
# ==========================================================================
|
6
|
+
|
7
|
+
namespace :generator do
|
8
|
+
|
9
|
+
# Require a project then make sure the build root is always the project
|
10
|
+
# root.
|
11
|
+
task :prepare do
|
12
|
+
GENERATOR.requires! :target_project
|
13
|
+
|
14
|
+
# if the target name has a slash in it, then we are trying to create a
|
15
|
+
# nested target. extract the final part (since this is the target name)
|
16
|
+
# and then set the build root to the parent target.
|
17
|
+
if GENERATOR.target_name && GENERATOR.target_name =~ /\//
|
18
|
+
parent_target_name = GENERATOR.target_name.split('/')
|
19
|
+
GENERATOR.target_name = parent_target_name.pop
|
20
|
+
|
21
|
+
parent_target_name = parent_target_name * "/"
|
22
|
+
project = GENERATOR.target_project
|
23
|
+
|
24
|
+
GENERATOR.parent_target_name = parent_target_name
|
25
|
+
GENERATOR.parent_target = project.target_for(parent_target_name)
|
26
|
+
GENERATOR.requires! :parent_target, :parent_target_name
|
27
|
+
|
28
|
+
GENERATOR.build_root = GENERATOR.parent_target.source_root
|
29
|
+
|
30
|
+
# otherwise just use project_root
|
31
|
+
else
|
32
|
+
GENERATOR.build_root = GENERATOR.target_project.project_root
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Your framework is now ready to use!
|
data/gen/framework/USAGE
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
framework - Create a new SproutCore framework.
|
2
|
+
|
3
|
+
USAGE:
|
4
|
+
|
5
|
+
sc-gen framework FrameworkName [--filename=FILENAME] [--target=TARGET_NAME]
|
6
|
+
|
7
|
+
DISCUSSION:
|
8
|
+
|
9
|
+
This generator will create a new SproutCore framework for a particular project. You should pass as the first parameter your FrameworkName you want to create. For example:
|
10
|
+
|
11
|
+
sc-gen framework Todos
|
12
|
+
|
13
|
+
defines a new framework called Todos in the file frameworks/todos/ .
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: <%= namespace %>
|
3
|
+
// Copyright: ©<%= Time.now.year %> My Company, Inc.
|
4
|
+
// ==========================================================================
|
5
|
+
/*globals <%= namespace %> */
|
6
|
+
|
7
|
+
/** @namespace
|
8
|
+
|
9
|
+
My cool new framework. Describe your framework.
|
10
|
+
|
11
|
+
@extends SC.Object
|
12
|
+
*/
|
13
|
+
<%= namespace %> = SC.Object.create(
|
14
|
+
/** @scope <%= namespace %>.prototype */ {
|
15
|
+
|
16
|
+
NAMESPACE: '<%= namespace %>',
|
17
|
+
VERSION: '0.1.0',
|
18
|
+
|
19
|
+
// TODO: Add global constants or singleton objects needed by your app here.
|
20
|
+
|
21
|
+
}) ;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: <%= namespace %> Strings
|
3
|
+
// Copyright: ©<%= Time.now.year %> My Company, Inc.
|
4
|
+
// ==========================================================================
|
5
|
+
/*globals <%= namespace %> */
|
6
|
+
|
7
|
+
// Place strings you want to localize here. In your app, use the key and
|
8
|
+
// localize it using "key string".loc(). HINT: For your key names, use the
|
9
|
+
// english string with an underscore in front. This way you can still see
|
10
|
+
// how your UI will look and you'll notice right away when something needs a
|
11
|
+
// localized string added to this file!
|
12
|
+
//
|
13
|
+
SC.stringsFor('English', {
|
14
|
+
// "_String Key": "Localized String"
|
15
|
+
}) ;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# ==========================================================================
|
2
|
+
# Generator: Language
|
3
|
+
# Copyright: ©2006-2009 Sprout Systems, Inc. and contributors
|
4
|
+
# portions copyright ©2009 Apple, Inc.
|
5
|
+
# ==========================================================================
|
6
|
+
|
7
|
+
namespace :generator do
|
8
|
+
|
9
|
+
# First argument must be the namespace. Second argument should be the
|
10
|
+
# language we want to add. Generate a filename (foo.lproj) and language
|
11
|
+
# name.
|
12
|
+
task :prepare do
|
13
|
+
long_languages = %w(english french german italian spanish japanese)
|
14
|
+
if language = GENERATOR.arguments[2]
|
15
|
+
if long_languages.include?(language.downcase)
|
16
|
+
GENERATOR.language = language.downcase.capitalize
|
17
|
+
GENERATOR.filename = language.downcase + '.lproj'
|
18
|
+
else
|
19
|
+
GENERATOR.language = language.gsub('_', '-')
|
20
|
+
GENERATOR.filename = language.gsub('-', '_') + '.lproj'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
GENERATOR.requires! :target_project, :target, :language, :filename
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|