diff --git a/thirdparty/jquery-concrete/.piston.yml b/thirdparty/jquery-concrete/.piston.yml index 677996d46..75a943eae 100644 --- a/thirdparty/jquery-concrete/.piston.yml +++ b/thirdparty/jquery-concrete/.piston.yml @@ -1,7 +1,7 @@ --- format: 1 handler: - commit: 767bc6d5ae87459cc6534ddcf91054d28fdd252c + commit: bae4684bd5ab659bd78ebd990cc68ecba8a36669 branch: master lock: false repository_class: Piston::Git::Repository diff --git a/thirdparty/jquery-concrete/README.textile b/thirdparty/jquery-concrete/README.textile index 39844b3cc..aecdab7b9 100644 --- a/thirdparty/jquery-concrete/README.textile +++ b/thirdparty/jquery-concrete/README.textile @@ -163,11 +163,13 @@ h2. Namespaces To avoid name clashes, to allow multiple bindings to the same event, and to generally seperate a set of functions from other code you can use namespaces

-  $('div').concrete('foo.bar', function($){ return {
+  $.concrete('foo.bar', function($){
+    $('div').concrete({
       baz: function(){}
-  }});
+    });
+  });
 
- + You can then call these functions like this:

@@ -182,9 +184,11 @@ This is particularly useful for events, because given this:
     onclick: function(){ this.css({backgroundColor: 'blue'}); }
   });
   
-  $('div').concrete('foo', function($){ return {
+  $.concrete('foo', function($){
+    $('div').concrete({
       onclick: function(){ this.css({color: 'green'}); }
-  }});
+    });
+  });
 
Clicking on a div will change the background **and** foreground color. @@ -199,9 +203,11 @@ Inside a namespace definition, functions remember the namespace they are in, and Where they don't exist, they will be looked up in the base namespace

