Permalink
Browse files

MINOR Updated jquery-concrete to 0.9 release

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92560 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 0e93bce commit 83267cdd450cb67bcd08ed9222ff64150eff410a @chillu chillu committed Nov 21, 2009
Showing with 1,556 additions and 599 deletions.
  1. +1 −1 thirdparty/jquery-concrete/.piston.yml
  2. +32 −27 thirdparty/jquery-concrete/README.textile
  3. +1 −0 thirdparty/jquery-concrete/dist/jquery.concrete-dist.js
  4. +40 −34 thirdparty/jquery-concrete/spec/spec.concrete.basics.js
  5. +5 −5 thirdparty/jquery-concrete/spec/spec.concrete.namespaces.js
  6. +1 −0 thirdparty/jquery-concrete/src/jquery.concrete.events.js
  7. +3 −3 thirdparty/jquery-concrete/vendor/jspec/.piston.yml
  8. +79 −0 thirdparty/jquery-concrete/vendor/jspec/History.rdoc
  9. +13 −6 thirdparty/jquery-concrete/vendor/jspec/Manifest
  10. +119 −18 thirdparty/jquery-concrete/vendor/jspec/README.rdoc
  11. +4 −2 thirdparty/jquery-concrete/vendor/jspec/Rakefile
  12. +153 −30 thirdparty/jquery-concrete/vendor/jspec/bin/jspec
  13. +16 −10 thirdparty/jquery-concrete/vendor/jspec/jspec.gemspec
  14. +8 −6 thirdparty/jquery-concrete/vendor/jspec/lib/jspec.css
  15. +4 −3 thirdparty/jquery-concrete/vendor/jspec/lib/jspec.jquery.js
  16. +218 −157 thirdparty/jquery-concrete/vendor/jspec/lib/jspec.js
  17. +36 −0 thirdparty/jquery-concrete/vendor/jspec/lib/jspec.shell.js
  18. +90 −0 thirdparty/jquery-concrete/vendor/jspec/lib/jspec.timers.js
  19. +64 −54 thirdparty/jquery-concrete/vendor/jspec/lib/jspec.xhr.js
  20. +222 −10 thirdparty/jquery-concrete/vendor/jspec/server/browsers.rb
  21. +82 −0 thirdparty/jquery-concrete/vendor/jspec/server/helpers.rb
  22. +57 −0 thirdparty/jquery-concrete/vendor/jspec/server/routes.rb
  23. +70 −82 thirdparty/jquery-concrete/vendor/jspec/server/server.rb
  24. +62 −0 thirdparty/jquery-concrete/vendor/jspec/spec/helpers.js
  25. +0 −42 thirdparty/jquery-concrete/vendor/jspec/spec/modules.js
  26. +2 −0 thirdparty/jquery-concrete/vendor/jspec/spec/server.rb
  27. +3 −2 thirdparty/jquery-concrete/vendor/jspec/spec/spec.dom.html
  28. +8 −0 thirdparty/jquery-concrete/vendor/jspec/spec/spec.grammar.js
  29. +7 −4 thirdparty/jquery-concrete/vendor/jspec/spec/spec.jquery.js
  30. +30 −0 thirdparty/jquery-concrete/vendor/jspec/spec/spec.jquery.xhr.js
  31. +89 −50 thirdparty/jquery-concrete/vendor/jspec/spec/spec.js
  32. +1 −0 thirdparty/jquery-concrete/vendor/jspec/spec/spec.matchers.js
  33. +0 −16 thirdparty/jquery-concrete/vendor/jspec/spec/spec.modules.js
  34. +1 −1 thirdparty/jquery-concrete/vendor/jspec/spec/spec.rhino.js
  35. +6 −6 thirdparty/jquery-concrete/vendor/jspec/spec/spec.server.html
  36. +4 −18 thirdparty/jquery-concrete/vendor/jspec/spec/spec.utils.js
  37. +6 −1 thirdparty/jquery-concrete/vendor/jspec/spec/spec.xhr.js
  38. +4 −0 thirdparty/jquery-concrete/vendor/jspec/templates/default/spec/server.rb
  39. +1 −1 thirdparty/jquery-concrete/vendor/jspec/templates/default/spec/spec.rhino.js
  40. +4 −4 thirdparty/jquery-concrete/vendor/jspec/templates/default/spec/spec.server.html
  41. +4 −0 thirdparty/jquery-concrete/vendor/jspec/templates/rails/server.rb
  42. +2 −2 thirdparty/jquery-concrete/vendor/jspec/templates/rails/spec.rhino.js
  43. +4 −4 thirdparty/jquery-concrete/vendor/jspec/templates/rails/spec.server.html
@@ -1,7 +1,7 @@
---
format: 1
handler:
- commit: 767bc6d5ae87459cc6534ddcf91054d28fdd252c
+ commit: bae4684bd5ab659bd78ebd990cc68ecba8a36669
branch: master
lock: false
repository_class: Piston::Git::Repository
@@ -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
<pre><code>
- $('div').concrete('foo.bar', function($){ return {
+ $.concrete('foo.bar', function($){
+ $('div').concrete({
baz: function(){}
- }});
+ });
+ });
</code></pre>
-
+
You can then call these functions like this:
<pre><code>
@@ -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'}); }
- }});
+ });
+ });
</code></pre>
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
<pre><code>
- $('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
<pre><code>
- $('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
-
-<pre><code>
- $.concrete('foo', function($){
- $('div').concrete({
- bar: function() { .. }
- })
- })
-</code></pre>
+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
<pre><code>
- $('div').concrete('foo', {
- bar: function() { this.concrete('.').baz(); }
+ $.concrete('foo', function($){
+ $('div').concrete({
+ bar: function() { this.concrete('.').baz(); }
+ })
})
</code></pre>
@@ -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
<pre><code>
- $('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();
});
</code></pre>
@@ -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);
@@ -2,71 +2,77 @@
describe 'Concrete'
describe 'Basics'
before
- $.concrete.warningLevel = $.concrete.WARN_LEVEL_BESTPRACTISE;
- $('body').append('<div id="dom_test"></div>')
+ $.concrete.warningLevel = $.concrete.WARN_LEVEL_BESTPRACTISE;
+ $('body').append('<div id="dom_test"></div>');
end
after
- $('#dom_test').remove()
+ $('#dom_test').remove();
end
before_each
- $.concrete.clear_all_rules()
- $('#dom_test').html('<div id="a" class="a b c"></div><div id="b" class="c d e"></div>')
+ $.concrete.clear_all_rules();
+ $('#dom_test').html('<div id="a" class="a b c"></div><div id="b" class="c d e"></div>');
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
@@ -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();
@@ -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);
@@ -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
@@ -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
Oops, something went wrong.

0 comments on commit 83267cd

Please sign in to comment.