bivouac 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +15 -0
- data/bin/bivouac +5 -10
- data/doc/rdoc/classes/BivouacHelpers/HtmlView.html +46 -37
- data/doc/rdoc/classes/BivouacHelpers/ScriptAculoUsView.html +27 -20
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/README.html +45 -1
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/html_rb.html +1 -1
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/javascript_rb.html +1 -1
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html +1 -1
- data/examples/bivouac_sample/Rakefile +0 -0
- data/examples/bivouac_sample/app/controllers/toggle_sortable.rb +2 -1
- data/examples/bivouac_sample/app/views/_sortable_result.rb +1 -1
- data/examples/bivouac_sample/script/console +0 -0
- data/examples/bivouac_sample/script/generate +0 -0
- data/examples/bivouac_sample/script/plugin +0 -0
- data/examples/bivouac_sample/script/server +0 -0
- data/examples/blog/Rakefile +56 -0
- data/examples/blog/app/blog.rb +107 -0
- data/examples/blog/app/controllers/comment.rb +17 -0
- data/examples/blog/app/controllers/index.rb +15 -0
- data/examples/blog/app/controllers/login.rb +33 -0
- data/examples/blog/app/controllers/logout.rb +15 -0
- data/examples/blog/app/controllers/not_found.rb +14 -0
- data/examples/blog/app/controllers/post.rb +48 -0
- data/examples/blog/app/helpers/_helpers.rb +30 -0
- data/examples/blog/app/helpers/blog.rb +14 -0
- data/examples/blog/app/models/comment.rb +18 -0
- data/examples/blog/app/models/post.rb +19 -0
- data/examples/blog/app/models/user.rb +12 -0
- data/examples/blog/app/views/_partials.rb +81 -0
- data/examples/blog/app/views/index/index.rb +23 -0
- data/examples/blog/app/views/layouts/default_layout.rb +40 -0
- data/examples/blog/app/views/login/login.rb +27 -0
- data/examples/blog/app/views/not_found.rb +13 -0
- data/examples/blog/app/views/post/add.rb +12 -0
- data/examples/blog/app/views/post/edit.rb +12 -0
- data/examples/blog/app/views/post/view.rb +14 -0
- data/examples/blog/config/console.rc +12 -0
- data/examples/blog/config/database.yml +3 -0
- data/examples/blog/config/environment.rb +58 -0
- data/examples/blog/db/blog.db +0 -0
- data/examples/blog/db/create.rb +11 -0
- data/examples/blog/db/migrate/001_users.rb +22 -0
- data/examples/blog/db/migrate/002_posts.rb +24 -0
- data/examples/blog/db/migrate/003_comments.rb +24 -0
- data/examples/blog/log/Blog.log +382 -0
- data/examples/{blog_goh → blog}/public/images/camping.png +0 -0
- data/examples/{blog_goh → blog}/public/index.html +3 -2
- data/examples/blog/public/javascripts/builder.js +136 -0
- data/examples/blog/public/javascripts/controls.js +965 -0
- data/examples/blog/public/javascripts/dragdrop.js +974 -0
- data/examples/blog/public/javascripts/effects.js +1122 -0
- data/examples/blog/public/javascripts/prototype.js +4320 -0
- data/examples/blog/public/javascripts/scriptaculous.js +58 -0
- data/examples/blog/public/javascripts/slider.js +275 -0
- data/examples/blog/public/javascripts/sound.js +55 -0
- data/examples/blog/public/javascripts/unittest.js +568 -0
- data/examples/blog/public/stylesheets/autocomplete.css +22 -0
- data/examples/blog/public/stylesheets/blog.css +107 -0
- data/examples/blog/script/console +12 -0
- data/examples/blog/script/generate +17 -0
- data/examples/blog/script/plugin +16 -0
- data/examples/blog/script/server +135 -0
- data/examples/blog/test/test_comment.rb +22 -0
- data/examples/blog/test/test_index.rb +22 -0
- data/examples/blog/test/test_login.rb +22 -0
- data/examples/blog/test/test_logout.rb +18 -0
- data/examples/blog/test/test_post.rb +30 -0
- data/examples/blog/test/test_post_new.rb +22 -0
- data/lib/bivouac.rb +2 -2
- data/lib/bivouac/commands/generate.rb +48 -8
- data/lib/bivouac/commands/plugin.rb +30 -15
- data/lib/bivouac/ext/filtering_camping.rb +46 -0
- data/lib/bivouac/helpers/view/goh/html.rb +9 -0
- data/lib/bivouac/helpers/view/goh/scriptaculous.rb +12 -8
- data/lib/bivouac/tasks/bivouac.rb +1 -0
- data/lib/bivouac/tasks/framework.rake +8 -8
- data/lib/bivouac/tasks/plugins.rake +17 -1
- data/lib/bivouac/template.rb +0 -0
- data/lib/bivouac/template/{application_goh.rb → application.rb} +36 -12
- data/lib/bivouac/template/application/{helpers_goh.rb → helpers.rb} +1 -1
- data/lib/bivouac/template/console.rb +2 -4
- data/lib/bivouac/template/environment.rb +1 -1
- data/lib/bivouac/template/generate.rb +0 -0
- data/lib/bivouac/template/generate/create.rb +0 -0
- data/lib/bivouac/template/generate/helper.rb +12 -0
- data/lib/bivouac/template/generate/migrate.rb +0 -0
- data/lib/bivouac/template/generate/migrate_end.rb +1 -0
- data/lib/bivouac/template/plugin.rb +6 -1
- data/lib/bivouac/template/server.rb +124 -3
- data/lib/bivouac/template/static/builder.js +19 -19
- data/lib/bivouac/template/static/controls.js +74 -74
- data/lib/bivouac/template/static/dragdrop.js +167 -166
- data/lib/bivouac/template/static/effects.js +171 -163
- data/lib/bivouac/template/static/not_found_controller.rb +8 -4
- data/lib/bivouac/template/static/prototype.js +218 -119
- data/lib/bivouac/template/static/scriptaculous.js +22 -20
- data/lib/bivouac/template/static/slider.js +39 -39
- data/lib/bivouac/template/static/sound.js +11 -11
- data/lib/bivouac/template/static/unittest.js +16 -16
- metadata +96 -60
- data/examples/blog_goh/app/blog.rb +0 -72
- data/examples/blog_goh/app/controllers/add.rb +0 -19
- data/examples/blog_goh/app/controllers/comment.rb +0 -9
- data/examples/blog_goh/app/controllers/edit.rb +0 -18
- data/examples/blog_goh/app/controllers/index.rb +0 -8
- data/examples/blog_goh/app/controllers/info.rb +0 -11
- data/examples/blog_goh/app/controllers/login.rb +0 -15
- data/examples/blog_goh/app/controllers/logout.rb +0 -8
- data/examples/blog_goh/app/controllers/view.rb +0 -9
- data/examples/blog_goh/app/models/comment.rb +0 -5
- data/examples/blog_goh/app/models/post.rb +0 -5
- data/examples/blog_goh/app/models/user.rb +0 -4
- data/examples/blog_goh/app/views/_form.rb +0 -16
- data/examples/blog_goh/app/views/_login.rb +0 -13
- data/examples/blog_goh/app/views/_post.rb +0 -9
- data/examples/blog_goh/app/views/add.rb +0 -9
- data/examples/blog_goh/app/views/edit.rb +0 -9
- data/examples/blog_goh/app/views/index.rb +0 -12
- data/examples/blog_goh/app/views/layout.rb +0 -18
- data/examples/blog_goh/app/views/login.rb +0 -6
- data/examples/blog_goh/app/views/logout.rb +0 -6
- data/examples/blog_goh/app/views/view.rb +0 -20
- data/examples/blog_goh/config/environment.rb +0 -27
- data/examples/blog_goh/db/Blog.db +0 -0
- data/examples/blog_goh/db/create.rb +0 -8
- data/examples/blog_goh/db/migrate/comment.rb +0 -15
- data/examples/blog_goh/db/migrate/post.rb +0 -15
- data/examples/blog_goh/db/migrate/user.rb +0 -15
- data/examples/blog_goh/log/Blog.log +0 -75
- data/examples/blog_goh/public/stylesheets/style.css +0 -10
- data/examples/blog_goh/script/generate +0 -3
- data/examples/blog_goh/script/server +0 -5
- data/lib/bivouac/template/application/postamble.rb +0 -195
- data/lib/camping/cookies_sessions.rb +0 -39
@@ -1,7 +1,7 @@
|
|
1
|
-
// script.aculo.us scriptaculous.js v1.8.
|
1
|
+
// script.aculo.us scriptaculous.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
|
2
2
|
|
3
|
-
// Copyright (c) 2005-
|
4
|
-
//
|
3
|
+
// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
4
|
+
//
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining
|
6
6
|
// a copy of this software and associated documentation files (the
|
7
7
|
// "Software"), to deal in the Software without restriction, including
|
@@ -9,7 +9,7 @@
|
|
9
9
|
// distribute, sublicense, and/or sell copies of the Software, and to
|
10
10
|
// permit persons to whom the Software is furnished to do so, subject to
|
11
11
|
// the following conditions:
|
12
|
-
//
|
12
|
+
//
|
13
13
|
// The above copyright notice and this permission notice shall be
|
14
14
|
// included in all copies or substantial portions of the Software.
|
15
15
|
//
|
@@ -24,35 +24,37 @@
|
|
24
24
|
// For details, see the script.aculo.us web site: http://script.aculo.us/
|
25
25
|
|
26
26
|
var Scriptaculous = {
|
27
|
-
Version: '1.8.
|
27
|
+
Version: '1.8.2',
|
28
28
|
require: function(libraryName) {
|
29
29
|
// inserting via DOM fails in Safari 2.0, so brute force approach
|
30
30
|
document.write('<script type="text/javascript" src="'+libraryName+'"><\/script>');
|
31
31
|
},
|
32
|
-
REQUIRED_PROTOTYPE: '1.6.0',
|
32
|
+
REQUIRED_PROTOTYPE: '1.6.0.3',
|
33
33
|
load: function() {
|
34
|
-
function convertVersionString(versionString){
|
35
|
-
var
|
36
|
-
|
34
|
+
function convertVersionString(versionString) {
|
35
|
+
var v = versionString.replace(/_.*|\./g, '');
|
36
|
+
v = parseInt(v + '0'.times(4-v.length));
|
37
|
+
return versionString.indexOf('_') > -1 ? v-1 : v;
|
37
38
|
}
|
38
|
-
|
39
|
-
if((typeof Prototype=='undefined') ||
|
40
|
-
(typeof Element == 'undefined') ||
|
39
|
+
|
40
|
+
if((typeof Prototype=='undefined') ||
|
41
|
+
(typeof Element == 'undefined') ||
|
41
42
|
(typeof Element.Methods=='undefined') ||
|
42
|
-
(convertVersionString(Prototype.Version) <
|
43
|
+
(convertVersionString(Prototype.Version) <
|
43
44
|
convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE)))
|
44
45
|
throw("script.aculo.us requires the Prototype JavaScript framework >= " +
|
45
46
|
Scriptaculous.REQUIRED_PROTOTYPE);
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
var
|
47
|
+
|
48
|
+
var js = /scriptaculous\.js(\?.*)?$/;
|
49
|
+
$$('head script[src]').findAll(function(s) {
|
50
|
+
return s.src.match(js);
|
51
|
+
}).each(function(s) {
|
52
|
+
var path = s.src.replace(js, ''),
|
53
|
+
includes = s.src.match(/\?.*load=([a-z,]*)/);
|
52
54
|
(includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound').split(',').each(
|
53
55
|
function(include) { Scriptaculous.require(path+include+'.js') });
|
54
56
|
});
|
55
57
|
}
|
56
|
-
}
|
58
|
+
};
|
57
59
|
|
58
60
|
Scriptaculous.load();
|
@@ -1,6 +1,6 @@
|
|
1
|
-
// script.aculo.us slider.js v1.8.
|
1
|
+
// script.aculo.us slider.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
|
2
2
|
|
3
|
-
// Copyright (c) 2005-
|
3
|
+
// Copyright (c) 2005-2008 Marty Haught, Thomas Fuchs
|
4
4
|
//
|
5
5
|
// script.aculo.us is freely distributable under the terms of an MIT-style license.
|
6
6
|
// For details, see the script.aculo.us web site: http://script.aculo.us/
|
@@ -16,13 +16,13 @@ if (!Control) var Control = { };
|
|
16
16
|
Control.Slider = Class.create({
|
17
17
|
initialize: function(handle, track, options) {
|
18
18
|
var slider = this;
|
19
|
-
|
19
|
+
|
20
20
|
if (Object.isArray(handle)) {
|
21
21
|
this.handles = handle.collect( function(e) { return $(e) });
|
22
22
|
} else {
|
23
23
|
this.handles = [$(handle)];
|
24
24
|
}
|
25
|
-
|
25
|
+
|
26
26
|
this.track = $(track);
|
27
27
|
this.options = options || { };
|
28
28
|
|
@@ -30,7 +30,7 @@ Control.Slider = Class.create({
|
|
30
30
|
this.increment = this.options.increment || 1;
|
31
31
|
this.step = parseInt(this.options.step || '1');
|
32
32
|
this.range = this.options.range || $R(0,1);
|
33
|
-
|
33
|
+
|
34
34
|
this.value = 0; // assure backwards compat
|
35
35
|
this.values = this.handles.map( function() { return 0 });
|
36
36
|
this.spans = this.options.spans ? this.options.spans.map(function(s){ return $(s) }) : false;
|
@@ -45,13 +45,13 @@ Control.Slider = Class.create({
|
|
45
45
|
// Will be used to align the handle onto the track, if necessary
|
46
46
|
this.alignX = parseInt(this.options.alignX || '0');
|
47
47
|
this.alignY = parseInt(this.options.alignY || '0');
|
48
|
-
|
48
|
+
|
49
49
|
this.trackLength = this.maximumOffset() - this.minimumOffset();
|
50
50
|
|
51
|
-
this.handleLength = this.isVertical() ?
|
52
|
-
(this.handles[0].offsetHeight != 0 ?
|
53
|
-
this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) :
|
54
|
-
(this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth :
|
51
|
+
this.handleLength = this.isVertical() ?
|
52
|
+
(this.handles[0].offsetHeight != 0 ?
|
53
|
+
this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) :
|
54
|
+
(this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth :
|
55
55
|
this.handles[0].style.width.replace(/px$/,""));
|
56
56
|
|
57
57
|
this.active = false;
|
@@ -75,20 +75,20 @@ Control.Slider = Class.create({
|
|
75
75
|
this.handles.each( function(h,i) {
|
76
76
|
i = slider.handles.length-1-i;
|
77
77
|
slider.setValue(parseFloat(
|
78
|
-
(Object.isArray(slider.options.sliderValue) ?
|
79
|
-
slider.options.sliderValue[i] : slider.options.sliderValue) ||
|
78
|
+
(Object.isArray(slider.options.sliderValue) ?
|
79
|
+
slider.options.sliderValue[i] : slider.options.sliderValue) ||
|
80
80
|
slider.range.start), i);
|
81
81
|
h.makePositioned().observe("mousedown", slider.eventMouseDown);
|
82
82
|
});
|
83
|
-
|
83
|
+
|
84
84
|
this.track.observe("mousedown", this.eventMouseDown);
|
85
85
|
document.observe("mouseup", this.eventMouseUp);
|
86
86
|
document.observe("mousemove", this.eventMouseMove);
|
87
|
-
|
87
|
+
|
88
88
|
this.initialized = true;
|
89
89
|
},
|
90
90
|
dispose: function() {
|
91
|
-
var slider = this;
|
91
|
+
var slider = this;
|
92
92
|
Event.stopObserving(this.track, "mousedown", this.eventMouseDown);
|
93
93
|
Event.stopObserving(document, "mouseup", this.eventMouseUp);
|
94
94
|
Event.stopObserving(document, "mousemove", this.eventMouseMove);
|
@@ -101,12 +101,12 @@ Control.Slider = Class.create({
|
|
101
101
|
},
|
102
102
|
setEnabled: function(){
|
103
103
|
this.disabled = false;
|
104
|
-
},
|
104
|
+
},
|
105
105
|
getNearestValue: function(value){
|
106
106
|
if (this.allowedValues){
|
107
107
|
if (value >= this.allowedValues.max()) return(this.allowedValues.max());
|
108
108
|
if (value <= this.allowedValues.min()) return(this.allowedValues.min());
|
109
|
-
|
109
|
+
|
110
110
|
var offset = Math.abs(this.allowedValues[0] - value);
|
111
111
|
var newValue = this.allowedValues[0];
|
112
112
|
this.allowedValues.each( function(v) {
|
@@ -114,7 +114,7 @@ Control.Slider = Class.create({
|
|
114
114
|
if (currentOffset <= offset){
|
115
115
|
newValue = v;
|
116
116
|
offset = currentOffset;
|
117
|
-
}
|
117
|
+
}
|
118
118
|
});
|
119
119
|
return newValue;
|
120
120
|
}
|
@@ -138,28 +138,28 @@ Control.Slider = Class.create({
|
|
138
138
|
sliderValue = this.getNearestValue(sliderValue);
|
139
139
|
this.values[handleIdx] = sliderValue;
|
140
140
|
this.value = this.values[0]; // assure backwards compat
|
141
|
-
|
142
|
-
this.handles[handleIdx].style[this.isVertical() ? 'top' : 'left'] =
|
141
|
+
|
142
|
+
this.handles[handleIdx].style[this.isVertical() ? 'top' : 'left'] =
|
143
143
|
this.translateToPx(sliderValue);
|
144
|
-
|
144
|
+
|
145
145
|
this.drawSpans();
|
146
146
|
if (!this.dragging || !this.event) this.updateFinished();
|
147
147
|
},
|
148
148
|
setValueBy: function(delta, handleIdx) {
|
149
|
-
this.setValue(this.values[handleIdx || this.activeHandleIdx || 0] + delta,
|
149
|
+
this.setValue(this.values[handleIdx || this.activeHandleIdx || 0] + delta,
|
150
150
|
handleIdx || this.activeHandleIdx || 0);
|
151
151
|
},
|
152
152
|
translateToPx: function(value) {
|
153
153
|
return Math.round(
|
154
|
-
((this.trackLength-this.handleLength)/(this.range.end-this.range.start)) *
|
154
|
+
((this.trackLength-this.handleLength)/(this.range.end-this.range.start)) *
|
155
155
|
(value - this.range.start)) + "px";
|
156
156
|
},
|
157
157
|
translateToValue: function(offset) {
|
158
|
-
return ((offset/(this.trackLength-this.handleLength) *
|
158
|
+
return ((offset/(this.trackLength-this.handleLength) *
|
159
159
|
(this.range.end-this.range.start)) + this.range.start);
|
160
160
|
},
|
161
161
|
getRange: function(range) {
|
162
|
-
var v = this.values.sortBy(Prototype.K);
|
162
|
+
var v = this.values.sortBy(Prototype.K);
|
163
163
|
range = range || 0;
|
164
164
|
return $R(v[range],v[range+1]);
|
165
165
|
},
|
@@ -167,12 +167,12 @@ Control.Slider = Class.create({
|
|
167
167
|
return(this.isVertical() ? this.alignY : this.alignX);
|
168
168
|
},
|
169
169
|
maximumOffset: function(){
|
170
|
-
return(this.isVertical() ?
|
170
|
+
return(this.isVertical() ?
|
171
171
|
(this.track.offsetHeight != 0 ? this.track.offsetHeight :
|
172
|
-
this.track.style.height.replace(/px$/,"")) - this.alignY :
|
173
|
-
(this.track.offsetWidth != 0 ? this.track.offsetWidth :
|
172
|
+
this.track.style.height.replace(/px$/,"")) - this.alignY :
|
173
|
+
(this.track.offsetWidth != 0 ? this.track.offsetWidth :
|
174
174
|
this.track.style.width.replace(/px$/,"")) - this.alignX);
|
175
|
-
},
|
175
|
+
},
|
176
176
|
isVertical: function(){
|
177
177
|
return (this.axis == 'vertical');
|
178
178
|
},
|
@@ -184,7 +184,7 @@ Control.Slider = Class.create({
|
|
184
184
|
this.setSpan(this.options.startSpan,
|
185
185
|
$R(0, this.values.length>1 ? this.getRange(0).min() : this.value ));
|
186
186
|
if (this.options.endSpan)
|
187
|
-
this.setSpan(this.options.endSpan,
|
187
|
+
this.setSpan(this.options.endSpan,
|
188
188
|
$R(this.values.length>1 ? this.getRange(this.spans.length-1).max() : this.value, this.maximum));
|
189
189
|
},
|
190
190
|
setSpan: function(span, range) {
|
@@ -204,14 +204,14 @@ Control.Slider = Class.create({
|
|
204
204
|
if (Event.isLeftClick(event)) {
|
205
205
|
if (!this.disabled){
|
206
206
|
this.active = true;
|
207
|
-
|
207
|
+
|
208
208
|
var handle = Event.element(event);
|
209
209
|
var pointer = [Event.pointerX(event), Event.pointerY(event)];
|
210
210
|
var track = handle;
|
211
211
|
if (track==this.track) {
|
212
|
-
var offsets = Position.cumulativeOffset(this.track);
|
212
|
+
var offsets = Position.cumulativeOffset(this.track);
|
213
213
|
this.event = event;
|
214
|
-
this.setValue(this.translateToValue(
|
214
|
+
this.setValue(this.translateToValue(
|
215
215
|
(this.isVertical() ? pointer[1]-offsets[1] : pointer[0]-offsets[0])-(this.handleLength/2)
|
216
216
|
));
|
217
217
|
var offsets = Position.cumulativeOffset(this.activeHandle);
|
@@ -219,14 +219,14 @@ Control.Slider = Class.create({
|
|
219
219
|
this.offsetY = (pointer[1] - offsets[1]);
|
220
220
|
} else {
|
221
221
|
// find the handle (prevents issues with Safari)
|
222
|
-
while((this.handles.indexOf(handle) == -1) && handle.parentNode)
|
222
|
+
while((this.handles.indexOf(handle) == -1) && handle.parentNode)
|
223
223
|
handle = handle.parentNode;
|
224
|
-
|
224
|
+
|
225
225
|
if (this.handles.indexOf(handle)!=-1) {
|
226
226
|
this.activeHandle = handle;
|
227
227
|
this.activeHandleIdx = this.handles.indexOf(this.activeHandle);
|
228
228
|
this.updateStyles();
|
229
|
-
|
229
|
+
|
230
230
|
var offsets = Position.cumulativeOffset(this.activeHandle);
|
231
231
|
this.offsetX = (pointer[0] - offsets[0]);
|
232
232
|
this.offsetY = (pointer[1] - offsets[1]);
|
@@ -261,15 +261,15 @@ Control.Slider = Class.create({
|
|
261
261
|
}
|
262
262
|
this.active = false;
|
263
263
|
this.dragging = false;
|
264
|
-
},
|
264
|
+
},
|
265
265
|
finishDrag: function(event, success) {
|
266
266
|
this.active = false;
|
267
267
|
this.dragging = false;
|
268
268
|
this.updateFinished();
|
269
269
|
},
|
270
270
|
updateFinished: function() {
|
271
|
-
if (this.initialized && this.options.onChange)
|
271
|
+
if (this.initialized && this.options.onChange)
|
272
272
|
this.options.onChange(this.values.length>1 ? this.values : this.value, this);
|
273
273
|
this.event = null;
|
274
274
|
}
|
275
|
-
});
|
275
|
+
});
|
@@ -1,6 +1,6 @@
|
|
1
|
-
// script.aculo.us sound.js v1.8.
|
1
|
+
// script.aculo.us sound.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
|
2
2
|
|
3
|
-
// Copyright (c) 2005-
|
3
|
+
// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
4
4
|
//
|
5
5
|
// Based on code created by Jules Gravinese (http://www.webveteran.com/)
|
6
6
|
//
|
@@ -23,23 +23,23 @@ Sound = {
|
|
23
23
|
var options = Object.extend({
|
24
24
|
track: 'global', url: url, replace: false
|
25
25
|
}, arguments[1] || {});
|
26
|
-
|
26
|
+
|
27
27
|
if(options.replace && this.tracks[options.track]) {
|
28
28
|
$R(0, this.tracks[options.track].id).each(function(id){
|
29
29
|
var sound = $('sound_'+options.track+'_'+id);
|
30
30
|
sound.Stop && sound.Stop();
|
31
31
|
sound.remove();
|
32
|
-
})
|
32
|
+
});
|
33
33
|
this.tracks[options.track] = null;
|
34
34
|
}
|
35
|
-
|
35
|
+
|
36
36
|
if(!this.tracks[options.track])
|
37
|
-
this.tracks[options.track] = { id: 0 }
|
37
|
+
this.tracks[options.track] = { id: 0 };
|
38
38
|
else
|
39
39
|
this.tracks[options.track].id++;
|
40
|
-
|
40
|
+
|
41
41
|
options.id = this.tracks[options.track].id;
|
42
|
-
$$('body')[0].insert(
|
42
|
+
$$('body')[0].insert(
|
43
43
|
Prototype.Browser.IE ? new Element('bgsound',{
|
44
44
|
id: 'sound_'+options.track+'_'+options.id,
|
45
45
|
src: options.url, loop: 1, autostart: true
|
@@ -49,7 +49,7 @@ Sound = {
|
|
49
49
|
|
50
50
|
if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){
|
51
51
|
if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 }))
|
52
|
-
Sound.template = new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>')
|
52
|
+
Sound.template = new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>');
|
53
53
|
else
|
54
|
-
Sound.play = function(){}
|
55
|
-
}
|
54
|
+
Sound.play = function(){};
|
55
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
// script.aculo.us unittest.js v1.8.
|
1
|
+
// script.aculo.us unittest.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
|
2
2
|
|
3
|
-
// Copyright (c) 2005-
|
4
|
-
// (c) 2005-
|
5
|
-
// (c) 2005-
|
3
|
+
// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
4
|
+
// (c) 2005-2008 Jon Tirsen (http://www.tirsen.com)
|
5
|
+
// (c) 2005-2008 Michael Schuerig (http://www.schuerig.de/michael/)
|
6
6
|
//
|
7
7
|
// script.aculo.us is freely distributable under the terms of an MIT-style license.
|
8
8
|
// For details, see the script.aculo.us web site: http://script.aculo.us/
|
@@ -32,8 +32,8 @@ Event.simulateMouse = function(element, eventName) {
|
|
32
32
|
this.mark.style.left = options.pointerX + "px";
|
33
33
|
this.mark.style.width = "5px";
|
34
34
|
this.mark.style.height = "5px;";
|
35
|
-
this.mark.style.borderTop = "1px solid red;"
|
36
|
-
this.mark.style.borderLeft = "1px solid red;"
|
35
|
+
this.mark.style.borderTop = "1px solid red;";
|
36
|
+
this.mark.style.borderLeft = "1px solid red;";
|
37
37
|
|
38
38
|
if(this.step)
|
39
39
|
alert('['+new Date().getTime().toString()+'] '+eventName+'/'+Test.Unit.inspect(options));
|
@@ -67,7 +67,7 @@ Event.simulateKeys = function(element, command) {
|
|
67
67
|
}
|
68
68
|
};
|
69
69
|
|
70
|
-
var Test = {}
|
70
|
+
var Test = {};
|
71
71
|
Test.Unit = {};
|
72
72
|
|
73
73
|
// security exception workaround
|
@@ -117,7 +117,7 @@ Test.Unit.Logger.prototype = {
|
|
117
117
|
'<thead><tr><th>Status</th><th>Test</th><th>Message</th></tr></thead>' +
|
118
118
|
'<tbody id="loglines"></tbody>' +
|
119
119
|
'</table>';
|
120
|
-
this.logsummary = $('logsummary')
|
120
|
+
this.logsummary = $('logsummary');
|
121
121
|
this.loglines = $('loglines');
|
122
122
|
},
|
123
123
|
_toHTML: function(txt) {
|
@@ -125,15 +125,15 @@ Test.Unit.Logger.prototype = {
|
|
125
125
|
},
|
126
126
|
addLinksToResults: function(){
|
127
127
|
$$("tr.failed .nameCell").each( function(td){ // todo: limit to children of this.log
|
128
|
-
td.title = "Run only this test"
|
128
|
+
td.title = "Run only this test";
|
129
129
|
Event.observe(td, 'click', function(){ window.location.search = "?tests=" + td.innerHTML;});
|
130
130
|
});
|
131
131
|
$$("tr.passed .nameCell").each( function(td){ // todo: limit to children of this.log
|
132
|
-
td.title = "Run all tests"
|
132
|
+
td.title = "Run all tests";
|
133
133
|
Event.observe(td, 'click', function(){ window.location.search = "";});
|
134
134
|
});
|
135
135
|
}
|
136
|
-
}
|
136
|
+
};
|
137
137
|
|
138
138
|
Test.Unit.Runner = Class.create();
|
139
139
|
Test.Unit.Runner.prototype = {
|
@@ -246,7 +246,7 @@ Test.Unit.Runner.prototype = {
|
|
246
246
|
failures + " failures, " +
|
247
247
|
errors + " errors");
|
248
248
|
}
|
249
|
-
}
|
249
|
+
};
|
250
250
|
|
251
251
|
Test.Unit.Assertions = Class.create();
|
252
252
|
Test.Unit.Assertions.prototype = {
|
@@ -331,7 +331,7 @@ Test.Unit.Assertions.prototype = {
|
|
331
331
|
catch(e) { this.error(e); }
|
332
332
|
},
|
333
333
|
assertNull: function(obj) {
|
334
|
-
var message = arguments[1] || 'assertNull'
|
334
|
+
var message = arguments[1] || 'assertNull';
|
335
335
|
try { (obj==null) ? this.pass() :
|
336
336
|
this.fail(message + ': got "' + Test.Unit.inspect(obj) + '"'); }
|
337
337
|
catch(e) { this.error(e); }
|
@@ -461,7 +461,7 @@ Test.Unit.Assertions.prototype = {
|
|
461
461
|
iterations + ' iterations in ' + (timeTaken/1000)+'s' );
|
462
462
|
return timeTaken;
|
463
463
|
}
|
464
|
-
}
|
464
|
+
};
|
465
465
|
|
466
466
|
Test.Unit.Testcase = Class.create();
|
467
467
|
Object.extend(Object.extend(Test.Unit.Testcase.prototype, Test.Unit.Assertions.prototype), {
|
@@ -526,7 +526,7 @@ Test.setupBDDExtensionMethods = function(){
|
|
526
526
|
};
|
527
527
|
var makeAssertion = function(assertion, args, object) {
|
528
528
|
this[assertion].apply(this,(args || []).concat([object]));
|
529
|
-
}
|
529
|
+
};
|
530
530
|
|
531
531
|
Test.BDDMethods = {};
|
532
532
|
$H(METHODMAP).each(function(pair) {
|
@@ -539,7 +539,7 @@ Test.setupBDDExtensionMethods = function(){
|
|
539
539
|
[Array.prototype, String.prototype, Number.prototype, Boolean.prototype].each(
|
540
540
|
function(p){ Object.extend(p, Test.BDDMethods) }
|
541
541
|
);
|
542
|
-
}
|
542
|
+
};
|
543
543
|
|
544
544
|
Test.context = function(name, spec, log){
|
545
545
|
Test.setupBDDExtensionMethods();
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bivouac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Gr\xC3\xA9goire Lejeune"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-12-15 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: "1.
|
23
|
+
version: "1.9"
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: mime-types
|
@@ -62,6 +62,16 @@ dependencies:
|
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: "0"
|
64
64
|
version:
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: markaby
|
67
|
+
type: :runtime
|
68
|
+
version_requirement:
|
69
|
+
version_requirements: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: "0"
|
74
|
+
version:
|
65
75
|
description: Developpe with Camping like you do with Rails
|
66
76
|
email: gregoire.lejeune@free.fr
|
67
77
|
executables:
|
@@ -121,6 +131,8 @@ files:
|
|
121
131
|
- lib/bivouac/commands
|
122
132
|
- lib/bivouac/commands/generate.rb
|
123
133
|
- lib/bivouac/commands/plugin.rb
|
134
|
+
- lib/bivouac/ext
|
135
|
+
- lib/bivouac/ext/filtering_camping.rb
|
124
136
|
- lib/bivouac/filter.rb
|
125
137
|
- lib/bivouac/helpers
|
126
138
|
- lib/bivouac/helpers/view
|
@@ -137,9 +149,8 @@ files:
|
|
137
149
|
- lib/bivouac/tasks/plugins.rake
|
138
150
|
- lib/bivouac/template
|
139
151
|
- lib/bivouac/template/application
|
140
|
-
- lib/bivouac/template/application/
|
141
|
-
- lib/bivouac/template/application
|
142
|
-
- lib/bivouac/template/application_goh.rb
|
152
|
+
- lib/bivouac/template/application/helpers.rb
|
153
|
+
- lib/bivouac/template/application.rb
|
143
154
|
- lib/bivouac/template/console.rb
|
144
155
|
- lib/bivouac/template/environment.rb
|
145
156
|
- lib/bivouac/template/generate
|
@@ -147,6 +158,7 @@ files:
|
|
147
158
|
- lib/bivouac/template/generate/controller_begin.rb
|
148
159
|
- lib/bivouac/template/generate/controller_end.rb
|
149
160
|
- lib/bivouac/template/generate/create.rb
|
161
|
+
- lib/bivouac/template/generate/helper.rb
|
150
162
|
- lib/bivouac/template/generate/migrate.rb
|
151
163
|
- lib/bivouac/template/generate/migrate_begin.rb
|
152
164
|
- lib/bivouac/template/generate/migrate_column.rb
|
@@ -189,8 +201,6 @@ files:
|
|
189
201
|
- lib/bivouac/template.rb
|
190
202
|
- lib/bivouac/utils.rb
|
191
203
|
- lib/bivouac.rb
|
192
|
-
- lib/camping
|
193
|
-
- lib/camping/cookies_sessions.rb
|
194
204
|
- examples/bivouac_sample
|
195
205
|
- examples/bivouac_sample/app
|
196
206
|
- examples/bivouac_sample/app/bivouac_sample.rb
|
@@ -273,59 +283,85 @@ files:
|
|
273
283
|
- examples/bivouac_sample/test/test_edit_in_place.rb
|
274
284
|
- examples/bivouac_sample/test/test_index.rb
|
275
285
|
- examples/bivouac_sample/test/test_sound.rb
|
276
|
-
- examples/
|
277
|
-
- examples/
|
278
|
-
- examples/
|
279
|
-
- examples/
|
280
|
-
- examples/
|
281
|
-
- examples/
|
282
|
-
- examples/
|
283
|
-
- examples/
|
284
|
-
- examples/
|
285
|
-
- examples/
|
286
|
-
- examples/
|
287
|
-
- examples/
|
288
|
-
- examples/
|
289
|
-
- examples/
|
290
|
-
- examples/
|
291
|
-
- examples/
|
292
|
-
- examples/
|
293
|
-
- examples/
|
294
|
-
- examples/
|
295
|
-
- examples/
|
296
|
-
- examples/
|
297
|
-
- examples/
|
298
|
-
- examples/
|
299
|
-
- examples/
|
300
|
-
- examples/
|
301
|
-
- examples/
|
302
|
-
- examples/
|
303
|
-
- examples/
|
304
|
-
- examples/
|
305
|
-
- examples/
|
306
|
-
- examples/
|
307
|
-
- examples/
|
308
|
-
- examples/
|
309
|
-
- examples/
|
310
|
-
- examples/
|
311
|
-
- examples/
|
312
|
-
- examples/
|
313
|
-
- examples/
|
314
|
-
- examples/
|
315
|
-
- examples/
|
316
|
-
- examples/
|
317
|
-
- examples/
|
318
|
-
- examples/
|
319
|
-
- examples/
|
320
|
-
- examples/
|
321
|
-
- examples/
|
322
|
-
- examples/
|
323
|
-
- examples/
|
324
|
-
- examples/
|
325
|
-
- examples/
|
286
|
+
- examples/blog
|
287
|
+
- examples/blog/app
|
288
|
+
- examples/blog/app/blog.rb
|
289
|
+
- examples/blog/app/controllers
|
290
|
+
- examples/blog/app/controllers/comment.rb
|
291
|
+
- examples/blog/app/controllers/index.rb
|
292
|
+
- examples/blog/app/controllers/login.rb
|
293
|
+
- examples/blog/app/controllers/logout.rb
|
294
|
+
- examples/blog/app/controllers/not_found.rb
|
295
|
+
- examples/blog/app/controllers/post.rb
|
296
|
+
- examples/blog/app/helpers
|
297
|
+
- examples/blog/app/helpers/_helpers.rb
|
298
|
+
- examples/blog/app/helpers/blog.rb
|
299
|
+
- examples/blog/app/models
|
300
|
+
- examples/blog/app/models/comment.rb
|
301
|
+
- examples/blog/app/models/post.rb
|
302
|
+
- examples/blog/app/models/user.rb
|
303
|
+
- examples/blog/app/views
|
304
|
+
- examples/blog/app/views/_partials.rb
|
305
|
+
- examples/blog/app/views/index
|
306
|
+
- examples/blog/app/views/index/index.rb
|
307
|
+
- examples/blog/app/views/layouts
|
308
|
+
- examples/blog/app/views/layouts/default_layout.rb
|
309
|
+
- examples/blog/app/views/login
|
310
|
+
- examples/blog/app/views/login/login.rb
|
311
|
+
- examples/blog/app/views/not_found.rb
|
312
|
+
- examples/blog/app/views/post
|
313
|
+
- examples/blog/app/views/post/add.rb
|
314
|
+
- examples/blog/app/views/post/edit.rb
|
315
|
+
- examples/blog/app/views/post/view.rb
|
316
|
+
- examples/blog/config
|
317
|
+
- examples/blog/config/console.rc
|
318
|
+
- examples/blog/config/database.yml
|
319
|
+
- examples/blog/config/environment.rb
|
320
|
+
- examples/blog/db
|
321
|
+
- examples/blog/db/blog.db
|
322
|
+
- examples/blog/db/create.rb
|
323
|
+
- examples/blog/db/migrate
|
324
|
+
- examples/blog/db/migrate/001_users.rb
|
325
|
+
- examples/blog/db/migrate/002_posts.rb
|
326
|
+
- examples/blog/db/migrate/003_comments.rb
|
327
|
+
- examples/blog/lib
|
328
|
+
- examples/blog/lib/tasks
|
329
|
+
- examples/blog/log
|
330
|
+
- examples/blog/log/Blog.log
|
331
|
+
- examples/blog/plugins
|
332
|
+
- examples/blog/public
|
333
|
+
- examples/blog/public/images
|
334
|
+
- examples/blog/public/images/camping.png
|
335
|
+
- examples/blog/public/index.html
|
336
|
+
- examples/blog/public/javascripts
|
337
|
+
- examples/blog/public/javascripts/builder.js
|
338
|
+
- examples/blog/public/javascripts/controls.js
|
339
|
+
- examples/blog/public/javascripts/dragdrop.js
|
340
|
+
- examples/blog/public/javascripts/effects.js
|
341
|
+
- examples/blog/public/javascripts/prototype.js
|
342
|
+
- examples/blog/public/javascripts/scriptaculous.js
|
343
|
+
- examples/blog/public/javascripts/slider.js
|
344
|
+
- examples/blog/public/javascripts/sound.js
|
345
|
+
- examples/blog/public/javascripts/unittest.js
|
346
|
+
- examples/blog/public/stylesheets
|
347
|
+
- examples/blog/public/stylesheets/autocomplete.css
|
348
|
+
- examples/blog/public/stylesheets/blog.css
|
349
|
+
- examples/blog/Rakefile
|
350
|
+
- examples/blog/script
|
351
|
+
- examples/blog/script/console
|
352
|
+
- examples/blog/script/generate
|
353
|
+
- examples/blog/script/plugin
|
354
|
+
- examples/blog/script/server
|
355
|
+
- examples/blog/test
|
356
|
+
- examples/blog/test/test_comment.rb
|
357
|
+
- examples/blog/test/test_index.rb
|
358
|
+
- examples/blog/test/test_login.rb
|
359
|
+
- examples/blog/test/test_logout.rb
|
360
|
+
- examples/blog/test/test_post.rb
|
361
|
+
- examples/blog/test/test_post_new.rb
|
326
362
|
has_rdoc: true
|
327
363
|
homepage: http://greg.rubyfr.net
|
328
|
-
post_install_message:
|
364
|
+
post_install_message: See http://bivouac.rubyforge.org
|
329
365
|
rdoc_options:
|
330
366
|
- --quiet
|
331
367
|
- --title
|
@@ -355,7 +391,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
355
391
|
requirements: []
|
356
392
|
|
357
393
|
rubyforge_project: bivouac
|
358
|
-
rubygems_version: 1.
|
394
|
+
rubygems_version: 1.3.1
|
359
395
|
signing_key:
|
360
396
|
specification_version: 2
|
361
397
|
summary: Developpe with Camping like you do with Rails
|