artifactory-cleaner 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/.idea/.gitignore +2 -0
- data/.idea/checkstyle-idea.xml +16 -0
- data/.idea/dictionaries/jgitlin.xml +7 -0
- data/.idea/misc.xml +6 -0
- data/.idea/modules.xml +8 -0
- data/.idea/vcs.xml +6 -0
- data/.rspec +3 -0
- data/.rspec_status +39 -0
- data/.travis.yml +6 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +12 -0
- data/README.md +73 -0
- data/Rakefile +20 -0
- data/artifactory-cleaner.gemspec +43 -0
- data/artifactory-cleaner.iml +9 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/rdoc/Artifactory.html +94 -0
- data/doc/rdoc/Artifactory/Cleaner.html +108 -0
- data/doc/rdoc/Artifactory/Cleaner/ArtifactBucket.html +504 -0
- data/doc/rdoc/Artifactory/Cleaner/ArtifactBucketCollection.html +570 -0
- data/doc/rdoc/Artifactory/Cleaner/ArtifactFilter.html +712 -0
- data/doc/rdoc/Artifactory/Cleaner/ArtifactFilterRule.html +519 -0
- data/doc/rdoc/Artifactory/Cleaner/CLI.html +625 -0
- data/doc/rdoc/Artifactory/Cleaner/Controller.html +1014 -0
- data/doc/rdoc/Artifactory/Cleaner/DiscoveredArtifact.html +400 -0
- data/doc/rdoc/Artifactory/Cleaner/DiscoveryWorker.html +466 -0
- data/doc/rdoc/Artifactory/Cleaner/Error.html +101 -0
- data/doc/rdoc/Artifactory/Cleaner/SpecHelpers.html +190 -0
- data/doc/rdoc/Artifactory/Cleaner/Util.html +157 -0
- data/doc/rdoc/CODE_OF_CONDUCT_md.html +228 -0
- data/doc/rdoc/Float.html +94 -0
- data/doc/rdoc/Gemfile.html +144 -0
- data/doc/rdoc/Gemfile_lock.html +217 -0
- data/doc/rdoc/Object.html +112 -0
- data/doc/rdoc/README_md.html +241 -0
- data/doc/rdoc/Rakefile.html +151 -0
- data/doc/rdoc/artifactory-cleaner_gemspec.html +173 -0
- data/doc/rdoc/artifactory-cleaner_iml.html +139 -0
- data/doc/rdoc/bin/setup.html +134 -0
- data/doc/rdoc/created.rid +219 -0
- data/doc/rdoc/css/fonts.css +167 -0
- data/doc/rdoc/css/rdoc.css +590 -0
- data/doc/rdoc/filterlist_yaml.html +149 -0
- data/doc/rdoc/filters/clean-amzn_yaml.html +133 -0
- data/doc/rdoc/filters/snapshots_yaml.html +137 -0
- data/doc/rdoc/filters/test-filter_yaml.html +137 -0
- data/doc/rdoc/filters/yum-test_yaml.html +141 -0
- data/doc/rdoc/fonts/Lato-Light.ttf +0 -0
- data/doc/rdoc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/rdoc/fonts/Lato-Regular.ttf +0 -0
- data/doc/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/rdoc/images/add.png +0 -0
- data/doc/rdoc/images/arrow_up.png +0 -0
- data/doc/rdoc/images/brick.png +0 -0
- data/doc/rdoc/images/brick_link.png +0 -0
- data/doc/rdoc/images/bug.png +0 -0
- data/doc/rdoc/images/bullet_black.png +0 -0
- data/doc/rdoc/images/bullet_toggle_minus.png +0 -0
- data/doc/rdoc/images/bullet_toggle_plus.png +0 -0
- data/doc/rdoc/images/date.png +0 -0
- data/doc/rdoc/images/delete.png +0 -0
- data/doc/rdoc/images/find.png +0 -0
- data/doc/rdoc/images/loadingAnimation.gif +0 -0
- data/doc/rdoc/images/macFFBgHack.png +0 -0
- data/doc/rdoc/images/package.png +0 -0
- data/doc/rdoc/images/page_green.png +0 -0
- data/doc/rdoc/images/page_white_text.png +0 -0
- data/doc/rdoc/images/page_white_width.png +0 -0
- data/doc/rdoc/images/plugin.png +0 -0
- data/doc/rdoc/images/ruby.png +0 -0
- data/doc/rdoc/images/tag_blue.png +0 -0
- data/doc/rdoc/images/tag_green.png +0 -0
- data/doc/rdoc/images/transparent.png +0 -0
- data/doc/rdoc/images/wrench.png +0 -0
- data/doc/rdoc/images/wrench_orange.png +0 -0
- data/doc/rdoc/images/zoom.png +0 -0
- data/doc/rdoc/index.html +166 -0
- data/doc/rdoc/js/darkfish.js +161 -0
- data/doc/rdoc/js/jquery.js +4 -0
- data/doc/rdoc/js/navigation.js +141 -0
- data/doc/rdoc/js/navigation.js.gz +0 -0
- data/doc/rdoc/js/search.js +109 -0
- data/doc/rdoc/js/search_index.js +1 -0
- data/doc/rdoc/js/search_index.js.gz +0 -0
- data/doc/rdoc/js/searcher.js +229 -0
- data/doc/rdoc/js/searcher.js.gz +0 -0
- data/doc/rdoc/results/archive-test-4_log.html +762 -0
- data/doc/rdoc/results/buckets-2020-01-31_txt.html +233 -0
- data/doc/rdoc/results/clean-test-2_log.html +598 -0
- data/doc/rdoc/results/clean-test-3_log.html +128 -0
- data/doc/rdoc/results/clean-test-5_log.html +2721 -0
- data/doc/rdoc/results/clean-test-6_log.html +135 -0
- data/doc/rdoc/results/clean-test-7_log.html +137 -0
- data/doc/rdoc/results/clean-test-8-real_log.html +131 -0
- data/doc/rdoc/results/clean-test-9_log.html +131 -0
- data/doc/rdoc/results/clean-test1_log.html +1759 -0
- data/doc/rdoc/results/yum-test_2020-01-31_log.html +2854 -0
- data/doc/rdoc/results/yum-test_dry-run_log.html +1074 -0
- data/doc/rdoc/table_of_contents.html +581 -0
- data/exe/artifactory-cleaner +12 -0
- data/lib/artifactory/cleaner.rb +17 -0
- data/lib/artifactory/cleaner/artifact_bucket.rb +102 -0
- data/lib/artifactory/cleaner/artifact_bucket_collection.rb +118 -0
- data/lib/artifactory/cleaner/artifact_filter.rb +146 -0
- data/lib/artifactory/cleaner/artifact_filter_rule.rb +81 -0
- data/lib/artifactory/cleaner/cli.rb +415 -0
- data/lib/artifactory/cleaner/controller.rb +466 -0
- data/lib/artifactory/cleaner/discovered_artifact.rb +71 -0
- data/lib/artifactory/cleaner/discovery_worker.rb +126 -0
- data/lib/artifactory/cleaner/util.rb +21 -0
- data/lib/artifactory/cleaner/version.rb +7 -0
- metadata +252 -0
@@ -0,0 +1,141 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>yum-test.yaml - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/jquery.js"></script>
|
15
|
+
<script src="../js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="file">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="../index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div id="project-metadata">
|
57
|
+
<div id="fileindex-section" class="nav-section">
|
58
|
+
<h3>Pages</h3>
|
59
|
+
|
60
|
+
<ul class="link-list">
|
61
|
+
|
62
|
+
<li><a href="../CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
63
|
+
|
64
|
+
<li><a href="../Gemfile.html">Gemfile</a>
|
65
|
+
|
66
|
+
<li><a href="../Gemfile_lock.html">Gemfile.lock</a>
|
67
|
+
|
68
|
+
<li><a href="../README_md.html">README</a>
|
69
|
+
|
70
|
+
<li><a href="../Rakefile.html">Rakefile</a>
|
71
|
+
|
72
|
+
<li><a href="../artifactory-cleaner_gemspec.html">artifactory-cleaner.gemspec</a>
|
73
|
+
|
74
|
+
<li><a href="../artifactory-cleaner_iml.html">artifactory-cleaner.iml</a>
|
75
|
+
|
76
|
+
<li><a href="../bin/setup.html">setup</a>
|
77
|
+
|
78
|
+
<li><a href="../filterlist_yaml.html">filterlist.yaml</a>
|
79
|
+
|
80
|
+
<li><a href="../filters/clean-amzn_yaml.html">clean-amzn.yaml</a>
|
81
|
+
|
82
|
+
<li><a href="../filters/snapshots_yaml.html">snapshots.yaml</a>
|
83
|
+
|
84
|
+
<li><a href="../filters/test-filter_yaml.html">test-filter.yaml</a>
|
85
|
+
|
86
|
+
<li><a href="../filters/yum-test_yaml.html">yum-test.yaml</a>
|
87
|
+
|
88
|
+
<li><a href="../results/archive-test-4_log.html">archive-test-4.log</a>
|
89
|
+
|
90
|
+
<li><a href="../results/buckets-2020-01-31_txt.html">buckets-2020-01-31</a>
|
91
|
+
|
92
|
+
<li><a href="../results/clean-test-2_log.html">clean-test-2.log</a>
|
93
|
+
|
94
|
+
<li><a href="../results/clean-test-3_log.html">clean-test-3.log</a>
|
95
|
+
|
96
|
+
<li><a href="../results/clean-test-5_log.html">clean-test-5.log</a>
|
97
|
+
|
98
|
+
<li><a href="../results/clean-test-6_log.html">clean-test-6.log</a>
|
99
|
+
|
100
|
+
<li><a href="../results/clean-test-7_log.html">clean-test-7.log</a>
|
101
|
+
|
102
|
+
<li><a href="../results/clean-test-8-real_log.html">clean-test-8-real.log</a>
|
103
|
+
|
104
|
+
<li><a href="../results/clean-test-9_log.html">clean-test-9.log</a>
|
105
|
+
|
106
|
+
<li><a href="../results/clean-test1_log.html">clean-test1.log</a>
|
107
|
+
|
108
|
+
<li><a href="../results/yum-test_2020-01-31_log.html">yum-test.2020-01-31.log</a>
|
109
|
+
|
110
|
+
<li><a href="../results/yum-test_dry-run_log.html">yum-test_dry-run.log</a>
|
111
|
+
|
112
|
+
</ul>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</nav>
|
117
|
+
|
118
|
+
<main role="main" aria-label="Page filters/yum-test.yaml">
|
119
|
+
<hr>
|
120
|
+
<ul><li>
|
121
|
+
<p>!ruby/object:Artifactory::Cleaner::ArtifactFilterRule regex: !ruby/regexp
|
122
|
+
/opencdisc-enterprise-cd-(app|web)-(dev|test)-5.0.0-.*/ action: :exclude
|
123
|
+
priority: -1 property: :uri</p>
|
124
|
+
</li><li>
|
125
|
+
<p>!ruby/object:Artifactory::Cleaner::ArtifactFilterRule regex: !ruby/regexp
|
126
|
+
/opencdisc-enterprise-cd-(app|web)-(dev|test)-4.1..*/ action: :exclude
|
127
|
+
priority: -2 property: :uri</p>
|
128
|
+
</li><li>
|
129
|
+
<p>!ruby/object:Artifactory::Cleaner::ArtifactFilterRule regex: !ruby/regexp
|
130
|
+
/prod/ action: :exclude priority: -100 property: :uri</p>
|
131
|
+
</li></ul>
|
132
|
+
</main>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
<footer id="validator-badges" role="contentinfo">
|
137
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
138
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.1.
|
139
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
140
|
+
</footer>
|
141
|
+
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/rdoc/index.html
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/jquery.js"></script>
|
15
|
+
<script src="./js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="file">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="./index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
|
38
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
39
|
+
<form action="#" method="get" accept-charset="utf-8">
|
40
|
+
<div id="search-field-wrapper">
|
41
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
42
|
+
aria-autocomplete="list" aria-controls="search-results"
|
43
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
44
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<ul id="search-results" aria-label="Search Results"
|
48
|
+
aria-busy="false" aria-expanded="false"
|
49
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
50
|
+
</form>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<div id="project-metadata">
|
56
|
+
<div id="fileindex-section" class="nav-section">
|
57
|
+
<h3>Pages</h3>
|
58
|
+
|
59
|
+
<ul class="link-list">
|
60
|
+
|
61
|
+
<li><a href="./CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
62
|
+
|
63
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
64
|
+
|
65
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
66
|
+
|
67
|
+
<li><a href="./README_md.html">README</a>
|
68
|
+
|
69
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
70
|
+
|
71
|
+
<li><a href="./artifactory-cleaner_gemspec.html">artifactory-cleaner.gemspec</a>
|
72
|
+
|
73
|
+
<li><a href="./artifactory-cleaner_iml.html">artifactory-cleaner.iml</a>
|
74
|
+
|
75
|
+
<li><a href="./bin/setup.html">setup</a>
|
76
|
+
|
77
|
+
<li><a href="./filterlist_yaml.html">filterlist.yaml</a>
|
78
|
+
|
79
|
+
<li><a href="./filters/clean-amzn_yaml.html">clean-amzn.yaml</a>
|
80
|
+
|
81
|
+
<li><a href="./filters/snapshots_yaml.html">snapshots.yaml</a>
|
82
|
+
|
83
|
+
<li><a href="./filters/test-filter_yaml.html">test-filter.yaml</a>
|
84
|
+
|
85
|
+
<li><a href="./filters/yum-test_yaml.html">yum-test.yaml</a>
|
86
|
+
|
87
|
+
<li><a href="./results/archive-test-4_log.html">archive-test-4.log</a>
|
88
|
+
|
89
|
+
<li><a href="./results/buckets-2020-01-31_txt.html">buckets-2020-01-31</a>
|
90
|
+
|
91
|
+
<li><a href="./results/clean-test-2_log.html">clean-test-2.log</a>
|
92
|
+
|
93
|
+
<li><a href="./results/clean-test-3_log.html">clean-test-3.log</a>
|
94
|
+
|
95
|
+
<li><a href="./results/clean-test-5_log.html">clean-test-5.log</a>
|
96
|
+
|
97
|
+
<li><a href="./results/clean-test-6_log.html">clean-test-6.log</a>
|
98
|
+
|
99
|
+
<li><a href="./results/clean-test-7_log.html">clean-test-7.log</a>
|
100
|
+
|
101
|
+
<li><a href="./results/clean-test-8-real_log.html">clean-test-8-real.log</a>
|
102
|
+
|
103
|
+
<li><a href="./results/clean-test-9_log.html">clean-test-9.log</a>
|
104
|
+
|
105
|
+
<li><a href="./results/clean-test1_log.html">clean-test1.log</a>
|
106
|
+
|
107
|
+
<li><a href="./results/yum-test_2020-01-31_log.html">yum-test.2020-01-31.log</a>
|
108
|
+
|
109
|
+
<li><a href="./results/yum-test_dry-run_log.html">yum-test_dry-run.log</a>
|
110
|
+
|
111
|
+
</ul>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<div id="classindex-section" class="nav-section">
|
115
|
+
<h3>Class and Module Index</h3>
|
116
|
+
|
117
|
+
<ul class="link-list">
|
118
|
+
|
119
|
+
<li><a href="./Artifactory.html">Artifactory</a>
|
120
|
+
|
121
|
+
<li><a href="./Artifactory/Cleaner.html">Artifactory::Cleaner</a>
|
122
|
+
|
123
|
+
<li><a href="./Artifactory/Cleaner/ArtifactBucket.html">Artifactory::Cleaner::ArtifactBucket</a>
|
124
|
+
|
125
|
+
<li><a href="./Artifactory/Cleaner/ArtifactBucketCollection.html">Artifactory::Cleaner::ArtifactBucketCollection</a>
|
126
|
+
|
127
|
+
<li><a href="./Artifactory/Cleaner/ArtifactFilter.html">Artifactory::Cleaner::ArtifactFilter</a>
|
128
|
+
|
129
|
+
<li><a href="./Artifactory/Cleaner/ArtifactFilterRule.html">Artifactory::Cleaner::ArtifactFilterRule</a>
|
130
|
+
|
131
|
+
<li><a href="./Artifactory/Cleaner/CLI.html">Artifactory::Cleaner::CLI</a>
|
132
|
+
|
133
|
+
<li><a href="./Artifactory/Cleaner/Controller.html">Artifactory::Cleaner::Controller</a>
|
134
|
+
|
135
|
+
<li><a href="./Artifactory/Cleaner/DiscoveredArtifact.html">Artifactory::Cleaner::DiscoveredArtifact</a>
|
136
|
+
|
137
|
+
<li><a href="./Artifactory/Cleaner/DiscoveryWorker.html">Artifactory::Cleaner::DiscoveryWorker</a>
|
138
|
+
|
139
|
+
<li><a href="./Artifactory/Cleaner/Error.html">Artifactory::Cleaner::Error</a>
|
140
|
+
|
141
|
+
<li><a href="./Artifactory/Cleaner/SpecHelpers.html">Artifactory::Cleaner::SpecHelpers</a>
|
142
|
+
|
143
|
+
<li><a href="./Artifactory/Cleaner/Util.html">Artifactory::Cleaner::Util</a>
|
144
|
+
|
145
|
+
<li><a href="./Float.html">Float</a>
|
146
|
+
|
147
|
+
<li><a href="./Object.html">Object</a>
|
148
|
+
|
149
|
+
</ul>
|
150
|
+
</div>
|
151
|
+
|
152
|
+
</div>
|
153
|
+
</nav>
|
154
|
+
|
155
|
+
<main role="main">
|
156
|
+
<p>This is the API documentation for RDoc Documentation.
|
157
|
+
</main>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
<footer id="validator-badges" role="contentinfo">
|
162
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
163
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.1.
|
164
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
165
|
+
</footer>
|
166
|
+
|
@@ -0,0 +1,161 @@
|
|
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 hookSearch() {
|
48
|
+
var input = $('#search-field').eq(0);
|
49
|
+
var result = $('#search-results').eq(0);
|
50
|
+
$(result).show();
|
51
|
+
|
52
|
+
var search_section = $('#search-section').get(0);
|
53
|
+
$(search_section).show();
|
54
|
+
|
55
|
+
var search = new Search(search_data, input, result);
|
56
|
+
|
57
|
+
search.renderItem = function(result) {
|
58
|
+
var li = document.createElement('li');
|
59
|
+
var html = '';
|
60
|
+
|
61
|
+
// TODO add relative path to <script> per-page
|
62
|
+
html += '<p class="search-match"><a href="' + index_rel_prefix + result.path + '">' + this.hlt(result.title);
|
63
|
+
if (result.params)
|
64
|
+
html += '<span class="params">' + result.params + '</span>';
|
65
|
+
html += '</a>';
|
66
|
+
|
67
|
+
|
68
|
+
if (result.namespace)
|
69
|
+
html += '<p class="search-namespace">' + this.hlt(result.namespace);
|
70
|
+
|
71
|
+
if (result.snippet)
|
72
|
+
html += '<div class="search-snippet">' + result.snippet + '</div>';
|
73
|
+
|
74
|
+
li.innerHTML = html;
|
75
|
+
|
76
|
+
return li;
|
77
|
+
}
|
78
|
+
|
79
|
+
search.select = function(result) {
|
80
|
+
var result_element = result.get(0);
|
81
|
+
window.location.href = result_element.firstChild.firstChild.href;
|
82
|
+
}
|
83
|
+
|
84
|
+
search.scrollIntoView = search.scrollInWindow;
|
85
|
+
};
|
86
|
+
|
87
|
+
function highlightTarget( anchor ) {
|
88
|
+
console.debug( "Highlighting target '%s'.", anchor );
|
89
|
+
|
90
|
+
$("a[name]").each( function() {
|
91
|
+
if ( $(this).attr("name") == anchor ) {
|
92
|
+
if ( !$(this).parent().parent().hasClass('target-section') ) {
|
93
|
+
console.debug( "Wrapping the target-section" );
|
94
|
+
$('div.method-detail').unwrap( 'div.target-section' );
|
95
|
+
$(this).parent().wrap( '<div class="target-section"></div>' );
|
96
|
+
} else {
|
97
|
+
console.debug( "Already wrapped." );
|
98
|
+
}
|
99
|
+
}
|
100
|
+
});
|
101
|
+
};
|
102
|
+
|
103
|
+
function highlightLocationTarget() {
|
104
|
+
console.debug( "Location hash: %s", window.location.hash );
|
105
|
+
if ( ! window.location.hash || window.location.hash.length == 0 ) return;
|
106
|
+
|
107
|
+
var anchor = window.location.hash.substring(1);
|
108
|
+
console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" );
|
109
|
+
|
110
|
+
highlightTarget( anchor );
|
111
|
+
};
|
112
|
+
|
113
|
+
function highlightClickTarget( event ) {
|
114
|
+
console.debug( "Highlighting click target for event %o", event.target );
|
115
|
+
try {
|
116
|
+
var anchor = $(event.target).attr( 'href' ).substring(1);
|
117
|
+
console.debug( "Found target anchor: %s", anchor );
|
118
|
+
highlightTarget( anchor );
|
119
|
+
} catch ( err ) {
|
120
|
+
console.error( "Exception while highlighting: %o", err );
|
121
|
+
};
|
122
|
+
};
|
123
|
+
|
124
|
+
function loadAsync(path, success, prefix) {
|
125
|
+
$.ajax({
|
126
|
+
url: prefix + path,
|
127
|
+
dataType: 'script',
|
128
|
+
success: success,
|
129
|
+
cache: true
|
130
|
+
});
|
131
|
+
};
|
132
|
+
|
133
|
+
$(document).ready( function() {
|
134
|
+
hookSourceViews();
|
135
|
+
highlightLocationTarget();
|
136
|
+
$('ul.link-list a').bind( "click", highlightClickTarget );
|
137
|
+
|
138
|
+
var search_scripts_loaded = {
|
139
|
+
navigation_loaded: false,
|
140
|
+
search_loaded: false,
|
141
|
+
search_index_loaded: false,
|
142
|
+
searcher_loaded: false,
|
143
|
+
}
|
144
|
+
|
145
|
+
var search_success_function = function(variable) {
|
146
|
+
return (function (data, status, xhr) {
|
147
|
+
search_scripts_loaded[variable] = true;
|
148
|
+
|
149
|
+
if (search_scripts_loaded['navigation_loaded'] == true &&
|
150
|
+
search_scripts_loaded['search_loaded'] == true &&
|
151
|
+
search_scripts_loaded['search_index_loaded'] == true &&
|
152
|
+
search_scripts_loaded['searcher_loaded'] == true)
|
153
|
+
hookSearch();
|
154
|
+
});
|
155
|
+
}
|
156
|
+
|
157
|
+
loadAsync('js/navigation.js', search_success_function('navigation_loaded'), rdoc_rel_prefix);
|
158
|
+
loadAsync('js/search.js', search_success_function('search_loaded'), rdoc_rel_prefix);
|
159
|
+
loadAsync('js/search_index.js', search_success_function('search_index_loaded'), index_rel_prefix);
|
160
|
+
loadAsync('js/searcher.js', search_success_function('searcher_loaded'), rdoc_rel_prefix);
|
161
|
+
});
|