rails 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rails might be problematic. Click here for more details.
- data/CHANGELOG +7 -0
- data/README +25 -24
- data/Rakefile +130 -10
- data/dispatches/dispatch.fcgi +9 -8
- data/fresh_rakefile +11 -2
- data/html/javascripts/prototype.js +133 -15
- data/lib/rails_generator/generators/components/mailer/templates/mailer.rb +2 -2
- metadata +8 -9
data/CHANGELOG
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
*0.11.1* (27th March, 2005)
|
2
|
+
|
3
|
+
* Fixed the dispatch.fcgi use of a logger
|
4
|
+
|
5
|
+
* Upgraded to Active Record 1.9.1, Action Pack 1.7.0, Action Mailer 0.8.1, Action Web Service 0.6.2, Active Support 1.0.3
|
6
|
+
|
7
|
+
|
1
8
|
*0.11.0* (22th March, 2005)
|
2
9
|
|
3
10
|
* Removed SCRIPT_NAME from the WEBrick environment to prevent conflicts with PATH_INFO #896 [Nicholas Seckar]
|
data/README
CHANGED
@@ -67,30 +67,30 @@ goes through FCGI (or mod_ruby) that requires restart to show changes.
|
|
67
67
|
|
68
68
|
== Example for lighttpd conf (with FastCGI)
|
69
69
|
|
70
|
-
server.port = 8080
|
71
|
-
server.bind = "127.0.0.1"
|
72
|
-
# server.event-handler = "freebsd-kqueue" # needed on OS X
|
73
|
-
|
74
|
-
server.modules = ( "mod_rewrite", "mod_fastcgi" )
|
75
|
-
|
76
|
-
url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" )
|
77
|
-
server.error-handler-404 = "/dispatch.fcgi"
|
78
|
-
|
79
|
-
server.document-root = "/path/application/public"
|
80
|
-
server.errorlog = "/path/application/log/server.log"
|
81
|
-
|
82
|
-
fastcgi.server = ( ".fcgi" =>
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
70
|
+
server.port = 8080
|
71
|
+
server.bind = "127.0.0.1"
|
72
|
+
# server.event-handler = "freebsd-kqueue" # needed on OS X
|
73
|
+
|
74
|
+
server.modules = ( "mod_rewrite", "mod_fastcgi" )
|
75
|
+
|
76
|
+
url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" )
|
77
|
+
server.error-handler-404 = "/dispatch.fcgi"
|
78
|
+
|
79
|
+
server.document-root = "/path/application/public"
|
80
|
+
server.errorlog = "/path/application/log/server.log"
|
81
|
+
|
82
|
+
fastcgi.server = ( ".fcgi" =>
|
83
|
+
( "localhost" =>
|
84
|
+
(
|
85
|
+
"min-procs" => 1,
|
86
|
+
"max-procs" => 5,
|
87
|
+
"socket" => "/tmp/application.fcgi.socket",
|
88
|
+
"bin-path" => "/path/application/public/dispatch.fcgi",
|
89
|
+
"bin-environment" => ( "RAILS_ENV" => "development" )
|
90
|
+
)
|
91
|
+
)
|
91
92
|
)
|
92
|
-
|
93
|
-
|
93
|
+
|
94
94
|
|
95
95
|
== Debugging Rails
|
96
96
|
|
@@ -139,7 +139,8 @@ Finally, when you're ready to resume execution, you press CTRL-D
|
|
139
139
|
You can interact with the domain model by starting the console through script/console.
|
140
140
|
Here you'll have all parts of the application configured, just like it is when the
|
141
141
|
application is running. You can inspect domain models, change values, and save to the
|
142
|
-
database. Start the script without arguments
|
142
|
+
database. Start the script without arguments will launch it in the development environment.
|
143
|
+
Passing an argument will specify a different environment, like <tt>console production</tt>.
|
143
144
|
|
144
145
|
|
145
146
|
== Description of contents
|
data/Rakefile
CHANGED
@@ -9,10 +9,15 @@ require 'rbconfig'
|
|
9
9
|
|
10
10
|
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
11
11
|
PKG_NAME = 'rails'
|
12
|
-
PKG_VERSION = '0.11.
|
12
|
+
PKG_VERSION = '0.11.1' + PKG_BUILD
|
13
13
|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
14
14
|
PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
|
15
15
|
|
16
|
+
RELEASE_NAME = "REL #{PKG_VERSION}"
|
17
|
+
|
18
|
+
RUBY_FORGE_PROJECT = "rails"
|
19
|
+
RUBY_FORGE_USER = "webster132"
|
20
|
+
|
16
21
|
|
17
22
|
BASE_DIRS = %w( app config/environments components db doc log lib public script test vendor )
|
18
23
|
APP_DIRS = %w( apis models controllers helpers views views/layouts )
|
@@ -121,8 +126,7 @@ task :copy_dispatches do
|
|
121
126
|
end
|
122
127
|
|
123
128
|
task :copy_html_files do
|
124
|
-
|
125
|
-
File.join(PKG_DESTINATION, 'public')
|
129
|
+
HTML_FILES.each { |file| cp File.join('html', file), File.join(PKG_DESTINATION, 'public', file) }
|
126
130
|
end
|
127
131
|
|
128
132
|
task :copy_application do
|
@@ -234,12 +238,12 @@ spec = Gem::Specification.new do |s|
|
|
234
238
|
on top of either MySQL, PostgreSQL, or SQLite with eRuby-based templates.
|
235
239
|
EOF
|
236
240
|
|
237
|
-
s.add_dependency('rake', '>= 0.
|
238
|
-
s.add_dependency('activesupport', '= 1.0.
|
239
|
-
s.add_dependency('activerecord', '= 1.9.
|
240
|
-
s.add_dependency('actionpack', '= 1.
|
241
|
-
s.add_dependency('actionmailer', '= 0.8.
|
242
|
-
s.add_dependency('actionwebservice', '= 0.6.
|
241
|
+
s.add_dependency('rake', '>= 0.5.0')
|
242
|
+
s.add_dependency('activesupport', '= 1.0.3' + PKG_BUILD)
|
243
|
+
s.add_dependency('activerecord', '= 1.9.1' + PKG_BUILD)
|
244
|
+
s.add_dependency('actionpack', '= 1.7.0' + PKG_BUILD)
|
245
|
+
s.add_dependency('actionmailer', '= 0.8.1' + PKG_BUILD)
|
246
|
+
s.add_dependency('actionwebservice', '= 0.6.2' + PKG_BUILD)
|
243
247
|
|
244
248
|
s.rdoc_options << '--exclude' << '.'
|
245
249
|
s.has_rdoc = false
|
@@ -260,9 +264,125 @@ end
|
|
260
264
|
Rake::GemPackageTask.new(spec) do |pkg|
|
261
265
|
end
|
262
266
|
|
263
|
-
|
267
|
+
|
268
|
+
# Publishing -------------------------------------------------------
|
264
269
|
desc "Publish the API documentation"
|
265
270
|
task :pgem => [:gem] do
|
266
271
|
Rake::SshFilePublisher.new("davidhh@comox.textdrive.com", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
|
267
272
|
`ssh davidhh@comox.textdrive.com './gemupdate.sh'`
|
273
|
+
end
|
274
|
+
|
275
|
+
desc "Publish the release files to RubyForge."
|
276
|
+
task :release => [:package] do
|
277
|
+
files = ["gem"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
|
278
|
+
|
279
|
+
if RUBY_FORGE_PROJECT then
|
280
|
+
require 'net/http'
|
281
|
+
require 'open-uri'
|
282
|
+
|
283
|
+
project_uri = "http://rubyforge.org/projects/#{RUBY_FORGE_PROJECT}/"
|
284
|
+
project_data = open(project_uri) { |data| data.read }
|
285
|
+
group_id = project_data[/[?&]group_id=(\d+)/, 1]
|
286
|
+
raise "Couldn't get group id" unless group_id
|
287
|
+
|
288
|
+
# This echos password to shell which is a bit sucky
|
289
|
+
if ENV["RUBY_FORGE_PASSWORD"]
|
290
|
+
password = ENV["RUBY_FORGE_PASSWORD"]
|
291
|
+
else
|
292
|
+
print "#{RUBY_FORGE_USER}@rubyforge.org's password: "
|
293
|
+
password = STDIN.gets.chomp
|
294
|
+
end
|
295
|
+
|
296
|
+
login_response = Net::HTTP.start("rubyforge.org", 80) do |http|
|
297
|
+
data = [
|
298
|
+
"login=1",
|
299
|
+
"form_loginname=#{RUBY_FORGE_USER}",
|
300
|
+
"form_pw=#{password}"
|
301
|
+
].join("&")
|
302
|
+
http.post("/account/login.php", data)
|
303
|
+
end
|
304
|
+
|
305
|
+
cookie = login_response["set-cookie"]
|
306
|
+
raise "Login failed" unless cookie
|
307
|
+
headers = { "Cookie" => cookie }
|
308
|
+
|
309
|
+
release_uri = "http://rubyforge.org/frs/admin/?group_id=#{group_id}"
|
310
|
+
release_data = open(release_uri, headers) { |data| data.read }
|
311
|
+
package_id = release_data[/[?&]package_id=(\d+)/, 1]
|
312
|
+
raise "Couldn't get package id" unless package_id
|
313
|
+
|
314
|
+
first_file = true
|
315
|
+
release_id = ""
|
316
|
+
|
317
|
+
files.each do |filename|
|
318
|
+
basename = File.basename(filename)
|
319
|
+
file_ext = File.extname(filename)
|
320
|
+
file_data = File.open(filename, "rb") { |file| file.read }
|
321
|
+
|
322
|
+
puts "Releasing #{basename}..."
|
323
|
+
|
324
|
+
release_response = Net::HTTP.start("rubyforge.org", 80) do |http|
|
325
|
+
release_date = Time.now.strftime("%Y-%m-%d %H:%M")
|
326
|
+
type_map = {
|
327
|
+
".zip" => "3000",
|
328
|
+
".tgz" => "3110",
|
329
|
+
".gz" => "3110",
|
330
|
+
".gem" => "1400"
|
331
|
+
}; type_map.default = "9999"
|
332
|
+
type = type_map[file_ext]
|
333
|
+
boundary = "rubyqMY6QN9bp6e4kS21H4y0zxcvoor"
|
334
|
+
|
335
|
+
query_hash = if first_file then
|
336
|
+
{
|
337
|
+
"group_id" => group_id,
|
338
|
+
"package_id" => package_id,
|
339
|
+
"release_name" => RELEASE_NAME,
|
340
|
+
"release_date" => release_date,
|
341
|
+
"type_id" => type,
|
342
|
+
"processor_id" => "8000", # Any
|
343
|
+
"release_notes" => "",
|
344
|
+
"release_changes" => "",
|
345
|
+
"preformatted" => "1",
|
346
|
+
"submit" => "1"
|
347
|
+
}
|
348
|
+
else
|
349
|
+
{
|
350
|
+
"group_id" => group_id,
|
351
|
+
"release_id" => release_id,
|
352
|
+
"package_id" => package_id,
|
353
|
+
"step2" => "1",
|
354
|
+
"type_id" => type,
|
355
|
+
"processor_id" => "8000", # Any
|
356
|
+
"submit" => "Add This File"
|
357
|
+
}
|
358
|
+
end
|
359
|
+
|
360
|
+
query = "?" + query_hash.map do |(name, value)|
|
361
|
+
[name, URI.encode(value)].join("=")
|
362
|
+
end.join("&")
|
363
|
+
|
364
|
+
data = [
|
365
|
+
"--" + boundary,
|
366
|
+
"Content-Disposition: form-data; name=\"userfile\"; filename=\"#{basename}\"",
|
367
|
+
"Content-Type: application/octet-stream",
|
368
|
+
"Content-Transfer-Encoding: binary",
|
369
|
+
"", file_data, ""
|
370
|
+
].join("\x0D\x0A")
|
371
|
+
|
372
|
+
release_headers = headers.merge(
|
373
|
+
"Content-Type" => "multipart/form-data; boundary=#{boundary}"
|
374
|
+
)
|
375
|
+
|
376
|
+
target = first_file ? "/frs/admin/qrs.php" : "/frs/admin/editrelease.php"
|
377
|
+
http.post(target + query, data, release_headers)
|
378
|
+
end
|
379
|
+
|
380
|
+
if first_file then
|
381
|
+
release_id = release_response.body[/release_id=(\d+)/, 1]
|
382
|
+
raise("Couldn't get release id") unless release_id
|
383
|
+
end
|
384
|
+
|
385
|
+
first_file = false
|
386
|
+
end
|
387
|
+
end
|
268
388
|
end
|
data/dispatches/dispatch.fcgi
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
#!/usr/local/bin/ruby
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
Logger.new(FASTCGI_CRASH_LOG_PATH).fatal(error_message)
|
3
|
+
def dispatcher_error(path,e,msg="")
|
4
|
+
error_message =
|
5
|
+
"[#{Time.now}] Dispatcher failed to catch: #{e} (#{e.class})\n #{e.backtrace.join("\n ")}\n#{msg}"
|
6
|
+
Logger.new(path).fatal(error_message)
|
8
7
|
rescue Object => log_error
|
9
|
-
STDERR << "Couldn't write to #{
|
8
|
+
STDERR << "Couldn't write to #{path} (#{e} [#{e.class}])\n" << error_message
|
10
9
|
end
|
11
10
|
|
12
11
|
begin
|
@@ -14,13 +13,15 @@ begin
|
|
14
13
|
require 'dispatcher'
|
15
14
|
require 'fcgi'
|
16
15
|
|
16
|
+
log_file_path = "#{RAILS_ROOT}/log/fastcgi.crash.log"
|
17
|
+
|
17
18
|
FCGI.each_cgi do |cgi|
|
18
19
|
begin
|
19
20
|
Dispatcher.dispatch(cgi)
|
20
21
|
rescue Object => rails_error
|
21
|
-
dispatcher_error(rails_error)
|
22
|
+
dispatcher_error(log_file_path, rails_error)
|
22
23
|
end
|
23
24
|
end
|
24
25
|
rescue Object => fcgi_error
|
25
|
-
dispatcher_error(fcgi_error, "FCGI process #{$$} killed by this error\n")
|
26
|
+
dispatcher_error(log_file_path, fcgi_error, "FCGI process #{$$} killed by this error\n")
|
26
27
|
end
|
data/fresh_rakefile
CHANGED
@@ -71,6 +71,7 @@ Rake::RDocTask.new("appdoc") { |rdoc|
|
|
71
71
|
desc "Generate documentation for the Rails framework"
|
72
72
|
Rake::RDocTask.new("apidoc") { |rdoc|
|
73
73
|
rdoc.rdoc_dir = 'doc/api'
|
74
|
+
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
|
74
75
|
rdoc.title = "Rails Framework Documentation"
|
75
76
|
rdoc.options << '--line-numbers --inline-source'
|
76
77
|
rdoc.rdoc_files.include('README')
|
@@ -89,9 +90,17 @@ Rake::RDocTask.new("apidoc") { |rdoc|
|
|
89
90
|
rdoc.rdoc_files.include('vendor/rails/actionmailer/CHANGELOG')
|
90
91
|
rdoc.rdoc_files.include('vendor/rails/actionmailer/lib/action_mailer/base.rb')
|
91
92
|
rdoc.rdoc_files.include('vendor/rails/actionwebservice/README')
|
92
|
-
rdoc.rdoc_files.include('vendor/rails/actionwebservice/
|
93
|
-
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service
|
93
|
+
rdoc.rdoc_files.include('vendor/rails/actionwebservice/CHANGELOG')
|
94
|
+
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service.rb')
|
95
|
+
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/*.rb')
|
96
|
+
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/api/*.rb')
|
97
|
+
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/client/*.rb')
|
98
|
+
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/container/*.rb')
|
99
|
+
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/dispatcher/*.rb')
|
100
|
+
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/protocol/*.rb')
|
101
|
+
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/support/*.rb')
|
94
102
|
rdoc.rdoc_files.include('vendor/rails/activesupport/README')
|
103
|
+
rdoc.rdoc_files.include('vendor/rails/activesupport/CHANGELOG')
|
95
104
|
rdoc.rdoc_files.include('vendor/rails/activesupport/lib/active_support/**/*.rb')
|
96
105
|
}
|
97
106
|
|
@@ -5,11 +5,11 @@
|
|
5
5
|
* For details, see http://prototype.conio.net/
|
6
6
|
*/
|
7
7
|
|
8
|
-
Prototype = {
|
9
|
-
Version: '1.0
|
8
|
+
var Prototype = {
|
9
|
+
Version: '1.1.0'
|
10
10
|
}
|
11
11
|
|
12
|
-
Class = {
|
12
|
+
var Class = {
|
13
13
|
create: function() {
|
14
14
|
return function() {
|
15
15
|
this.initialize.apply(this, arguments);
|
@@ -17,7 +17,7 @@ Class = {
|
|
17
17
|
}
|
18
18
|
}
|
19
19
|
|
20
|
-
Abstract = new Object();
|
20
|
+
var Abstract = new Object();
|
21
21
|
|
22
22
|
Object.prototype.extend = function(object) {
|
23
23
|
for (property in object) {
|
@@ -40,7 +40,13 @@ Function.prototype.bindAsEventListener = function(object) {
|
|
40
40
|
}
|
41
41
|
}
|
42
42
|
|
43
|
-
|
43
|
+
Number.prototype.toColorPart = function() {
|
44
|
+
var digits = this.toString(16);
|
45
|
+
if (this < 16) return '0' + digits;
|
46
|
+
return digits;
|
47
|
+
}
|
48
|
+
|
49
|
+
var Try = {
|
44
50
|
these: function() {
|
45
51
|
var returnValue;
|
46
52
|
|
@@ -56,10 +62,10 @@ Try = {
|
|
56
62
|
}
|
57
63
|
}
|
58
64
|
|
59
|
-
Toggle = {
|
65
|
+
var Toggle = {
|
60
66
|
display: function() {
|
61
|
-
for (var i = 0; i <
|
62
|
-
var element = $(
|
67
|
+
for (var i = 0; i < arguments.length; i++) {
|
68
|
+
var element = $(arguments[i]);
|
63
69
|
element.style.display =
|
64
70
|
(element.style.display == 'none' ? '' : 'none');
|
65
71
|
}
|
@@ -85,8 +91,8 @@ function $() {
|
|
85
91
|
return elements;
|
86
92
|
}
|
87
93
|
|
88
|
-
function getElementsByClassName(className
|
89
|
-
var children =
|
94
|
+
function getElementsByClassName(className) {
|
95
|
+
var children = document.getElementsByTagName('*') || document.all;
|
90
96
|
var elements = new Array();
|
91
97
|
|
92
98
|
for (var i = 0; i < children.length; i++) {
|
@@ -105,7 +111,7 @@ function getElementsByClassName(className, element) {
|
|
105
111
|
|
106
112
|
/*--------------------------------------------------------------------------*/
|
107
113
|
|
108
|
-
Ajax = {
|
114
|
+
var Ajax = {
|
109
115
|
getTransport: function() {
|
110
116
|
return Try.these(
|
111
117
|
function() {return new ActiveXObject('Msxml2.XMLHTTP')},
|
@@ -191,14 +197,22 @@ Ajax.Updater.prototype = (new Ajax.Base()).extend({
|
|
191
197
|
},
|
192
198
|
|
193
199
|
updateContent: function() {
|
194
|
-
this.
|
195
|
-
|
200
|
+
if (!this.options.insertion) {
|
201
|
+
this.container.innerHTML = this.request.transport.responseText;
|
202
|
+
} else {
|
203
|
+
new this.options.insertion(this.container,
|
204
|
+
this.request.transport.responseText);
|
205
|
+
}
|
206
|
+
|
207
|
+
if (this.onComplete) {
|
208
|
+
setTimeout((function() {this.onComplete(this.request)}).bind(this), 10);
|
209
|
+
}
|
196
210
|
}
|
197
211
|
});
|
198
212
|
|
199
213
|
/*--------------------------------------------------------------------------*/
|
200
214
|
|
201
|
-
Field = {
|
215
|
+
var Field = {
|
202
216
|
clear: function() {
|
203
217
|
for (var i = 0; i < arguments.length; i++)
|
204
218
|
$(arguments[i]).value = '';
|
@@ -217,7 +231,7 @@ Field = {
|
|
217
231
|
|
218
232
|
/*--------------------------------------------------------------------------*/
|
219
233
|
|
220
|
-
Form = {
|
234
|
+
var Form = {
|
221
235
|
serialize: function(form) {
|
222
236
|
var elements = Form.getElements($(form));
|
223
237
|
var queryComponents = new Array();
|
@@ -269,12 +283,14 @@ Form.Element.Serializers = {
|
|
269
283
|
input: function(element) {
|
270
284
|
switch (element.type.toLowerCase()) {
|
271
285
|
case 'hidden':
|
286
|
+
case 'password':
|
272
287
|
case 'text':
|
273
288
|
return Form.Element.Serializers.textarea(element);
|
274
289
|
case 'checkbox':
|
275
290
|
case 'radio':
|
276
291
|
return Form.Element.Serializers.inputSelector(element);
|
277
292
|
}
|
293
|
+
return false;
|
278
294
|
},
|
279
295
|
|
280
296
|
inputSelector: function(element) {
|
@@ -334,3 +350,105 @@ Form.Observer.prototype = (new Abstract.TimedObserver()).extend({
|
|
334
350
|
}
|
335
351
|
});
|
336
352
|
|
353
|
+
|
354
|
+
/*--------------------------------------------------------------------------*/
|
355
|
+
|
356
|
+
Abstract.Insertion = function(adjacency) {
|
357
|
+
this.adjacency = adjacency;
|
358
|
+
}
|
359
|
+
|
360
|
+
Abstract.Insertion.prototype = {
|
361
|
+
initialize: function(element, content) {
|
362
|
+
this.element = $(element);
|
363
|
+
this.content = content;
|
364
|
+
|
365
|
+
if (this.adjacency && this.element.insertAdjacentHTML) {
|
366
|
+
this.element.insertAdjacentHTML(this.adjacency, this.content);
|
367
|
+
} else {
|
368
|
+
this.range = this.element.ownerDocument.createRange();
|
369
|
+
if (this.initializeRange) this.initializeRange();
|
370
|
+
this.fragment = this.range.createContextualFragment(this.content);
|
371
|
+
this.insertContent();
|
372
|
+
}
|
373
|
+
}
|
374
|
+
}
|
375
|
+
|
376
|
+
var Insertion = new Object();
|
377
|
+
|
378
|
+
Insertion.Before = Class.create();
|
379
|
+
Insertion.Before.prototype = (new Abstract.Insertion('beforeBegin')).extend({
|
380
|
+
initializeRange: function() {
|
381
|
+
this.range.setStartBefore(this.element);
|
382
|
+
},
|
383
|
+
|
384
|
+
insertContent: function() {
|
385
|
+
this.element.parentNode.insertBefore(this.fragment, this.element);
|
386
|
+
}
|
387
|
+
});
|
388
|
+
|
389
|
+
Insertion.Top = Class.create();
|
390
|
+
Insertion.Top.prototype = (new Abstract.Insertion('afterBegin')).extend({
|
391
|
+
initializeRange: function() {
|
392
|
+
this.range.selectNodeContents(this.element);
|
393
|
+
this.range.collapse(true);
|
394
|
+
},
|
395
|
+
|
396
|
+
insertContent: function() {
|
397
|
+
this.element.insertBefore(this.fragment, this.element.firstChild);
|
398
|
+
}
|
399
|
+
});
|
400
|
+
|
401
|
+
Insertion.Bottom = Class.create();
|
402
|
+
Insertion.Bottom.prototype = (new Abstract.Insertion('beforeEnd')).extend({
|
403
|
+
initializeRange: function() {
|
404
|
+
this.range.selectNodeContents(this.element);
|
405
|
+
this.range.collapse(this.element);
|
406
|
+
},
|
407
|
+
|
408
|
+
insertContent: function() {
|
409
|
+
this.element.appendChild(this.fragment);
|
410
|
+
}
|
411
|
+
});
|
412
|
+
|
413
|
+
Insertion.After = Class.create();
|
414
|
+
Insertion.After.prototype = (new Abstract.Insertion('afterEnd')).extend({
|
415
|
+
initializeRange: function() {
|
416
|
+
this.range.setStartAfter(this.element);
|
417
|
+
},
|
418
|
+
|
419
|
+
insertContent: function() {
|
420
|
+
this.element.parentNode.insertBefore(this.fragment,
|
421
|
+
this.element.nextSibling);
|
422
|
+
}
|
423
|
+
});
|
424
|
+
|
425
|
+
/*--------------------------------------------------------------------------*/
|
426
|
+
|
427
|
+
var Effect = new Object();
|
428
|
+
|
429
|
+
Effect.Highlight = Class.create();
|
430
|
+
Effect.Highlight.prototype = {
|
431
|
+
initialize: function(element) {
|
432
|
+
this.element = $(element);
|
433
|
+
this.start = 153;
|
434
|
+
this.finish = 255;
|
435
|
+
this.current = this.start;
|
436
|
+
this.fade();
|
437
|
+
},
|
438
|
+
|
439
|
+
fade: function() {
|
440
|
+
if (this.isFinished()) return;
|
441
|
+
if (this.timer) clearTimeout(this.timer);
|
442
|
+
this.highlight(this.element, this.current);
|
443
|
+
this.current += 17;
|
444
|
+
this.timer = setTimeout(this.fade.bind(this), 250);
|
445
|
+
},
|
446
|
+
|
447
|
+
isFinished: function() {
|
448
|
+
return this.current > this.finish;
|
449
|
+
},
|
450
|
+
|
451
|
+
highlight: function(element, current) {
|
452
|
+
element.style.backgroundColor = "#ffff" + current.toColorPart();
|
453
|
+
}
|
454
|
+
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class <%= class_name %> < ActionMailer::Base
|
2
2
|
<% for action in actions -%>
|
3
3
|
|
4
|
-
def <%= action %>(
|
4
|
+
def <%= action %>(sent_at = Time.now)
|
5
5
|
@subject = '<%= class_name %>#<%= action %>'
|
6
6
|
@body = {}
|
7
7
|
@recipients = ''
|
8
8
|
@from = ''
|
9
|
-
@sent_on =
|
9
|
+
@sent_on = sent_at
|
10
10
|
@headers = {}
|
11
11
|
end
|
12
12
|
<% end -%>
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.8
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rails
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.11.
|
7
|
-
date: 2005-03-
|
6
|
+
version: 0.11.1
|
7
|
+
date: 2005-03-27
|
8
8
|
summary: "Web-application framework with template engine, control-flow layer, and ORM."
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -40,7 +40,6 @@ files:
|
|
40
40
|
- html
|
41
41
|
- lib
|
42
42
|
- MIT-LICENSE
|
43
|
-
- pkg
|
44
43
|
- Rakefile
|
45
44
|
- README
|
46
45
|
- test
|
@@ -163,7 +162,7 @@ dependencies:
|
|
163
162
|
-
|
164
163
|
- ">="
|
165
164
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.
|
165
|
+
version: 0.5.0
|
167
166
|
version:
|
168
167
|
- !ruby/object:Gem::Dependency
|
169
168
|
name: activesupport
|
@@ -173,7 +172,7 @@ dependencies:
|
|
173
172
|
-
|
174
173
|
- "="
|
175
174
|
- !ruby/object:Gem::Version
|
176
|
-
version: 1.0.
|
175
|
+
version: 1.0.3
|
177
176
|
version:
|
178
177
|
- !ruby/object:Gem::Dependency
|
179
178
|
name: activerecord
|
@@ -183,7 +182,7 @@ dependencies:
|
|
183
182
|
-
|
184
183
|
- "="
|
185
184
|
- !ruby/object:Gem::Version
|
186
|
-
version: 1.9.
|
185
|
+
version: 1.9.1
|
187
186
|
version:
|
188
187
|
- !ruby/object:Gem::Dependency
|
189
188
|
name: actionpack
|
@@ -193,7 +192,7 @@ dependencies:
|
|
193
192
|
-
|
194
193
|
- "="
|
195
194
|
- !ruby/object:Gem::Version
|
196
|
-
version: 1.
|
195
|
+
version: 1.7.0
|
197
196
|
version:
|
198
197
|
- !ruby/object:Gem::Dependency
|
199
198
|
name: actionmailer
|
@@ -203,7 +202,7 @@ dependencies:
|
|
203
202
|
-
|
204
203
|
- "="
|
205
204
|
- !ruby/object:Gem::Version
|
206
|
-
version: 0.8.
|
205
|
+
version: 0.8.1
|
207
206
|
version:
|
208
207
|
- !ruby/object:Gem::Dependency
|
209
208
|
name: actionwebservice
|
@@ -213,5 +212,5 @@ dependencies:
|
|
213
212
|
-
|
214
213
|
- "="
|
215
214
|
- !ruby/object:Gem::Version
|
216
|
-
version: 0.6.
|
215
|
+
version: 0.6.2
|
217
216
|
version:
|