my_yard 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,118 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Top Level Namespace
8
+
9
+ &mdash; Generated with Yard v0.9.0
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="just_file_list.html"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <!-- <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index</a> &raquo;
40
+
41
+
42
+ <span class="title">Top Level Namespace</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <iframe id="search_frame" src=""></iframe>
63
+ -->
64
+ <div id="content"><h1>Top Level Namespace
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ </div>
82
+
83
+ <h2>Defined Under Namespace</h2>
84
+ <p class="children">
85
+
86
+
87
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="YardThemeDefaults.html" title="YardThemeDefaults (module)">YardThemeDefaults</a></span>
88
+
89
+
90
+
91
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="GlobalSettings.html" title="GlobalSettings (class)">GlobalSettings</a></span>, <span class='object_link'><a href="MyYard.html" title="MyYard (class)">MyYard</a></span>, <span class='object_link'><a href="YardTheme.html" title="YardTheme (class)">YardTheme</a></span>
92
+
93
+
94
+ </p>
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+ </div>
105
+
106
+ <div id="footer">
107
+ Generated on Tue Jul 19 00:28:11 2016 by
108
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
109
+ 0.9.0 (ruby-2.3.0).
110
+ </div>
111
+
112
+ </div>
113
+ <div id="resizer"></div>
114
+ <div class="nav_wrap">
115
+ <iframe id="nav" src="class_and_method_list.html" ></iframe>
116
+ </div>
117
+ </body>
118
+ </html>
@@ -16,8 +16,8 @@
16
16
  </head>
17
17
  <body>
18
18
  <div id="content">
19
- <a href="/">
20
- <img src="/img/logo.png" onerror="this.style.display='none'">
19
+ <a href="/index.html">
20
+ <img src="./img/logo.png" onerror="this.style.display='none'">
21
21
  </a>
22
22
  <ul id="full_list" class="file">
23
23
  <% even_odd = 'odd' %>
data/my_yard CHANGED
@@ -1,19 +1,24 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
3
  require "vrlib"
4
- require "yard"
5
4
 
6
5
  # from require_all gem:
7
6
  require_rel 'src/'
8
7
 
9
8
  def start_my_yard
10
9
 
10
+ begin
11
+ require "yard"
12
+ rescue LoadError
13
+ alert "You need to install the yard gem. At command prompt:\n\ngem install yard"
14
+ return
15
+ end
11
16
  # create /home/my_yard if doesn't exist
12
17
  unless File.directory?(File.join(Dir.home, "my_yard"))
13
18
  VR.copy_recursively File.join(File.dirname(__FILE__), "home_my_yard"), File.join(Dir.home, "my_yard")
14
19
  end
15
20
 
16
- VR::save_yaml(YardTheme.new(), File.join(Dir.home, "my_yard", "themes", "default.yaml"))
21
+ VR::load_yaml(YardTheme, File.join(Dir.home, "my_yard", "themes", "default.yaml"))
17
22
 
18
23
  $open_project = (ARGV[0] and File.directory?(ARGV[0])) ? File.expand_path(ARGV[0]) : Dir.pwd
19
24
 
data/my_yard.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "my_yard" # i.e. visualruby. This name will show up in the gem list.
3
- s.version = "0.0.1" # i.e. (major,non-backwards compatable).(backwards compatable).(bugfix)
3
+ s.version = "0.0.2" # i.e. (major,non-backwards compatable).(backwards compatable).(bugfix)
4
4
  s.add_dependency "visualruby", ">= 3.0.20"
5
5
  s.add_dependency "yard", "= 0.9.0"
6
6
  s.has_rdoc = false
data/notes ADDED
@@ -0,0 +1,9 @@
1
+ To make yard compatible:
2
+
3
+ #search { position: static;}
4
+ .fixed_header { position: static; padding-bottom: 0px;}
5
+ #full_list {margin-top: 15px; }
6
+
7
+ remove height: 70px from .fixed_header class in full_list.css
8
+
9
+
data/src/MyYard.rb CHANGED
@@ -19,7 +19,7 @@ class MyYard
19
19
  @include_private ||= false
20
20
  @include_protected ||= false
21
21
  @include_private_tag ||= false
22
- @title ||= "Generated with Yard 0.8.7.6"
22
+ @title ||= "Generated with Yard v0.9.0"
23
23
  @main ||= "README.md"
24
24
  @export_db = true if @export_db.nil?
25
25
  @export_db_path ||= ".yardoc"
@@ -67,7 +67,7 @@ class MyYard
67
67
  end
68
68
  if File.directory?(@project_root) and @project_root != ENV["HOME"]
69
69
  YARD::Registry.clear
70
- YARD::Templates::ErbCache.clear!
70
+ # YARD::Templates::ErbCache.clear!
71
71
  old_dir = Dir.pwd
72
72
  FileUtils.cd(@project_root)
73
73
  YARD::CLI::Yardoc.run(*args)
@@ -80,7 +80,8 @@ class MyYard
80
80
  css.export_to(File.join(@project_root, @output_dir, "css", "common.css"))
