mon81 / scriptaculous forked from madrobby/scriptaculous

script.aculo.us is an open-source JavaScript framework for visual effects and interface behaviours.

This URL has Read+Write access

scriptaculous / Rakefile
5d47d9be » madrobby 2005-06-23 Added beginnings of unittes... 1 #mostly borrowed from the rails Rakefile
2
3 require 'rake'
4
5 PKG_NAME = 'scriptaculous-js'
9fa9d8ee » madrobby 2007-01-19 script.aculo.us: prep 1.7.0... 6 PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
9d100921 » madrobby 2006-08-20 script.aculo.us: Add versio... 7 PKG_TIMESTAMP = Time.new.to_s
af3758fd » madrobby 2008-01-03 script.aculo.us: Update to ... 8 PKG_VERSION = '1.8.1' + PKG_BUILD
5d47d9be » madrobby 2005-06-23 Added beginnings of unittes... 9 PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
74ecdf84 » madrobby 2006-10-09 script.aculo.us: Add rails-... 10 PKG_DESTINATION = ENV["PKG_DESTINATION"] || "dist"
11
06c37e64 » madrobby 2006-11-19 script.aculo.us: prototype ... 12 RAILS_RAILTIES = (ENV["RAILS_ROOT"] || '../rails-trunk') + '/railties/html/javascripts'
13 RAILS_ACTIONVIEW = (ENV["RAILS_ROOT"] || '../rails-trunk') + '/actionpack/lib/action_view/helpers/javascripts'
5d47d9be » madrobby 2005-06-23 Added beginnings of unittes... 14
15 desc "Default Task"
16 task :default => [ :clean, :fresh_scriptaculous, :package ]
17
18 task :clean do
19 rm_rf PKG_DESTINATION
20 end
21
22 PKG_FILES = FileList[
23 'CHANGELOG',
24 'README',
25 'MIT-LICENSE',
9d100921 » madrobby 2006-08-20 script.aculo.us: Add versio... 26 'lib/prototype.js',
27 'test/**/*.html',
28 'test/**/*.css',
6dcf9193 » madrobby 2007-03-11 script.aculo.us: prepare 1.... 29 'test/**/*.png',
30 'test/**/*.mp3'
9d100921 » madrobby 2006-08-20 script.aculo.us: Add versio... 31 ]
32
33 SRC_FILES = FileList[
b6df43c1 » madrobby 2005-08-11 script.aculo.us: Added a ma... 34 'src/scriptaculous.js',
5d47d9be » madrobby 2005-06-23 Added beginnings of unittes... 35 'src/dragdrop.js',
b3754252 » madrobby 2005-06-25 Included Ajax.Autocompleter... 36 'src/effects.js',
6d3a5e49 » madrobby 2005-08-09 script.aculo.us: minor rest... 37 'src/controls.js',
38 'src/unittest.js',
a194aae3 » madrobby 2005-10-17 script.aculo.us: Synced to ... 39 'src/builder.js',
a2028059 » madrobby 2005-09-25 script.aculo.us: updates fo... 40 'src/slider.js',
59a3dd6d » madrobby 2007-03-03 script.aculo.us: Added Soun... 41 'src/sound.js',
42 'src/unittest.js'
5d47d9be » madrobby 2005-06-23 Added beginnings of unittes... 43 ]
44
74ecdf84 » madrobby 2006-10-09 script.aculo.us: Add rails-... 45 RAILS_FILES = FileList[
46 'src/effects.js',
47 'src/dragdrop.js',
48 'src/controls.js'
49 ]
50
a2028059 » madrobby 2005-09-25 script.aculo.us: updates fo... 51 DIRS = %w( src lib test test/functional test/unit )
52
5d47d9be » madrobby 2005-06-23 Added beginnings of unittes... 53 desc "Make a ready-for-packaging distribution dir"
54 task :fresh_scriptaculous do
55 mkdir PKG_DESTINATION
56 mkdir File.join(PKG_DESTINATION, PKG_FILE_NAME)
a2028059 » madrobby 2005-09-25 script.aculo.us: updates fo... 57 mkdir_p DIRS.map { |dir| File.join(PKG_DESTINATION, PKG_FILE_NAME, dir) }
9d100921 » madrobby 2006-08-20 script.aculo.us: Add versio... 58 PKG_FILES.each { |file| cp file, File.join(PKG_DESTINATION, PKG_FILE_NAME, file) }
59 SRC_FILES.each do |file|
60 File.open(File.join(PKG_DESTINATION, PKG_FILE_NAME, file), 'w+') do |dist|
61 dist << ('// script.aculo.us '+File.basename(file)+' v'+PKG_VERSION+", "+PKG_TIMESTAMP+"\n\n")
62 dist << File.read(file)
63 end
64 end
5d47d9be » madrobby 2005-06-23 Added beginnings of unittes... 65 end
66
67 desc "Packages the fresh script.aculo.us scripts"
68 task :package do
69 system %{cd #{PKG_DESTINATION}; tar -czvf #{PKG_FILE_NAME}.tar.gz #{PKG_FILE_NAME}}
70 system %{cd #{PKG_DESTINATION}; zip -r #{PKG_FILE_NAME}.zip #{PKG_FILE_NAME}}
71 system %{cd #{PKG_DESTINATION}; tar -c #{PKG_FILE_NAME} | bzip2 --best > #{PKG_FILE_NAME}.tar.bz2 }
72 end
73
74ecdf84 » madrobby 2006-10-09 script.aculo.us: Add rails-... 74 desc "Update rails trunk to latest script.aculo.us"
75 task :update_rails do
76 RAILS_FILES.each do |file|
77 cp file, File.join(RAILS_RAILTIES, File.basename(file))
78 cp file, File.join(RAILS_ACTIONVIEW, File.basename(file))
79 end
80 end
81
7f3813ab » madrobby 2005-08-24 script.aculo.us: updates to... 82 require 'src/javascripttest'
83 desc "Runs all the JavaScript unit tests and collects the results"
84 JavaScriptTestTask.new(:unittest) do |t|
85 t.mount("/lib")
86 t.mount("/src")
87 t.mount("/test")
88
ad25001b » madrobby 2005-12-14 script.aculo.us: Added sele... 89 t.run("/test/unit/loading_test.html")
7f3813ab » madrobby 2005-08-24 script.aculo.us: updates to... 90 t.run("/test/unit/unittest_test.html")
67d15f84 » madrobby 2006-08-29 script.aculo.us: Add experi... 91 t.run("/test/unit/bdd_test.html")
a0e9ea79 » madrobby 2005-08-30 script.aculo.us: automatic ... 92 t.run("/test/unit/effects_test.html")
e3ae13ea » madrobby 2005-08-26 Made builder_test.html unit... 93 t.run("/test/unit/ajax_autocompleter_test.html")
7f3813ab » madrobby 2005-08-24 script.aculo.us: updates to... 94 t.run("/test/unit/ajax_inplaceeditor_test.html")
cbfdecda » madrobby 2005-10-22 script.aculo.us: Removed Bu... 95 t.run("/test/unit/slider_test.html")
7f3813ab » madrobby 2005-08-24 script.aculo.us: updates to... 96 t.run("/test/unit/string_test.html")
97 t.run("/test/unit/builder_test.html")
4167d27e » madrobby 2005-08-30 script.aculo.us: Finetuning... 98 t.run("/test/unit/element_test.html")
807ef0e3 » madrobby 2005-11-18 script.aculo.us: Make Dropp... 99 t.run("/test/unit/dragdrop_test.html")
be246fee » madrobby 2005-10-09 script.aculo.us: V1.5_rc2 r... 100 t.run("/test/unit/sortable_test.html")
cdfd65b2 » madrobby 2005-08-30 script.aculo.us: new Positi... 101 t.run("/test/unit/position_clone_test.html")
7f3813ab » madrobby 2005-08-24 script.aculo.us: updates to... 102
103 t.browser(:safari)
104 t.browser(:firefox)
d19f2493 » madrobby 2005-08-27 script.aculo.us: Support fo... 105 t.browser(:ie)
a0e9ea79 » madrobby 2005-08-30 script.aculo.us: automatic ... 106 t.browser(:konqueror)
7f3813ab » madrobby 2005-08-24 script.aculo.us: updates to... 107 end