sproutit-sproutcore 1.0.126 → 1.0.203
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +22 -7
- data/VERSION.yml +2 -2
- data/vendor/github_gem_lint.rb +22 -0
- data/vendor/jsdoc/README.txt +151 -0
- data/vendor/jsdoc/app/frame/Chain.js +102 -0
- data/vendor/jsdoc/app/frame/Dumper.js +144 -0
- data/vendor/jsdoc/app/frame/Hash.js +47 -0
- data/vendor/jsdoc/app/frame/Link.js +142 -0
- data/vendor/jsdoc/app/frame/Namespace.js +10 -0
- data/vendor/jsdoc/app/frame/Opt.js +134 -0
- data/vendor/jsdoc/app/frame/Reflection.js +26 -0
- data/vendor/jsdoc/app/frame/String.js +93 -0
- data/vendor/jsdoc/app/frame/Testrun.js +129 -0
- data/vendor/jsdoc/app/frame.js +33 -0
- data/vendor/jsdoc/app/handlers/FOODOC.js +26 -0
- data/vendor/jsdoc/app/handlers/XMLDOC/DomReader.js +159 -0
- data/vendor/jsdoc/app/handlers/XMLDOC/XMLDoc.js +16 -0
- data/vendor/jsdoc/app/handlers/XMLDOC/XMLParse.js +292 -0
- data/vendor/jsdoc/app/handlers/XMLDOC.js +26 -0
- data/vendor/jsdoc/app/lib/JSDOC/DocComment.js +200 -0
- data/vendor/jsdoc/app/lib/JSDOC/DocTag.js +294 -0
- data/vendor/jsdoc/app/lib/JSDOC/JsDoc.js +162 -0
- data/vendor/jsdoc/app/lib/JSDOC/JsPlate.js +100 -0
- data/vendor/jsdoc/app/lib/JSDOC/Lang.js +144 -0
- data/vendor/jsdoc/app/lib/JSDOC/Parser.js +109 -0
- data/vendor/jsdoc/app/lib/JSDOC/PluginManager.js +33 -0
- data/vendor/jsdoc/app/lib/JSDOC/Symbol.js +681 -0
- data/vendor/jsdoc/app/lib/JSDOC/SymbolSet.js +226 -0
- data/vendor/jsdoc/app/lib/JSDOC/TextStream.js +41 -0
- data/vendor/jsdoc/app/lib/JSDOC/Token.js +18 -0
- data/vendor/jsdoc/app/lib/JSDOC/TokenReader.js +332 -0
- data/vendor/jsdoc/app/lib/JSDOC/TokenStream.js +133 -0
- data/vendor/jsdoc/app/lib/JSDOC/Util.js +32 -0
- data/vendor/jsdoc/app/lib/JSDOC/Walker.js +453 -0
- data/vendor/jsdoc/app/lib/JSDOC.js +98 -0
- data/vendor/jsdoc/app/main.js +74 -0
- data/vendor/jsdoc/app/plugins/commentSrcJson.js +19 -0
- data/vendor/jsdoc/app/plugins/frameworkPrototype.js +16 -0
- data/vendor/jsdoc/app/plugins/functionCall.js +10 -0
- data/vendor/jsdoc/app/plugins/publishSrcHilite.js +62 -0
- data/vendor/jsdoc/app/plugins/sproutcoreTags.js +26 -0
- data/vendor/jsdoc/app/plugins/symbolLink.js +9 -0
- data/vendor/jsdoc/app/plugins/tagParamConfig.js +31 -0
- data/vendor/jsdoc/app/plugins/tagSynonyms.js +43 -0
- data/vendor/jsdoc/app/run.js +346 -0
- data/vendor/jsdoc/app/t/TestDoc.js +144 -0
- data/vendor/jsdoc/app/t/runner.js +13 -0
- data/vendor/jsdoc/app/test/addon.js +24 -0
- data/vendor/jsdoc/app/test/anon_inner.js +14 -0
- data/vendor/jsdoc/app/test/augments.js +31 -0
- data/vendor/jsdoc/app/test/augments2.js +26 -0
- data/vendor/jsdoc/app/test/borrows.js +41 -0
- data/vendor/jsdoc/app/test/borrows2.js +23 -0
- data/vendor/jsdoc/app/test/config.js +22 -0
- data/vendor/jsdoc/app/test/constructs.js +18 -0
- data/vendor/jsdoc/app/test/encoding.js +10 -0
- data/vendor/jsdoc/app/test/encoding_other.js +12 -0
- data/vendor/jsdoc/app/test/functions_anon.js +39 -0
- data/vendor/jsdoc/app/test/functions_nested.js +33 -0
- data/vendor/jsdoc/app/test/global.js +13 -0
- data/vendor/jsdoc/app/test/globals.js +25 -0
- data/vendor/jsdoc/app/test/ignore.js +10 -0
- data/vendor/jsdoc/app/test/inner.js +16 -0
- data/vendor/jsdoc/app/test/jsdoc_test.js +477 -0
- data/vendor/jsdoc/app/test/lend.js +33 -0
- data/vendor/jsdoc/app/test/memberof.js +20 -0
- data/vendor/jsdoc/app/test/memberof_constructor.js +15 -0
- data/vendor/jsdoc/app/test/name.js +19 -0
- data/vendor/jsdoc/app/test/namespace_nested.js +23 -0
- data/vendor/jsdoc/app/test/nocode.js +13 -0
- data/vendor/jsdoc/app/test/oblit_anon.js +20 -0
- data/vendor/jsdoc/app/test/overview.js +20 -0
- data/vendor/jsdoc/app/test/param_inline.js +37 -0
- data/vendor/jsdoc/app/test/params_optional.js +8 -0
- data/vendor/jsdoc/app/test/prototype.js +17 -0
- data/vendor/jsdoc/app/test/prototype_nested.js +9 -0
- data/vendor/jsdoc/app/test/prototype_oblit.js +13 -0
- data/vendor/jsdoc/app/test/prototype_oblit_constructor.js +24 -0
- data/vendor/jsdoc/app/test/public.js +10 -0
- data/vendor/jsdoc/app/test/shared.js +42 -0
- data/vendor/jsdoc/app/test/shared2.js +2 -0
- data/vendor/jsdoc/app/test/shortcuts.js +22 -0
- data/vendor/jsdoc/app/test/static_this.js +13 -0
- data/vendor/jsdoc/app/test/synonyms.js +23 -0
- data/vendor/jsdoc/app/test/tosource.js +23 -0
- data/vendor/jsdoc/app/test/variable_redefine.js +14 -0
- data/vendor/jsdoc/app/test.js +304 -0
- data/vendor/jsdoc/changes.txt +47 -0
- data/vendor/jsdoc/conf/sample.conf +31 -0
- data/vendor/jsdoc/java/build.xml +36 -0
- data/vendor/jsdoc/java/build_1.4.xml +36 -0
- data/vendor/jsdoc/java/classes/js.jar +0 -0
- data/vendor/jsdoc/java/src/JsDebugRun.java +21 -0
- data/vendor/jsdoc/java/src/JsRun.java +21 -0
- data/vendor/jsdoc/jsdebug.jar +0 -0
- data/vendor/jsdoc/jsrun.jar +0 -0
- data/vendor/jsdoc/t/TestDoc.js +144 -0
- data/vendor/jsdoc/t/runner.js +13 -0
- data/vendor/jsdoc/templates/jsdoc/publish.js +166 -0
- data/vendor/jsdoc/templates/jsdoc/static/default.css +162 -0
- data/vendor/jsdoc/templates/jsdoc/static/header.html +2 -0
- data/vendor/jsdoc/templates/jsdoc/static/index.html +19 -0
- data/vendor/jsdoc/templates/sproutcore/publish.js +333 -0
- data/vendor/jsdoc/templates/sproutcore/static/default.css +212 -0
- data/vendor/jsdoc/templates/sproutcore/static/header.html +2 -0
- data/vendor/jsdoc/templates/sproutcore/static/index.html +19 -0
- data/vendor/jsdoc/test/addon.js +24 -0
- data/vendor/jsdoc/test/anon_inner.js +14 -0
- data/vendor/jsdoc/test/augments.js +31 -0
- data/vendor/jsdoc/test/augments2.js +26 -0
- data/vendor/jsdoc/test/borrows.js +41 -0
- data/vendor/jsdoc/test/borrows2.js +23 -0
- data/vendor/jsdoc/test/config.js +22 -0
- data/vendor/jsdoc/test/constructs.js +18 -0
- data/vendor/jsdoc/test/encoding.js +10 -0
- data/vendor/jsdoc/test/encoding_other.js +12 -0
- data/vendor/jsdoc/test/functions_anon.js +39 -0
- data/vendor/jsdoc/test/functions_nested.js +33 -0
- data/vendor/jsdoc/test/global.js +13 -0
- data/vendor/jsdoc/test/globals.js +25 -0
- data/vendor/jsdoc/test/ignore.js +10 -0
- data/vendor/jsdoc/test/inner.js +16 -0
- data/vendor/jsdoc/test/jsdoc_test.js +477 -0
- data/vendor/jsdoc/test/lend.js +33 -0
- data/vendor/jsdoc/test/memberof.js +20 -0
- data/vendor/jsdoc/test/memberof_constructor.js +15 -0
- data/vendor/jsdoc/test/name.js +19 -0
- data/vendor/jsdoc/test/namespace_nested.js +23 -0
- data/vendor/jsdoc/test/nocode.js +13 -0
- data/vendor/jsdoc/test/oblit_anon.js +20 -0
- data/vendor/jsdoc/test/overview.js +20 -0
- data/vendor/jsdoc/test/param_inline.js +37 -0
- data/vendor/jsdoc/test/params_optional.js +8 -0
- data/vendor/jsdoc/test/prototype.js +17 -0
- data/vendor/jsdoc/test/prototype_nested.js +9 -0
- data/vendor/jsdoc/test/prototype_oblit.js +13 -0
- data/vendor/jsdoc/test/prototype_oblit_constructor.js +24 -0
- data/vendor/jsdoc/test/public.js +10 -0
- data/vendor/jsdoc/test/shared.js +42 -0
- data/vendor/jsdoc/test/shared2.js +2 -0
- data/vendor/jsdoc/test/shortcuts.js +22 -0
- data/vendor/jsdoc/test/static_this.js +13 -0
- data/vendor/jsdoc/test/synonyms.js +23 -0
- data/vendor/jsdoc/test/tosource.js +23 -0
- data/vendor/jsdoc/test/variable_redefine.js +14 -0
- data/vendor/jsdoc/test.js +304 -0
- data/vendor/yui-compressor/yuicompressor-2.4.2.jar +0 -0
- metadata +170 -145
- data/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/QuickLook/Preview.pdf +0 -0
- data/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/QuickLook/Thumbnail.tiff +0 -0
- data/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/data.plist +0 -14378
- data/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/image10.png +0 -0
- data/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/image11.png +0 -0
- data/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/image13.png +0 -0
- data/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/image14.png +0 -0
- data/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/image8.png +0 -0
- data/frameworks/sproutcore/apps/docs/design/Doc Viewer.graffle/image9.tiff +0 -0
- data/frameworks/sproutcore/design/CollectionView State Charts.graffle +0 -4848
- data/frameworks/sproutcore/design/Design Charts.graffle +0 -18232
- data/frameworks/sproutcore/design/SproutCore Design Template.graffle/QuickLook/Preview.pdf +0 -0
- data/frameworks/sproutcore/design/SproutCore Design Template.graffle/QuickLook/Thumbnail.tiff +0 -0
- data/frameworks/sproutcore/design/SproutCore Design Template.graffle/data.plist +0 -1452
- data/frameworks/sproutcore/design/SproutCore Design Template.graffle/image8.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/QuickLook/Preview.pdf +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/QuickLook/Thumbnail.tiff +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/data.plist +0 -24187
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image10.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image11.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image13.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image15.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image16.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image17.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image18.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image19.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image22.tiff +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image23.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image24.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image25.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image30.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image31.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image8.png +0 -0
- data/frameworks/sproutcore/design/TestRunner Design.graffle/image9.png +0 -0
- data/frameworks/sproutcore/frameworks/runtime/tests/core/inspect.js +0 -27
- data/frameworks/sproutcore/themes/standard_theme/Source/Panel.drawit/Data +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/Panel.drawit/QuickLook/Preview.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/Panel.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/Data +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/QuickLook/Preview.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/10.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/100.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/102.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/110.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/120.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/127.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/18.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/19.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/2.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/24.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/26.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/27.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/28.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/29.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/30.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/31.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/33.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/37.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/41.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/16/99.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/10.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/100.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/102.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/110.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/120.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/127.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/18.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/19.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/2.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/24.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/26.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/27.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/28.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/29.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/30.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/31.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/33.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/37.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/41.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/24/99.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/10.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/100.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/102.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/110.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/120.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/127.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/18.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/19.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/2.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/24.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/26.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/27.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/28.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/29.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/30.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/31.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/33.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/37.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/41.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/32/99.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/48/10.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/48/18.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/48/19.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/icons/48/2.png +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-x.drawit/Data +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-x.drawit/QuickLook/Preview.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-x.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-y.drawit/Data +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-y.drawit/QuickLook/Preview.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-y.drawit/QuickLook/Thumbnail.jpg +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/sc-theme-repeat-x-2.psd +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/sc-theme-repeat-x.psd +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/sc-theme-sprite.psd +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/sc-theme-ysprite.psd +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/shared-icons.psd +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/sproutcore-logo.psd +0 -0
- data/frameworks/sproutcore/themes/standard_theme/Source/sticky-note.psd +0 -0
- data/lib/thor/.autotest +0 -7
- data/lib/thor/spec/fixtures/task.thor +0 -10
- data/lib/thor/spec/options_spec.rb +0 -271
- data/lib/thor/spec/ordered_hash_spec.rb +0 -84
- data/lib/thor/spec/spec.opts +0 -1
- data/lib/thor/spec/spec_helper.rb +0 -30
- data/lib/thor/spec/task_spec.rb +0 -11
- data/lib/thor/spec/tasks_spec.rb +0 -28
- data/lib/thor/spec/thor_runner_spec.rb +0 -194
- data/lib/thor/spec/thor_spec.rb +0 -206
- data/lib/thor/spec/util_spec.rb +0 -99
- data/lib/thor/thor.gemspec +0 -29
- data/spec/buildtasks/build/copy_spec.rb +0 -60
- data/spec/buildtasks/build/spec_helper.rb +0 -36
- data/spec/buildtasks/manifest/catalog_spec.rb +0 -48
- data/spec/buildtasks/manifest/hide_buildfiles_spec.rb +0 -125
data/lib/thor/spec/util_spec.rb
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/spec_helper'
|
2
|
-
require "thor/util"
|
3
|
-
|
4
|
-
describe Thor::Util do
|
5
|
-
describe ".snake_case" do
|
6
|
-
it "preserves no-cap strings" do
|
7
|
-
Thor::Util.snake_case("foo").must == "foo"
|
8
|
-
Thor::Util.snake_case("foo_bar").must == "foo_bar"
|
9
|
-
end
|
10
|
-
|
11
|
-
it "downcases all-caps strings" do
|
12
|
-
Thor::Util.snake_case("FOO").must == "foo"
|
13
|
-
Thor::Util.snake_case("FOO_BAR").must == "foo_bar"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "downcases initial-cap strings" do
|
17
|
-
Thor::Util.snake_case("Foo").must == "foo"
|
18
|
-
end
|
19
|
-
|
20
|
-
it "replaces camel-casing with underscores" do
|
21
|
-
Thor::Util.snake_case("FooBarBaz").must == "foo_bar_baz"
|
22
|
-
Thor::Util.snake_case("Foo_BarBaz").must == "foo_bar_baz"
|
23
|
-
end
|
24
|
-
|
25
|
-
it "places underscores between multiple capitals" do
|
26
|
-
Thor::Util.snake_case("ABClass").must == "a_b_class"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe ".constant_to_thor_path" do
|
31
|
-
it "replaces constant nesting with task namespacing" do
|
32
|
-
Thor::Util.constant_to_thor_path("Foo::Bar::Baz").must == "foo:bar:baz"
|
33
|
-
end
|
34
|
-
|
35
|
-
it "snake-cases component strings" do
|
36
|
-
Thor::Util.constant_to_thor_path("FooBar::BarBaz::BazBoom").must == "foo_bar:bar_baz:baz_boom"
|
37
|
-
end
|
38
|
-
|
39
|
-
it "gets rid of an initial Default module" do
|
40
|
-
Thor::Util.constant_to_thor_path("Default::Foo::Bar").must == ":foo:bar"
|
41
|
-
Thor::Util.constant_to_thor_path("Default").must == ""
|
42
|
-
end
|
43
|
-
|
44
|
-
it "accepts class and module objects" do
|
45
|
-
require 'thor/ordered_hash'
|
46
|
-
Thor::Util.constant_to_thor_path(Thor::OrderedHash).must == "thor:ordered_hash"
|
47
|
-
Thor::Util.constant_to_thor_path(Thor::Util).must == "thor:util"
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
describe ".to_constant" do
|
52
|
-
it "returns 'Default' if no name is given" do
|
53
|
-
Thor::Util.to_constant("").must == "Default"
|
54
|
-
end
|
55
|
-
|
56
|
-
it "upcases the namespaces" do
|
57
|
-
Thor::Util.to_constant("foo").must == "Foo"
|
58
|
-
Thor::Util.to_constant("foo:bar").must == "Foo::Bar"
|
59
|
-
end
|
60
|
-
|
61
|
-
it "expands task namespacing into constant nesting" do
|
62
|
-
Thor::Util.to_constant("foo:bar:baz").must == "Foo::Bar::Baz"
|
63
|
-
end
|
64
|
-
|
65
|
-
it "replaces snake-casing with camel-casing" do
|
66
|
-
Thor::Util.to_constant("foo_bar:bar_baz").must == "FooBar::BarBaz"
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
describe ".make_constant" do
|
71
|
-
it "returns the constant given by the string" do
|
72
|
-
Thor::Util.make_constant("Object").must == Object
|
73
|
-
end
|
74
|
-
|
75
|
-
it "resolves constant nesting" do
|
76
|
-
Thor::Util.make_constant("Thor::Util").must == Thor::Util
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
describe ".constant_from_thor_path" do
|
81
|
-
it "returns the named constant" do
|
82
|
-
require 'thor/ordered_hash'
|
83
|
-
Thor::Util.constant_from_thor_path('thor:ordered_hash').must == Thor::OrderedHash
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
describe ".constants_in_contents" do
|
88
|
-
it "returns an array of names of constants defined in the string" do
|
89
|
-
list = Thor::Util.constants_in_contents("class Foo; class Bar < Thor; end; end; class Baz; class Bat; end; end")
|
90
|
-
list.must include("Foo::Bar")
|
91
|
-
list.must_not include("Baz::Bat")
|
92
|
-
end
|
93
|
-
|
94
|
-
it "doesn't put the newly-defined constants in the enclosing namespace" do
|
95
|
-
Thor::Util.constants_in_contents("class Blat; end")
|
96
|
-
defined?(Blat).must_not be
|
97
|
-
end
|
98
|
-
end
|
99
|
-
end
|
data/lib/thor/thor.gemspec
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
Gem::Specification.new do |s|
|
2
|
-
s.name = %q{thor}
|
3
|
-
s.version = "0.9.8"
|
4
|
-
|
5
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
|
-
s.authors = ["Yehuda Katz"]
|
7
|
-
s.date = %q{2008-08-27}
|
8
|
-
s.description = %q{A gem that maps options to a class}
|
9
|
-
s.email = %q{wycats@gmail.com}
|
10
|
-
s.executables = ["thor", "rake2thor"]
|
11
|
-
s.extra_rdoc_files = ["README.markdown", "CHANGELOG.rdoc", "LICENSE"]
|
12
|
-
s.files = ["README.markdown", "LICENSE", "CHANGELOG.rdoc", "Rakefile", "bin/rake2thor", "bin/thor", "lib/thor", "lib/thor/error.rb", "lib/thor/options.rb", "lib/thor/ordered_hash.rb", "lib/thor/runner.rb", "lib/thor/task.rb", "lib/thor/task_hash.rb", "lib/thor/tasks", "lib/thor/tasks/package.rb", "lib/thor/tasks.rb", "lib/thor/util.rb", "lib/thor.rb"]
|
13
|
-
s.has_rdoc = true
|
14
|
-
s.homepage = %q{http://yehudakatz.com}
|
15
|
-
s.require_paths = ["lib"]
|
16
|
-
s.rubyforge_project = %q{thor}
|
17
|
-
s.rubygems_version = %q{1.2.0}
|
18
|
-
s.summary = %q{A gem that maps options to a class}
|
19
|
-
|
20
|
-
if s.respond_to? :specification_version then
|
21
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
22
|
-
s.specification_version = 2
|
23
|
-
|
24
|
-
if current_version >= 3 then
|
25
|
-
else
|
26
|
-
end
|
27
|
-
else
|
28
|
-
end
|
29
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'spec_helper')
|
2
|
-
|
3
|
-
describe "build:copy" do
|
4
|
-
|
5
|
-
include SC::SpecHelpers
|
6
|
-
include SC::BuildSpecHelpers
|
7
|
-
|
8
|
-
before do
|
9
|
-
std_before
|
10
|
-
@task_name = 'build:copy'
|
11
|
-
|
12
|
-
@entry = @manifest.entry_for('demo.html')
|
13
|
-
@src_path = @entry.source_path
|
14
|
-
@dst_path = @entry.build_path
|
15
|
-
|
16
|
-
@entry.build_task.should == 'build:copy' # precondition
|
17
|
-
end
|
18
|
-
|
19
|
-
after do
|
20
|
-
std_after
|
21
|
-
end
|
22
|
-
|
23
|
-
it "copies from source to dst_path if dst_path does not exist" do
|
24
|
-
File.exist?(@dst_path).should be_false # precondition
|
25
|
-
|
26
|
-
run_task @entry, @dst_path
|
27
|
-
files_eql(@src_path, @dst_path).should be_true
|
28
|
-
end
|
29
|
-
|
30
|
-
it "does not run if newer file exists at dst_path" do
|
31
|
-
write_dummy(@dst_path)
|
32
|
-
make_newer(@dst_path, @src_path)
|
33
|
-
|
34
|
-
run_task
|
35
|
-
|
36
|
-
is_dummy(@dst_path).should be_true # make sure task did not copy
|
37
|
-
end
|
38
|
-
|
39
|
-
it "replaces dst_path if older file exists at dst_path" do
|
40
|
-
write_dummy(@dst_path)
|
41
|
-
make_newer(@src_path, @dst_path)
|
42
|
-
|
43
|
-
run_task
|
44
|
-
|
45
|
-
is_dummy(@dst_path).should be_false # should overrwite older file
|
46
|
-
files_eql(@src_path, @dst_path).should be_true
|
47
|
-
end
|
48
|
-
|
49
|
-
it "does not run if dst_path == src_path" do
|
50
|
-
task = @buildfile.lookup('build:copy')
|
51
|
-
expected_count = task.execute_count
|
52
|
-
|
53
|
-
@dst_path = @src_path
|
54
|
-
run_task
|
55
|
-
|
56
|
-
task.execute_count.should == expected_count # did not execute!
|
57
|
-
end
|
58
|
-
|
59
|
-
|
60
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])
|
2
|
-
|
3
|
-
module SC::BuildSpecHelpers
|
4
|
-
|
5
|
-
def std_before
|
6
|
-
@project = temp_project :real_world
|
7
|
-
@target = @project.target_for :sproutcore
|
8
|
-
@buildfile = @target.buildfile
|
9
|
-
@manifest = @target.manifest_for(:language => :fr)
|
10
|
-
|
11
|
-
@target.prepare! # make sure its ready for the manifest...
|
12
|
-
@manifest.build! # get a basic manifest good to go...
|
13
|
-
end
|
14
|
-
|
15
|
-
def std_after
|
16
|
-
@project.cleanup
|
17
|
-
end
|
18
|
-
|
19
|
-
def run_task(entry=nil, dst_path=nil)
|
20
|
-
entry ||= @entry
|
21
|
-
@buildfile.invoke @task_name,
|
22
|
-
:entry => entry,
|
23
|
-
:manifest => @manifest,
|
24
|
-
:target => @target,
|
25
|
-
:config => @target.config,
|
26
|
-
:project => @project,
|
27
|
-
:src_path => @src_path || entry.source_path,
|
28
|
-
:src_paths => @src_path.nil? ? entry.source_paths : [@src_path],
|
29
|
-
:dst_path => dst_path || @dst_path || entry.build_path
|
30
|
-
end
|
31
|
-
|
32
|
-
def entry_for(filename)
|
33
|
-
@manifest.entry_for filename, :hidden => true
|
34
|
-
end
|
35
|
-
|
36
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'spec_helper')
|
2
|
-
|
3
|
-
describe "manifest:catalog" do
|
4
|
-
|
5
|
-
include SC::SpecHelpers
|
6
|
-
include SC::ManifestSpecHelpers
|
7
|
-
|
8
|
-
before do
|
9
|
-
std_before
|
10
|
-
end
|
11
|
-
|
12
|
-
def run_task
|
13
|
-
@manifest.prepare! # this should be run first...
|
14
|
-
super('manifest:catalog')
|
15
|
-
end
|
16
|
-
|
17
|
-
it "create an entry for each item in the target regardless of language with the relative path as filename" do
|
18
|
-
run_task
|
19
|
-
|
20
|
-
# collect filenames from target dir...
|
21
|
-
filenames = Dir.glob(File.join(@target.source_root, '**','*'))
|
22
|
-
filenames.reject! { |f| File.directory?(f) }
|
23
|
-
filenames.map! { |f| f.sub(@target.source_root + '/', '') }
|
24
|
-
filenames.reject! { |f| f =~ /^(apps|frameworks|themes)/ }
|
25
|
-
|
26
|
-
entries = @manifest.entries.dup # get entries to test...
|
27
|
-
filenames.each do |filename|
|
28
|
-
entry = entries.find { |e| e.filename == filename }
|
29
|
-
if entry.nil?
|
30
|
-
nil.should == filename # oops! not found...
|
31
|
-
else
|
32
|
-
entry.filename.should == filename
|
33
|
-
entry.build_task.should == 'build:copy'
|
34
|
-
entry.build_path.should == File.join(@manifest.build_root, filename)
|
35
|
-
entry.staging_path.should == File.join(@manifest.source_root, filename)
|
36
|
-
entry.source_path.should == entry.staging_path
|
37
|
-
entry.url.should == [@manifest.url_root, filename] * '/'
|
38
|
-
entry.should_not be_hidden
|
39
|
-
entry.original?.should be_true # mark as original entry
|
40
|
-
end
|
41
|
-
|
42
|
-
(entry.nil? ? nil : entry.filename).should == filename
|
43
|
-
entries.delete entry
|
44
|
-
end
|
45
|
-
entries.size.should == 0
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
@@ -1,125 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'spec_helper')
|
2
|
-
|
3
|
-
describe "manifest:hide_buildfiles" do
|
4
|
-
|
5
|
-
include SC::SpecHelpers
|
6
|
-
include SC::ManifestSpecHelpers
|
7
|
-
|
8
|
-
before do
|
9
|
-
std_before
|
10
|
-
end
|
11
|
-
|
12
|
-
|
13
|
-
def run_task
|
14
|
-
@manifest.prepare!
|
15
|
-
super('manifest:hide_buildfiles')
|
16
|
-
end
|
17
|
-
|
18
|
-
it "should run manifest:catalog first" do
|
19
|
-
should_run('manifest:catalog') { run_task }
|
20
|
-
end
|
21
|
-
|
22
|
-
it "should hide any Buildfile, sc-config, or sc-config.rb" do
|
23
|
-
run_task
|
24
|
-
entry_for('Buildfile').hidden?.should be_true
|
25
|
-
end
|
26
|
-
|
27
|
-
it "should hide any non .js file outside of .lproj, test, fixture, & debug dirs" do
|
28
|
-
run_task
|
29
|
-
entry_for('README').hidden?.should be_true
|
30
|
-
entry_for('lib/index.html').hidden?.should be_true
|
31
|
-
|
32
|
-
entry_for('tests/sample.rhtml').hidden?.should be_false
|
33
|
-
entry_for('english.lproj/demo.html').hidden?.should be_false
|
34
|
-
entry_for('fixtures/sample-json-fixture.json').hidden?.should be_false
|
35
|
-
entry_for('debug/debug-resource.html').hidden?.should be_false
|
36
|
-
end
|
37
|
-
|
38
|
-
it "should NOT hide non-js files inslide lproj dirs" do
|
39
|
-
run_task
|
40
|
-
entry = entry_for('english.lproj/demo.html')
|
41
|
-
entry.should_not be_hidden
|
42
|
-
end
|
43
|
-
|
44
|
-
describe "CONFIG.load_fixtures" do
|
45
|
-
|
46
|
-
it "should hide files in /fixtures and /*.lproj/fixtures if CONFIG.load_fixtures is false" do
|
47
|
-
@target.config.load_fixtures = false
|
48
|
-
run_task
|
49
|
-
entry = entry_for('fixtures/sample_fixtures.js')
|
50
|
-
entry.should be_hidden
|
51
|
-
entry = entry_for('english.lproj/fixtures/sample_fixtures-loc.js')
|
52
|
-
entry.should be_hidden
|
53
|
-
end
|
54
|
-
|
55
|
-
it "should NOT hide files in /fixtures and /*.lproj/fixtures if CONFIG.load_fixtures is true" do
|
56
|
-
@target.config.load_fixtures = true
|
57
|
-
run_task
|
58
|
-
entry = entry_for('fixtures/sample_fixtures.js')
|
59
|
-
entry.should_not be_hidden
|
60
|
-
entry = entry_for('english.lproj/fixtures/sample_fixtures-loc.js')
|
61
|
-
entry.should_not be_hidden
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
describe "CONFIG.load_debug" do
|
66
|
-
it "should hide files in /debug and /*.lproj/debug if CONFIG.load_debug is false" do
|
67
|
-
@target.config.load_debug = false
|
68
|
-
run_task
|
69
|
-
entry = entry_for('debug/sample_debug.js')
|
70
|
-
entry.should be_hidden
|
71
|
-
entry = entry_for('english.lproj/debug/sample_debug-loc.js')
|
72
|
-
entry.should be_hidden
|
73
|
-
end
|
74
|
-
|
75
|
-
it "should NOT hide files in /debug and /*.lproj/debug if CONFIG.load_fixtures is true" do
|
76
|
-
@target.config.load_debug = true
|
77
|
-
run_task
|
78
|
-
entry = entry_for('debug/sample_debug.js')
|
79
|
-
entry.should_not be_hidden
|
80
|
-
entry = entry_for('english.lproj/debug/sample_debug-loc.js')
|
81
|
-
entry.should_not be_hidden
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
describe "CONFIG.load_tests" do
|
86
|
-
it "should hide files in /tests and /*.lproj/tests if CONFIG.load_tests is false" do
|
87
|
-
@target.config.load_tests = false
|
88
|
-
run_task
|
89
|
-
entry = entry_for('tests/sample.js')
|
90
|
-
entry.should be_hidden
|
91
|
-
entry = entry_for('english.lproj/tests/sample-loc.js')
|
92
|
-
entry.should be_hidden
|
93
|
-
end
|
94
|
-
|
95
|
-
it "should NOT hide files in /tests and /*.lproj/tests if CONFIG.load_tests is true" do
|
96
|
-
@target.config.load_tests = true
|
97
|
-
run_task
|
98
|
-
entry = entry_for('tests/sample.js')
|
99
|
-
entry.should_not be_hidden
|
100
|
-
entry = entry_for('english.lproj/tests/sample-loc.js')
|
101
|
-
entry.should_not be_hidden
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
describe "CONFIG.load_protocols" do
|
106
|
-
it "should hide files in /protocols and /*.lproj/protocols if config is false" do
|
107
|
-
@target.config.load_protocols = false
|
108
|
-
run_task
|
109
|
-
entry = entry_for('protocols/sample.js')
|
110
|
-
entry.should be_hidden
|
111
|
-
entry = entry_for('english.lproj/protocols/sample-loc.js')
|
112
|
-
entry.should be_hidden
|
113
|
-
end
|
114
|
-
|
115
|
-
it "should NOT hide files in /protocols and /*.lproj/protocols if config is true" do
|
116
|
-
@target.config.load_protocols = true
|
117
|
-
run_task
|
118
|
-
entry = entry_for('protocols/sample.js')
|
119
|
-
entry.should_not be_hidden
|
120
|
-
entry = entry_for('english.lproj/protocols/sample-loc.js')
|
121
|
-
entry.should_not be_hidden
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
end
|