my_yard 0.0.3 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/GlobalSettings.rb +23 -0
- data/{src → lib}/MyYard.rb +47 -52
- data/{src → lib}/YardTheme.rb +12 -9
- data/{src → lib}/glade/MyYard.glade +151 -213
- data/{src → lib}/glade/YardTheme.glade +314 -407
- data/lib/my_yard.rb +7 -0
- data/my_yard +59 -34
- metadata +21 -148
- data/README.md +0 -25
- data/doc/GlobalSettings.html +0 -552
- data/doc/MyYard.html +0 -1201
- data/doc/TreeContext/Alternator.html +0 -297
- data/doc/TreeContext.html +0 -467
- data/doc/YardTheme.html +0 -746
- data/doc/YardThemeDefaults.html +0 -498
- data/doc/_index.html +0 -170
- data/doc/class_and_method_list.html +0 -322
- data/doc/class_list.html +0 -51
- data/doc/css/common.css +0 -45
- data/doc/css/full_list.css +0 -58
- data/doc/css/style.css +0 -474
- data/doc/file.README.html +0 -100
- data/doc/file_list.html +0 -56
- data/doc/frames.html +0 -17
- data/doc/img/logo.png +0 -0
- data/doc/index.html +0 -100
- data/doc/js/app.js +0 -243
- data/doc/js/full_list.js +0 -216
- data/doc/js/jquery.js +0 -4
- data/doc/just_file_list.html +0 -40
- data/doc/method_list.html +0 -843
- data/doc/top-level-namespace.html +0 -118
- data/home_my_yard/templates/visualruby/class/dot/superklass.erb +0 -3
- data/home_my_yard/templates/visualruby/class/html/constructor_details.erb +0 -8
- data/home_my_yard/templates/visualruby/class/html/subclasses.erb +0 -4
- data/home_my_yard/templates/visualruby/class/text/subclasses.erb +0 -5
- data/home_my_yard/templates/visualruby/constant/text/header.erb +0 -11
- data/home_my_yard/templates/visualruby/docstring/html/abstract.erb +0 -4
- data/home_my_yard/templates/visualruby/docstring/html/deprecated.erb +0 -1
- data/home_my_yard/templates/visualruby/docstring/html/index.erb +0 -5
- data/home_my_yard/templates/visualruby/docstring/html/note.erb +0 -6
- data/home_my_yard/templates/visualruby/docstring/html/private.erb +0 -4
- data/home_my_yard/templates/visualruby/docstring/html/returns_void.erb +0 -1
- data/home_my_yard/templates/visualruby/docstring/html/text.erb +0 -1
- data/home_my_yard/templates/visualruby/docstring/html/todo.erb +0 -6
- data/home_my_yard/templates/visualruby/docstring/text/abstract.erb +0 -2
- data/home_my_yard/templates/visualruby/docstring/text/deprecated.erb +0 -2
- data/home_my_yard/templates/visualruby/docstring/text/index.erb +0 -2
- data/home_my_yard/templates/visualruby/docstring/text/note.erb +0 -4
- data/home_my_yard/templates/visualruby/docstring/text/private.erb +0 -2
- data/home_my_yard/templates/visualruby/docstring/text/returns_void.erb +0 -1
- data/home_my_yard/templates/visualruby/docstring/text/text.erb +0 -1
- data/home_my_yard/templates/visualruby/docstring/text/todo.erb +0 -4
- data/home_my_yard/templates/visualruby/fulldoc/html/class_and_method.erb +0 -42
- data/home_my_yard/templates/visualruby/fulldoc/html/css/common.css +0 -1
- data/home_my_yard/templates/visualruby/fulldoc/html/css/full_list.css +0 -62
- data/home_my_yard/templates/visualruby/fulldoc/html/css/style.css +0 -476
- data/home_my_yard/templates/visualruby/fulldoc/html/frames.erb +0 -17
- data/home_my_yard/templates/visualruby/fulldoc/html/full_list.erb +0 -37
- data/home_my_yard/templates/visualruby/fulldoc/html/full_list_class.erb +0 -2
- data/home_my_yard/templates/visualruby/fulldoc/html/full_list_file.erb +0 -7
- data/home_my_yard/templates/visualruby/fulldoc/html/full_list_method.erb +0 -10
- data/home_my_yard/templates/visualruby/fulldoc/html/js/app.js +0 -243
- data/home_my_yard/templates/visualruby/fulldoc/html/js/full_list.js +0 -213
- data/home_my_yard/templates/visualruby/fulldoc/html/js/jquery.js +0 -4
- data/home_my_yard/templates/visualruby/fulldoc/html/just_files.erb +0 -33
- data/home_my_yard/templates/visualruby/layout/dot/header.erb +0 -6
- data/home_my_yard/templates/visualruby/layout/html/breadcrumb.erb +0 -11
- data/home_my_yard/templates/visualruby/layout/html/files.erb +0 -11
- data/home_my_yard/templates/visualruby/layout/html/footer.erb +0 -5
- data/home_my_yard/templates/visualruby/layout/html/headers.erb +0 -15
- data/home_my_yard/templates/visualruby/layout/html/index.erb +0 -2
- data/home_my_yard/templates/visualruby/layout/html/layout.erb +0 -30
- data/home_my_yard/templates/visualruby/layout/html/listing.erb +0 -4
- data/home_my_yard/templates/visualruby/layout/html/objects.erb +0 -32
- data/home_my_yard/templates/visualruby/layout/html/script_setup.erb +0 -4
- data/home_my_yard/templates/visualruby/layout/html/search.erb +0 -13
- data/home_my_yard/templates/visualruby/method/html/header.erb +0 -17
- data/home_my_yard/templates/visualruby/method/text/header.erb +0 -1
- data/home_my_yard/templates/visualruby/method_details/html/header.erb +0 -3
- data/home_my_yard/templates/visualruby/method_details/html/method_signature.erb +0 -25
- data/home_my_yard/templates/visualruby/method_details/html/source.erb +0 -10
- data/home_my_yard/templates/visualruby/method_details/text/header.erb +0 -10
- data/home_my_yard/templates/visualruby/method_details/text/method_signature.erb +0 -12
- data/home_my_yard/templates/visualruby/module/dot/child.erb +0 -1
- data/home_my_yard/templates/visualruby/module/dot/dependencies.erb +0 -3
- data/home_my_yard/templates/visualruby/module/dot/header.erb +0 -6
- data/home_my_yard/templates/visualruby/module/dot/info.erb +0 -14
- data/home_my_yard/templates/visualruby/module/html/attribute_details.erb +0 -10
- data/home_my_yard/templates/visualruby/module/html/attribute_summary.erb +0 -8
- data/home_my_yard/templates/visualruby/module/html/box_info.erb +0 -43
- data/home_my_yard/templates/visualruby/module/html/children.erb +0 -8
- data/home_my_yard/templates/visualruby/module/html/constant_summary.erb +0 -13
- data/home_my_yard/templates/visualruby/module/html/defines.erb +0 -3
- data/home_my_yard/templates/visualruby/module/html/header.erb +0 -5
- data/home_my_yard/templates/visualruby/module/html/inherited_attributes.erb +0 -14
- data/home_my_yard/templates/visualruby/module/html/inherited_constants.erb +0 -8
- data/home_my_yard/templates/visualruby/module/html/inherited_methods.erb +0 -19
- data/home_my_yard/templates/visualruby/module/html/item_summary.erb +0 -40
- data/home_my_yard/templates/visualruby/module/html/method_details_list.erb +0 -9
- data/home_my_yard/templates/visualruby/module/html/method_summary.erb +0 -14
- data/home_my_yard/templates/visualruby/module/html/methodmissing.erb +0 -12
- data/home_my_yard/templates/visualruby/module/html/pre_docstring.erb +0 -1
- data/home_my_yard/templates/visualruby/module/text/children.erb +0 -10
- data/home_my_yard/templates/visualruby/module/text/class_meths_list.erb +0 -8
- data/home_my_yard/templates/visualruby/module/text/extends.erb +0 -8
- data/home_my_yard/templates/visualruby/module/text/header.erb +0 -7
- data/home_my_yard/templates/visualruby/module/text/includes.erb +0 -8
- data/home_my_yard/templates/visualruby/module/text/instance_meths_list.erb +0 -8
- data/home_my_yard/templates/visualruby/onefile/html/files.erb +0 -5
- data/home_my_yard/templates/visualruby/onefile/html/headers.erb +0 -6
- data/home_my_yard/templates/visualruby/onefile/html/layout.erb +0 -17
- data/home_my_yard/templates/visualruby/onefile/html/readme.erb +0 -3
- data/home_my_yard/templates/visualruby/root/dot/child.erb +0 -3
- data/home_my_yard/templates/visualruby/tags/html/example.erb +0 -11
- data/home_my_yard/templates/visualruby/tags/html/index.erb +0 -3
- data/home_my_yard/templates/visualruby/tags/html/option.erb +0 -24
- data/home_my_yard/templates/visualruby/tags/html/overload.erb +0 -14
- data/home_my_yard/templates/visualruby/tags/html/see.erb +0 -8
- data/home_my_yard/templates/visualruby/tags/html/tag.erb +0 -20
- data/home_my_yard/templates/visualruby/tags/text/example.erb +0 -12
- data/home_my_yard/templates/visualruby/tags/text/index.erb +0 -1
- data/home_my_yard/templates/visualruby/tags/text/option.erb +0 -20
- data/home_my_yard/templates/visualruby/tags/text/overload.erb +0 -19
- data/home_my_yard/templates/visualruby/tags/text/see.erb +0 -11
- data/home_my_yard/templates/visualruby/tags/text/tag.erb +0 -13
- data/home_my_yard/themes/visualruby.yaml +0 -47
- data/my_yard-0.0.2.gem +0 -0
- data/my_yard.gemspec +0 -20
- data/notes +0 -9
- data/src/GlobalSettings.rb +0 -22
- data/src/glade/MyYard.glade~ +0 -611
- data/src/glade/YardTheme.glade~ +0 -1062
- /data/{src → lib}/YardThemeDefaults.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5a200b8335d6175bfb8dffc8b466fc0fb705a0cf0c4d0684b4d70d401af2cd52
|
4
|
+
data.tar.gz: c1addbb4b2361e364e6e7a0cd8e267aa46f00312b9756415d3f6894430a06c0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5154630c16725c3973b7eca8de9e52ac3aa89428953a5d9742837e91bc4416dea24f9f762c119ea76d13e89b6390d9aa52f321d024fe81bcd0962777ea81d091
|
7
|
+
data.tar.gz: 44a235a560c423ce93f2cd368f62340514cfe40ba96f61dbdff8c16368e0ca6b7485934fd723a81000dafc6db2fc222c1cf7da433883b81bbfa6774242b16875
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# class GlobalSettings
|
3
|
+
#
|
4
|
+
# include GladeGUI
|
5
|
+
#
|
6
|
+
# attr_accessor :browser, :projects, :theme_root, :template_root
|
7
|
+
#
|
8
|
+
# def defaults
|
9
|
+
# @browser ||= "firefox"
|
10
|
+
# @projects ||= []
|
11
|
+
# @theme_root = File.join(Dir.home, "my_yard", "themes")
|
12
|
+
# @template_root = File.join(Dir.home, "my_yard", "templates")
|
13
|
+
# end
|
14
|
+
#
|
15
|
+
# def add_project(proj_path)
|
16
|
+
# unless @projects.include?(proj_path)
|
17
|
+
# @projects << proj_path
|
18
|
+
# VR::save_yaml(self)
|
19
|
+
# end
|
20
|
+
# end
|
21
|
+
#
|
22
|
+
# end
|
23
|
+
#
|
data/{src → lib}/MyYard.rb
RENAMED
@@ -3,14 +3,21 @@ class MyYard
|
|
3
3
|
|
4
4
|
include GladeGUI
|
5
5
|
|
6
|
-
def initialize
|
6
|
+
def initialize()
|
7
7
|
defaults
|
8
8
|
end
|
9
9
|
|
10
10
|
def defaults
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
unless File.directory?(File.join(Dir.home, "my_yard"))
|
12
|
+
VR.copy_recursively File.join(File.dirname(__FILE__), "..", "home_my_yard"), File.join(Dir.home, "my_yard")
|
13
|
+
VR::load_yaml(YardTheme, File.join(Dir.home, "my_yard", "themes", "default.yaml")) # create default theme
|
14
|
+
end
|
15
|
+
|
16
|
+
@project_root = Dir.pwd
|
17
|
+
@theme_root = File.join(Dir.home, "my_yard", "themes")
|
18
|
+
@template_root = File.join(Dir.home, "my_yard", "templates")
|
19
|
+
@output_dir ||= "docs"
|
20
|
+
@theme = "default" if @theme.nil? or !File.exist?(File.join(@theme_root, @theme + ".yaml"))
|
14
21
|
@template ||= "default"
|
15
22
|
@files ||= "*/**/*.rb */**/*.c"
|
16
23
|
@extra_files ||= "*/**/*.md"
|
@@ -19,7 +26,7 @@ class MyYard
|
|
19
26
|
@include_private ||= false
|
20
27
|
@include_protected ||= false
|
21
28
|
@include_private_tag ||= false
|
22
|
-
@title ||= "Generated with
|
29
|
+
@title ||= "Generated with my_yard "
|
23
30
|
@main ||= "README.md"
|
24
31
|
@export_db = true if @export_db.nil?
|
25
32
|
@export_db_path ||= ".yardoc"
|
@@ -27,6 +34,7 @@ class MyYard
|
|
27
34
|
|
28
35
|
def before_show()
|
29
36
|
fill_combo_boxes
|
37
|
+
set_glade_variables
|
30
38
|
end
|
31
39
|
|
32
40
|
def buttonGenerate__clicked(*args)
|
@@ -55,7 +63,7 @@ class MyYard
|
|
55
63
|
end
|
56
64
|
if @template != "default"
|
57
65
|
args << "--template-path"
|
58
|
-
args <<
|
66
|
+
args << @template_root
|
59
67
|
args << "--template"
|
60
68
|
args << @template
|
61
69
|
end
|
@@ -67,7 +75,6 @@ class MyYard
|
|
67
75
|
end
|
68
76
|
if File.directory?(@project_root) and @project_root != ENV["HOME"]
|
69
77
|
YARD::Registry.clear
|
70
|
-
# YARD::Templates::ErbCache.clear!
|
71
78
|
old_dir = Dir.pwd
|
72
79
|
FileUtils.cd(@project_root)
|
73
80
|
YARD::CLI::Yardoc.run(*args)
|
@@ -76,57 +83,65 @@ class MyYard
|
|
76
83
|
alert "Invalid Project Folder.", parent: self
|
77
84
|
end
|
78
85
|
if @theme != "default"
|
79
|
-
css = VR::load_yaml(YardTheme, File.join(
|
86
|
+
css = VR::load_yaml(YardTheme, File.join(@theme_root, @theme + ".yaml"))
|
80
87
|
css.export_to(File.join(@project_root, @output_dir, "css", "common.css"))
|
81
88
|
# $default_theme.export_to(File.join(@project_root, @output_dir, "css", "common.css"))
|
82
89
|
else
|
83
90
|
css = File.join(@project_root, @output_dir, "css", "common.css")
|
84
91
|
File.delete(css) if File.exist?(css)
|
85
92
|
end
|
93
|
+
alert("Documents created in the '#{@output_dir}' folder.", headline: "Documents Generated", width: 500)
|
86
94
|
end
|
87
95
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
save_state
|
92
|
-
$open_project = @builder[:project_root].active_text
|
93
|
-
@builder[:window1].destroy
|
96
|
+
|
97
|
+
def theme__changed(*a)
|
98
|
+
get_glade_variables
|
94
99
|
end
|
95
100
|
|
96
101
|
def fill_combo_boxes()
|
97
102
|
@builder[:template].append_text "default"
|
98
|
-
glob = File.join(
|
103
|
+
glob = File.join(@template_root, "*/")
|
99
104
|
Dir.glob(glob).each do |path|
|
100
105
|
@builder[:template].append_text File.basename(path)
|
101
106
|
end
|
102
107
|
fill_themes
|
103
|
-
$env.projects.each do |path|
|
104
|
-
@builder[:project_root].append_text path
|
105
|
-
end
|
106
108
|
end
|
107
109
|
|
108
110
|
def fill_themes()
|
109
111
|
@builder[:theme].model.clear
|
110
|
-
glob = File.join(
|
112
|
+
glob = File.join(@theme_root, "*.yaml")
|
111
113
|
Dir.glob(glob).each do |path|
|
112
|
-
|
114
|
+
@builder[:theme].append_text File.basename(path, ".*")
|
113
115
|
end
|
114
116
|
end
|
115
117
|
|
118
|
+
def buttonCopy__clicked(*args)
|
119
|
+
copy = alert("Enter name for your new theme: ", data: "my_theme", headline: "Create New Theme")
|
120
|
+
if copy.is_a? String and copy != "" and copy != "default"
|
121
|
+
current_theme = File.join(@theme_root, @theme + ".yaml")
|
122
|
+
new_theme = File.join(@theme_root, copy + ".yaml")
|
123
|
+
FileUtils.cp current_theme, new_theme
|
124
|
+
fill_themes
|
125
|
+
@theme = copy
|
126
|
+
set_glade_variables # select new theme
|
127
|
+
save_state
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
116
131
|
def buttonEditTheme__clicked(*a)
|
117
|
-
|
118
|
-
|
132
|
+
if @theme == "default"
|
133
|
+
alert("You can't edit the default theme. Make a copy of it, and edit the copy.")
|
134
|
+
return
|
135
|
+
end
|
136
|
+
file = File.join(@theme_root, @theme + ".yaml")
|
119
137
|
win = VR::load_yaml(YardTheme, file)
|
120
|
-
win.show_glade(self)
|
121
|
-
fill_themes
|
122
|
-
set_glade_variables # select theme again
|
138
|
+
win.show_glade(self)
|
123
139
|
end
|
124
140
|
|
125
141
|
def buttonOpenProject__clicked(*a)
|
126
142
|
if folder = alert("Enter folder to open:",
|
127
|
-
parent: self,
|
128
|
-
headline: "Open Folder", button_yes: "Open"
|
129
|
-
button_no: "Cancel")
|
143
|
+
parent: self, data: Dir.home + "/",
|
144
|
+
headline: "Open Folder", button_yes: "Open")
|
130
145
|
if File.directory?(folder)
|
131
146
|
save_state
|
132
147
|
$open_project = folder
|
@@ -135,17 +150,6 @@ class MyYard
|
|
135
150
|
end
|
136
151
|
end
|
137
152
|
|
138
|
-
def buttonBrowse__clicked(*a)
|
139
|
-
save_state
|
140
|
-
begin
|
141
|
-
IO.popen("#{$env.browser} #{File.join(@project_root, @output_dir, 'index.html')}")
|
142
|
-
rescue
|
143
|
-
if answer = alert("Enter command to start your browser:", parent: self, input_text: $env.browser)
|
144
|
-
$env.browser = answer
|
145
|
-
VR::save_yaml($env)
|
146
|
-
end
|
147
|
-
end
|
148
|
-
end
|
149
153
|
|
150
154
|
def buttonDeleteProject__clicked(*a)
|
151
155
|
if alert("This will delete this project:\n<b>#{@project_root}</b>\nDo you want to continue?",
|
@@ -153,10 +157,10 @@ class MyYard
|
|
153
157
|
button_no: "Cancel",
|
154
158
|
parent: self,
|
155
159
|
headline: "Delete This Project?")
|
156
|
-
|
157
|
-
VR::save_yaml(
|
160
|
+
@env.projects.delete(@project_root)
|
161
|
+
VR::save_yaml(@env)
|
158
162
|
FileUtils.rm_rf File.join(@project_root, ".yardoc", "my_yard.yaml")
|
159
|
-
$open_project =
|
163
|
+
$open_project = @env.projects.empty? ? :exit : $env.projects[0]
|
160
164
|
@builder[:window1].destroy
|
161
165
|
end
|
162
166
|
end
|
@@ -165,7 +169,7 @@ class MyYard
|
|
165
169
|
get_glade_variables
|
166
170
|
return if @theme == "default"
|
167
171
|
if alert "Delete theme: <b>#{@theme}</b>?", parent:self, button_no: "Cancel"
|
168
|
-
theme = File.join(
|
172
|
+
theme = File.join(@theme_root, "#{@theme}.yaml")
|
169
173
|
File.delete(theme)
|
170
174
|
@theme = "default"
|
171
175
|
fill_themes
|
@@ -175,20 +179,11 @@ class MyYard
|
|
175
179
|
|
176
180
|
def window1__delete_event(*a)
|
177
181
|
save_state
|
178
|
-
$open_project = :exit
|
179
182
|
return false
|
180
183
|
end
|
181
184
|
|
182
|
-
def buttonCancel__clicked(*a)
|
183
|
-
save_state
|
184
|
-
$open_project = :exit
|
185
|
-
super
|
186
|
-
end
|
187
|
-
|
188
|
-
|
189
185
|
def save_state
|
190
186
|
get_glade_variables
|
191
|
-
@project_root = $open_project
|
192
187
|
VR::save_yaml(self)
|
193
188
|
end
|
194
189
|
|
data/{src → lib}/YardTheme.rb
RENAMED
@@ -45,15 +45,16 @@ class YardTheme
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def buttonClone__clicked(*a)
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
48
|
+
clone = alert("This will make a clone of this theme. " +
|
49
|
+
"Enter the name of the new theme without any extension (only letters and underscores).",
|
50
|
+
headline: "Clone Theme",
|
51
|
+
data: "",
|
52
|
+
width: 350,
|
53
|
+
parent: self)
|
54
|
+
alert clone
|
55
|
+
if clone.is_a? String and clone != "default" and clone != ""
|
56
|
+
# todo lowercase, strip, replace everything except letters, numbers and underscores.
|
57
|
+
path = File.join(Dir.home, "my_yard", "themes", clone + ".yaml")
|
57
58
|
if File.exists?(path)
|
58
59
|
alert "The file, <b>#{clone}</b> already exists.", parent: self
|
59
60
|
else
|
@@ -61,6 +62,8 @@ class YardTheme
|
|
61
62
|
VR::save_yaml(self, path)
|
62
63
|
@builder[:headline].label = "Theme: #{clone}"
|
63
64
|
end
|
65
|
+
else
|
66
|
+
|
64
67
|
end
|
65
68
|
end
|
66
69
|
|