jasmine 1.0.2.1 → 1.1.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. data/.gitignore +1 -0
  2. data/Gemfile +0 -3
  3. data/README.markdown +7 -1
  4. data/Rakefile +10 -24
  5. data/generators/jasmine/templates/jasmine-example/SpecRunner.html +40 -13
  6. data/generators/jasmine/templates/jasmine-example/spec/SpecHelper.js +3 -3
  7. data/jasmine.gemspec +18 -8
  8. data/lib/generators/jasmine/templates/lib/tasks/jasmine.rake +8 -2
  9. data/lib/jasmine/base.rb +9 -6
  10. data/lib/jasmine/command_line_tool.rb +1 -1
  11. data/lib/jasmine/firebug/firebug-1.6.2.xpi +0 -0
  12. data/lib/jasmine/firebug/firebug-1.7.0.xpi +0 -0
  13. data/lib/jasmine/firebug/firebug-license.txt +30 -0
  14. data/lib/jasmine/firebug/firebug.rb +30 -0
  15. data/lib/jasmine/selenium_driver.rb +8 -2
  16. data/lib/jasmine/server.rb +4 -7
  17. data/lib/jasmine/tasks/jasmine.rake +15 -6
  18. data/lib/jasmine/version.rb +1 -1
  19. data/spec/fixture/Rakefile +4 -0
  20. data/spec/fixture/spec/example_spec.js +5 -0
  21. data/spec/fixture/src/example.js +3 -0
  22. data/spec/jasmine_command_line_tool_rakeless_spec.rb +20 -0
  23. data/spec/jasmine_rails2_spec.rb +1 -1
  24. data/spec/jasmine_self_test_config.rb +6 -2
  25. data/spec/jasmine_self_test_spec.rb +0 -1
  26. data/spec/server_spec.rb +12 -11
  27. metadata +39 -92
  28. data/.gitmodules +0 -3
  29. data/jasmine/Gemfile +0 -6
  30. data/jasmine/HowToRelease.markdown +0 -29
  31. data/jasmine/MIT.LICENSE +0 -20
  32. data/jasmine/README.markdown +0 -50
  33. data/jasmine/Rakefile +0 -166
  34. data/jasmine/cruise_config.rb +0 -21
  35. data/jasmine/example/SpecRunner.html +0 -27
  36. data/jasmine/example/spec/PlayerSpec.js +0 -58
  37. data/jasmine/example/spec/SpecHelper.js +0 -9
  38. data/jasmine/example/src/Player.js +0 -22
  39. data/jasmine/example/src/Song.js +0 -7
  40. data/jasmine/images/jasmine_favicon.png +0 -0
  41. data/jasmine/jsdoc-template/allclasses.tmpl +0 -17
  42. data/jasmine/jsdoc-template/allfiles.tmpl +0 -56
  43. data/jasmine/jsdoc-template/class.tmpl +0 -646
  44. data/jasmine/jsdoc-template/index.tmpl +0 -39
  45. data/jasmine/jsdoc-template/publish.js +0 -184
  46. data/jasmine/jsdoc-template/static/default.css +0 -162
  47. data/jasmine/jsdoc-template/static/header.html +0 -2
  48. data/jasmine/jsdoc-template/static/index.html +0 -19
  49. data/jasmine/jsdoc-template/symbol.tmpl +0 -35
  50. data/jasmine/jshint/jshint.js +0 -5919
  51. data/jasmine/jshint/run.js +0 -98
  52. data/jasmine/lib/jasmine-html.js +0 -190
  53. data/jasmine/lib/jasmine.css +0 -166
  54. data/jasmine/lib/jasmine.js +0 -2445
  55. data/jasmine/lib/json2.js +0 -478
  56. data/jasmine/spec/node_suite.js +0 -233
  57. data/jasmine/spec/runner.html +0 -82
  58. data/jasmine/spec/suites/BaseSpec.js +0 -27
  59. data/jasmine/spec/suites/CustomMatchersSpec.js +0 -97
  60. data/jasmine/spec/suites/EnvSpec.js +0 -158
  61. data/jasmine/spec/suites/ExceptionsSpec.js +0 -107
  62. data/jasmine/spec/suites/JsApiReporterSpec.js +0 -103
  63. data/jasmine/spec/suites/MatchersSpec.js +0 -795
  64. data/jasmine/spec/suites/MockClockSpec.js +0 -38
  65. data/jasmine/spec/suites/MultiReporterSpec.js +0 -45
  66. data/jasmine/spec/suites/NestedResultsSpec.js +0 -54
  67. data/jasmine/spec/suites/PrettyPrintSpec.js +0 -93
  68. data/jasmine/spec/suites/QueueSpec.js +0 -23
  69. data/jasmine/spec/suites/ReporterSpec.js +0 -56
  70. data/jasmine/spec/suites/RunnerSpec.js +0 -267
  71. data/jasmine/spec/suites/SpecRunningSpec.js +0 -1253
  72. data/jasmine/spec/suites/SpecSpec.js +0 -124
  73. data/jasmine/spec/suites/SpySpec.js +0 -201
  74. data/jasmine/spec/suites/SuiteSpec.js +0 -120
  75. data/jasmine/spec/suites/TrivialConsoleReporterSpec.js +0 -431
  76. data/jasmine/spec/suites/TrivialReporterSpec.js +0 -238
  77. data/jasmine/spec/suites/UtilSpec.js +0 -39
  78. data/jasmine/spec/suites/WaitsForBlockSpec.js +0 -118
  79. data/jasmine/src/Block.js +0 -22
  80. data/jasmine/src/Env.js +0 -264
  81. data/jasmine/src/JsApiReporter.js +0 -102
  82. data/jasmine/src/Matchers.js +0 -354
  83. data/jasmine/src/MultiReporter.js +0 -35
  84. data/jasmine/src/NestedResults.js +0 -80
  85. data/jasmine/src/PrettyPrinter.js +0 -123
  86. data/jasmine/src/Queue.js +0 -99
  87. data/jasmine/src/Reporter.js +0 -31
  88. data/jasmine/src/Runner.js +0 -77
  89. data/jasmine/src/Spec.js +0 -242
  90. data/jasmine/src/Suite.js +0 -82
  91. data/jasmine/src/WaitsBlock.js +0 -15
  92. data/jasmine/src/WaitsForBlock.js +0 -54
  93. data/jasmine/src/base.js +0 -608
  94. data/jasmine/src/console/TrivialConsoleReporter.js +0 -144
  95. data/jasmine/src/html/TrivialReporter.js +0 -190
  96. data/jasmine/src/html/jasmine.css +0 -166
  97. data/jasmine/src/mock-timeout.js +0 -183
  98. data/jasmine/src/util.js +0 -67
  99. data/jasmine/src/version.json +0 -5