-  $('div').concrete('foo', {
-    bar: function() { this.baz(); this.qux(); }
-    baz: function() { console.log('baz'); }
+  $.concrete('foo', function($){
+    $('div').concrete({
+      bar: function() { this.baz(); this.qux(); }
+      baz: function() { console.log('baz'); }
+    })
   })
   
   $('div').concrete({
@@ -220,12 +226,15 @@ Note that 'exists' means that a function is declared in this namespace for _any_
 And the concrete definitions
 
 

-  $('div').concrete('foo', {
-    bar: function() { this.baz(); }
+  $.concrete('foo', function($){
+    $('div').concrete({
+      bar: function() { this.baz(); }
+    });
+    $('span').concrete({
+      baz: function() { console.log('a'); }
+    });
   })
   
-  $('span').concrete('foo' {
-    baz: function() { console.log('a'); }
   
   $('div').concrete({
     baz: function() { console.log('b'); }
@@ -234,17 +243,7 @@ And the concrete definitions
 
 Then doing $('div').bar(); will _not_ display b. Even though the span rule could never match a div, because baz is defined for some rule in the foo namespace, the base namespace will never be checked
 
-h4. Cleaner namespace blocks
-
-When declaring a lot of namespaces, you can declare the namespace seperately from the concrete definitions, like so
-
-

-  $.concrete('foo', function($){
-    $('div').concrete({
-      bar: function() { .. }
-    })
-  })
-
+h4. Nesting namespace blocks You can also nest declarations. In this next example, we're defining the functions $().concrete('zap').bar() and $().concrete('zap.pow').baz() @@ -268,8 +267,10 @@ Inside a namespace, namespace lookups are by default relative to the current nam In some situations (such as the last example) you may want to force using the base namespace. In this case you can call concrete with the first argument being the base namespace code '.'. For example, if the first definition in the previous example was

-  $('div').concrete('foo', {
-    bar: function() { this.concrete('.').baz(); }
+  $.concrete('foo', function($){
+    $('div').concrete({
+      bar: function() { this.concrete('.').baz(); }
+    })
   })
 
@@ -280,12 +281,16 @@ h4. Using Sometimes a block outside of a namespace will need to refer to that namespace repeatedly. By passing a function to the concrete function, you can change the looked-up namespace

-  $('div').concrete('foo', {
-    bar: function() { console.log('a'); }
+  $.concrete('foo', function($){
+    $('div').concrete({
+      bar: function() { console.log('a'); }
+    })
   })
   
   $('div').concrete('foo', function(){
     this.bar();
+    this.bar();
+    this.bar();
   });
 
diff --git a/thirdparty/jquery-concrete/dist/jquery.concrete-dist.js b/thirdparty/jquery-concrete/dist/jquery.concrete-dist.js index 3d1ac7622..3d6cdc48a 100644 --- a/thirdparty/jquery-concrete/dist/jquery.concrete-dist.js +++ b/thirdparty/jquery-concrete/dist/jquery.concrete-dist.js @@ -1284,6 +1284,7 @@ var console; order: 40, bind: function(selector, k, v){ + var match, event; if ($.isFunction(v) && (match = k.match(/^on(.*)/))) { event = match[1]; this.bind_event(selector, k, v, event); diff --git a/thirdparty/jquery-concrete/spec/spec.concrete.basics.js b/thirdparty/jquery-concrete/spec/spec.concrete.basics.js index 487d57096..b882aa364 100644 --- a/thirdparty/jquery-concrete/spec/spec.concrete.basics.js +++ b/thirdparty/jquery-concrete/spec/spec.concrete.basics.js @@ -2,71 +2,77 @@ describe 'Concrete' describe 'Basics' before - $.concrete.warningLevel = $.concrete.WARN_LEVEL_BESTPRACTISE; - $('body').append('
') + $.concrete.warningLevel = $.concrete.WARN_LEVEL_BESTPRACTISE; + $('body').append('
'); end after - $('#dom_test').remove() + $('#dom_test').remove(); end before_each - $.concrete.clear_all_rules() - $('#dom_test').html('
') + $.concrete.clear_all_rules(); + $('#dom_test').html('
'); end it 'can attach and call a base function' $('#a').concrete({ foo: function(){return this.attr('id');} }); - $('.a').foo().should.equal 'a' + $('.a').foo().should.equal 'a' end it 'can attach and call several base functions' $('#a').concrete({ foo: function(){return 'foo_' + this.attr('id');}, bar: function(){return 'bar_' + this.attr('id');} - }); - $('.a').foo().should.equal 'foo_a' - $('.a').bar().should.equal 'bar_a' + }); + $('.a').foo().should.equal 'foo_a' + $('.a').bar().should.equal 'bar_a' end - + it 'can attach and call a namespaced function' - $('#a').concrete('bar', function($){return{ - foo: function(){return this.attr('id');} - }}); - $('.a').concrete('bar').foo().should.equal 'a' + $.concrete('bar', function($){ + $('#a').concrete({ + foo: function(){return this.attr('id');} + }); + }); + $('.a').concrete('bar').foo().should.equal 'a' end - + it 'can attach and call a nested namespaced function' - $('#a').concrete('qux.baz.bar', function($){return{ - foo: function(){return this.attr('id');} - }}); - $('.a').concrete('qux.baz.bar').foo().should.equal 'a' + $.concrete('qux.baz.bar', function($){ + $('#a').concrete({ + foo: function(){return this.attr('id');} + }); + }); + $('.a').concrete('qux.baz.bar').foo().should.equal 'a' end - - it 'can call two functions on two elements' + + it 'can call two functions on two elements' var res = [] $('#a').concrete({ - foo: function(){res.push(this.attr('id'));}, - }) + foo: function(){res.push(this.attr('id'));} + }); $('#b.c').concrete({ - foo: function(){res.push(this.attr('id'));}, - }) + foo: function(){res.push(this.attr('id'));} + }); $('#dom_test div').foo(); res.should.eql ['b', 'a'] end - - it 'can call two namespaced functions on two elements' + + it 'can call two namespaced functions on two elements' var res = [] - $('#a').concrete('bar', function($){return{ - foo: function(){res.push(this.attr('id'));}, - }}) - $('#b.c').concrete('bar', function($){return{ - foo: function(){res.push(this.attr('id'));}, - }}) + $.concrete('bar', function($){ + $('#a').concrete({ + foo: function(){res.push(this.attr('id'));} + }); + $('#b.c').concrete({ + foo: function(){res.push(this.attr('id'));} + }); + }); $('#dom_test div').concrete('bar').foo(); res.should.eql ['b', 'a'] end - + end end diff --git a/thirdparty/jquery-concrete/spec/spec.concrete.namespaces.js b/thirdparty/jquery-concrete/spec/spec.concrete.namespaces.js index b95214c7c..5f99bad51 100644 --- a/thirdparty/jquery-concrete/spec/spec.concrete.namespaces.js +++ b/thirdparty/jquery-concrete/spec/spec.concrete.namespaces.js @@ -109,7 +109,7 @@ describe 'Concrete' it 'internal to namespace, will look up functions in base when not present in namespace' var res = [] $('#a').concrete({ - foo: function(){res.push(1);}, + foo: function(){res.push(1);} }) $('#a').concrete('bar', function($){return{ bar: function(){res.push(2); this.foo();} @@ -121,10 +121,10 @@ describe 'Concrete' it 'internal to namespace, will not look up functions in base if present in namespace, even when not applicable to selector' var res = [] $('#a').concrete('bar', function($){return{ - foo: function(){this.bar();}, + foo: function(){this.bar();} }}) $('#a').concrete({ - bar: function(){res.push(1);}, + bar: function(){res.push(1);} }) $('span').concrete('bar', function($){return{ bar: function(){res.push(2);} @@ -227,10 +227,10 @@ describe 'Concrete' it 'using block functions' var res = [] $('#a').concrete({ - foo: function(){res.push(1);}, + foo: function(){res.push(1);} }) $('#a').concrete('bar', function($){return{ - foo: function(){res.push(3);}, + foo: function(){res.push(3);} }}) $('#dom_test div').foo(); diff --git a/thirdparty/jquery-concrete/src/jquery.concrete.events.js b/thirdparty/jquery-concrete/src/jquery.concrete.events.js index 26434f4d7..c6fcf08f2 100644 --- a/thirdparty/jquery-concrete/src/jquery.concrete.events.js +++ b/thirdparty/jquery-concrete/src/jquery.concrete.events.js @@ -144,6 +144,7 @@ order: 40, bind: function(selector, k, v){ + var match, event; if ($.isFunction(v) && (match = k.match(/^on(.*)/))) { event = match[1]; this.bind_event(selector, k, v, event); diff --git a/thirdparty/jquery-concrete/vendor/jspec/.piston.yml b/thirdparty/jquery-concrete/vendor/jspec/.piston.yml index 3e485bad0..46ea70fc7 100644 --- a/thirdparty/jquery-concrete/vendor/jspec/.piston.yml +++ b/thirdparty/jquery-concrete/vendor/jspec/.piston.yml @@ -1,8 +1,8 @@ --- format: 1 +handler: + commit: 8fe63b186e349433b6da1cd6ec4c9a751fefb13e + branch: master lock: false repository_class: Piston::Git::Repository -handler: - commit: 75336bc94061b818f90361ff163436c8eb61d4c3 - branch: tags/2.8.4 repository_url: git://github.com/visionmedia/jspec.git diff --git a/thirdparty/jquery-concrete/vendor/jspec/History.rdoc b/thirdparty/jquery-concrete/vendor/jspec/History.rdoc index ece2424a0..880f06efc 100644 --- a/thirdparty/jquery-concrete/vendor/jspec/History.rdoc +++ b/thirdparty/jquery-concrete/vendor/jspec/History.rdoc @@ -1,4 +1,83 @@ +=== 2.11.7 / 2009-10-15 + +* Fixed minor grammar issues for windows users [thanks Tony] +* Fixes installation issue when XCode is not present; changed dependency json -> json_pure [thanks esbie] +* Fixed Chrome#visit; latest builds of Chrome for the mac are now "Google Chrome" + +=== 2.11.6 / 2009-10-12 + +* Added Tony to contributor list +* Removed JSpec.paramsFor() +* Removed module contexts [#72] +* Fixed some css styling issues in IE8 [#71] +* Fixed; DOM formatter supporting \r\n \r \n for EOL in the body source [Thanks Tony] +* Fixed "Access is denied" error in IE +* Fixed some css support for older browsers [Thanks Tony] + +=== 2.11.5 / 2009-10-10 + +* Fixed dependencies (created by github's gem builder removal) + +=== 2.11.4 / 2009-10-10 + +* Updated installation docs +* Removed namespaced dependencies (thanks alot github...) + +=== 2.11.3 / 2009-09-30 + +* Updated to mock timers 1.0.1 + fixes an issue where setTimeout(function(){}, 0); tick(100) is never called + +=== 2.11.2 / 2009-09-21 + +* Fixed example path in rails template + +=== 2.11.1 / 2009-09-10 + +* Fixed JSpec root when using --symlink, --freeze [#36] +* Added __END__ to the grammar (works like Ruby's __END__) + +=== 2.11.0 / 2009-09-04 + +* Added --symlink switch (links the current version of JSpec to ./spec/lib) [#4] +* Added --freeze switch (copies the current version of JSpec to ./spec/lib) [#4] + +=== 2.10.1 / 2009-09-02 + +* Added `jspec shell` sub command (interactive Rhino shell through JSpec) +* Added jspec.shell.js + +=== 2.10.0 / 2009-08-27 + +* Added Async support via mock timers (lib/jspec.timers.js) [#19] +* IRC channel up and running! irc://irc.freenode.net#jspec + +=== 2.9.1 / 2009-08-21 + +* Added module support for formatters + +=== 2.9.0 / 2009-08-21 + +* Server output matching Rhino when using verbose or failuresOnly options +* Added mock_request() and unmock_request() as aliases for mockRequest() and unmockRequest() +* Added JSpec.JSON.encode() +* Added default Sinatra routes /slow/NUMBER and /status/NUMBER for simulating + slow reponses and HTTP status codes. +* Added server support for loading spec/jspec.rb (or jspec/jspec.rb for rails) + Allowing additional browser support to be plugged in, as well as Sinatra routes. +* Added dependency for Sinatra (new server) +* Added a new Ruby server +* Added support for --bind and --server on various platforms +* Added Google Chrome support +* Added Internet Explorer support +* Change; --server without --browsers defaults to all supported browsers +* Removed JSpec.reportToServer() + Now utilizes JSpec.formatters.Server to handle this + functionality. +* Fixed Server output escaping (removed html escaping from puts()) [#13] +* Fixed JSpec.load(); returns responseText when 2xx or 0 (for file://) + === 2.8.4 / 2009-08-02 * Fixed error thrown when a module has no utilities diff --git a/thirdparty/jquery-concrete/vendor/jspec/Manifest b/thirdparty/jquery-concrete/vendor/jspec/Manifest index c2ce47494..f5f1f4cf3 100644 --- a/thirdparty/jquery-concrete/vendor/jspec/Manifest +++ b/thirdparty/jquery-concrete/vendor/jspec/Manifest @@ -1,5 +1,8 @@ -bin/jspec History.rdoc +Manifest +README.rdoc +Rakefile +bin/jspec jspec.gemspec lib/images/bg.png lib/images/hr.png @@ -10,18 +13,20 @@ lib/images/vr.png lib/jspec.css lib/jspec.jquery.js lib/jspec.js +lib/jspec.shell.js +lib/jspec.timers.js lib/jspec.xhr.js -Manifest -Rakefile -README.rdoc server/browsers.rb +server/helpers.rb +server/routes.rb server/server.rb spec/async spec/env.js spec/fixtures/test.html spec/fixtures/test.json spec/fixtures/test.xml -spec/modules.js +spec/helpers.js +spec/server.rb spec/spec.dom.html spec/spec.fixtures.js spec/spec.grammar-less.js @@ -38,12 +43,14 @@ spec/spec.shared-behaviors.js spec/spec.utils.js spec/spec.xhr.js templates/default/History.rdoc -templates/default/lib/yourlib.core.js templates/default/README.rdoc +templates/default/lib/yourlib.core.js +templates/default/spec/server.rb templates/default/spec/spec.core.js templates/default/spec/spec.dom.html templates/default/spec/spec.rhino.js templates/default/spec/spec.server.html +templates/rails/server.rb templates/rails/spec.application.js templates/rails/spec.dom.html templates/rails/spec.rhino.js diff --git a/thirdparty/jquery-concrete/vendor/jspec/README.rdoc b/thirdparty/jquery-concrete/vendor/jspec/README.rdoc index 9c6501114..6e09fa6a2 100644 --- a/thirdparty/jquery-concrete/vendor/jspec/README.rdoc +++ b/thirdparty/jquery-concrete/vendor/jspec/README.rdoc @@ -33,6 +33,7 @@ and much more. * Method Stubbing * Shared behaviors * Profiling +* Interactive Shell * Ruby on Rails Integration * Tiny (15 kb compressed, 1300-ish LOC) @@ -42,13 +43,19 @@ Simply download JSpec and include JSpec.css and JSpec.js in your markup. Head over to the downloads section on Github, clone this public repo, or add JSpec as a git submodule with in your project. Alternatively JSpec is also available as a Ruby Gem (though this is not required), which also -provides the `jspec` executable. To install execute: - $ gem sources -a http://gems.github.com (if you have not previously done so) - $ sudo gem install visionmedia-jspec +provides the `jspec` executable. First install [Gemcutter](http://gemcutter.org/) then execute: + $ sudo gem install jspec At which point you may: $ jspec init myproject +By default, the command above will use absolute path for all JSpec library files. +This behavior can be a problem when you're working across different computers or +operating systems. You can freeze the library or symlink it. + + $ jspec init myproject --freeze + $ jspec init myproject --symlink + JSpec scripts should NOT be referenced via the - + + diff --git a/thirdparty/jquery-concrete/vendor/jspec/spec/spec.grammar.js b/thirdparty/jquery-concrete/vendor/jspec/spec/spec.grammar.js index 4cd1bcb8c..3b3add2d7 100644 --- a/thirdparty/jquery-concrete/vendor/jspec/spec/spec.grammar.js +++ b/thirdparty/jquery-concrete/vendor/jspec/spec/spec.grammar.js @@ -215,4 +215,12 @@ describe 'Grammar' end end +end + +__END__ + +describe 'Grammar' + it 'should consider everything below __END__ a comment' + + end end \ No newline at end of file diff --git a/thirdparty/jquery-concrete/vendor/jspec/spec/spec.jquery.js b/thirdparty/jquery-concrete/vendor/jspec/spec/spec.jquery.js index 3712b4387..6f94e1dd3 100644 --- a/thirdparty/jquery-concrete/vendor/jspec/spec/spec.jquery.js +++ b/thirdparty/jquery-concrete/vendor/jspec/spec/spec.jquery.js @@ -20,16 +20,16 @@ describe 'jQuery' describe 'async' it 'should load mah cookies (textfile)' - $.post('async', function(text){ + $.get('async', function(text){ text.should_eql 'cookies!' }) end it 'should load mah cookies twice (ensure multiple async requests work)' - $.post('async', function(text){ + $.get('async', function(text){ text.should.eql 'cookies!' }) - $.post('async', function(text){ + $.get('async', function(text){ text.should.not.eql 'rawr' }) end @@ -49,7 +49,10 @@ describe 'jQuery' end it 'should fail with pretty print of element' - elem.should.not.have_tag 'label' + spec = mock_it(function() { + elem.should.not.have_tag 'label' + }) + spec.should.have_failure_message(/