Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 105 lines (90 sloc) 3.122 kb
5d47d9b @madrobby Added beginnings of unittest.js; cleaned up effects2.js; added packaging...
authored
1 #mostly borrowed from the rails Rakefile
2
3 require 'rake'
4
5 PKG_NAME = 'scriptaculous-js'
6 PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
9d10092 @madrobby script.aculo.us: Add version and timestamp to indvidual library files fo...
authored
7 PKG_TIMESTAMP = Time.new.to_s
d6c8f41 @madrobby script.aculo.us: Prepare 1.6.5 release
authored
8 PKG_VERSION = '1.6.5' + PKG_BUILD
5d47d9b @madrobby Added beginnings of unittest.js; cleaned up effects2.js; added packaging...
authored
9 PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
74ecdf8 @madrobby script.aculo.us: Add rails-trunk update task, clean up references to MIT...
authored
10 PKG_DESTINATION = ENV["PKG_DESTINATION"] || "dist"
11
06c37e6 @madrobby script.aculo.us: prototype update, better env var handling for rakefile
authored
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'
5d47d9b @madrobby Added beginnings of unittest.js; cleaned up effects2.js; added packaging...
authored
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',
9d10092 @madrobby script.aculo.us: Add version and timestamp to indvidual library files fo...
authored
26 'lib/prototype.js',
27 'test/**/*.html',
28 'test/**/*.css',
29 'test/**/*.png'
30 ]
31
32 SRC_FILES = FileList[
b6df43c @madrobby script.aculo.us: Added a main scriptaculous.js file to load in the other...
authored
33 'src/scriptaculous.js',
5d47d9b @madrobby Added beginnings of unittest.js; cleaned up effects2.js; added packaging...
authored
34 'src/dragdrop.js',
b375425 @madrobby Included Ajax.Autocompleter, refactoring, fixes
authored
35 'src/effects.js',
6d3a5e4 @madrobby script.aculo.us: minor restructuring fixes
authored
36 'src/controls.js',
37 'src/unittest.js',
a194aae @madrobby script.aculo.us: Synced to Rails 1.0 release candidate, update to Protot...
authored
38 'src/builder.js',
a202805 @madrobby script.aculo.us: updates for 1.5_rc1 release
authored
39 'src/slider.js',
40 'src/unittest.js',
5d47d9b @madrobby Added beginnings of unittest.js; cleaned up effects2.js; added packaging...
authored
41 ]
42
74ecdf8 @madrobby script.aculo.us: Add rails-trunk update task, clean up references to MIT...
authored
43 RAILS_FILES = FileList[
44 'src/effects.js',
45 'src/dragdrop.js',
46 'src/controls.js'
47 ]
48
a202805 @madrobby script.aculo.us: updates for 1.5_rc1 release
authored
49 DIRS = %w( src lib test test/functional test/unit )
50
5d47d9b @madrobby Added beginnings of unittest.js; cleaned up effects2.js; added packaging...
authored
51 desc "Make a ready-for-packaging distribution dir"
52 task :fresh_scriptaculous do
53 mkdir PKG_DESTINATION
54 mkdir File.join(PKG_DESTINATION, PKG_FILE_NAME)
a202805 @madrobby script.aculo.us: updates for 1.5_rc1 release
authored
55 mkdir_p DIRS.map { |dir| File.join(PKG_DESTINATION, PKG_FILE_NAME, dir) }
9d10092 @madrobby script.aculo.us: Add version and timestamp to indvidual library files fo...
authored
56 PKG_FILES.each { |file| cp file, File.join(PKG_DESTINATION, PKG_FILE_NAME, file) }
57 SRC_FILES.each do |file|
58 File.open(File.join(PKG_DESTINATION, PKG_FILE_NAME, file), 'w+') do |dist|
59 dist << ('// script.aculo.us '+File.basename(file)+' v'+PKG_VERSION+", "+PKG_TIMESTAMP+"\n\n")
60 dist << File.read(file)
61 end
62 end
5d47d9b @madrobby Added beginnings of unittest.js; cleaned up effects2.js; added packaging...
authored
63 end
64
65 desc "Packages the fresh script.aculo.us scripts"
66 task :package do
67 system %{cd #{PKG_DESTINATION}; tar -czvf #{PKG_FILE_NAME}.tar.gz #{PKG_FILE_NAME}}
68 system %{cd #{PKG_DESTINATION}; zip -r #{PKG_FILE_NAME}.zip #{PKG_FILE_NAME}}
69 system %{cd #{PKG_DESTINATION}; tar -c #{PKG_FILE_NAME} | bzip2 --best > #{PKG_FILE_NAME}.tar.bz2 }
70 end
71
74ecdf8 @madrobby script.aculo.us: Add rails-trunk update task, clean up references to MIT...
authored
72 desc "Update rails trunk to latest script.aculo.us"
73 task :update_rails do
74 RAILS_FILES.each do |file|
75 cp file, File.join(RAILS_RAILTIES, File.basename(file))
76 cp file, File.join(RAILS_ACTIONVIEW, File.basename(file))
77 end
78 end
79
7f3813a @madrobby script.aculo.us: updates to Ajax.InPlaceEditor, self running automated i...
authored
80 require 'src/javascripttest'
81 desc "Runs all the JavaScript unit tests and collects the results"
82 JavaScriptTestTask.new(:unittest) do |t|
83 t.mount("/lib")
84 t.mount("/src")
85 t.mount("/test")
86
ad25001 @madrobby script.aculo.us: Added selective component loading to scriptaculous.js, ...
authored
87 t.run("/test/unit/loading_test.html")
7f3813a @madrobby script.aculo.us: updates to Ajax.InPlaceEditor, self running automated i...
authored
88 t.run("/test/unit/unittest_test.html")
67d15f8 @madrobby script.aculo.us: Add experimental alternate syntax for unit tests (Behav...
authored
89 t.run("/test/unit/bdd_test.html")
a0e9ea7 @madrobby script.aculo.us: automatic unit testing support for Firefox/Konqueror on...
authored
90 t.run("/test/unit/effects_test.html")
e3ae13e @madrobby Made builder_test.html unit test work with Safari, fixed (one of two) ca...
authored
91 t.run("/test/unit/ajax_autocompleter_test.html")
7f3813a @madrobby script.aculo.us: updates to Ajax.InPlaceEditor, self running automated i...
authored
92 t.run("/test/unit/ajax_inplaceeditor_test.html")
cbfdecd @madrobby script.aculo.us: Removed Builder code from effects.js, removed Object.de...
authored
93 t.run("/test/unit/slider_test.html")
7f3813a @madrobby script.aculo.us: updates to Ajax.InPlaceEditor, self running automated i...
authored
94 t.run("/test/unit/string_test.html")
95 t.run("/test/unit/builder_test.html")
4167d27 @madrobby script.aculo.us: Finetuning unittest.js + even more unit tests
authored
96 t.run("/test/unit/element_test.html")
807ef0e @madrobby script.aculo.us: Make Droppables.remove accept DOM IDs in addition to el...
authored
97 t.run("/test/unit/dragdrop_test.html")
be246fe @madrobby script.aculo.us: V1.5_rc2 release
authored
98 t.run("/test/unit/sortable_test.html")
cdfd65b @madrobby script.aculo.us: new Position.clone unit test, checks for Konqueror, fix...
authored
99 t.run("/test/unit/position_clone_test.html")
7f3813a @madrobby script.aculo.us: updates to Ajax.InPlaceEditor, self running automated i...
authored
100
101 t.browser(:safari)
102 t.browser(:firefox)
d19f249 @madrobby script.aculo.us: Support for automatic unit testing on windows (IE/Firef...
authored
103 t.browser(:ie)
a0e9ea7 @madrobby script.aculo.us: automatic unit testing support for Firefox/Konqueror on...
authored
104 t.browser(:konqueror)
7f3813a @madrobby script.aculo.us: updates to Ajax.InPlaceEditor, self running automated i...
authored
105 end
Something went wrong with that request. Please try again.