vermillion-client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +320 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +26 -0
- data/README.md +55 -0
- data/Rakefile +10 -0
- data/bin/setup +7 -0
- data/bin/vermillion +16 -0
- data/doc/ChangeBranchTest.html +240 -0
- data/doc/ConfigurationTest.html +277 -0
- data/doc/CreateTest.html +240 -0
- data/doc/Gemfile.html +145 -0
- data/doc/Gemfile_lock.html +173 -0
- data/doc/README_md.html +216 -0
- data/doc/Rakefile.html +151 -0
- data/doc/UpdateTest.html +280 -0
- data/doc/Vermillion.html +272 -0
- data/doc/Vermillion/Cfg.html +362 -0
- data/doc/Vermillion/Controller.html +185 -0
- data/doc/Vermillion/Controller/Base.html +503 -0
- data/doc/Vermillion/Controller/Change.html +301 -0
- data/doc/Vermillion/Controller/Create.html +301 -0
- data/doc/Vermillion/Controller/Firstrun.html +256 -0
- data/doc/Vermillion/Controller/Status.html +308 -0
- data/doc/Vermillion/Controller/Update.html +326 -0
- data/doc/Vermillion/Helper.html +252 -0
- data/doc/Vermillion/Helper/ApiCommunication.html +307 -0
- data/doc/Vermillion/Helper/Endpoint.html +506 -0
- data/doc/Vermillion/Helper/Formatting.html +250 -0
- data/doc/Vermillion/Helper/Network.html +304 -0
- data/doc/Vermillion/Helper/Results.html +341 -0
- data/doc/Vermillion/Helper/Time.html +295 -0
- data/doc/Vermillion/Request.html +332 -0
- data/doc/Vermillion/Router.html +351 -0
- data/doc/Vermillion/Test.html +183 -0
- data/doc/Vermillion/Test/Base.html +260 -0
- data/doc/Vermillion/Utils.html +247 -0
- data/doc/bin/setup.html +147 -0
- data/doc/created.rid +33 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +138 -0
- data/doc/js/darkfish.js +155 -0
- data/doc/js/jquery.js +4 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +595 -0
- data/doc/table_of_contents.html +255 -0
- data/doc/vermillion-client_gemspec.html +166 -0
- data/lib/client.rb +35 -0
- data/lib/client/config.rb +58 -0
- data/lib/client/controller.rb +68 -0
- data/lib/client/controller/change.rb +26 -0
- data/lib/client/controller/create.rb +26 -0
- data/lib/client/controller/firstrun.rb +30 -0
- data/lib/client/controller/status.rb +43 -0
- data/lib/client/controller/update.rb +26 -0
- data/lib/client/helper.rb +21 -0
- data/lib/client/helper/apicommunication.rb +78 -0
- data/lib/client/helper/endpoint.rb +61 -0
- data/lib/client/helper/formatting.rb +23 -0
- data/lib/client/helper/network.rb +54 -0
- data/lib/client/helper/results.rb +28 -0
- data/lib/client/helper/time.rb +33 -0
- data/lib/client/request.rb +22 -0
- data/lib/client/router.rb +56 -0
- data/lib/client/utils.rb +18 -0
- data/lib/client/version.rb +4 -0
- data/lib/test.rb +13 -0
- data/lib/test/base.rb +17 -0
- data/test/test_change_branch.rb +14 -0
- data/test/test_configuration.rb +21 -0
- data/test/test_create.rb +14 -0
- data/test/test_update.rb +24 -0
- data/vermillion-client.gemspec +23 -0
- metadata +201 -0
data/doc/bin/setup.html
ADDED
@@ -0,0 +1,147 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>setup - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body class="file">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../index.html">Home</a>
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
<div id="project-metadata">
|
49
|
+
<nav id="fileindex-section" class="section project-section">
|
50
|
+
<h3 class="section-header">Pages</h3>
|
51
|
+
|
52
|
+
<ul>
|
53
|
+
|
54
|
+
<li class="file"><a href="../Gemfile.html">Gemfile</a>
|
55
|
+
|
56
|
+
<li class="file"><a href="../Gemfile_lock.html">Gemfile.lock</a>
|
57
|
+
|
58
|
+
<li class="file"><a href="../README_md.html">README</a>
|
59
|
+
|
60
|
+
<li class="file"><a href="../Rakefile.html">Rakefile</a>
|
61
|
+
|
62
|
+
<li class="file"><a href="../bin/setup.html">setup</a>
|
63
|
+
|
64
|
+
<li class="file"><a href="../vermillion-client_gemspec.html">vermillion-client.gemspec</a>
|
65
|
+
|
66
|
+
</ul>
|
67
|
+
</nav>
|
68
|
+
|
69
|
+
<nav id="classindex-section" class="section project-section">
|
70
|
+
<h3 class="section-header">Class and Module Index</h3>
|
71
|
+
|
72
|
+
<ul class="link-list">
|
73
|
+
|
74
|
+
<li><a href="../ChangeBranchTest.html">ChangeBranchTest</a>
|
75
|
+
|
76
|
+
<li><a href="../ConfigurationTest.html">ConfigurationTest</a>
|
77
|
+
|
78
|
+
<li><a href="../CreateTest.html">CreateTest</a>
|
79
|
+
|
80
|
+
<li><a href="../UpdateTest.html">UpdateTest</a>
|
81
|
+
|
82
|
+
<li><a href="../Vermillion.html">Vermillion</a>
|
83
|
+
|
84
|
+
<li><a href="../Vermillion/Cfg.html">Vermillion::Cfg</a>
|
85
|
+
|
86
|
+
<li><a href="../Vermillion/Controller.html">Vermillion::Controller</a>
|
87
|
+
|
88
|
+
<li><a href="../Vermillion/Controller/Base.html">Vermillion::Controller::Base</a>
|
89
|
+
|
90
|
+
<li><a href="../Vermillion/Controller/Change.html">Vermillion::Controller::Change</a>
|
91
|
+
|
92
|
+
<li><a href="../Vermillion/Controller/Create.html">Vermillion::Controller::Create</a>
|
93
|
+
|
94
|
+
<li><a href="../Vermillion/Controller/Firstrun.html">Vermillion::Controller::Firstrun</a>
|
95
|
+
|
96
|
+
<li><a href="../Vermillion/Controller/Status.html">Vermillion::Controller::Status</a>
|
97
|
+
|
98
|
+
<li><a href="../Vermillion/Controller/Update.html">Vermillion::Controller::Update</a>
|
99
|
+
|
100
|
+
<li><a href="../Vermillion/Helper.html">Vermillion::Helper</a>
|
101
|
+
|
102
|
+
<li><a href="../Vermillion/Helper/ApiCommunication.html">Vermillion::Helper::ApiCommunication</a>
|
103
|
+
|
104
|
+
<li><a href="../Vermillion/Helper/Endpoint.html">Vermillion::Helper::Endpoint</a>
|
105
|
+
|
106
|
+
<li><a href="../Vermillion/Helper/Formatting.html">Vermillion::Helper::Formatting</a>
|
107
|
+
|
108
|
+
<li><a href="../Vermillion/Helper/Network.html">Vermillion::Helper::Network</a>
|
109
|
+
|
110
|
+
<li><a href="../Vermillion/Helper/Results.html">Vermillion::Helper::Results</a>
|
111
|
+
|
112
|
+
<li><a href="../Vermillion/Helper/Time.html">Vermillion::Helper::Time</a>
|
113
|
+
|
114
|
+
<li><a href="../Vermillion/Request.html">Vermillion::Request</a>
|
115
|
+
|
116
|
+
<li><a href="../Vermillion/Router.html">Vermillion::Router</a>
|
117
|
+
|
118
|
+
<li><a href="../Vermillion/Test.html">Vermillion::Test</a>
|
119
|
+
|
120
|
+
<li><a href="../Vermillion/Test/Base.html">Vermillion::Test::Base</a>
|
121
|
+
|
122
|
+
<li><a href="../Vermillion/Utils.html">Vermillion::Utils</a>
|
123
|
+
|
124
|
+
</ul>
|
125
|
+
</nav>
|
126
|
+
|
127
|
+
</div>
|
128
|
+
</nav>
|
129
|
+
|
130
|
+
<div id="documentation" class="description">
|
131
|
+
|
132
|
+
<p>#!/bin/bash set -euo pipefail IFS=$'nt'</p>
|
133
|
+
|
134
|
+
<p>bundle install</p>
|
135
|
+
|
136
|
+
<p># Do any other automated setup that you need to do here</p>
|
137
|
+
|
138
|
+
</div>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<footer id="validator-badges">
|
143
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
144
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
145
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
146
|
+
</footer>
|
147
|
+
|
data/doc/created.rid
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
Wed, 12 Oct 2016 11:58:25 -0600
|
2
|
+
./bin/setup Thu, 21 Apr 2016 10:21:49 -0600
|
3
|
+
./bin/vermillion Fri, 07 Oct 2016 15:28:31 -0600
|
4
|
+
./Gemfile Thu, 21 Apr 2016 10:21:49 -0600
|
5
|
+
./Gemfile.lock Thu, 21 Apr 2016 10:21:49 -0600
|
6
|
+
./lib/client/config.rb Wed, 12 Oct 2016 09:53:05 -0600
|
7
|
+
./lib/client/controller/change.rb Wed, 12 Oct 2016 11:53:26 -0600
|
8
|
+
./lib/client/controller/create.rb Wed, 12 Oct 2016 11:54:57 -0600
|
9
|
+
./lib/client/controller/firstrun.rb Wed, 12 Oct 2016 11:25:36 -0600
|
10
|
+
./lib/client/controller/status.rb Wed, 12 Oct 2016 11:26:51 -0600
|
11
|
+
./lib/client/controller/update.rb Wed, 12 Oct 2016 11:28:12 -0600
|
12
|
+
./lib/client/controller.rb Wed, 12 Oct 2016 09:41:06 -0600
|
13
|
+
./lib/client/helper/apicommunication.rb Wed, 12 Oct 2016 11:31:25 -0600
|
14
|
+
./lib/client/helper/endpoint.rb Wed, 12 Oct 2016 11:41:15 -0600
|
15
|
+
./lib/client/helper/formatting.rb Wed, 12 Oct 2016 11:41:49 -0600
|
16
|
+
./lib/client/helper/network.rb Wed, 12 Oct 2016 11:44:32 -0600
|
17
|
+
./lib/client/helper/results.rb Wed, 12 Oct 2016 11:46:37 -0600
|
18
|
+
./lib/client/helper/time.rb Wed, 12 Oct 2016 11:50:26 -0600
|
19
|
+
./lib/client/helper.rb Wed, 12 Oct 2016 09:54:30 -0600
|
20
|
+
./lib/client/request.rb Wed, 12 Oct 2016 09:54:48 -0600
|
21
|
+
./lib/client/router.rb Wed, 12 Oct 2016 11:55:26 -0600
|
22
|
+
./lib/client/utils.rb Wed, 12 Oct 2016 09:57:36 -0600
|
23
|
+
./lib/client/version.rb Wed, 12 Oct 2016 09:57:55 -0600
|
24
|
+
./lib/client.rb Wed, 12 Oct 2016 11:52:45 -0600
|
25
|
+
./lib/test/base.rb Wed, 12 Oct 2016 11:58:18 -0600
|
26
|
+
./lib/test.rb Wed, 12 Oct 2016 09:59:05 -0600
|
27
|
+
./Rakefile Fri, 07 Oct 2016 15:28:31 -0600
|
28
|
+
./README.md Tue, 11 Oct 2016 16:24:09 -0600
|
29
|
+
./test/test_change_branch.rb Wed, 12 Oct 2016 11:56:03 -0600
|
30
|
+
./test/test_configuration.rb Wed, 12 Oct 2016 11:56:17 -0600
|
31
|
+
./test/test_create.rb Wed, 12 Oct 2016 11:56:29 -0600
|
32
|
+
./test/test_update.rb Wed, 12 Oct 2016 11:56:47 -0600
|
33
|
+
./vermillion-client.gemspec Wed, 12 Oct 2016 11:53:02 -0600
|
data/doc/images/add.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/images/bug.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/images/date.png
ADDED
Binary file
|
Binary file
|
data/doc/images/find.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/images/ruby.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/images/zoom.png
ADDED
Binary file
|
data/doc/index.html
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "./";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body>
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="./index.html">Home</a>
|
28
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
<div id="project-metadata">
|
47
|
+
<nav id="fileindex-section" class="section project-section">
|
48
|
+
<h3 class="section-header">Pages</h3>
|
49
|
+
|
50
|
+
<ul>
|
51
|
+
|
52
|
+
<li class="file"><a href="./Gemfile.html">Gemfile</a>
|
53
|
+
|
54
|
+
<li class="file"><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
55
|
+
|
56
|
+
<li class="file"><a href="./README_md.html">README</a>
|
57
|
+
|
58
|
+
<li class="file"><a href="./Rakefile.html">Rakefile</a>
|
59
|
+
|
60
|
+
<li class="file"><a href="./bin/setup.html">setup</a>
|
61
|
+
|
62
|
+
<li class="file"><a href="./vermillion-client_gemspec.html">vermillion-client.gemspec</a>
|
63
|
+
|
64
|
+
</ul>
|
65
|
+
</nav>
|
66
|
+
|
67
|
+
<nav id="classindex-section" class="section project-section">
|
68
|
+
<h3 class="section-header">Class and Module Index</h3>
|
69
|
+
|
70
|
+
<ul class="link-list">
|
71
|
+
|
72
|
+
<li><a href="./ChangeBranchTest.html">ChangeBranchTest</a>
|
73
|
+
|
74
|
+
<li><a href="./ConfigurationTest.html">ConfigurationTest</a>
|
75
|
+
|
76
|
+
<li><a href="./CreateTest.html">CreateTest</a>
|
77
|
+
|
78
|
+
<li><a href="./UpdateTest.html">UpdateTest</a>
|
79
|
+
|
80
|
+
<li><a href="./Vermillion.html">Vermillion</a>
|
81
|
+
|
82
|
+
<li><a href="./Vermillion/Cfg.html">Vermillion::Cfg</a>
|
83
|
+
|
84
|
+
<li><a href="./Vermillion/Controller.html">Vermillion::Controller</a>
|
85
|
+
|
86
|
+
<li><a href="./Vermillion/Controller/Base.html">Vermillion::Controller::Base</a>
|
87
|
+
|
88
|
+
<li><a href="./Vermillion/Controller/Change.html">Vermillion::Controller::Change</a>
|
89
|
+
|
90
|
+
<li><a href="./Vermillion/Controller/Create.html">Vermillion::Controller::Create</a>
|
91
|
+
|
92
|
+
<li><a href="./Vermillion/Controller/Firstrun.html">Vermillion::Controller::Firstrun</a>
|
93
|
+
|
94
|
+
<li><a href="./Vermillion/Controller/Status.html">Vermillion::Controller::Status</a>
|
95
|
+
|
96
|
+
<li><a href="./Vermillion/Controller/Update.html">Vermillion::Controller::Update</a>
|
97
|
+
|
98
|
+
<li><a href="./Vermillion/Helper.html">Vermillion::Helper</a>
|
99
|
+
|
100
|
+
<li><a href="./Vermillion/Helper/ApiCommunication.html">Vermillion::Helper::ApiCommunication</a>
|
101
|
+
|
102
|
+
<li><a href="./Vermillion/Helper/Endpoint.html">Vermillion::Helper::Endpoint</a>
|
103
|
+
|
104
|
+
<li><a href="./Vermillion/Helper/Formatting.html">Vermillion::Helper::Formatting</a>
|
105
|
+
|
106
|
+
<li><a href="./Vermillion/Helper/Network.html">Vermillion::Helper::Network</a>
|
107
|
+
|
108
|
+
<li><a href="./Vermillion/Helper/Results.html">Vermillion::Helper::Results</a>
|
109
|
+
|
110
|
+
<li><a href="./Vermillion/Helper/Time.html">Vermillion::Helper::Time</a>
|
111
|
+
|
112
|
+
<li><a href="./Vermillion/Request.html">Vermillion::Request</a>
|
113
|
+
|
114
|
+
<li><a href="./Vermillion/Router.html">Vermillion::Router</a>
|
115
|
+
|
116
|
+
<li><a href="./Vermillion/Test.html">Vermillion::Test</a>
|
117
|
+
|
118
|
+
<li><a href="./Vermillion/Test/Base.html">Vermillion::Test::Base</a>
|
119
|
+
|
120
|
+
<li><a href="./Vermillion/Utils.html">Vermillion::Utils</a>
|
121
|
+
|
122
|
+
</ul>
|
123
|
+
</nav>
|
124
|
+
|
125
|
+
</div>
|
126
|
+
</nav>
|
127
|
+
|
128
|
+
<div id="documentation" class="description">
|
129
|
+
<p>This is the API documentation for RDoc Documentation.
|
130
|
+
</div>
|
131
|
+
|
132
|
+
|
133
|
+
<footer id="validator-badges">
|
134
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
135
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
136
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
137
|
+
</footer>
|
138
|
+
|
data/doc/js/darkfish.js
ADDED
@@ -0,0 +1,155 @@
|
|
1
|
+
/**
|
2
|
+
*
|
3
|
+
* Darkfish Page Functions
|
4
|
+
* $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
|
5
|
+
*
|
6
|
+
* Author: Michael Granger <mgranger@laika.com>
|
7
|
+
*
|
8
|
+
*/
|
9
|
+
|
10
|
+
/* Provide console simulation for firebug-less environments */
|
11
|
+
if (!("console" in window) || !("firebug" in console)) {
|
12
|
+
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
13
|
+
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
14
|
+
|
15
|
+
window.console = {};
|
16
|
+
for (var i = 0; i < names.length; ++i)
|
17
|
+
window.console[names[i]] = function() {};
|
18
|
+
};
|
19
|
+
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Unwrap the first element that matches the given @expr@ from the targets and return them.
|
23
|
+
*/
|
24
|
+
$.fn.unwrap = function( expr ) {
|
25
|
+
return this.each( function() {
|
26
|
+
$(this).parents( expr ).eq( 0 ).after( this ).remove();
|
27
|
+
});
|
28
|
+
};
|
29
|
+
|
30
|
+
|
31
|
+
function showSource( e ) {
|
32
|
+
var target = e.target;
|
33
|
+
var codeSections = $(target).
|
34
|
+
parents('.method-detail').
|
35
|
+
find('.method-source-code');
|
36
|
+
|
37
|
+
$(target).
|
38
|
+
parents('.method-detail').
|
39
|
+
find('.method-source-code').
|
40
|
+
slideToggle();
|
41
|
+
};
|
42
|
+
|
43
|
+
function hookSourceViews() {
|
44
|
+
$('.method-heading').click( showSource );
|
45
|
+
};
|
46
|
+
|
47
|
+
function toggleDebuggingSection() {
|
48
|
+
$('.debugging-section').slideToggle();
|
49
|
+
};
|
50
|
+
|
51
|
+
function hookDebuggingToggle() {
|
52
|
+
$('#debugging-toggle img').click( toggleDebuggingSection );
|
53
|
+
};
|
54
|
+
|
55
|
+
function hookTableOfContentsToggle() {
|
56
|
+
$('.indexpage li .toc-toggle').each( function() {
|
57
|
+
$(this).click( function() {
|
58
|
+
$(this).toggleClass('open');
|
59
|
+
});
|
60
|
+
|
61
|
+
var section = $(this).next();
|
62
|
+
|
63
|
+
$(this).click( function() {
|
64
|
+
section.slideToggle();
|
65
|
+
});
|
66
|
+
});
|
67
|
+
}
|
68
|
+
|
69
|
+
function hookSearch() {
|
70
|
+
var input = $('#search-field').eq(0);
|
71
|
+
var result = $('#search-results').eq(0);
|
72
|
+
$(result).show();
|
73
|
+
|
74
|
+
var search_section = $('#search-section').get(0);
|
75
|
+
$(search_section).show();
|
76
|
+
|
77
|
+
var search = new Search(search_data, input, result);
|
78
|
+
|
79
|
+
search.renderItem = function(result) {
|
80
|
+
var li = document.createElement('li');
|
81
|
+
var html = '';
|
82
|
+
|
83
|
+
// TODO add relative path to <script> per-page
|
84
|
+
html += '<p class="search-match"><a href="' + rdoc_rel_prefix + result.path + '">' + this.hlt(result.title);
|
85
|
+
if (result.params)
|
86
|
+
html += '<span class="params">' + result.params + '</span>';
|
87
|
+
html += '</a>';
|
88
|
+
|
89
|
+
|
90
|
+
if (result.namespace)
|
91
|
+
html += '<p class="search-namespace">' + this.hlt(result.namespace);
|
92
|
+
|
93
|
+
if (result.snippet)
|
94
|
+
html += '<div class="search-snippet">' + result.snippet + '</div>';
|
95
|
+
|
96
|
+
li.innerHTML = html;
|
97
|
+
|
98
|
+
return li;
|
99
|
+
}
|
100
|
+
|
101
|
+
search.select = function(result) {
|
102
|
+
var result_element = result.get(0);
|
103
|
+
window.location.href = result_element.firstChild.firstChild.href;
|
104
|
+
}
|
105
|
+
|
106
|
+
search.scrollIntoView = search.scrollInWindow;
|
107
|
+
};
|
108
|
+
|
109
|
+
function highlightTarget( anchor ) {
|
110
|
+
console.debug( "Highlighting target '%s'.", anchor );
|
111
|
+
|
112
|
+
$("a[name]").each( function() {
|
113
|
+
if ( $(this).attr("name") == anchor ) {
|
114
|
+
if ( !$(this).parent().parent().hasClass('target-section') ) {
|
115
|
+
console.debug( "Wrapping the target-section" );
|
116
|
+
$('div.method-detail').unwrap( 'div.target-section' );
|
117
|
+
$(this).parent().wrap( '<div class="target-section"></div>' );
|
118
|
+
} else {
|
119
|
+
console.debug( "Already wrapped." );
|
120
|
+
}
|
121
|
+
}
|
122
|
+
});
|
123
|
+
};
|
124
|
+
|
125
|
+
function highlightLocationTarget() {
|
126
|
+
console.debug( "Location hash: %s", window.location.hash );
|
127
|
+
if ( ! window.location.hash || window.location.hash.length == 0 ) return;
|
128
|
+
|
129
|
+
var anchor = window.location.hash.substring(1);
|
130
|
+
console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" );
|
131
|
+
|
132
|
+
highlightTarget( anchor );
|
133
|
+
};
|
134
|
+
|
135
|
+
function highlightClickTarget( event ) {
|
136
|
+
console.debug( "Highlighting click target for event %o", event.target );
|
137
|
+
try {
|
138
|
+
var anchor = $(event.target).attr( 'href' ).substring(1);
|
139
|
+
console.debug( "Found target anchor: %s", anchor );
|
140
|
+
highlightTarget( anchor );
|
141
|
+
} catch ( err ) {
|
142
|
+
console.error( "Exception while highlighting: %o", err );
|
143
|
+
};
|
144
|
+
};
|
145
|
+
|
146
|
+
|
147
|
+
$(document).ready( function() {
|
148
|
+
hookSourceViews();
|
149
|
+
hookDebuggingToggle();
|
150
|
+
hookSearch();
|
151
|
+
highlightLocationTarget();
|
152
|
+
hookTableOfContentsToggle();
|
153
|
+
|
154
|
+
$('ul.link-list a').bind( "click", highlightClickTarget );
|
155
|
+
});
|