yard-sketchup 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/Gemfile +15 -0
- data/lib/yard-sketchup/templates/changelog/fulldoc/text/setup.rb +44 -0
- data/lib/yard-sketchup/templates/coverage/fulldoc/text/setup.rb +38 -0
- data/lib/yard-sketchup/templates/default/fulldoc/html/css/rubyapi.css +11 -0
- data/lib/yard-sketchup/templates/default/fulldoc/html/css/sketchup.css +110 -0
- data/lib/yard-sketchup/templates/default/fulldoc/html/full_list_object_types.erb +1 -0
- data/lib/yard-sketchup/templates/default/fulldoc/html/js/sketchup.js +37 -0
- data/lib/yard-sketchup/templates/default/fulldoc/html/setup.rb +44 -0
- data/lib/yard-sketchup/templates/default/layout/html/embed_meta.erb +78 -0
- data/lib/yard-sketchup/templates/default/layout/html/footer.erb +4 -0
- data/lib/yard-sketchup/templates/default/layout/html/headers.erb +15 -0
- data/lib/yard-sketchup/templates/default/layout/html/layout.erb +55 -0
- data/lib/yard-sketchup/templates/default/layout/html/navbar.erb +36 -0
- data/lib/yard-sketchup/templates/default/layout/html/setup.rb +19 -0
- data/lib/yard-sketchup/templates/default/method_details/html/method_signature.erb +26 -0
- data/lib/yard-sketchup/templates/default/method_details/setup.rb +12 -0
- data/lib/yard-sketchup/templates/default/module/html/box_info.erb +37 -0
- data/lib/yard-sketchup/templates/default/module/html/constant_summary.erb +17 -0
- data/lib/yard-sketchup/templates/default/module/html/defines.erb +1 -0
- data/lib/yard-sketchup/templates/default/module/html/method_summary.erb +18 -0
- data/lib/yard-sketchup/templates/rubocop-changelog/fulldoc/text/setup.rb +75 -0
- data/lib/yard-sketchup/templates/stubs/fulldoc/text/setup.rb +363 -0
- data/lib/yard-sketchup/templates/versions/fulldoc/text/setup.rb +25 -0
- data/lib/yard-sketchup/version.rb +3 -0
- data/lib/yard-sketchup/yard/handlers/class_constants.rb +17 -0
- data/lib/yard-sketchup/yard/handlers/class_enum_constants.rb +17 -0
- data/lib/yard-sketchup/yard/handlers/global_constants.rb +19 -0
- data/lib/yard-sketchup/yard/logger.rb +45 -0
- data/lib/yard-sketchup.rb +29 -0
- data/yard-sketchup.gemspec +25 -0
- metadata +101 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6f5ccbdb07215a2c62997fa6cf0bee5a1644e132
|
4
|
+
data.tar.gz: c42fce2d50f4856d1af081a8b8a70aee5bcebac4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ee97ca4f5d65511df3cb4b1cd26ac1b228f3933a4bf724783bfd03256b4eca553845c088fa681fd439e5939b4dc207bf2fbb32f23b7974aeb86f9185a28276a3
|
7
|
+
data.tar.gz: af6c97ba016193d4a464b076bfd7b1d9f8aca9e69e4deb2407133bee3d1a52b29ceea902dd38c88bb2258f8861549293f08f91fdf211c19369a3ca048aad05e5
|
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
gemspec
|
6
|
+
|
7
|
+
gem 'rake', '~> 12.0', require: false
|
8
|
+
|
9
|
+
group :tools do
|
10
|
+
gem 'colorize', '~> 0.0', require: false
|
11
|
+
gem 'git', '~> 1.3', require: false
|
12
|
+
gem 'git_diff_parser', '~> 2.3', require: false
|
13
|
+
gem 'thor', '~> 0.19', require: false
|
14
|
+
end
|
15
|
+
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
require 'set'
|
3
|
+
require 'stringio'
|
4
|
+
|
5
|
+
include Helpers::ModuleHelper
|
6
|
+
|
7
|
+
def init
|
8
|
+
generate_changelog
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
def all_objects
|
13
|
+
run_verifier(Registry.all())
|
14
|
+
end
|
15
|
+
|
16
|
+
def namespace_objects
|
17
|
+
run_verifier(Registry.all(:class, :module))
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
def output_path
|
22
|
+
options.serializer.options[:basepath] || Dir.pwd
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
def changelog_filename
|
27
|
+
'Changelog SU201x.log'
|
28
|
+
end
|
29
|
+
|
30
|
+
def generate_changelog
|
31
|
+
#p (methods - Object.instance_methods).sort
|
32
|
+
#p ARGV
|
33
|
+
puts "Generating #{changelog_filename}..."
|
34
|
+
output = StringIO.new
|
35
|
+
new_objects = all_objects.sort { |a, b| a.path <=> b.path }
|
36
|
+
new_objects.each do |object|
|
37
|
+
#object.meths.each { |method|
|
38
|
+
#methods << "#{method.namespace}##{method.name}"
|
39
|
+
#}
|
40
|
+
output.puts "Added #{object.type} #{object.path}"
|
41
|
+
end
|
42
|
+
changelog_path = File.join(output_path, changelog_filename)
|
43
|
+
File.write(changelog_path, output.string)
|
44
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
require 'set'
|
3
|
+
|
4
|
+
include Helpers::ModuleHelper
|
5
|
+
|
6
|
+
MANIFEST_FILENAME = 'coverage.manifest'.freeze
|
7
|
+
|
8
|
+
def init
|
9
|
+
generate_manifest
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
def namespace_objects
|
14
|
+
run_verifier(Registry.all(:class, :module))
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
def output_path
|
19
|
+
options.serializer.options[:basepath] || Dir.pwd
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
def generate_manifest
|
24
|
+
puts "Generating #{MANIFEST_FILENAME}..."
|
25
|
+
methods = Set.new
|
26
|
+
namespace_objects.each do |object|
|
27
|
+
run_verifier(object.meths).each { |method|
|
28
|
+
# TODO(thomthom): Currently the manifest doesn't distinguish between
|
29
|
+
# class and instance methods. This should be addressed, but we need to
|
30
|
+
# update TestUp to handle this first.
|
31
|
+
methods << "#{method.namespace}.#{method.name}"
|
32
|
+
}
|
33
|
+
end
|
34
|
+
manifest = methods.sort.join("\n")
|
35
|
+
manifest_path = File.join(output_path, MANIFEST_FILENAME)
|
36
|
+
puts manifest_path
|
37
|
+
File.write(manifest_path, manifest)
|
38
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
@charset "UTF-8";/*!
|
2
|
+
* Bootstrap v3.3.5 (http://getbootstrap.com)
|
3
|
+
* Copyright 2011-2015 Twitter, Inc.
|
4
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
5
|
+
*//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */.sr-only,img{border:0}.caret,img{vertical-align:middle}.dropdown-menu,.nav,ul li.expanded,ul li.leaf{list-style:none}header,nav{display:block}a:active,a:hover{outline:0}button{color:inherit;font:inherit;margin:0;overflow:visible;text-transform:none;-webkit-appearance:button;cursor:pointer}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}img{page-break-inside:avoid;max-width:100%!important}.navbar{display:none}}.nav>li>a:focus,.nav>li>a:hover,.navbar-brand:focus,.navbar-brand:hover,a,a:focus,a:hover{text-decoration:none}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-size:10px;-webkit-tap-highlight-color:transparent}body{margin:0;font-size:16px;line-height:1.42857}button{font-family:inherit;font-size:inherit;line-height:inherit}a{background-color:transparent;color:#e72b2d}a:focus,a:hover{color:#b11416}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.dropdown-toggle:focus,.navbar-toggle:focus{outline:0}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0)}ul{margin-top:0;margin-bottom:11px}ul ul{margin-bottom:0}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.collapse{display:none}.collapse.in{display:block}.caret{display:inline-block;width:0;height:0;margin-left:2px;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:16px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:0;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{text-decoration:none;color:#262626;background-color:#f5f5f5}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{color:#fff}.nav{margin-bottom:0;padding-left:0}.nav:after,.nav:before{content:" ";display:table}.nav>li,.nav>li>a{display:block;position:relative}.nav:after{clear:both}.nav>li>a{padding:10px 15px}.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before{content:" ";display:table}.nav>li>a:focus,.nav>li>a:hover{background-color:#eee}.nav>li>a>img{max-width:none}.navbar{position:relative;min-height:50px;margin-bottom:22px;border:1px solid transparent}.navbar:after{clear:both}.navbar-header:after{clear:both}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse:after{clear:both}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:0}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse{padding-left:0;padding-right:0}.navbar-fixed-top{border-radius:0}}.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse{max-height:200px}}.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030;top:0;border-width:0 0 1px}.navbar-toggle,body{position:relative}.navbar-brand{float:left;padding:14px 15px;font-size:20px;line-height:22px;height:50px}.navbar-toggle{float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:0;background-image:none}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-nav{margin:7px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:22px}@media (min-width:768px){.navbar-toggle{display:none}.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:14px;padding-bottom:14px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-btn{margin-top:7px;margin-bottom:7px}.navbar-inverse{background-color:#363545;border-color:#000;box-shadow:1px 1px 6px #35393e}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#D4D5D1;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse{border-color:#262531}.pull-left{float:left!important}@-ms-viewport{width:device-width}.navbar .logo{margin-right:-15px;padding-left:15px;padding-right:15px}@media screen and (min-width:768px){.navbar .logo{margin-right:0;padding-left:0}.navbar-collapse{float:right}}@font-face{font-family:fontello;src:url(/sites/all/themes/sketch/fonts/fontello/font/fontello.eot?93575470);src:url(/sites/all/themes/sketch/fonts/fontello/font/fontello.eot?93575470#iefix) format("embedded-opentype"),url(/sites/all/themes/sketch/fonts/fontello/font/fontello.woff?93575470) format("woff"),url(/sites/all/themes/sketch/fonts/fontello/font/fontello.ttf?93575470) format("truetype"),url(/sites/all/themes/sketch/fonts/fontello/font/fontello.svg?93575470#fontello) format("svg");font-weight:400;font-style:normal}[class^=icon-]:before{font-family:fontello;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.navbar-brand,.navbar-nav .caret{display:none}/*!
|
6
|
+
Animate.css - http://daneden.me/animate
|
7
|
+
Version - 3.4.0
|
8
|
+
Licensed under the MIT license - http://opensource.org/licenses/MIT
|
9
|
+
|
10
|
+
Copyright (c) 2015 Daniel Eden
|
11
|
+
*/body,html{background-color:#363545;color:#4d5259;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif}.navbar-inverse .navbar-nav>li>a{font-size:14px;padding:22px 25px 10px}li.dropdown{border-bottom:2px solid transparent}.dropdown-menu>li>a{font-size:14px}.logo{margin:0;padding:11px 7px 12px 0}.logo img{height:33px}.icon-bar{transition:all .1s}.trimble-top-menu-item+ul.dropdown-menu{background-color:#005596}.trimble-top-menu-item+ul li>a{color:#fff}.trimble-top-menu-item img{width:65px;vertical-align:-2px}.navbar-inverse .navbar-nav>li>a.top-menu--download-button{font-size:14px!important;margin-top:0!important;margin-bottom:0!important;display:none;color:#fff;background-color:#e72b2d;border:1px solid #e72b2d;border-radius:0;font-weight:400;white-space:normal}.navbar-inverse .navbar-nav>li>a.top-menu--download-button:hover{background-color:#9b1113;border:1px solid #9b1113;box-shadow:#9b1113 0 0 0 4px inset;color:#fff}.navbar-inverse .navbar-nav>li>a.top-menu--download-button:active,.navbar-inverse .navbar-nav>li>a.top-menu--download-button:focus,.navbar-inverse .navbar-nav>li>a.top-menu--download-button:hover{color:#fff;text-decoration:none}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
body {
|
2
|
+
font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
|
3
|
+
color: #4d5259;
|
4
|
+
}
|
5
|
+
|
6
|
+
h1, h2, h3, h4, h5, h6, .tags .tag_title, .tags .examples .tag_title {
|
7
|
+
font-weight: normal;
|
8
|
+
}
|
9
|
+
|
10
|
+
a, a:visited,
|
11
|
+
#content a, #content a:visited,
|
12
|
+
#search a, #search a:visited,
|
13
|
+
#menu a, #menu a:visited,
|
14
|
+
#footer a, #footer a:visited {
|
15
|
+
color: #e72b3d;
|
16
|
+
}
|
17
|
+
a:hover, a:focus,
|
18
|
+
#content a:hover #content a:focus,
|
19
|
+
#search a:hover #search a:focus,
|
20
|
+
#menu a:hover #menu a:focus,
|
21
|
+
#footer a:hover #footer a:focus {
|
22
|
+
color: #b11423;
|
23
|
+
}
|
24
|
+
|
25
|
+
.summary_desc .object_link a,
|
26
|
+
.docstring .object_link a,
|
27
|
+
.object_link a
|
28
|
+
{
|
29
|
+
background: #f9f3f3;
|
30
|
+
}
|
31
|
+
|
32
|
+
#main {
|
33
|
+
/* Counterweight the body font-size the bootstrap CSS pulls in. */
|
34
|
+
font-size: 13px;
|
35
|
+
}
|
36
|
+
|
37
|
+
#content .signature {
|
38
|
+
background: #6B6B6B;
|
39
|
+
color: #fff;
|
40
|
+
border: none;
|
41
|
+
}
|
42
|
+
|
43
|
+
#content .signature a {
|
44
|
+
color: #FF8080;
|
45
|
+
background: none;
|
46
|
+
}
|
47
|
+
|
48
|
+
#content .overload .signature {
|
49
|
+
background: #bbb;
|
50
|
+
}
|
51
|
+
|
52
|
+
#content .overload .signature a {
|
53
|
+
color: #e72b3d;
|
54
|
+
}
|
55
|
+
|
56
|
+
.summary_desc .object_link a,
|
57
|
+
#content .signature,
|
58
|
+
.summary .summary_signature,
|
59
|
+
#filecontents pre.code,
|
60
|
+
.docstring pre.code,
|
61
|
+
.tags pre.example
|
62
|
+
{
|
63
|
+
border-radius: 2px;
|
64
|
+
}
|
65
|
+
|
66
|
+
h2 small a {
|
67
|
+
box-sizing: border-box;
|
68
|
+
height: 28px;
|
69
|
+
}
|
70
|
+
|
71
|
+
#api-documentation-header {
|
72
|
+
padding-left: 15px;
|
73
|
+
padding-right: 15px;
|
74
|
+
}
|
75
|
+
|
76
|
+
#su-content {
|
77
|
+
background: #eef;
|
78
|
+
width: 100%;
|
79
|
+
position: fixed;
|
80
|
+
top: 57px;
|
81
|
+
bottom: 0;
|
82
|
+
display: flex;
|
83
|
+
display: -webkit-flex;
|
84
|
+
display: -ms-flexbox;
|
85
|
+
}
|
86
|
+
|
87
|
+
/* The YARD JS doesn't size these elements unless we use the traditional
|
88
|
+
* content-box type of sizing.
|
89
|
+
*/
|
90
|
+
.box_info * {
|
91
|
+
box-sizing: content-box;
|
92
|
+
}
|
93
|
+
|
94
|
+
|
95
|
+
.tags .bug {
|
96
|
+
background: #ffcccc;
|
97
|
+
border: 1px solid #ff6666;
|
98
|
+
border-radius: 2px;
|
99
|
+
padding-top: 5px;
|
100
|
+
padding-bottom: 5px;
|
101
|
+
padding-right: 5px;
|
102
|
+
}
|
103
|
+
|
104
|
+
|
105
|
+
/* Ensure content is scrollable on small screens. */
|
106
|
+
@media (max-width: 920px) {
|
107
|
+
#main {
|
108
|
+
overflow-y: scroll;
|
109
|
+
}
|
110
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= reference_list %>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
(function() {
|
2
|
+
|
3
|
+
var localStorage = {}, sessionStorage = {};
|
4
|
+
try { localStorage = window.localStorage; } catch (e) { }
|
5
|
+
try { sessionStorage = window.sessionStorage; } catch (e) { }
|
6
|
+
|
7
|
+
// Kludge: This isn't a clean way to do it. But it works for now.
|
8
|
+
// It doesn't take into account collapsed state change that happen when expandTo
|
9
|
+
// is called. User must click the un-collapse arrow for that.
|
10
|
+
// This also relies on this file being loaded after full_list.js so that the
|
11
|
+
// original YARD enableToggles function is called before this one.
|
12
|
+
function persistentToggles() {
|
13
|
+
// Remember the collapsed state when toggling the first two levels.
|
14
|
+
$('#full_list a.toggle').on('click', function(evt) {
|
15
|
+
console.log('persistentToggles');
|
16
|
+
var $item = $(this).parent().parent();
|
17
|
+
var key = $item.attr('id');
|
18
|
+
var value = $item.hasClass('collapsed');
|
19
|
+
localStorage.setItem(key, value);
|
20
|
+
});
|
21
|
+
// Load initial state.
|
22
|
+
$('#full_list a.toggle').each(function() {
|
23
|
+
var $item = $(this).parent().parent();
|
24
|
+
var key = $item.attr('id');
|
25
|
+
var value = localStorage.getItem(key);
|
26
|
+
if (value === 'true') {
|
27
|
+
$item.addClass('collapsed');
|
28
|
+
}
|
29
|
+
});
|
30
|
+
}
|
31
|
+
|
32
|
+
$(document).ready(function() {
|
33
|
+
console.log('READY: sketchup.js');
|
34
|
+
persistentToggles();
|
35
|
+
});
|
36
|
+
|
37
|
+
})();
|
@@ -0,0 +1,44 @@
|
|
1
|
+
def javascripts_full_list
|
2
|
+
%w(js/jquery.js js/full_list.js js/sketchup.js)
|
3
|
+
end
|
4
|
+
|
5
|
+
# Custom search list grouping the classes in the API into similar groups.
|
6
|
+
# TODO(thomthom): This file is just a stub.
|
7
|
+
|
8
|
+
def generate_object_types_list
|
9
|
+
#@items = options.objects if options.objects
|
10
|
+
@items = [
|
11
|
+
"App Level Classes",
|
12
|
+
"Entity Classes",
|
13
|
+
"Collection Classes",
|
14
|
+
"Geom Classes",
|
15
|
+
"UI Classes",
|
16
|
+
"Observer Classes",
|
17
|
+
"Core Ruby Classes"
|
18
|
+
]
|
19
|
+
@list_title = "Object Index"
|
20
|
+
@list_type = "object_types"
|
21
|
+
|
22
|
+
# optional: the specified stylesheet class
|
23
|
+
# when not specified it will default to the value of @list_type
|
24
|
+
@list_class = "class"
|
25
|
+
|
26
|
+
# Generate the full list html file with named feature_list.html
|
27
|
+
# @note this file must be match the name of the type
|
28
|
+
asset(url_for_list(@list_type), erb(:full_list))
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# See `class_list` in fulldoc/html.
|
33
|
+
def reference_list
|
34
|
+
even_odd = "odd"
|
35
|
+
out = ""
|
36
|
+
@items.each { |item|
|
37
|
+
out << "<li class='#{even_odd}'>"
|
38
|
+
out << "<a class='toggle'></a>"
|
39
|
+
out << item
|
40
|
+
out << "</li>"
|
41
|
+
even_odd = (even_odd == 'even' ? 'odd' : 'even')
|
42
|
+
}
|
43
|
+
out
|
44
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
<% su_site_name = h options.title
|
2
|
+
case object
|
3
|
+
when String
|
4
|
+
if object == "_index.html" || object == "index.html"
|
5
|
+
su_page_url = "http://ruby.sketchup.com/index.html"
|
6
|
+
su_page_title = "Alphabetic Index"
|
7
|
+
su_page_desc = "Alphabetic Index of Files and API Namespaces. This is the main landing page for the SketchUp Ruby API Documentation."
|
8
|
+
else
|
9
|
+
su_page_url = "http://ruby.sketchup.com/"+(object =~ /(.html)\z/ ? object : "#{File.basename(object,'.*')}.html" )
|
10
|
+
su_page_title = (@page_title && !@page_title.empty?) ? (h @page_title) : object.split('.')[0]
|
11
|
+
su_page_desc = "The #{su_page_title} page."
|
12
|
+
end
|
13
|
+
when YARD::CodeObjects::Base # or subclass
|
14
|
+
if object.root?
|
15
|
+
if @file # Generating a YARD::CodeObjects::ExtraFileObject
|
16
|
+
su_page_url = "http://ruby.sketchup.com/file.#{File.basename(@file.filename,'.*')}.html"
|
17
|
+
su_page_title = h @page_title
|
18
|
+
su_page_desc = @file.title
|
19
|
+
elsif h @page_title == "Top Level Namespace"
|
20
|
+
su_page_url = "http://ruby.sketchup.com/top-level-namespace.html"
|
21
|
+
su_page_title = h @page_title
|
22
|
+
su_page_desc = "The Top Level Namespace for Ruby and the SketchUp API, listing global constants, and a summary of toplevel modules and classes."
|
23
|
+
else %>
|
24
|
+
<!-- <%= "YARD Error - (embed_meta.erb) Unknown root object - using site name." %>--><%
|
25
|
+
su_page_title = su_site_name
|
26
|
+
su_page_url = "http://ruby.sketchup.com/"
|
27
|
+
su_page_desc = "#{su_site_name}."
|
28
|
+
end
|
29
|
+
else # Generating a Class or Module page:
|
30
|
+
su_page_url = "http://ruby.sketchup.com/#{@path.gsub('::','/')}.html"
|
31
|
+
su_page_title = h @page_title
|
32
|
+
if object.docstring.blank?
|
33
|
+
if object.is_a?(YARD::CodeObjects::ClassObject)
|
34
|
+
su_page_desc = "The #{@path} class."
|
35
|
+
elsif object.is_a?(YARD::CodeObjects::ModuleObject)
|
36
|
+
su_page_desc = "The #{@path} module."
|
37
|
+
else
|
38
|
+
su_page_desc = "The #{su_page_title} page."
|
39
|
+
end %>
|
40
|
+
<!-- <%= "YARD Warning - Blank docstring, object is: #{object.class.name}" %>--><%
|
41
|
+
else
|
42
|
+
su_page_desc = object.docstring.summary.gsub(/[{}+]/,'')
|
43
|
+
end
|
44
|
+
end # if root object
|
45
|
+
else # object is unexpected type %>
|
46
|
+
<!-- <%= "YARD Error - (embed_meta.erb) Unexpected type: #{object.class.name}" %>--><%
|
47
|
+
su_page_title = su_site_name
|
48
|
+
su_page_url = "http://ruby.sketchup.com/"
|
49
|
+
if object.respond_to?(:docstring)
|
50
|
+
su_page_desc = object.docstring.summary.gsub(/[{}+]/,'')
|
51
|
+
else
|
52
|
+
su_page_desc = "#{su_site_name}."
|
53
|
+
end
|
54
|
+
end
|
55
|
+
su_page_img = "http://developer.sketchup.com/sites/developers.sketchup.com/files/Ruby.svg"
|
56
|
+
%>
|
57
|
+
<!-- GENERIC META PROPERTIES -->
|
58
|
+
<meta name="url" content="<%= su_page_url %>" />
|
59
|
+
<meta name="image" content="<%= su_page_img %>?s=60" />
|
60
|
+
<meta name="title" content="<%= su_page_title %>" />
|
61
|
+
<meta name="name" content="<%= su_site_name %>" />
|
62
|
+
<meta name="description" content="<%= su_page_desc %>" />
|
63
|
+
<!-- OPEN GRAPH META PROPERTIES -->
|
64
|
+
<meta property="og:site_name" content="<%= su_site_name %>" />
|
65
|
+
<meta property="og:type" content="website" />
|
66
|
+
<meta property="og:image" content="<%= su_page_img %>" />
|
67
|
+
<meta property="og:image:width" content="60" />
|
68
|
+
<meta property="og:image:height" content="60" />
|
69
|
+
<meta property="og:title" content="<%= su_page_title %>" />
|
70
|
+
<meta property="og:url" content="<%= su_page_url %>" />
|
71
|
+
<meta property="og:description" content="<%= su_page_desc %>" />
|
72
|
+
<!-- TWITTER CARD META PROPERTIES -->
|
73
|
+
<meta name="twitter:card" content="summary" />
|
74
|
+
<meta name="twitter:site" content="@sketchup" />
|
75
|
+
<meta name="twitter:title" content="<%= su_page_title %>" />
|
76
|
+
<meta name="twitter:description" content="<%= su_page_desc %>" />
|
77
|
+
<meta name="twitter:image:src" content="<%= su_page_img %>?s=120" />
|
78
|
+
<meta name="twitter:url" content="<%= su_page_url %>" />
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<meta charset="<%= charset %>">
|
2
|
+
<!-- VIEWPORT -->
|
3
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
4
|
+
<!-- AUTHOR and GENERATOR -->
|
5
|
+
<meta name="author" content="SketchUp Extensibility Team">
|
6
|
+
<meta name="generator" content="YARD http://yardoc.org">
|
7
|
+
<!-- TITLE -->
|
8
|
+
<title><% if object == "_index.html" || object == "index.html" %>
|
9
|
+
Alphabetic Index — <%= h options.title %><% else %>
|
10
|
+
<%= h @page_title %><% if options.title && @page_title != options.title %> — <%= h options.title %><% end %><% end %>
|
11
|
+
</title>
|
12
|
+
<!-- SHORTCUT ICON -->
|
13
|
+
<link rel="shortcut icon" type="image/vnd.microsoft.icon"
|
14
|
+
href="https://developer.sketchup.com/sites/all/themes/sketch_help/favicon.ico" />
|
15
|
+
<%= erb(:embed_meta) %>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<%= erb(:headers) %>
|
5
|
+
<!-- STYLESHEETS -->
|
6
|
+
<link rel="stylesheet" type="text/css"
|
7
|
+
href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic" />
|
8
|
+
<% stylesheets.each do |stylesheet| %>
|
9
|
+
<link rel="stylesheet" href="<%= url_for(stylesheet) %>" type="text/css" charset="utf-8" />
|
10
|
+
<% end %>
|
11
|
+
<!-- SCRIPTS -->
|
12
|
+
<%= erb :script_setup %>
|
13
|
+
<% javascripts.each do |javascript| %>
|
14
|
+
<script type="text/javascript" charset="utf-8" src="<%= url_for(javascript) %>"></script>
|
15
|
+
<% end %>
|
16
|
+
<script>
|
17
|
+
// Every time this page is loaded, it sends this action to SketchUp, telling
|
18
|
+
// SketchUp that a new page has loaded that has example snippets that should
|
19
|
+
// be replaced with code editors. Nothing happens if the page is loaded in a
|
20
|
+
// regular browser outside of the SketchUp client.
|
21
|
+
$( document ).ready(function() {
|
22
|
+
if (typeof sketchup == 'object') {
|
23
|
+
sketchup.page_loaded();
|
24
|
+
}
|
25
|
+
});
|
26
|
+
</script>
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
|
31
|
+
<%= erb(:navbar) %>
|
32
|
+
|
33
|
+
<div id="su-content">
|
34
|
+
|
35
|
+
<div class="nav_wrap">
|
36
|
+
<iframe id="nav" src="<%= @nav_url %>"></iframe>
|
37
|
+
<div id="resizer"></div>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div id="main" tabindex="-1">
|
41
|
+
<div id="header">
|
42
|
+
<%= erb(:breadcrumb) %>
|
43
|
+
<%= erb(:search) %>
|
44
|
+
<div class="clear"></div>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div id="content"><%= yieldall %></div>
|
48
|
+
|
49
|
+
<%= erb(:footer) %>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</body>
|
55
|
+
</html>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<!-- SU - start -->
|
2
|
+
<header id="navbar" role="banner" class="navbar navbar-fixed-top navbar-inverse">
|
3
|
+
<div id="api-documentation-header">
|
4
|
+
<div class="navbar-header">
|
5
|
+
<a class="logo navbar-btn pull-left" href="http://developer.sketchup.com" title="Home">
|
6
|
+
<img src="http://developer.sketchup.com/sites/help.sketchup.com/files/SU_Developer-RedWhite.png" alt="Home">
|
7
|
+
</a>
|
8
|
+
<a class="name navbar-brand" href="/en" title="Home">SketchUp Developer Center</a>
|
9
|
+
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
10
|
+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
11
|
+
<span class="sr-only">Toggle navigation</span>
|
12
|
+
<span class="icon-bar"></span>
|
13
|
+
<span class="icon-bar"></span>
|
14
|
+
<span class="icon-bar"></span>
|
15
|
+
</button>
|
16
|
+
</div>
|
17
|
+
<div class="navbar-collapse collapse">
|
18
|
+
<nav role="navigation">
|
19
|
+
<ul class="menu nav navbar-nav">
|
20
|
+
<li class="first leaf"><a href="http://forums.sketchup.com/c/developers">Community</a></li>
|
21
|
+
<li class="leaf"><a href="http://blog.sketchup.com/tags/developers">SketchUpdate Blog</a></li>
|
22
|
+
<li class="leaf"><a href="http://www.sketchup.com/download" class="top-menu--download-button">Download</a></li>
|
23
|
+
<li class="last expanded dropdown">
|
24
|
+
<a href="http://www.trimble.com" class="trimble-top-menu-item dropdown-toggle" data-target="#" data-toggle="dropdown"><img src="https://developer.sketchup.com/sites/help.sketchup.com/files/core/trimble-logo-white.png"><span class="caret"></span></a>
|
25
|
+
<ul class="dropdown-menu">
|
26
|
+
<li class="first leaf"><a href="http://connect.trimble.com/">Trimble Connect</a></li>
|
27
|
+
<li class="leaf"><a href="https://www.trimble.com/Corporate/About_Trimble.aspx">About Trimble</a></li>
|
28
|
+
<li class="last leaf"><a href="http://buildings.trimble.com/">Trimble Buildings</a></li>
|
29
|
+
</ul>
|
30
|
+
</li>
|
31
|
+
</ul>
|
32
|
+
</nav>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</header>
|
36
|
+
<!-- SU - end -->
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Consider if this should simply replace the Classes list.
|
2
|
+
|
3
|
+
=begin
|
4
|
+
TODO(thomthom): Temporarily disabled until we have time to fully implement this.
|
5
|
+
def menu_lists
|
6
|
+
# Load the existing menus
|
7
|
+
super + [ { :type => 'object_types', :title => 'Object Reference', :search_title => 'Object Reference List' } ]
|
8
|
+
end
|
9
|
+
=end
|
10
|
+
|
11
|
+
def javascripts
|
12
|
+
# Using the latest 1.x jQuery from CDN broke the YARD js. For now we must
|
13
|
+
# continue to use the version shipping with the YARD template we use as base.
|
14
|
+
%w(js/jquery.js js/app.js)
|
15
|
+
end
|
16
|
+
|
17
|
+
def stylesheets
|
18
|
+
%w(css/style.css css/sketchup.css css/rubyapi.css)
|
19
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<h3 class="signature <%= 'first' if @index == 0 %>" id="<%= anchor_for(object) %>">
|
2
|
+
<a style="float: right;" href="#header" title="Return to Top">↑</a>
|
3
|
+
<% if object.tags(:overload).size == 1 %>
|
4
|
+
<%= signature(object.tag(:overload), false) %>
|
5
|
+
<% elsif object.tags(:overload).size > 1 %>
|
6
|
+
<% object.tags(:overload).each do |overload| %>
|
7
|
+
<span class="overload"><%= signature(overload, false) %></span>
|
8
|
+
<% end %>
|
9
|
+
<% else %>
|
10
|
+
<%= signature(object, false) %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<% if object.aliases.size > 0 %>
|
14
|
+
<span class="aliases">Also known as:
|
15
|
+
<span class="names"><%= object.aliases.map {|o|
|
16
|
+
"<span id='#{anchor_for(o)}'>" + h(o.name.to_s) + "</span>" }.join(", ") %></span>
|
17
|
+
</span>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<% if owner != object.namespace %>
|
21
|
+
<span class="not_defined_here">
|
22
|
+
Originally defined in <%= object.namespace.type %>
|
23
|
+
<%= linkify object, owner.relative_path(object.namespace) %>
|
24
|
+
</span>
|
25
|
+
<% end %>
|
26
|
+
</h3>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# We don't want to expose our source code in the API docs.
|
2
|
+
|
3
|
+
# https://groups.google.com/forum/#!topic/yardoc/-HH48h-aifs
|
4
|
+
def source
|
5
|
+
return
|
6
|
+
end
|
7
|
+
|
8
|
+
# http://stackoverflow.com/a/10345917/486990
|
9
|
+
#def init
|
10
|
+
# super
|
11
|
+
# sections.first.delete(:source)
|
12
|
+
#end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<div class="box_info">
|
2
|
+
<% if CodeObjects::ClassObject === object && object.superclass %>
|
3
|
+
<dl>
|
4
|
+
<dt>Inherits:</dt>
|
5
|
+
<dd>
|
6
|
+
<span class="inheritName"><%= linkify object.superclass %></span>
|
7
|
+
<% if object.superclass.name != :BasicObject %>
|
8
|
+
<ul class="fullTree">
|
9
|
+
<li><%= linkify P(:Object) %></li>
|
10
|
+
<% object.inheritance_tree.reverse.each_with_index do |obj, i| %>
|
11
|
+
<li class="next"><%= obj == object ? obj.path : linkify(obj) %></li>
|
12
|
+
<% end %>
|
13
|
+
</ul>
|
14
|
+
<a href="#" class="inheritanceTree">show all</a>
|
15
|
+
<% end %>
|
16
|
+
</dd>
|
17
|
+
</dl>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<% [[:class, "Extended by"], [:instance, "Includes"]].each do |scope, name| %>
|
21
|
+
<% if (mix = run_verifier(object.mixins(scope))).size > 0 %>
|
22
|
+
<dl>
|
23
|
+
<dt><%= name %>:</dt>
|
24
|
+
<dd><%= mix.sort_by {|o| o.path }.map {|o| linkify(o) }.join(", ") %></dd>
|
25
|
+
</dl>
|
26
|
+
<% end %>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<% if (mixed_into = mixed_into(object)).size > 0 %>
|
30
|
+
<dl>
|
31
|
+
<dt>Included in:</dt>
|
32
|
+
<dd><%= mixed_into.sort_by {|o| o.path }.map {|o| linkify(o) }.join(", ") %></dd>
|
33
|
+
</dl>
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
</div>
|
37
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% if constant_listing.size > 0 || object.constants.size > 0 %>
|
2
|
+
<h2>
|
3
|
+
Constant Summary
|
4
|
+
<a
|
5
|
+
id="constant_summary"
|
6
|
+
href="#constant_summary"
|
7
|
+
title="Permalink">#</a>
|
8
|
+
</h2>
|
9
|
+
<% if constant_listing.size > 0 %>
|
10
|
+
<dl class="constants">
|
11
|
+
<% constant_listing.each do |cnst| %>
|
12
|
+
<dt id="<%= anchor_for(cnst) %>" class="<%= cnst.has_tag?(:deprecated) ? 'deprecated' : '' %>"><%= cnst.namespace.to_s.empty? ? '' : "#{cnst.namespace}::" %><%= cnst.name %>
|
13
|
+
</dt>
|
14
|
+
<% end %>
|
15
|
+
</dl>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= '(unknown)' %>
|