ontology 0.0.1
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.
- data/LICENSE +19 -0
- data/NEWS.md +7 -0
- data/README.md +36 -0
- data/bin/ontology +83 -0
- data/doc/Change_Log_txt.html +97 -0
- data/doc/Gemfile.html +93 -0
- data/doc/LICENSE.html +111 -0
- data/doc/Object.html +230 -0
- data/doc/Ontology.html +791 -0
- data/doc/Ontology/Leaf.html +370 -0
- data/doc/bin/ontology.html +193 -0
- data/doc/created.rid +17 -0
- data/doc/images/add.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +88 -0
- data/doc/js/darkfish.js +153 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +543 -0
- data/doc/table_of_contents.html +110 -0
- data/lib/ontology.rb +11 -0
- data/lib/ontology/error_message.rb +17 -0
- data/lib/ontology/leaf.rb +57 -0
- data/lib/ontology/load_config_yaml.rb +13 -0
- data/lib/ontology/make_glossary.rb +128 -0
- data/lib/ontology/write_file.rb +10 -0
- data/lib/ontology/yaml_utils.rb +74 -0
- data/ontology.gemspec +32 -0
- data/spec/config.yaml +3 -0
- data/spec/decompose_md_file_spec.rb +417 -0
- data/spec/leaf_spec.rb +13 -0
- data/spec/test.md +5 -0
- data/spec/test_make_glossary.rb +68 -0
- data/spec/write_md_file_spec.rb +23 -0
- data/spec/yaml_utils_spec.rb +39 -0
- metadata +109 -0
@@ -0,0 +1,110 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>Table of Contents - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "./";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body class="indexpage">
|
24
|
+
<h1>Table of Contents - RDoc Documentation</h1>
|
25
|
+
|
26
|
+
<h2>Pages</h2>
|
27
|
+
<ul>
|
28
|
+
<li class="file">
|
29
|
+
<a href="Change_Log_txt.html">Change_Log</a>
|
30
|
+
</li>
|
31
|
+
<li class="file">
|
32
|
+
<a href="Gemfile.html">Gemfile</a>
|
33
|
+
</li>
|
34
|
+
<li class="file">
|
35
|
+
<a href="LICENSE.html">LICENSE</a>
|
36
|
+
</li>
|
37
|
+
<li class="file">
|
38
|
+
<a href="bin/ontology.html">ontology</a>
|
39
|
+
</li>
|
40
|
+
|
41
|
+
</ul>
|
42
|
+
|
43
|
+
<h2 id="classes">Classes/Modules</h2>
|
44
|
+
<ul>
|
45
|
+
<li class="module">
|
46
|
+
<a href="Ontology.html">Ontology</a>
|
47
|
+
</li>
|
48
|
+
<li class="class">
|
49
|
+
<a href="Ontology/Leaf.html">Ontology::Leaf</a>
|
50
|
+
</li>
|
51
|
+
<li class="class">
|
52
|
+
<a href="Object.html">Object</a>
|
53
|
+
</li>
|
54
|
+
|
55
|
+
</ul>
|
56
|
+
|
57
|
+
<h2 id="methods">Methods</h2>
|
58
|
+
<ul>
|
59
|
+
|
60
|
+
<li class="method"><a href="Ontology/Leaf.html#method-c-new">::new — Ontology::Leaf</a>
|
61
|
+
|
62
|
+
<li class="method"><a href="Ontology.html#method-i-any_language_ize">#any_language_ize — Ontology</a>
|
63
|
+
|
64
|
+
<li class="method"><a href="Ontology.html#method-i-build_glossary">#build_glossary — Ontology</a>
|
65
|
+
|
66
|
+
<li class="method"><a href="Ontology.html#method-i-check_config_yaml">#check_config_yaml — Ontology</a>
|
67
|
+
|
68
|
+
<li class="method"><a href="Ontology/Leaf.html#method-i-correct_yaml">#correct_yaml — Ontology::Leaf</a>
|
69
|
+
|
70
|
+
<li class="method"><a href="Ontology.html#method-i-decompose_as_multi_lang_md">#decompose_as_multi_lang_md — Ontology</a>
|
71
|
+
|
72
|
+
<li class="method"><a href="Ontology.html#method-i-decompose_as_yaml_conf">#decompose_as_yaml_conf — Ontology</a>
|
73
|
+
|
74
|
+
<li class="method"><a href="Ontology.html#method-i-error_message">#error_message — Ontology</a>
|
75
|
+
|
76
|
+
<li class="method"><a href="Ontology.html#method-i-error_message_abort">#error_message_abort — Ontology</a>
|
77
|
+
|
78
|
+
<li class="method"><a href="Ontology/Leaf.html#method-i-export_markdowns">#export_markdowns — Ontology::Leaf</a>
|
79
|
+
|
80
|
+
<li class="method"><a href="Object.html#method-i-f">#f — Object</a>
|
81
|
+
|
82
|
+
<li class="method"><a href="Ontology.html#method-i-generate_leaf_init_struct">#generate_leaf_init_struct — Ontology</a>
|
83
|
+
|
84
|
+
<li class="method"><a href="Ontology/Leaf.html#method-i-generate_markdown_file">#generate_markdown_file — Ontology::Leaf</a>
|
85
|
+
|
86
|
+
<li class="method"><a href="Ontology/Leaf.html#method-i-inspect">#inspect — Ontology::Leaf</a>
|
87
|
+
|
88
|
+
<li class="method"><a href="Ontology.html#method-i-iterate_yaml_part">#iterate_yaml_part — Ontology</a>
|
89
|
+
|
90
|
+
<li class="method"><a href="Ontology.html#method-i-load_config_pars">#load_config_pars — Ontology</a>
|
91
|
+
|
92
|
+
<li class="method"><a href="Ontology.html#method-i-symbolize_for_this_key">#symbolize_for_this_key — Ontology</a>
|
93
|
+
|
94
|
+
<li class="method"><a href="Ontology.html#method-i-to_symbol">#to_symbol — Ontology</a>
|
95
|
+
|
96
|
+
<li class="method"><a href="Ontology.html#method-i-treat_glossary_file">#treat_glossary_file — Ontology</a>
|
97
|
+
|
98
|
+
<li class="method"><a href="Ontology.html#method-i-type_of_leaf_part">#type_of_leaf_part — Ontology</a>
|
99
|
+
|
100
|
+
<li class="method"><a href="Ontology.html#method-i-write_md_file">#write_md_file — Ontology</a>
|
101
|
+
|
102
|
+
</ul>
|
103
|
+
|
104
|
+
|
105
|
+
<footer id="validator-badges">
|
106
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
107
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
108
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
109
|
+
</footer>
|
110
|
+
|
data/lib/ontology.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Ontology
|
3
|
+
def error_message_abort(msg, exception = nil)
|
4
|
+
STDERR.puts msg
|
5
|
+
if exception
|
6
|
+
raise exception
|
7
|
+
end
|
8
|
+
exit 1
|
9
|
+
end
|
10
|
+
|
11
|
+
def error_message(msg, exception = nil)
|
12
|
+
STDERR.puts msg
|
13
|
+
if exception
|
14
|
+
raise exception
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Ontology
|
3
|
+
|
4
|
+
class Leaf
|
5
|
+
attr_reader :my_hash
|
6
|
+
def inspect
|
7
|
+
["Leaf.inspect", @my_hash.inspect]
|
8
|
+
end
|
9
|
+
def correct_yaml(languages)
|
10
|
+
#puts "correct_yaml #{languages}, #{languages.class}"
|
11
|
+
(languages + [:any]).each{|lng|
|
12
|
+
unless @my_hash[lng].nil?
|
13
|
+
@my_hash[:title] ||= Hash.new(&Lang_block)
|
14
|
+
@my_hash[:title][lng] = @my_hash[lng]
|
15
|
+
#@my_hash[:order] ||= {}
|
16
|
+
#@my_hash[:order][lng.first] = @my_hash[lng.first]
|
17
|
+
@my_hash.delete(lng)
|
18
|
+
end
|
19
|
+
}
|
20
|
+
any_language_ize(@my_hash, :title)
|
21
|
+
any_language_ize(@my_hash, :order)
|
22
|
+
end
|
23
|
+
def initialize hash_struct, glossary_as_symb
|
24
|
+
@my_hash = hash_struct
|
25
|
+
@glossary_as_symb = glossary_as_symb
|
26
|
+
#puts '****************!!', @my_hash
|
27
|
+
correct_yaml $data_symb[:ontology][@glossary_as_symb][:destination].keys
|
28
|
+
#puts '****************!!!!!', @my_hash
|
29
|
+
end
|
30
|
+
def generate_markdown_file lang, dir
|
31
|
+
begin
|
32
|
+
file_name = Base_dir + '/' + dir + '/_' + (@my_hash[:order][lang].to_url) + '.md'
|
33
|
+
#puts file_name
|
34
|
+
#puts @my_hash[:title][lang] #, @my_hash[:content][0][lang]
|
35
|
+
file_content = '##' + @my_hash[:title][lang] + "\n\n"
|
36
|
+
@my_hash[:content].each {|leaf_part| file_content << leaf_part[lang]+ "\n\n"}
|
37
|
+
if $options[:build]
|
38
|
+
write_md_file(file_name, file_content)
|
39
|
+
else
|
40
|
+
puts "write to #{file_name}"
|
41
|
+
#puts "content: ", file_content
|
42
|
+
end
|
43
|
+
rescue
|
44
|
+
STDERR.puts 'Aborting'
|
45
|
+
puts self.inspect
|
46
|
+
exit 1
|
47
|
+
end
|
48
|
+
end
|
49
|
+
def export_markdowns
|
50
|
+
$data_symb[:ontology][@glossary_as_symb][:destination].each {|lng, dir |
|
51
|
+
#puts lng, "export_markdowns #{lng}, #{dir} "
|
52
|
+
generate_markdown_file lng, dir
|
53
|
+
}
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Ontology
|
3
|
+
def load_config_pars(str)
|
4
|
+
data = YAML.load(str)
|
5
|
+
$data_symb = to_symbol(data)
|
6
|
+
symbolize_for_this_key($data_symb, :default_language)
|
7
|
+
check_config_yaml
|
8
|
+
end
|
9
|
+
def check_config_yaml
|
10
|
+
error_message_abort("The configuration file #{$options[:config_file]} has been found, however it does not have an ontology section. Ontology cannot work, Aborting !") unless $data_symb[:ontology]
|
11
|
+
error_message_abort("No languages defined under ontology: languages: . Ontology cannot work, Aborting !") if $data_symb[:ontology][:languages].nil?
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,128 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
require 'yaml'
|
5
|
+
require 'stringex'
|
6
|
+
module Ontology
|
7
|
+
|
8
|
+
# type_of_leaf_part returns one of the following:
|
9
|
+
#
|
10
|
+
# * :is_yaml_conf
|
11
|
+
# * :is_multi_lang_md
|
12
|
+
# * :is_md
|
13
|
+
#
|
14
|
+
# This choice is done by successive tests
|
15
|
+
#
|
16
|
+
def type_of_leaf_part(str)
|
17
|
+
begin
|
18
|
+
decompose_as_yaml_conf(str)
|
19
|
+
return :is_yaml_conf
|
20
|
+
rescue
|
21
|
+
begin
|
22
|
+
decompose_as_multi_lang_md(str)
|
23
|
+
return :is_multi_lang_md
|
24
|
+
rescue
|
25
|
+
return :is_md
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def decompose_as_yaml_conf(str)
|
31
|
+
# begin ??????????????????????????????????????
|
32
|
+
# puts "before!!!!!!!!!!!!!!decompose_as_yaml_conf #{str}"
|
33
|
+
wrk_yaml = YAML.load(str)
|
34
|
+
# rescue
|
35
|
+
puts "****!!!!!!!!!!!!!!decompose_as_yaml_conf #{str}"
|
36
|
+
# end
|
37
|
+
raise "not a yaml" unless wrk_yaml.class == Hash
|
38
|
+
to_symbol(wrk_yaml, Def_List.clone)
|
39
|
+
end
|
40
|
+
|
41
|
+
def decompose_as_multi_lang_md(str)
|
42
|
+
list_of_language_parts = str.scan(/\[(\w+)\](.*?)(?=(\[(\w+)\]|\z))/m)
|
43
|
+
# puts "decompose_as_multi_lang_md", str, '!!!!!!!!!!!!!!!!!!!!!!', list_of_language_parts, '!!!!!!!!!!!!!', list_of_language_parts.length
|
44
|
+
raise "not multi-language" if list_of_language_parts.length == 0
|
45
|
+
list_of_language_parts.inject(Hash.new(&Lang_block)){|result, arg| result[arg[0].to_sym] = arg[1]; result}
|
46
|
+
end
|
47
|
+
|
48
|
+
def iterate_yaml_part(file_as_str)
|
49
|
+
# list_of_yaml_files = file_as_str.scan(/^---$(.*?)(?=(^---$|\z))/m) initial version
|
50
|
+
# list_of_yaml_files = file_as_str.scan(/^---[\f\t ]*$(.*?)(?=(^---[\f\t ]*$|\z))/m) better
|
51
|
+
|
52
|
+
list_of_yaml_files = file_as_str.scan(/^---[\f\t ]*$(.*?)(?=(^---[\f\t ]*$|\z))/m)
|
53
|
+
|
54
|
+
#puts '***', list_of_yaml_files.class, list_of_yaml_files.length, list_of_yaml_files.inspect
|
55
|
+
list_of_yaml_files.each {|elt|
|
56
|
+
#puts "test === #{/\A[\f\t \r]*\z/m =~ elt[0]} , #{elt[0]}"
|
57
|
+
yield elt[0] unless /\A[\s\t\r\n\f]*\z/m =~ elt[0]
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
def generate_leaf_init_struct(file_as_str)
|
62
|
+
elt_ant = nil
|
63
|
+
iterate_yaml_part(file_as_str) {|str_elt|
|
64
|
+
begin
|
65
|
+
begin
|
66
|
+
x_elt_ant = decompose_as_yaml_conf(str_elt)
|
67
|
+
unless elt_ant.nil?
|
68
|
+
#puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!yield"
|
69
|
+
yield elt_ant
|
70
|
+
elt_ant = nil
|
71
|
+
end
|
72
|
+
elt_ant = x_elt_ant
|
73
|
+
elt_ant[:content] = []
|
74
|
+
rescue
|
75
|
+
begin
|
76
|
+
mark_down = decompose_as_multi_lang_md(str_elt)
|
77
|
+
rescue
|
78
|
+
mark_down = Hash.new(&Lang_block)
|
79
|
+
mark_down[:any] = str_elt
|
80
|
+
end
|
81
|
+
elt_ant[:content] << mark_down
|
82
|
+
end
|
83
|
+
rescue
|
84
|
+
STDERR.puts "Aborting:"
|
85
|
+
puts file_as_str
|
86
|
+
exit 1
|
87
|
+
end
|
88
|
+
}
|
89
|
+
unless elt_ant.nil?
|
90
|
+
yield elt_ant
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def treat_glossary_file(fname, gloss_symb)
|
95
|
+
file = File.open(fname, 'rb')
|
96
|
+
content = file.read
|
97
|
+
content.force_encoding("UTF-8")
|
98
|
+
|
99
|
+
generate_leaf_init_struct(content){|hash_struct|
|
100
|
+
leaf = Leaf.new(hash_struct, gloss_symb)
|
101
|
+
leaf.export_markdowns
|
102
|
+
}
|
103
|
+
end
|
104
|
+
|
105
|
+
# ?? test_file = '/Users/mathias/Server/Projets/mflu_nanoc/mflu/work-progs/glossary/secondary-currency.md'
|
106
|
+
|
107
|
+
def build_glossary(gloss_symbol)
|
108
|
+
gloss_dir = $data_symb[:ontology][gloss_symbol][:source]
|
109
|
+
Dir.foreach(gloss_dir) { |f|
|
110
|
+
unless (f == '.') or (f == '..')
|
111
|
+
full_file_name = Base_dir + '/' + gloss_dir +'/' + f
|
112
|
+
#puts full_file_name
|
113
|
+
treat_glossary_file full_file_name, gloss_symbol #?? if full_file_name == test_file
|
114
|
+
end
|
115
|
+
}
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
#File.open(fname) { |yf|
|
120
|
+
# YAML::load_documents(yf) { | yd|
|
121
|
+
# puts = '******'
|
122
|
+
# puts yd.inspect
|
123
|
+
# }
|
124
|
+
#}
|
125
|
+
#/^---$([.\n]*?)^---$/
|
126
|
+
|
127
|
+
#st.scan(/^---$(.*?)(?=(^---$|\z))/){|x| puts "** #{x}”}
|
128
|
+
# x = content.scan(/^---$(.*?)(?=(^---$|\z))/) {|st|
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Ontology
|
3
|
+
|
4
|
+
# remplacé par Main_block et Lang_block !!!
|
5
|
+
# The hash structures introduces a more complex default hierarchy than Hash by default. Aprt from that there are no differences.
|
6
|
+
#hierarchy of replies:
|
7
|
+
# * highest level: the ke value pair is defined
|
8
|
+
# * a specific default key is defined, ie. if the original key-value pair is not supplied if for this key a specific default key is provided, it will be used
|
9
|
+
# * a default key is defined, ie. the default key is used everytime the requested key-value pair is not defined
|
10
|
+
# * default ie a default value is defined like for the original Hash class. It will be used if a given key or default_key or specific_default_key does not provide a value
|
11
|
+
|
12
|
+
|
13
|
+
Lang_block = Proc.new {|hash, lang| if hash.keys.include?(:any) then hash[:any] end}
|
14
|
+
|
15
|
+
Main_block = Proc.new {|hash, arg| if hash.keys.include?(:title) and arg == :order then hash[:title] end}
|
16
|
+
|
17
|
+
Def_List = [Main_block, Lang_block]
|
18
|
+
|
19
|
+
|
20
|
+
#to_symbol converts a hash (of hash's) in the same strcuture replacing string keys by symbol. The routine is recursive
|
21
|
+
def to_symbol(x, hash_default_list = nil)
|
22
|
+
if x.class == Hash
|
23
|
+
if ! hash_default_list.nil? && hash_default_list.class == Array && hash_default_list.length > 0
|
24
|
+
default_function = hash_default_list[0]
|
25
|
+
new_default_list = hash_default_list[1, 100]
|
26
|
+
unless new_default_list.length > 0
|
27
|
+
new_default_list = nil
|
28
|
+
end
|
29
|
+
hash_used = Hash.new(&default_function)
|
30
|
+
else
|
31
|
+
hash_used = Hash.new()
|
32
|
+
new_default_list = nil
|
33
|
+
end
|
34
|
+
result = x.inject(hash_used) {|result, arg|
|
35
|
+
if arg.last.class == Hash || arg.last.class == Array
|
36
|
+
result[arg.first.to_sym] = to_symbol(arg.last, new_default_list);
|
37
|
+
else
|
38
|
+
result[arg.first.to_sym] = arg.last;
|
39
|
+
end
|
40
|
+
result}
|
41
|
+
elsif x.class == Array
|
42
|
+
begin
|
43
|
+
result = x.inject([]) {|res, elt| raise '' unless elt.class == String; res << elt.to_sym}
|
44
|
+
rescue
|
45
|
+
result = x
|
46
|
+
end
|
47
|
+
else
|
48
|
+
result = x
|
49
|
+
end
|
50
|
+
result
|
51
|
+
end
|
52
|
+
|
53
|
+
def symbolize_for_this_key(tree, this_key)
|
54
|
+
if tree.class == Hash
|
55
|
+
tree.each {|key, val|
|
56
|
+
if key == this_key and val.class == String then
|
57
|
+
tree[this_key] = val.to_sym
|
58
|
+
end
|
59
|
+
if val.class == Hash then
|
60
|
+
symbolize_for_this_key(val, this_key)
|
61
|
+
end
|
62
|
+
}
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def any_language_ize(leaf, key_as_symbol)
|
67
|
+
leaf.each{|key, val| if key == key_as_symbol and val.class == String then
|
68
|
+
h = Hash.new(&Lang_block)
|
69
|
+
h[:any] = val
|
70
|
+
leaf[key] = h
|
71
|
+
end
|
72
|
+
}
|
73
|
+
end
|
74
|
+
end
|
data/ontology.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
|
5
|
+
$LOAD_PATH.unshift(File.expand_path('../lib/', __FILE__))
|
6
|
+
|
7
|
+
require 'ontology'
|
8
|
+
|
9
|
+
Gem::Specification.new do |s|
|
10
|
+
s.name = "ontology"
|
11
|
+
s.version = "0.0.1"
|
12
|
+
s.platform = Gem::Platform::RUBY
|
13
|
+
s.authors = ['Mathias Foehr']
|
14
|
+
s.email = 'mf_tech@mathiasfoehr.lu'
|
15
|
+
s.homepage = 'http://mathiasfoehr.lu/ontology'
|
16
|
+
s.description = 'ontology structures (e.g. toc, glossaries,..) in an (if necessary multi-language Nanoc) static web site '
|
17
|
+
s.summary = s.description
|
18
|
+
s.rubyforge_project = 'ontology'
|
19
|
+
|
20
|
+
s.date = %q{2012-08-14}
|
21
|
+
|
22
|
+
s.require_paths << 'lib'
|
23
|
+
s.bindir = 'bin'
|
24
|
+
s.executables << 'ontology'
|
25
|
+
s.files = ['README.md', 'NEWS.md', 'LICENSE', 'lib/ontology.rb', 'bin/ontology'] +
|
26
|
+
Dir['{lib,spec}/**/*'] +
|
27
|
+
Dir['doc/**/*'] +
|
28
|
+
[ 'ontology.gemspec' ]
|
29
|
+
s.has_rdoc = true
|
30
|
+
# s.add_runtime_dependancy( 'stringex')
|
31
|
+
end
|
32
|
+
|