81
81
  # $default_theme.export_to(File.join(@project_root, @output_dir, "css", "common.css"))
82
82
  else
83
- File.delete(File.join(@project_root, @output_dir, "css", "common.css"))
83
+ css = File.join(@project_root, @output_dir, "css", "common.css")
84
+ File.delete(css) if File.exist?(css)
84
85
  end
85
86
  end
86
87
 
data/src/YardTheme.rb CHANGED
@@ -23,25 +23,25 @@ class YardTheme
23
23
  end
24
24
 
25
25
  def to_css
26
- maps
27
- out = import_google_font("h1")
28
- out += import_google_font("h2")
29
- out += import_google_font("h3")
26
+ maps()
27
+ out = import_google_fonts()
30
28
  @css.each do |key, val|
31
29
  if val.strip != "" # and val != $default_theme.css[key]
32
30
  val = "'#{val}'" if key.include?("{font-family}") # quotes around font names
33
31
  out = out + key.gsub("}", ": #{val};" ) + "}\n"
34
32
  end
35
33
  end
36
- return out
34
+ return out + "#search { position: static; } .fixed_header { position: static; height: auto;} #full_list {margin-top: 0px;}"
37
35
  end
38
36
 
39
- def import_google_font(tag)
40
- out = ""
41
- font = @css["#{tag} {font-family}"]
42
- weight = @css["#{tag} {font-weight}"].strip == "" ? "" : ":" + @css["#{tag} {font-weight}"]
43
- out += "@import url('https://fonts.googleapis.com/css?family=#{font.gsub(' ', '+')}#{weight}');\n"
44
- return out
37
+ def import_google_fonts()
38
+ lines = []
39
+ ["h1", "h2", "h3", "#toc", ".object_link", "#main p"].each do |tag|
40
+ font = @css["#{tag} {font-family}"]
41
+ weight = @css["#{tag} {font-weight}"].strip == "" ? "" : ":" + @css["#{tag} {font-weight}"]
42
+ lines << "@import url('https://fonts.googleapis.com/css?family=#{font.gsub(' ', '+')}#{weight}');\n"
43
+ end
44
+ return lines.uniq!.join
45
45
  end
46
46
 
47
47
  def buttonClone__clicked(*a)
@@ -8,10 +8,12 @@ module YardThemeDefaults
8
8
 
9
9
  # covers table text, paragraph text
10
10
  @css["body {color}"] ||= "#000000"
11
+ @css["#main p {font-family}"] ||= "Raleway"
12
+ @css["#main p {font-weight}"] ||= "300"
11
13
 
12
14
 
13
15
  # #main background (middle doc)
14
- @css["#main {background}"] ||= "#ffffff" #ffffff
16
+ # @css["#main {background}"] ||= "#ffffff" #ffffff
15
17
 
16
18
  # background for full list. the even/odd backgrounds cover top, this is bottom.
17
19
  @css["body {background-color}"] ||= "#ffffff" #"#ffffff"
@@ -27,11 +29,17 @@ module YardThemeDefaults
27
29
  # @css[".summary_desc .object_link a, .docstring .object_link a {color}"] ||= "#0055aa" #0055aa
28
30
 
29
31
  # full list backgrounds
30
- @css[".object_link a {color}"] ||= "#0055aa"
32
+ @css[".object_link a, #full_list_nav a, #full_list_nav a:hover {color}"] ||= "#0055aa"
31
33
  @css["li.odd {background}"] ||= "#f0f0f0" #f0f0f0
32
34
  @css["li.even {background}"] ||= "#fafafa" #fafafa
33
35
  @css[".item:hover {background}"] ||= "#dddddd" #ddd
34
36
 
37
+ # full list font
38
+ @css[".object_link {font-family}"] ||= "Raleway"
39
+ @css[".object_link {font-weight}"] ||= "300"
40
+ @css[".object_link {font-size}"] ||= "1em"
41
+
42
+
35
43
  # background color of the selected item in list
36
44
  @css["li.clicked > .item {background}"] ||= "#0055aa" #05a;
37
45
  @css["li.clicked > .item {color}"] ||= "#fafafa"
@@ -79,15 +87,22 @@ module YardThemeDefaults
79
87
 
80
88
  # table of contents
81
89
  @css["#toc {background-color}"] ||= "#fee"
90
+ @css["#toc {font-size}"] ||= "1em"
91
+ # @css["#toc > a, #toc > a:visited {color}"] ||= "fafafa"
92
+ @css["#toc {font-family}"] ||= "Raleway"
93
+ @css["#toc {font-weight}"] ||= "300"
82
94
 
83
95
  # @css[".summary .summary_signature {background}"] = "#faf" # summary of instance methods titles
84
- @css["p.signature, h3.signature {background}"] = "#0a6" #tit
96
+ # @css["p.signature, h3.signature {background}"] = "#09aa66" #tit
97
+ @css["#content .summary .summary_signature:hover a {color}"] ||= "#000000"
98
+ @css[".summary_signature:hover {border-color}"] ||= "#000000"
85
99
 
86
100
  # List of links:
87
101
  # class = "summary_toggle" is class used for "collapse"
