Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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