@@ -1,166 +0,0 @@
1
- def jasmine_sources
2
- sources = ["src/base.js", "src/util.js", "src/Env.js", "src/Reporter.js", "src/Block.js"]
3
- sources += Dir.glob('src/*.js').reject { |f| f == 'src/base.js' || sources.include?(f) }.sort
4
- sources
5
- end
6
-
7
- def jasmine_html_sources
8
- ["src/html/TrivialReporter.js"]
9
- end
10
-
11
- def jasmine_version
12
- "#{version_hash['major']}.#{version_hash['minor']}.#{version_hash['build']}"
13
- end
14
-
15
- def version_hash
16
- require 'json'
17
- @version ||= JSON.parse(File.new("src/version.json").read);
18
- end
19
-
20
-
21
- def substitute_jasmine_version(filename)
22
- contents = File.read(filename)
23
- contents = contents.gsub(/##JASMINE_VERSION##/, (jasmine_version))
24
- contents = contents.gsub(/[^\n]*REMOVE_THIS_LINE_FROM_BUILD[^\n]*/, '')
25
- File.open(filename, 'w') { |f| f.write(contents) }
26
- end
27
-
28
- task :default => :spec
29
-
30
- desc "Run spec suite: Browser, Node, JSHint"
31
- task :spec => ["spec:node", "spec:browser", "jasmine:hint"]
32
-
33
- namespace :spec do
34
- desc 'Run specs in Node.js'
35
- task :node do
36
- raise "Node is required to run all jasmine specs" unless system("node spec/node_suite.js")
37
- end
38
-
39
- desc "Run specs in the default browser (MacOS only)"
40
- task :browser do
41
- system("open spec/runner.html")
42
- end
43
- end
44
-
45
- namespace :jasmine do
46
-
47
- desc 'Prepares for distribution'
48
- task :dist => ['jasmine:build',
49
- 'jasmine:doc',
50
- 'jasmine:build_pages',
51
- 'jasmine:build_example_project',
52
- 'jasmine:fill_index_downloads']
53
-
54
- desc 'Check jasmine sources for coding problems'
55
- task :lint do
56
- puts "Running JSHint via Node.js"
57
- system("node jshint/run.js") || exit(1)
58
- end
59
-
60
- desc "Alias to JSHint"
61
- task :hint => :lint
62
-
63
- desc 'Builds lib/jasmine from source'
64
- task :build => :lint do
65
- puts 'Building Jasmine from source'
66
-
67
- sources = jasmine_sources
68
- version = version_hash
69
-
70
- File.open("lib/jasmine.js", 'w') do |jasmine|
71
- sources.each do |source_filename|
72
- jasmine.puts(File.read(source_filename))
73
- end
74
-
75
- jasmine.puts %{
76
- jasmine.version_= {
77
- "major": #{version['major'].to_json},
78
- "minor": #{version['minor'].to_json},
79
- "build": #{version['build'].to_json},
80
- "revision": #{Time.now.to_i}
81
- };
82
- }
83
- end
84
-
85
- File.open("lib/jasmine-html.js", 'w') do |jasmine_html|
86
- jasmine_html_sources.each do |source_filename|
87
- jasmine_html.puts(File.read(source_filename))
88
- end
89
- end
90
-
91
- FileUtils.cp("src/html/jasmine.css", "lib/jasmine.css")
92
- end
93
-
94
- downloads_file = 'pages/download.html'
95
- task :need_pages_submodule do
96
- unless File.exist?(downloads_file)
97
- raise "Jasmine pages submodule isn't present. Run git submodule update --init"
98
- end
99
- end
100
-
101
- desc "Build the Github pages HTML"
102
- task :build_pages => :need_pages_submodule do
103
- Dir.chdir("pages") do
104
- FileUtils.rm_r('pages_output') if File.exist?('pages_output')
105
- Dir.chdir('pages_source') do
106
- system("frank export ../pages_output")
107
- end
108
- puts "\nCopying Frank output to the root of the gh-pages branch\n\n"
109
- system("cp -r pages_output/* .")
110
- end
111
- end
112
-
113
- desc "Build jasmine documentation"
114
- task :doc => :need_pages_submodule do
115
- puts 'Creating Jasmine Documentation'
116
- require 'rubygems'
117
- require 'jsdoc_helper'
118
-
119
- FileUtils.rm_r "pages/jsdoc", :force => true
120
-
121
- JsdocHelper::Rake::Task.new(:lambda_jsdoc) do |t|
122
- t[:files] = jasmine_sources << jasmine_html_sources
123
- t[:options] = "-a"
124
- t[:out] = "pages/jsdoc"
125
- # JsdocHelper bug: template must be relative to the JsdocHelper gem, ick
126
- t[:template] = File.join("../".*(100), Dir::getwd, "jsdoc-template")
127
- end
128
- Rake::Task[:lambda_jsdoc].invoke
129
- end
130
-
131
- desc "Build example project"
132
- task :build_example_project => :need_pages_submodule do
133
- require 'tmpdir'
134
-
135
- temp_dir = File.join(Dir.tmpdir, 'jasmine-standalone-project')
136
- puts "Building Example Project in #{temp_dir}"
137
- FileUtils.rm_r temp_dir if File.exist?(temp_dir)
138
- Dir.mkdir(temp_dir)
139
-
140
- root = File.expand_path(File.dirname(__FILE__))
141
- FileUtils.cp_r File.join(root, 'example/.'), File.join(temp_dir)
142
- substitute_jasmine_version(File.join(temp_dir, "SpecRunner.html"))
143
-
144
- lib_dir = File.join(temp_dir, "lib/jasmine-#{jasmine_version}")
145
- FileUtils.mkdir_p(lib_dir)
146
- {
147
- "lib/jasmine.js" => "jasmine.js",
148
- "lib/jasmine-html.js" => "jasmine-html.js",
149
- "src/html/jasmine.css" => "jasmine.css",
150
- "MIT.LICENSE" => "MIT.LICENSE"
151
- }.each_pair do |src, dest|
152
- FileUtils.cp(File.join(root, src), File.join(lib_dir, dest))
153
- end
154
-
155
- dist_dir = File.join(root, 'pages/downloads')
156
- zip_file_name = File.join(dist_dir, "jasmine-standalone-#{jasmine_version}.zip")
157
- puts "Zipping Example Project and moving to #{zip_file_name}"
158
- FileUtils.mkdir(dist_dir) unless File.exist?(dist_dir)
159
- if File.exist?(zip_file_name)
160
- puts "WARNING!!! #{zip_file_name} already exists!"
161
- FileUtils.rm(zip_file_name)
162
- end
163
- exec "cd #{temp_dir} && zip -r #{zip_file_name} . -x .[a-zA-Z0-9]*"
164
- end
165
-
166
- end
@@ -1,21 +0,0 @@
1
- # Project-specific configuration for CruiseControl.rb
2
- Project.configure do |project|
3
-
4
- # Send email notifications about broken and fixed builds to email1@your.site, email2@your.site (default: send to nobody)
5
- # project.email_notifier.emails = ['email1@your.site', 'email2@your.site']
6
-
7
- # Set email 'from' field to john@doe.com:
8
- # project.email_notifier.from = 'john@doe.com'
9
-
10
- # Build the project by invoking rake task 'custom'
11
- project.rake_task = 'jasmine:test:ci:saucelabs'
12
-
13
- # Build the project by invoking shell script "build_my_app.sh". Keep in mind that when the script is invoked,
14
- # current working directory is <em>[cruise&nbsp;data]</em>/projects/your_project/work, so if you do not keep build_my_app.sh
15
- # in version control, it should be '../build_my_app.sh' instead
16
- #project.build_command = 'cp ../saucelabs.yml .'
17
-
18
- # Ping Subversion for new revisions every 5 minutes (default: 30 seconds)
19
- # project.scheduler.polling_interval = 5.minutes
20
-
21
- end
@@ -1,27 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
- "http://www.w3.org/TR/html4/loose.dtd">
3
- <html>
4
- <head>
5
- <title>Jasmine Test Runner</title>
6
- <link rel="stylesheet" type="text/css" href="lib/jasmine-##JASMINE_VERSION##/jasmine.css">
7
- <script type="text/javascript" src="lib/jasmine-##JASMINE_VERSION##/jasmine.js"></script>
8
- <script type="text/javascript" src="lib/jasmine-##JASMINE_VERSION##/jasmine-html.js"></script>
9
-
10
- <!-- include source files here... -->
11
- <script type="text/javascript" src="src/Player.js"></script>
12
- <script type="text/javascript" src="src/Song.js"></script>
13
-
14
- <!-- include spec files here... -->
15
- <script type="text/javascript" src="spec/SpecHelper.js"></script>
16
- <script type="text/javascript" src="spec/PlayerSpec.js"></script>
17
-
18
- </head>
19
- <body>
20
- <div id="REMOVE_THIS_LINE_FROM_BUILD"><p>You must be trying to look at examples in the Jasmine source tree.</p><p>Please download a distribution version of Jasmine at <a href="http://pivotal.github.com/jasmine/">http://pivotal.github.com/jasmine/</a>.</p></div>
21
- <script type="text/javascript">
22
- jasmine.getEnv().addReporter(new jasmine.TrivialReporter());
23
- jasmine.getEnv().execute();
24
- </script>
25
-
26
- </body>
27
- </html>
@@ -1,58 +0,0 @@
1
- describe("Player", function() {
2
- var player;
3
- var song;
4
-
5
- beforeEach(function() {
6
- player = new Player();
7
- song = new Song();
8
- });
9
-
10
- it("should be able to play a Song", function() {
11
- player.play(song);
12
- expect(player.currentlyPlayingSong).toEqual(song);
13
-
14
- //demonstrates use of custom matcher
15
- expect(player).toBePlaying(song);
16
- });
17
-
18
- describe("when song has been paused", function() {
19
- beforeEach(function() {
20
- player.play(song);
21
- player.pause();
22
- });
23
-
24
- it("should indicate that the song is currently paused", function() {
25
- expect(player.isPlaying).toBeFalsy();
26
-
27
- // demonstrates use of 'not' with a custom matcher
28
- expect(player).not.toBePlaying(song);
29
- });
30
-
31
- it("should be possible to resume", function() {
32
- player.resume();
33
- expect(player.isPlaying).toBeTruthy();
34
- expect(player.currentlyPlayingSong).toEqual(song);
35
- });
36
- });
37
-
38
- // demonstrates use of spies to intercept and test method calls
39
- it("tells the current song if the user has made it a favorite", function() {
40
- spyOn(song, 'persistFavoriteStatus');
41
-
42
- player.play(song);
43
- player.makeFavorite();
44
-
45
- expect(song.persistFavoriteStatus).toHaveBeenCalledWith(true);
46
- });
47
-
48
- //demonstrates use of expected exceptions
49
- describe("#resume", function() {
50
- it("should throw an exception if song is already playing", function() {
51
- player.play(song);
52
-
53
- expect(function() {
54
- player.resume();
55
- }).toThrow("song is already playing");
56
- });
57
- });
58
- });
@@ -1,9 +0,0 @@
1
- beforeEach(function() {
2
- this.addMatchers({
3
- toBePlaying: function(expectedSong) {
4
- var player = this.actual;
5
- return player.currentlyPlayingSong === expectedSong &&
6
- player.isPlaying;
7
- }
8
- });
9
- });
@@ -1,22 +0,0 @@
1
- function Player() {
2
- }
3
- Player.prototype.play = function(song) {
4
- this.currentlyPlayingSong = song;
5
- this.isPlaying = true;
6
- };
7
-
8
- Player.prototype.pause = function() {
9
- this.isPlaying = false;
10
- };
11
-
12
- Player.prototype.resume = function() {
13
- if (this.isPlaying) {
14
- throw new Error("song is already playing");
15
- }
16
-
17
- this.isPlaying = true;
18
- };
19
-
20
- Player.prototype.makeFavorite = function() {
21
- this.currentlyPlayingSong.persistFavoriteStatus(true);
22
- };
@@ -1,7 +0,0 @@
1
- function Song() {
2
- }
3
-
4
- Song.prototype.persistFavoriteStatus = function(value) {
5
- // something complicated
6
- throw new Error("not yet implemented");
7
- };
@@ -1,17 +0,0 @@
1
- <div align="center">{+new Link().toFile("index.html").withText("Class Index")+}
2
- | {+new Link().toFile("files.html").withText("File Index")+}</div>
3
- <hr />
4
- <h2>Classes</h2>
5
- <ul class="classList">
6
- <for each="thisClass" in="data">
7
- <li>{!
8
- if (thisClass.alias == "_global_") {
9
- output += "<i>"+new Link().toClass(thisClass.alias)+"</i>";
10
- }
11
- else {
12
- output += new Link().toClass(thisClass.alias);
13
- }
14
- !}</li>
15
- </for>
16
- </ul>
17
- <hr />
@@ -1,56 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}"" />
6
- {! Link.base = ""; /* all generated links will be relative to this */ !}
7
- <title>JsDoc Reference - File Index</title>
8
- <meta name="generator" content="JsDoc Toolkit" />
9
-
10
- <style type="text/css">
11
- {+include("static/default.css")+}
12
- </style>
13
- </head>
14
-
15
- <body>
16
- {+include("static/header.html")+}
17
-
18
- <div id="index">
19
- {+publish.classesIndex+}
20
- </div>
21
-
22
- <div id="content">
23
- <h1 class="classTitle">File Index</h1>
24
-
25
- <for each="item" in="data">
26
- <div>
27
- <h2>{+new Link().toSrc(item.alias).withText(item.name)+}</h2>
28
- <if test="item.desc">{+resolveLinks(summarize(item.desc))+}</if>
29
- <dl>
30
- <if test="item.author">
31
- <dt class="heading">Author:</dt>
32
- <dd>{+item.author+}</dd>
33
- </if>
34
- <if test="item.version">
35
- <dt class="heading">Version:</dt>
36
- <dd>{+item.version+}</dd>
37
- </if>
38
- {! var locations = item.comment.getTag('location').map(function($){return $.toString().replace(/(^\$ ?| ?\$$)/g, '').replace(/^HeadURL: https:/g, 'http:');}) !}
39
- <if test="locations.length">
40
- <dt class="heading">Location:</dt>
41
- <for each="location" in="locations">
42
- <dd><a href="{+location+}">{+location+}</a></dd>
43
- </for>
44
- </if>
45
- </dl>
46
- </div>
47
- <hr />
48
- </for>
49
-
50
- </div>
51
- <div class="fineprint" style="clear:both">
52
- <if test="JSDOC.opt.D.copyright">&copy;{+JSDOC.opt.D.copyright+}<br /></if>
53
- Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+}
54
- </div>
55
- </body>
56
- </html>
@@ -1,646 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" />
6
- <meta name="generator" content="JsDoc Toolkit" />
7
- {! Link.base = "../"; /* all generated links will be relative to this */ !}
8
- <title>JsDoc Reference - {+data.alias+}</title>
9
-
10
- <style type="text/css">
11
- {+include("static/default.css")+}
12
- </style>
13
- </head>
14
-
15
- <body>
16
- <!-- ============================== header ================================= -->
17
- <!-- begin static/header.html -->
18
- {+include("static/header.html")+}
19
- <!-- end static/header.html -->
20
-
21
- <!-- ============================== classes index ============================ -->
22
- <div id="index">
23
- <!-- begin publish.classesIndex -->
24
- {+publish.classesIndex+}
25
- <!-- end publish.classesIndex -->
26
- </div>
27
-
28
- <div id="content">
29
- <!-- ============================== class title ============================ -->
30
- <h1 class="classTitle">
31
- {!
32
- var classType = "";
33
-
34
- if (data.isBuiltin()) {
35
- classType += "Built-In ";
36
- }
37
-
38
- if (data.isNamespace) {
39
- if (data.is('FUNCTION')) {
40
- classType += "Function ";
41
- }
42
- classType += "Namespace ";
43
- }
44
- else {
45
- classType += "Class ";
46
- }
47
- !}
48
- {+classType+}{+data.alias+}
49
- </h1>
50
-
51
- <!-- ============================== class summary ========================== -->
52
- <p class="description">
53
- <if test="data.augments.length"><br />Extends
54
- {+
55
- data.augments
56
- .sort()
57
- .map(
58
- function($) { return new Link().toSymbol($); }
59
- )
60
- .join(", ")
61
- +}.<br />
62
- </if>
63
-
64
- {+resolveLinks(data.classDesc)+}
65
-
66
- <if test="!data.isBuiltin()">{# isn't defined in any file #}
67
- <br /><i>Defined in: </i> {+new Link().toSrc(data.srcFile)+}.
68
- </if>
69
- </p>
70
-
71
- <!-- ============================== constructor summary ==================== -->
72
- <if test="!data.isBuiltin() && (data.isNamespace || data.is('CONSTRUCTOR'))">
73
- <table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class {+data.alias+}.">
74
- <caption>{+classType+}Summary</caption>
75
- <thead>
76
- <tr>
77
- <th scope="col">Constructor Attributes</th>
78
- <th scope="col">Constructor Name and Description</th>
79
- </tr>
80
- </thead>
81
- <tbody>
82
- <tr>
83
- <td class="attributes">{!
84
- if (data.isPrivate) output += "&lt;private&gt; ";
85
- if (data.isInner) output += "&lt;inner&gt; ";
86
- !}&nbsp;</td>
87
- <td class="nameDescription" {!if (data.comment.getTag("hilited").length){output += 'style="color: red"'}!}>
88
- <div class="fixedFont">
89
- <b>{+ new Link().toSymbol(data.alias).inner('constructor')+}</b><if test="classType != 'Namespace '">{+ makeSignature(data.params) +}</if>
90
- </div>
91
- <div class="description">{+resolveLinks(summarize(data.desc))+}</div>
92
- </td>
93
- </tr>
94
- </tbody>
95
- </table>
96
- </if>
97
-
98
- <!-- ============================== properties summary ===================== -->
99
- <if test="data.properties.length">
100
- {! var ownProperties = data.properties.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !}
101
- <if test="ownProperties.length">
102
- <table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class {+data.alias+}.">
103
- <caption>Field Summary</caption>
104
- <thead>
105
- <tr>
106
- <th scope="col">Field Attributes</th>
107
- <th scope="col">Field Name and Description</th>
108
- </tr>
109
- </thead>
110
- <tbody>
111
- <for each="member" in="ownProperties">
112
- <tr>
113
- <td class="attributes">{!
114
- if (member.isPrivate) output += "&lt;private&gt; ";
115
- if (member.isInner) output += "&lt;inner&gt; ";
116
- if (member.isStatic) output += "&lt;static&gt; ";
117
- if (member.isConstant) output += "&lt;constant&gt; ";
118
- !}&nbsp;</td>
119
- <td class="nameDescription">
120
- <div class="fixedFont">
121
- <if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b>
122
- </div>
123
- <div class="description">{+resolveLinks(summarize(member.desc))+}</div>
124
- </td>
125
- </tr>
126
- </for>
127
- </tbody>
128
- </table>
129
- </if>
130
-
131
- <if test="data.inheritsFrom.length">
132
- <dl class="inheritsList">
133
- {!
134
- var borrowedMembers = data.properties.filter(function($) {return $.memberOf != data.alias});
135
-
136
- var contributers = [];
137
- borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)});
138
- for (var i = 0, l = contributers.length; i < l; i++) {
139
- output +=
140
- "<dt>Fields borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>"
141
- +
142
- "<dd>" +
143
- borrowedMembers
144
- .filter(
145
- function($) { return $.memberOf == contributers[i] }
146
- )
147
- .sort(makeSortby("name"))
148
- .map(
149
- function($) { return new Link().toSymbol($.alias).withText($.name) }
150
- )
151
- .join(", ")
152
- +
153
- "</dd>";
154
- }
155
- !}
156
- </dl>
157
- </if>
158
- </if>
159
-
160
- <!-- ============================== methods summary ======================== -->
161
- <if test="data.methods.length">
162
- {! var ownMethods = data.methods.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !}
163
- <if test="ownMethods.length">
164
- <table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class {+data.alias+}.">
165
- <caption>Method Summary</caption>
166
- <thead>
167
- <tr>
168
- <th scope="col">Method Attributes</th>
169
- <th scope="col">Method Name and Description</th>
170
- </tr>
171
- </thead>
172
- <tbody>
173
- <for each="member" in="ownMethods">
174
- <tr>
175
- <td class="attributes">{!
176
- if (member.isPrivate) output += "&lt;private&gt; ";
177
- if (member.isInner) output += "&lt;inner&gt; ";
178
- if (member.isStatic) output += "&lt;static&gt; ";
179
- !}&nbsp;</td>
180
- <td class="nameDescription">
181
- <div class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b>{+makeSignature(member.params)+}
182
- </div>
183
- <div class="description">{+resolveLinks(summarize(member.desc))+}</div>
184
- </td>
185
- </tr>
186
- </for>
187
- </tbody>
188
- </table>
189
- </if>
190
-
191
- <if test="data.inheritsFrom.length">
192
- <dl class="inheritsList">
193
- {!
194
- var borrowedMembers = data.methods.filter(function($) {return $.memberOf != data.alias});
195
- var contributers = [];
196
- borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)});
197
- for (var i = 0, l = contributers.length; i < l; i++) {
198
- output +=
199
- "<dt>Methods borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>"
200
- +
201
- "<dd>" +
202
- borrowedMembers
203
- .filter(
204
- function($) { return $.memberOf == contributers[i] }
205
- )
206
- .sort(makeSortby("name"))
207
- .map(
208
- function($) { return new Link().toSymbol($.alias).withText($.name) }
209
- )
210
- .join(", ")
211
- +
212
- "</dd>";
213
- }
214
-
215
- !}
216
- </dl>
217
- </if>
218
- </if>
219
- <!-- ============================== events summary ======================== -->
220
- <if test="data.events.length">
221
- {! var ownEvents = data.events.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !}
222
- <if test="ownEvents.length">
223
- <table class="summaryTable" cellspacing="0" summary="A summary of the events documented in the class {+data.alias+}.">
224
- <caption>Event Summary</caption>
225
- <thead>
226
- <tr>
227
- <th scope="col">Event Attributes</th>
228
- <th scope="col">Event Name and Description</th>
229
- </tr>
230
- </thead>
231
- <tbody>
232
- <for each="member" in="ownEvents">
233
- <tr>
234
- <td class="attributes">{!
235
- if (member.isPrivate) output += "&lt;private&gt; ";
236
- if (member.isInner) output += "&lt;inner&gt; ";
237
- if (member.isStatic) output += "&lt;static&gt; ";
238
- !}&nbsp;</td>
239
- <td class="nameDescription">
240
- <div class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b>{+makeSignature(member.params)+}
241
- </div>
242
- <div class="description">{+resolveLinks(summarize(member.desc))+}</div>
243
- </td>
244
- </tr>
245
- </for>
246
- </tbody>
247
- </table>
248
- </if>
249
-
250
- <if test="data.inheritsFrom.length">
251
- <dl class="inheritsList">
252
- {!
253
- var borrowedMembers = data.events.filter(function($) {return $.memberOf != data.alias});
254
- var contributers = [];
255
- borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)});
256
- for (var i = 0, l = contributers.length; i < l; i++) {
257
- output +=
258
- "<dt>Events borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>"
259
- +
260
- "<dd>" +
261
- borrowedMembers
262
- .filter(
263
- function($) { return $.memberOf == contributers[i] }
264
- )
265
- .sort(makeSortby("name"))
266
- .map(
267
- function($) { return new Link().toSymbol($.alias).withText($.name) }
268
- )
269
- .join(", ")
270
- +
271
- "</dd>";
272
- }
273
-
274
- !}
275
- </dl>
276
- </if>
277
- </if>
278
-
279
- <!-- ============================== constructor details ==================== -->
280
- <if test="!data.isBuiltin() && (data.isNamespace || data.is('CONSTRUCTOR'))">
281
- <div class="details"><a name="constructor"> </a>
282
- <div class="sectionTitle">
283
- {+classType+}Detail
284
- </div>
285
-
286
- <div class="fixedFont">{!
287
- if (data.isPrivate) output += "&lt;private&gt; ";
288
- if (data.isInner) output += "&lt;inner&gt; ";
289
- !}
290
- <b>{+ data.alias +}</b><if test="classType != 'Namespace '">{+ makeSignature(data.params) +}</if>
291
- </div>
292
-
293
- <div class="description">
294
- {+resolveLinks(data.desc)+}
295
- <if test="data.author"><br /><i>Author: </i>{+data.author+}.</if>
296
- </div>
297
-
298
- <if test="data.example.length">
299
- <for each="example" in="data.example">
300
- <pre class="code">{+example+}</pre>
301
- </for>
302
- </if>
303
-
304
-
305
- <if test="data.params.length">
306
- <dl class="detailList">
307
- <dt class="heading">Parameters:</dt>
308
- <for each="item" in="data.params">
309
- <dt>
310
- {+((item.type)?""+("<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type)+"}</span> ")) : "")+} <b>{+item.name+}</b>
311
- <if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
312
- </dt>
313
- <dd>{+resolveLinks(item.desc)+}</dd>
314
- </for>
315
- </dl>
316
- </if>
317
- <if test="data.deprecated">
318
- <dl class="detailList">
319
- <dt class="heading">Deprecated:</dt>
320
- <dt>
321
- {+resolveLinks(data.deprecated)+}
322
- </dt>
323
- </dl>
324
- </if>
325
- <if test="data.since">
326
- <dl class="detailList">
327
- <dt class="heading">Since:</dt>
328
- <dd>{+ data.since +}</dd>
329
- </dl>
330
- </if>
331
- <if test="data.exceptions.length">
332
- <dl class="detailList">
333
- <dt class="heading">Throws:</dt>
334
- <for each="item" in="data.exceptions">
335
- <dt>
336
- {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b>
337
- </dt>
338
- <dd>{+resolveLinks(item.desc)+}</dd>
339
- </for>
340
- </dl>
341
- </if>
342
- <if test="data.returns.length">
343
- <dl class="detailList">
344
- <dt class="heading">Returns:</dt>
345
- <for each="item" in="data.returns">
346
- <dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd>
347
- </for>
348
- </dl>
349
- </if>
350
- <if test="data.requires.length">
351
- <dl class="detailList">
352
- <dt class="heading">Requires:</dt>
353
- <for each="item" in="data.requires">
354
- <dd>{+ resolveLinks(item) +}</dd>
355
- </for>
356
- </dl>
357
- </if>
358
- <if test="data.see.length">
359
- <dl class="detailList">
360
- <dt class="heading">See:</dt>
361
- <for each="item" in="data.see">
362
- <dd>{+ new Link().toSymbol(item) +}</dd>
363
- </for>
364
- </dl>
365
- </if>
366
-
367
- </div>
368
- </if>
369
-
370
- <!-- ============================== field details ========================== -->
371
- <if test="defined(ownProperties) && ownProperties.length">
372
- <div class="sectionTitle">
373
- Field Detail
374
- </div>
375
- <for each="member" in="ownProperties">
376
- <a name="{+Link.symbolNameToLinkName(member)+}"> </a>
377
- <div class="fixedFont">{!
378
- if (member.isPrivate) output += "&lt;private&gt; ";
379
- if (member.isInner) output += "&lt;inner&gt; ";
380
- if (member.isStatic) output += "&lt;static&gt; ";
381
- if (member.isConstant) output += "&lt;constant&gt; ";
382
- !}
383
-
384
- <if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
385
- <if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b>
386
-
387
- </div>
388
- <div class="description">
389
- {+resolveLinks(member.desc)+}
390
- <if test="member.srcFile != data.srcFile">
391
- <br />
392
- <i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}.
393
- </if>
394
- <if test="member.author"><br /><i>Author: </i>{+member.author+}.</if>
395
- </div>
396
-
397
- <if test="member.example.length">
398
- <for each="example" in="member.example">
399
- <pre class="code">{+example+}</pre>
400
- </for>
401
- </if>
402
-
403
- <if test="member.deprecated">
404
- <dl class="detailList">
405
- <dt class="heading">Deprecated:</dt>
406
- <dt>
407
- {+ member.deprecated +}
408
- </dt>
409
- </dl>
410
- </if>
411
- <if test="member.since">
412
- <dl class="detailList">
413
- <dt class="heading">Since:</dt>
414
- <dd>{+ member.since +}</dd>
415
- </dl>
416
- </if>
417
- <if test="member.see.length">
418
- <dl class="detailList">
419
- <dt class="heading">See:</dt>
420
- <for each="item" in="member.see">
421
- <dd>{+ new Link().toSymbol(item) +}</dd>
422
- </for>
423
- </dl>
424
- </if>
425
- <if test="member.defaultValue">
426
- <dl class="detailList">
427
- <dt class="heading">Default Value:</dt>
428
- <dd>
429
- {+resolveLinks(member.defaultValue)+}
430
- </dd>
431
- </dl>
432
- </if>
433
-
434
- <if test="!$member_last"><hr /></if>
435
- </for>
436
- </if>
437
-
438
- <!-- ============================== method details ========================= -->
439
- <if test="defined(ownMethods) && ownMethods.length">
440
- <div class="sectionTitle">
441
- Method Detail
442
- </div>
443
- <for each="member" in="ownMethods">
444
- <a name="{+Link.symbolNameToLinkName(member)+}"> </a>
445
- <div class="fixedFont">{!
446
- if (member.isPrivate) output += "&lt;private&gt; ";
447
- if (member.isInner) output += "&lt;inner&gt; ";
448
- if (member.isStatic) output += "&lt;static&gt; ";
449
- !}
450
-
451
- <if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
452
- <if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b>{+makeSignature(member.params)+}
453
-
454
- </div>
455
- <div class="description">
456
- {+resolveLinks(member.desc)+}
457
- <if test="member.srcFile != data.srcFile">
458
- <br />
459
- <i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}.
460
- </if>
461
- <if test="member.author"><br /><i>Author: </i>{+member.author+}.</if>
462
- </div>
463
-
464
- <if test="member.example.length">
465
- <for each="example" in="member.example">
466
- <pre class="code">{+example+}</pre>
467
- </for>
468
- </if>
469
-
470
- <if test="member.params.length">
471
- <dl class="detailList">
472
- <dt class="heading">Parameters:</dt>
473
- <for each="item" in="member.params">
474
- <dt>
475
- {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}<b>{+item.name+}</b>
476
- <if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
477
- </dt>
478
- <dd>{+resolveLinks(item.desc)+}</dd>
479
- </for>
480
- </dl>
481
- </if>
482
- <if test="member.deprecated">
483
- <dl class="detailList">
484
- <dt class="heading">Deprecated:</dt>
485
- <dt>
486
- {+member.deprecated+}
487
- </dt>
488
- </dl>
489
- </if>
490
- <if test="member.since">
491
- <dl class="detailList">
492
- <dt class="heading">Since:</dt>
493
- <dd>{+ member.since +}</dd>
494
- </dl>
495
- </dl>
496
- </if>
497
- <if test="member.exceptions.length">
498
- <dl class="detailList">
499
- <dt class="heading">Throws:</dt>
500
- <for each="item" in="member.exceptions">
501
- <dt>
502
- {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b>
503
- </dt>
504
- <dd>{+resolveLinks(item.desc)+}</dd>
505
- </for>
506
- </dl>
507
- </if>
508
- <if test="member.returns.length">
509
- <dl class="detailList">
510
- <dt class="heading">Returns:</dt>
511
- <for each="item" in="member.returns">
512
- <dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd>
513
- </for>
514
- </dl>
515
- </if>
516
- <if test="member.requires.length">
517
- <dl class="detailList">
518
- <dt class="heading">Requires:</dt>
519
- <for each="item" in="member.requires">
520
- <dd>{+ resolveLinks(item) +}</dd>
521
- </for>
522
- </dl>
523
- </if>
524
- <if test="member.see.length">
525
- <dl class="detailList">
526
- <dt class="heading">See:</dt>
527
- <for each="item" in="member.see">
528
- <dd>{+ new Link().toSymbol(item) +}</dd>
529
- </for>
530
- </dl>
531
- </if>
532
-
533
- <if test="!$member_last"><hr /></if>
534
- </for>
535
- </if>
536
-
537
- <!-- ============================== event details ========================= -->
538
- <if test="defined(ownEvents) && ownEvents.length">
539
- <div class="sectionTitle">
540
- Event Detail
541
- </div>
542
- <for each="member" in="ownEvents">
543
- <a name="event:{+Link.symbolNameToLinkName(member)+}"> </a>
544
- <div class="fixedFont">{!
545
- if (member.isPrivate) output += "&lt;private&gt; ";
546
- if (member.isInner) output += "&lt;inner&gt; ";
547
- if (member.isStatic) output += "&lt;static&gt; ";
548
- !}
549
-
550
- <if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
551
- <if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b>{+makeSignature(member.params)+}
552
-
553
- </div>
554
- <div class="description">
555
- {+resolveLinks(member.desc)+}
556
- <if test="member.srcFile != data.srcFile">
557
- <br />
558
- <i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}.
559
- </if>
560
- <if test="member.author"><br /><i>Author: </i>{+member.author+}.</if>
561
- </div>
562
-
563
- <if test="member.example.length">
564
- <for each="example" in="member.example">
565
- <pre class="code">{+example+}</pre>
566
- </for>
567
- </if>
568
-
569
- <if test="member.params.length">
570
- <dl class="detailList">
571
- <dt class="heading">Parameters:</dt>
572
- <for each="item" in="member.params">
573
- <dt>
574
- {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}<b>{+item.name+}</b>
575
- <if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
576
- </dt>
577
- <dd>{+resolveLinks(item.desc)+}</dd>
578
- </for>
579
- </dl>
580
- </if>
581
- <if test="member.deprecated">
582
- <dl class="detailList">
583
- <dt class="heading">Deprecated:</dt>
584
- <dt>
585
- {+member.deprecated+}
586
- </dt>
587
- </dl>
588
- </if>
589
- <if test="member.since">
590
- <dl class="detailList">
591
- <dt class="heading">Since:</dt>
592
- <dd>{+ member.since +}</dd>
593
- </dl>
594
- </dl>
595
- </if>
596
- <if test="member.exceptions.length">
597
- <dl class="detailList">
598
- <dt class="heading">Throws:</dt>
599
- <for each="item" in="member.exceptions">
600
- <dt>
601
- {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b>
602
- </dt>
603
- <dd>{+resolveLinks(item.desc)+}</dd>
604
- </for>
605
- </dl>
606
- </if>
607
- <if test="member.returns.length">
608
- <dl class="detailList">
609
- <dt class="heading">Returns:</dt>
610
- <for each="item" in="member.returns">
611
- <dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd>
612
- </for>
613
- </dl>
614
- </if>
615
- <if test="member.requires.length">
616
- <dl class="detailList">
617
- <dt class="heading">Requires:</dt>
618
- <for each="item" in="member.requires">
619
- <dd>{+ resolveLinks(item) +}</dd>
620
- </for>
621
- </dl>
622
- </if>
623
- <if test="member.see.length">
624
- <dl class="detailList">
625
- <dt class="heading">See:</dt>
626
- <for each="item" in="member.see">
627
- <dd>{+ new Link().toSymbol(item) +}</dd>
628
- </for>
629
- </dl>
630
- </if>
631
-
632
- <if test="!$member_last"><hr /></if>
633
- </for>
634
- </if>
635
-
636
- <hr />
637
- </div>
638
-
639
-
640
- <!-- ============================== footer ================================= -->
641
- <div class="fineprint" style="clear:both">
642
- <if test="JSDOC.opt.D.copyright">&copy;{+JSDOC.opt.D.copyright+}<br /></if>
643
- Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+}
644
- </div>
645
- </body>
646
- </html>