yard-sketchup 1.1.3 → 1.1.4
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 +5 -5
- data/lib/yard-sketchup/templates/default/fulldoc/html/css/sketchup.css +10 -0
- data/lib/yard-sketchup/templates/default/layout/html/navbar.erb +1 -1
- data/lib/yard-sketchup/templates/rubocop-changelog/fulldoc/text/setup.rb +75 -75
- data/lib/yard-sketchup/version.rb +1 -1
- data/lib/yard-sketchup/yard/handlers/class_constants.rb +17 -17
- data/lib/yard-sketchup/yard/handlers/class_enum_constants.rb +17 -17
- data/lib/yard-sketchup/yard/handlers/global_constants.rb +19 -19
- data/lib/yard-sketchup/yard/logger.rb +45 -45
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b423474c8d87b8f7f225b0b9711005e4cce42cdae47f40b8016b0a8dc7336525
|
4
|
+
data.tar.gz: 50c9651f436c50cda5c46bb3682a16d4141bd7c380c0e174fb724fbd98376720
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34e49e6029571fd60cd6b73995a5859af78f991ee252d09b63f8bd5270a0f8a118830ce79a6d281a103c5a1e3c6d78fe26e9d4a3f9463993f3caa47b92abfd3a
|
7
|
+
data.tar.gz: e96a7090401e217445ebd31c05394b558d298017ed5dc24b353dbb777197216f7f4dbb3fb05d84900867a980839e09068f3507fd14a6cecb58c6faf9fc7bef6e
|
@@ -102,6 +102,16 @@ h2 small a {
|
|
102
102
|
}
|
103
103
|
|
104
104
|
|
105
|
+
p.signature .aliases,
|
106
|
+
h3.signature .aliases {
|
107
|
+
color: #ccc;
|
108
|
+
}
|
109
|
+
p.signature .aliases .names,
|
110
|
+
h3.signature .aliases .names {
|
111
|
+
color: #fff;
|
112
|
+
}
|
113
|
+
|
114
|
+
|
105
115
|
/* Ensure content is scrollable on small screens. */
|
106
116
|
@media (max-width: 920px) {
|
107
117
|
#main {
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<li class="leaf"><a href="https://blog.sketchup.com/">SketchUp Blog</a></li>
|
22
22
|
<li class="leaf"><a href="https://www.sketchup.com/download" class="top-menu--download-button">Download</a></li>
|
23
23
|
<li class="last expanded dropdown">
|
24
|
-
<a href="https://www.trimble.com" class="trimble-top-menu-item dropdown-toggle" data-target="#" data-toggle="dropdown"><img src="https://ruby.sketchup.com/images/
|
24
|
+
<a href="https://www.trimble.com" class="trimble-top-menu-item dropdown-toggle" data-target="#" data-toggle="dropdown"><img src="https://ruby.sketchup.com/images/trimble-logo-white.png"><span class="caret"></span></a>
|
25
25
|
<ul class="dropdown-menu">
|
26
26
|
<li class="first leaf"><a href="https://connect.trimble.com/">Trimble Connect</a></li>
|
27
27
|
<li class="leaf"><a href="https://www.trimble.com/Corporate/About_Trimble.aspx">About Trimble</a></li>
|
@@ -1,75 +1,75 @@
|
|
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 changelog_filename
|
22
|
-
'Changelog SU201x.log'
|
23
|
-
end
|
24
|
-
|
25
|
-
VERSION_MATCH = /^\D+([0-9.]+)(?:\s+M(\d+))?$/
|
26
|
-
|
27
|
-
def generate_changelog
|
28
|
-
output = StringIO.new
|
29
|
-
|
30
|
-
versions = Hash.new
|
31
|
-
all_objects.each { |object|
|
32
|
-
version_tag = object.tag(:version)
|
33
|
-
next if version_tag.nil?
|
34
|
-
version = version_tag.text
|
35
|
-
|
36
|
-
# Don't list SU6 or older.
|
37
|
-
next if version.match(VERSION_MATCH).captures[0].to_i <= 6
|
38
|
-
|
39
|
-
versions[version] ||= {}
|
40
|
-
versions[version][object.type] ||= []
|
41
|
-
versions[version][object.type] << object.path
|
42
|
-
}
|
43
|
-
versions = versions.sort { |a, b|
|
44
|
-
v1, mv1 = a[0].match(VERSION_MATCH).captures
|
45
|
-
v2, mv2 = b[0].match(VERSION_MATCH).captures
|
46
|
-
if v1 == v2
|
47
|
-
(mv2 || '0').to_i <=> (mv1 || '0').to_i
|
48
|
-
else
|
49
|
-
v2.to_f <=> v1.to_f
|
50
|
-
end
|
51
|
-
}
|
52
|
-
|
53
|
-
output.puts "FEATURES = ["
|
54
|
-
versions.each { |version, features|
|
55
|
-
output.puts ""
|
56
|
-
output.puts " {"
|
57
|
-
output.puts " version: '#{version}',"
|
58
|
-
output.puts " types: {"
|
59
|
-
features.sort.each { |type, objects|
|
60
|
-
unless objects.empty?
|
61
|
-
output.puts " #{type}: ["
|
62
|
-
objects.sort.each { |object|
|
63
|
-
output.puts " '#{object}',"
|
64
|
-
}
|
65
|
-
output.puts " ],"
|
66
|
-
end
|
67
|
-
}
|
68
|
-
output.puts " },"
|
69
|
-
output.puts " },"
|
70
|
-
}
|
71
|
-
output.puts "]"
|
72
|
-
|
73
|
-
puts output.string
|
74
|
-
exit # Avoid the YARD summary
|
75
|
-
end
|
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 changelog_filename
|
22
|
+
'Changelog SU201x.log'
|
23
|
+
end
|
24
|
+
|
25
|
+
VERSION_MATCH = /^\D+([0-9.]+)(?:\s+M(\d+))?$/
|
26
|
+
|
27
|
+
def generate_changelog
|
28
|
+
output = StringIO.new
|
29
|
+
|
30
|
+
versions = Hash.new
|
31
|
+
all_objects.each { |object|
|
32
|
+
version_tag = object.tag(:version)
|
33
|
+
next if version_tag.nil?
|
34
|
+
version = version_tag.text
|
35
|
+
|
36
|
+
# Don't list SU6 or older.
|
37
|
+
next if version.match(VERSION_MATCH).captures[0].to_i <= 6
|
38
|
+
|
39
|
+
versions[version] ||= {}
|
40
|
+
versions[version][object.type] ||= []
|
41
|
+
versions[version][object.type] << object.path
|
42
|
+
}
|
43
|
+
versions = versions.sort { |a, b|
|
44
|
+
v1, mv1 = a[0].match(VERSION_MATCH).captures
|
45
|
+
v2, mv2 = b[0].match(VERSION_MATCH).captures
|
46
|
+
if v1 == v2
|
47
|
+
(mv2 || '0').to_i <=> (mv1 || '0').to_i
|
48
|
+
else
|
49
|
+
v2.to_f <=> v1.to_f
|
50
|
+
end
|
51
|
+
}
|
52
|
+
|
53
|
+
output.puts "FEATURES = ["
|
54
|
+
versions.each { |version, features|
|
55
|
+
output.puts ""
|
56
|
+
output.puts " {"
|
57
|
+
output.puts " version: '#{version}',"
|
58
|
+
output.puts " types: {"
|
59
|
+
features.sort.each { |type, objects|
|
60
|
+
unless objects.empty?
|
61
|
+
output.puts " #{type}: ["
|
62
|
+
objects.sort.each { |object|
|
63
|
+
output.puts " '#{object}',"
|
64
|
+
}
|
65
|
+
output.puts " ],"
|
66
|
+
end
|
67
|
+
}
|
68
|
+
output.puts " },"
|
69
|
+
output.puts " },"
|
70
|
+
}
|
71
|
+
output.puts "]"
|
72
|
+
|
73
|
+
puts output.string
|
74
|
+
exit # Avoid the YARD summary
|
75
|
+
end
|
@@ -1,17 +1,17 @@
|
|
1
|
-
module SketchUpYARD
|
2
|
-
class ClassConstantHandler < YARD::Handlers::C::Base
|
3
|
-
|
4
|
-
MATCH = %r{\bDEFINE_RUBY_CLASS_CONSTANT\s*\(([^,]+)\s*,\s*([^,]+)\s*,\s*(\w+)\s*\)\s*;}xm
|
5
|
-
handles MATCH
|
6
|
-
statement_class BodyStatement
|
7
|
-
|
8
|
-
process do
|
9
|
-
statement.source.scan(MATCH) do |klass_name, value, const_name|
|
10
|
-
type = "const"
|
11
|
-
value = "nil"
|
12
|
-
handle_constants(type, klass_name, const_name, value)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|
17
|
-
end
|
1
|
+
module SketchUpYARD
|
2
|
+
class ClassConstantHandler < YARD::Handlers::C::Base
|
3
|
+
|
4
|
+
MATCH = %r{\bDEFINE_RUBY_CLASS_CONSTANT\s*\(([^,]+)\s*,\s*([^,]+)\s*,\s*(\w+)\s*\)\s*;}xm
|
5
|
+
handles MATCH
|
6
|
+
statement_class BodyStatement
|
7
|
+
|
8
|
+
process do
|
9
|
+
statement.source.scan(MATCH) do |klass_name, value, const_name|
|
10
|
+
type = "const"
|
11
|
+
value = "nil"
|
12
|
+
handle_constants(type, klass_name, const_name, value)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -1,17 +1,17 @@
|
|
1
|
-
module SketchUpYARD
|
2
|
-
class ClassEnumConstantHandler < YARD::Handlers::C::Base
|
3
|
-
|
4
|
-
MATCH = %r{\bDEFINE_RUBY_CLASS_ENUM\s*\(([^,]+)\s*,\s*(\w+)\s*\)\s*;}xm
|
5
|
-
handles MATCH
|
6
|
-
statement_class BodyStatement
|
7
|
-
|
8
|
-
process do
|
9
|
-
statement.source.scan(MATCH) do |klass_name, const_name|
|
10
|
-
type = "const"
|
11
|
-
value = "nil"
|
12
|
-
handle_constants(type, klass_name, const_name, value)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|
17
|
-
end
|
1
|
+
module SketchUpYARD
|
2
|
+
class ClassEnumConstantHandler < YARD::Handlers::C::Base
|
3
|
+
|
4
|
+
MATCH = %r{\bDEFINE_RUBY_CLASS_ENUM\s*\(([^,]+)\s*,\s*(\w+)\s*\)\s*;}xm
|
5
|
+
handles MATCH
|
6
|
+
statement_class BodyStatement
|
7
|
+
|
8
|
+
process do
|
9
|
+
statement.source.scan(MATCH) do |klass_name, const_name|
|
10
|
+
type = "const"
|
11
|
+
value = "nil"
|
12
|
+
handle_constants(type, klass_name, const_name, value)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -1,19 +1,19 @@
|
|
1
|
-
module SketchUpYARD
|
2
|
-
class GlobalConstantHandler < YARD::Handlers::C::Base
|
3
|
-
|
4
|
-
MATCH = %r{\bDEFINE_RUBY_(?:(?:NAMED_)?CONSTANT|ENUM)\s*\((?:[^)]+,\s*)?(\w+)\)\s*;}xm
|
5
|
-
handles MATCH
|
6
|
-
statement_class BodyStatement
|
7
|
-
|
8
|
-
process do
|
9
|
-
statement.source.scan(MATCH) do |captures|
|
10
|
-
const_name = captures.first
|
11
|
-
type = "global_const"
|
12
|
-
var_name = nil
|
13
|
-
value = "nil"
|
14
|
-
handle_constants(type, var_name, const_name, value)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|
1
|
+
module SketchUpYARD
|
2
|
+
class GlobalConstantHandler < YARD::Handlers::C::Base
|
3
|
+
|
4
|
+
MATCH = %r{\bDEFINE_RUBY_(?:(?:NAMED_)?CONSTANT|ENUM)\s*\((?:[^)]+,\s*)?(\w+)\)\s*;}xm
|
5
|
+
handles MATCH
|
6
|
+
statement_class BodyStatement
|
7
|
+
|
8
|
+
process do
|
9
|
+
statement.source.scan(MATCH) do |captures|
|
10
|
+
const_name = captures.first
|
11
|
+
type = "global_const"
|
12
|
+
var_name = nil
|
13
|
+
value = "nil"
|
14
|
+
handle_constants(type, var_name, const_name, value)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -1,45 +1,45 @@
|
|
1
|
-
require 'yard/logging'
|
2
|
-
|
3
|
-
# Hack to show some progress on Windows while building the docs.
|
4
|
-
# Helpful in seeing what takes most time.
|
5
|
-
# It's Copy+Paste from YARD 0.9.9 with some noted edits.
|
6
|
-
module YARD
|
7
|
-
class Logger < ::Logger
|
8
|
-
|
9
|
-
def show_progress
|
10
|
-
return false if YARD.ruby18? # threading is too ineffective for progress support
|
11
|
-
# <hack>
|
12
|
-
# return false if YARD.windows? # windows has poor ANSI support
|
13
|
-
# </hack>
|
14
|
-
return false unless io.tty? # no TTY support on IO
|
15
|
-
return false unless level > INFO # no progress in verbose/debug modes
|
16
|
-
@show_progress
|
17
|
-
end
|
18
|
-
|
19
|
-
def progress(msg, nontty_log = :debug)
|
20
|
-
send(nontty_log, msg) if nontty_log
|
21
|
-
return unless show_progress
|
22
|
-
icon = ""
|
23
|
-
if defined?(::Encoding)
|
24
|
-
icon = PROGRESS_INDICATORS[@progress_indicator] + " "
|
25
|
-
end
|
26
|
-
@mutex.synchronize do
|
27
|
-
print("\e[2K\e[?25l\e[1m#{icon}#{msg}\e[0m\r")
|
28
|
-
@progress_msg = msg
|
29
|
-
if Time.now - @progress_last_update > 0.2
|
30
|
-
@progress_indicator += 1
|
31
|
-
@progress_indicator %= PROGRESS_INDICATORS.size
|
32
|
-
@progress_last_update = Time.now
|
33
|
-
end
|
34
|
-
end
|
35
|
-
Thread.new do
|
36
|
-
sleep(0.05)
|
37
|
-
# <hack>
|
38
|
-
# progress(msg + ".", nil) if @progress_msg == msg
|
39
|
-
# </hack>
|
40
|
-
progress(msg, nil) if @progress_msg == msg
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
end
|
45
|
-
end if true # Set to false to disable hack.
|
1
|
+
require 'yard/logging'
|
2
|
+
|
3
|
+
# Hack to show some progress on Windows while building the docs.
|
4
|
+
# Helpful in seeing what takes most time.
|
5
|
+
# It's Copy+Paste from YARD 0.9.9 with some noted edits.
|
6
|
+
module YARD
|
7
|
+
class Logger < ::Logger
|
8
|
+
|
9
|
+
def show_progress
|
10
|
+
return false if YARD.ruby18? # threading is too ineffective for progress support
|
11
|
+
# <hack>
|
12
|
+
# return false if YARD.windows? # windows has poor ANSI support
|
13
|
+
# </hack>
|
14
|
+
return false unless io.tty? # no TTY support on IO
|
15
|
+
return false unless level > INFO # no progress in verbose/debug modes
|
16
|
+
@show_progress
|
17
|
+
end
|
18
|
+
|
19
|
+
def progress(msg, nontty_log = :debug)
|
20
|
+
send(nontty_log, msg) if nontty_log
|
21
|
+
return unless show_progress
|
22
|
+
icon = ""
|
23
|
+
if defined?(::Encoding)
|
24
|
+
icon = PROGRESS_INDICATORS[@progress_indicator] + " "
|
25
|
+
end
|
26
|
+
@mutex.synchronize do
|
27
|
+
print("\e[2K\e[?25l\e[1m#{icon}#{msg}\e[0m\r")
|
28
|
+
@progress_msg = msg
|
29
|
+
if Time.now - @progress_last_update > 0.2
|
30
|
+
@progress_indicator += 1
|
31
|
+
@progress_indicator %= PROGRESS_INDICATORS.size
|
32
|
+
@progress_last_update = Time.now
|
33
|
+
end
|
34
|
+
end
|
35
|
+
Thread.new do
|
36
|
+
sleep(0.05)
|
37
|
+
# <hack>
|
38
|
+
# progress(msg + ".", nil) if @progress_msg == msg
|
39
|
+
# </hack>
|
40
|
+
progress(msg, nil) if @progress_msg == msg
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end if true # Set to false to disable hack.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-sketchup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trimble Inc, SketchUp Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yard
|
@@ -104,8 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
|
-
|
108
|
-
rubygems_version: 2.6.14
|
107
|
+
rubygems_version: 3.0.3
|
109
108
|
signing_key:
|
110
109
|
specification_version: 4
|
111
110
|
summary: SketchUp Ruby API YARD template.
|