88
102
  end
89
103
 
90
104
  def maps
105
+ prune
91
106
  # summary of instance methods titles
92
107
  @css[".summary .summary_signature {background}"] = @css["h3 {background}"]
93
108
  # titles over instance method, attr details
@@ -96,5 +111,10 @@ module YardThemeDefaults
96
111
  @css["li.clicked > .item a, li.clicked > .item a:visited {color}"] = @css["li.clicked > .item {color}"]
97
112
  end
98
113
 
114
+ def prune()
115
+ default_theme = YardTheme.new()
116
+ @css.delete_if { |key, val| !default_theme.css.has_key?(key) }
117
+ end
118
+
99
119
 
100
120
  end
@@ -116,18 +116,6 @@
116
116
  <property name="height">1</property>
117
117
  </packing>
118
118
  </child>
119
- <child>
120
- <object class="GtkEntry" id="output_dir">
121
- <property name="visible">True</property>
122
- <property name="can_focus">True</property>
123
- </object>
124
- <packing>
125
- <property name="left_attach">1</property>
126
- <property name="top_attach">1</property>
127
- <property name="width">1</property>
128
- <property name="height">1</property>
129
- </packing>
130
- </child>
131
119
  <child>
132
120
  <object class="GtkEntry" id="exclude">
133
121
  <property name="visible">True</property>
@@ -302,6 +290,7 @@
302
290
  <object class="GtkBox" id="box8">
303
291
  <property name="visible">True</property>
304
292
  <property name="can_focus">False</property>
293
+ <property name="spacing">5</property>
305
294
  <child>
306
295
  <object class="GtkEntry" id="main">
307
296
  <property name="visible">True</property>
@@ -335,6 +324,18 @@
335
324
  <property name="height">1</property>
336
325
  </packing>
337
326
  </child>
327
+ <child>
328
+ <object class="GtkEntry" id="output_dir">
329
+ <property name="visible">True</property>
330
+ <property name="can_focus">True</property>
331
+ </object>
332
+ <packing>
333
+ <property name="left_attach">1</property>
334
+ <property name="top_attach">1</property>
335
+ <property name="width">1</property>
336
+ <property name="height">1</property>
337
+ </packing>
338
+ </child>
338
339
  </object>
339
340
  <packing>
340
341
  <property name="expand">False</property>
@@ -116,18 +116,6 @@
116
116
  <property name="height">1</property>
117
117
  </packing>
118
118
  </child>
119
- <child>
120
- <object class="GtkEntry" id="output_dir">
121
- <property name="visible">True</property>
122
- <property name="can_focus">True</property>
123
- </object>
124
- <packing>
125
- <property name="left_attach">1</property>
126
- <property name="top_attach">1</property>
127
- <property name="width">1</property>
128
- <property name="height">1</property>
129
- </packing>
130
- </child>
131
119
  <child>
132
120
  <object class="GtkEntry" id="exclude">
133
121
  <property name="visible">True</property>
@@ -302,6 +290,7 @@
302
290
  <object class="GtkBox" id="box8">
303
291
  <property name="visible">True</property>
304
292
  <property name="can_focus">False</property>
293
+ <property name="spacing">10</property>
305
294
  <child>
306
295
  <object class="GtkEntry" id="main">
307
296
  <property name="visible">True</property>
@@ -314,6 +303,21 @@
314
303
  <property name="position">0</property>
315
304
  </packing>
316
305
  </child>
306
+ <child>
307
+ <object class="GtkCheckButton" id="one_file">
308
+ <property name="label" translatable="yes">output one file</property>
309
+ <property name="visible">True</property>
310
+ <property name="can_focus">True</property>
311
+ <property name="receives_default">False</property>
312
+ <property name="xalign">0</property>
313
+ <property name="draw_indicator">True</property>
314
+ </object>
315
+ <packing>
316
+ <property name="expand">False</property>
317
+ <property name="fill">True</property>
318
+ <property name="position">1</property>
319
+ </packing>
320
+ </child>
317
321
  <child>
318
322
  <object class="GtkButton" id="buttonBrowse">
319
323
  <property name="label" translatable="yes">Browse</property>
@@ -324,7 +328,7 @@
324
328
  <packing>
325
329
  <property name="expand">False</property>
326
330
  <property name="fill">True</property>
327
- <property name="position">1</property>
331
+ <property name="position">2</property>
328
332
  </packing>
329
333
  </child>
330
334
  </object>
@@ -335,6 +339,18 @@
335
339
  <property name="height">1</property>
336
340
  </packing>
337
341
  </child>
342
+ <child>
343
+ <object class="GtkEntry" id="output_dir">
344
+ <property name="visible">True</property>
345
+ <property name="can_focus">True</property>
346
+ </object>
347
+ <packing>
348
+ <property name="left_attach">1</property>
349
+ <property name="top_attach">1</property>
350
+ <property name="width">1</property>
351
+ <property name="height">1</property>
352
+ </packing>
353
+ </child>
338
354
  </object>
339
355
  <packing>
340
356
  <property name="expand">False</property>