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,23 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'ontology'
|
3
|
+
include Ontology
|
4
|
+
|
5
|
+
describe 'testing the splitting of an md file in yaml or equivalent parts and of the diagnostic of the type of the part' do
|
6
|
+
before :each do
|
7
|
+
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should write this file" do
|
11
|
+
cnt = <<EOF
|
12
|
+
##Test
|
13
|
+
|
14
|
+
überlegen ob UTF-8 wirklich geht, à l'école, on teste!
|
15
|
+
|
16
|
+
This will be enough!
|
17
|
+
EOF
|
18
|
+
dir = Dir.pwd
|
19
|
+
file_name = dir + '/test.md'
|
20
|
+
puts file_name
|
21
|
+
write_md_file(file_name, cnt)
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'ontology'
|
3
|
+
include Ontology
|
4
|
+
|
5
|
+
describe 'testing the loading of the config.yaml file' do
|
6
|
+
before :each do
|
7
|
+
#puts "initializing #{$:}"
|
8
|
+
@x= <<EOF
|
9
|
+
ontology:
|
10
|
+
languages: [fr, en, de]
|
11
|
+
|
12
|
+
glossaries: [general_dictionary, glossary_2]
|
13
|
+
|
14
|
+
general_dictionary:
|
15
|
+
source: glossary
|
16
|
+
default_language: any
|
17
|
+
destination:
|
18
|
+
fr: content/fr/glossaire
|
19
|
+
de: content/de/glossarium
|
20
|
+
en: content/en/glossary
|
21
|
+
|
22
|
+
glossary_2:
|
23
|
+
source: glossary_tech
|
24
|
+
default_language: en
|
25
|
+
destination:
|
26
|
+
fr: content/fr/glossaire_tech
|
27
|
+
en: content/en/glossary_tech
|
28
|
+
EOF
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'this should work' do
|
33
|
+
data = YAML.load(@x)
|
34
|
+
$data_symb = to_symbol(data)
|
35
|
+
symbolize_for_this_key($data_symb, :default_language)
|
36
|
+
$data_symb[:ontology][:languages].should == [:fr, :en, :de]
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ontology
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Mathias Foehr
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-08-14 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: ! 'ontology structures (e.g. toc, glossaries,..) in an (if necessary
|
15
|
+
multi-language Nanoc) static web site '
|
16
|
+
email: mf_tech@mathiasfoehr.lu
|
17
|
+
executables:
|
18
|
+
- ontology
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- README.md
|
23
|
+
- NEWS.md
|
24
|
+
- LICENSE
|
25
|
+
- lib/ontology.rb
|
26
|
+
- bin/ontology
|
27
|
+
- lib/ontology/error_message.rb
|
28
|
+
- lib/ontology/leaf.rb
|
29
|
+
- lib/ontology/load_config_yaml.rb
|
30
|
+
- lib/ontology/make_glossary.rb
|
31
|
+
- lib/ontology/write_file.rb
|
32
|
+
- lib/ontology/yaml_utils.rb
|
33
|
+
- spec/config.yaml
|
34
|
+
- spec/decompose_md_file_spec.rb
|
35
|
+
- spec/leaf_spec.rb
|
36
|
+
- spec/test.md
|
37
|
+
- spec/test_make_glossary.rb
|
38
|
+
- spec/write_md_file_spec.rb
|
39
|
+
- spec/yaml_utils_spec.rb
|
40
|
+
- doc/bin/ontology.html
|
41
|
+
- doc/Change_Log_txt.html
|
42
|
+
- doc/created.rid
|
43
|
+
- doc/Gemfile.html
|
44
|
+
- doc/images/add.png
|
45
|
+
- doc/images/brick.png
|
46
|
+
- doc/images/brick_link.png
|
47
|
+
- doc/images/bug.png
|
48
|
+
- doc/images/bullet_black.png
|
49
|
+
- doc/images/bullet_toggle_minus.png
|
50
|
+
- doc/images/bullet_toggle_plus.png
|
51
|
+
- doc/images/date.png
|
52
|
+
- doc/images/delete.png
|
53
|
+
- doc/images/find.png
|
54
|
+
- doc/images/loadingAnimation.gif
|
55
|
+
- doc/images/macFFBgHack.png
|
56
|
+
- doc/images/package.png
|
57
|
+
- doc/images/page_green.png
|
58
|
+
- doc/images/page_white_text.png
|
59
|
+
- doc/images/page_white_width.png
|
60
|
+
- doc/images/plugin.png
|
61
|
+
- doc/images/ruby.png
|
62
|
+
- doc/images/tag_blue.png
|
63
|
+
- doc/images/tag_green.png
|
64
|
+
- doc/images/transparent.png
|
65
|
+
- doc/images/wrench.png
|
66
|
+
- doc/images/wrench_orange.png
|
67
|
+
- doc/images/zoom.png
|
68
|
+
- doc/index.html
|
69
|
+
- doc/js/darkfish.js
|
70
|
+
- doc/js/jquery.js
|
71
|
+
- doc/js/navigation.js
|
72
|
+
- doc/js/search.js
|
73
|
+
- doc/js/search_index.js
|
74
|
+
- doc/js/searcher.js
|
75
|
+
- doc/LICENSE.html
|
76
|
+
- doc/Object.html
|
77
|
+
- doc/Ontology/Leaf.html
|
78
|
+
- doc/Ontology.html
|
79
|
+
- doc/rdoc.css
|
80
|
+
- doc/table_of_contents.html
|
81
|
+
- ontology.gemspec
|
82
|
+
homepage: http://mathiasfoehr.lu/ontology
|
83
|
+
licenses: []
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
- lib
|
89
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ! '>='
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
requirements: []
|
102
|
+
rubyforge_project: ontology
|
103
|
+
rubygems_version: 1.8.24
|
104
|
+
signing_key:
|
105
|
+
specification_version: 3
|
106
|
+
summary: ontology structures (e.g. toc, glossaries,..) in an (if necessary multi-language
|
107
|
+
Nanoc) static web site
|
108
|
+
test_files: []
|
109
|
+
has_rdoc: true
|