smallcage 0.0.9 → 0.1.0

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.
Files changed (97) hide show
  1. data/History.txt +7 -1
  2. data/License.txt +0 -0
  3. data/Manifest.txt +12 -6
  4. data/README.txt +0 -0
  5. data/Rakefile +0 -0
  6. data/bin/smc +0 -0
  7. data/config/hoe.rb +0 -0
  8. data/config/requirements.rb +0 -0
  9. data/lib/smallcage.rb +0 -0
  10. data/lib/smallcage/application.rb +14 -9
  11. data/lib/smallcage/commands/auto.rb +0 -0
  12. data/lib/smallcage/commands/base.rb +0 -0
  13. data/lib/smallcage/commands/clean.rb +0 -0
  14. data/lib/smallcage/commands/export.rb +0 -0
  15. data/lib/smallcage/commands/import.rb +0 -0
  16. data/lib/smallcage/commands/manifest.rb +0 -0
  17. data/lib/smallcage/commands/server.rb +0 -0
  18. data/lib/smallcage/commands/update.rb +0 -0
  19. data/lib/smallcage/document_path.rb +0 -0
  20. data/lib/smallcage/erb_base.rb +0 -0
  21. data/lib/smallcage/http_server.rb +0 -0
  22. data/lib/smallcage/loader.rb +42 -14
  23. data/lib/smallcage/misc.rb +0 -0
  24. data/lib/smallcage/renderer.rb +0 -0
  25. data/lib/smallcage/resources/Manifest.erb +0 -0
  26. data/lib/smallcage/resources/auto.html +0 -0
  27. data/lib/smallcage/runner.rb +0 -0
  28. data/lib/smallcage/version.rb +2 -2
  29. data/project/base/_smc/helpers/base_helper.rb +10 -3
  30. data/project/base/_smc/helpers/site_helper.rb +0 -0
  31. data/project/base/_smc/templates/default.rhtml +0 -0
  32. data/project/base/_smc/templates/footer.rhtml +0 -0
  33. data/project/base/_smc/templates/header.rhtml +0 -0
  34. data/project/lang/_smc/helpers/lang_helper.rb +0 -0
  35. data/project/lang/_smc/templates/other_lang.rhtml +0 -0
  36. data/project/nkf/_smc/filters/filters.yml +0 -0
  37. data/project/nkf/_smc/filters/nkf_filter.rb +0 -0
  38. data/project/redcloth/_smc/helpers/red_cloth_helper.rb +0 -0
  39. data/project/redcloth/_smc/templates/markdown.rhtml +0 -0
  40. data/project/redcloth/_smc/templates/textile.rhtml +0 -0
  41. data/project/relpath/_smc/filters/filters.yml +0 -0
  42. data/project/relpath/_smc/filters/relpath_filter.rb +0 -0
  43. data/project/standard/_dir.smc +0 -0
  44. data/project/standard/_smc/helpers/base_helper.rb +34 -0
  45. data/project/standard/_smc/helpers/menu_helper.rb +0 -0
  46. data/project/standard/_smc/templates/footer.rhtml +3 -4
  47. data/project/standard/_smc/templates/header.rhtml +10 -8
  48. data/project/standard/_smc/templates/menu.rhtml +7 -0
  49. data/project/standard/_smc/templates/redirect.rhtml +0 -0
  50. data/project/standard/_smc/templates/sidebar.rhtml +3 -6
  51. data/project/standard/_smc/templates/topic_path.rhtml +0 -0
  52. data/project/standard/about/_dir.smc +0 -0
  53. data/project/standard/about/index.html.smc +0 -0
  54. data/project/standard/common/css/default.css +92 -56
  55. data/project/standard/common/css/print.css +0 -0
  56. data/project/standard/index.html.smc +11 -1
  57. data/project/standard/menu1/_dir.smc +1 -0
  58. data/project/standard/menu1/index.html.smc +4 -0
  59. data/project/standard/{sample1 → menu1}/index2.html.smc +0 -0
  60. data/project/standard/menu2/1/_dir.smc +1 -0
  61. data/project/standard/menu2/1/index.html.smc +4 -0
  62. data/project/standard/menu2/2/_dir.smc +1 -0
  63. data/project/standard/{sample2 → menu2/2}/index.html.smc +2 -1
  64. data/project/standard/menu2/_dir.smc +1 -0
  65. data/project/standard/menu2/index.html.smc +8 -0
  66. data/project/standard/menu2/redirect.html.smc +2 -0
  67. data/script/destroy +0 -0
  68. data/script/destroy.cmd +0 -0
  69. data/script/generate +0 -0
  70. data/script/generate.cmd +0 -0
  71. data/setup.rb +0 -0
  72. data/spec/data/htdocs1/_dir.smc +0 -0
  73. data/spec/data/htdocs1/a/b/c/index.html.smc +0 -0
  74. data/spec/data/htdocs2/_smc/templates/dummy.rhtml +0 -0
  75. data/spec/data/htdocs2/a/b/c/test.html +0 -0
  76. data/spec/data/htdocs2/a/b/test.html +0 -0
  77. data/spec/data/htdocs2/a/test.html.smc +0 -0
  78. data/spec/document_path_spec.rb +0 -0
  79. data/spec/export_spec.rb +0 -0
  80. data/spec/import_spec.rb +0 -0
  81. data/spec/loader_spec.rb +0 -0
  82. data/spec/manifest_spec.rb +0 -0
  83. data/spec/misc_spec.rb +0 -0
  84. data/spec/smallcage_spec.rb +0 -0
  85. data/spec/spec.opts +0 -0
  86. data/spec/spec_helper.rb +0 -0
  87. data/tasks/deployment.rake +0 -0
  88. data/tasks/environment.rake +0 -0
  89. data/tasks/rspec.rake +0 -0
  90. data/tasks/website.rake +0 -0
  91. data/test/test_helper.rb +0 -0
  92. data/test/test_smallcage.rb +0 -0
  93. metadata +15 -9
  94. data/project/standard/sample1/_dir.smc +0 -1
  95. data/project/standard/sample1/index.html.smc +0 -7
  96. data/project/standard/sample1/redirect.html.smc +0 -2
  97. data/project/standard/sample2/_dir.smc +0 -1
data/History.txt CHANGED
@@ -1,9 +1,15 @@
1
+ == 0.1.0 2008-05-26
2
+
3
+ * to avoid namespace polution, the helpers and filters loaded into an anonymous module.
4
+ * fix signal handler bug.
5
+ * change base helper _glob method.
6
+ * refine default project template.
7
+
1
8
  == 0.0.9 2008-04-21
2
9
 
3
10
  * fix smc auto command bug.
4
11
  * add RedCloth project template (redcloth).
5
12
  * add multi language project template (lang).
6
-
7
13
  * add auto navigation servlet to the HTTP server.
8
14
  * add export command.
9
15
  * delete output file when smc source file does not exist.
data/License.txt CHANGED
File without changes
data/Manifest.txt CHANGED
@@ -41,9 +41,11 @@ project/redcloth/_smc/templates/textile.rhtml
41
41
  project/relpath/_smc/filters/filters.yml
42
42
  project/relpath/_smc/filters/relpath_filter.rb
43
43
  project/standard/_dir.smc
44
+ project/standard/_smc/helpers/base_helper.rb
44
45
  project/standard/_smc/helpers/menu_helper.rb
45
46
  project/standard/_smc/templates/footer.rhtml
46
47
  project/standard/_smc/templates/header.rhtml
48
+ project/standard/_smc/templates/menu.rhtml
47
49
  project/standard/_smc/templates/redirect.rhtml
48
50
  project/standard/_smc/templates/sidebar.rhtml
49
51
  project/standard/_smc/templates/topic_path.rhtml
@@ -52,12 +54,16 @@ project/standard/about/index.html.smc
52
54
  project/standard/common/css/default.css
53
55
  project/standard/common/css/print.css
54
56
  project/standard/index.html.smc
55
- project/standard/sample1/_dir.smc
56
- project/standard/sample1/index.html.smc
57
- project/standard/sample1/index2.html.smc
58
- project/standard/sample1/redirect.html.smc
59
- project/standard/sample2/_dir.smc
60
- project/standard/sample2/index.html.smc
57
+ project/standard/menu1/_dir.smc
58
+ project/standard/menu1/index.html.smc
59
+ project/standard/menu1/index2.html.smc
60
+ project/standard/menu2/1/_dir.smc
61
+ project/standard/menu2/1/index.html.smc
62
+ project/standard/menu2/2/_dir.smc
63
+ project/standard/menu2/2/index.html.smc
64
+ project/standard/menu2/_dir.smc
65
+ project/standard/menu2/index.html.smc
66
+ project/standard/menu2/redirect.html.smc
61
67
  script/destroy
62
68
  script/destroy.cmd
63
69
  script/generate
data/README.txt CHANGED
File without changes
data/Rakefile CHANGED
File without changes
data/bin/smc CHANGED
File without changes
data/config/hoe.rb CHANGED
File without changes
File without changes
data/lib/smallcage.rb CHANGED
File without changes
@@ -5,21 +5,26 @@ OPTIONS[:original_argv] = ARGV.clone
5
5
 
6
6
  class SmallCage::Application
7
7
  require 'optparse'
8
-
9
- @@signal_handlers = {
10
- "INT" => [],
11
- "TERM" => []
12
- }
13
8
 
14
- @@signal_handlers.keys.each do |signal|
15
- Signal.trap(signal) do
16
- @@signal_handlers[signal].each do |proc|
17
- proc.call(signal)
9
+ @@signal_handlers = nil
10
+
11
+ def self.init_signal_handlers
12
+ @@signal_handlers = {
13
+ "INT" => [],
14
+ "TERM" => []
15
+ }
16
+
17
+ @@signal_handlers.keys.each do |signal|
18
+ Signal.trap(signal) do
19
+ @@signal_handlers[signal].each do |proc|
20
+ proc.call(signal)
21
+ end
18
22
  end
19
23
  end
20
24
  end
21
25
 
22
26
  def self.add_signal_handler(signal, handler)
27
+ init_signal_handlers if @@signal_handlers.nil?
23
28
  signal.to_a.each do |s|
24
29
  @@signal_handlers[s] << handler
25
30
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -94,8 +94,12 @@ module SmallCage
94
94
  source = source_path.read
95
95
  return result if source.strip.empty?
96
96
 
97
- obj = YAML.load_stream(source)
98
- return result if obj.nil?
97
+ begin
98
+ obj = YAML.load_stream(source)
99
+ return result if obj.nil?
100
+ rescue => e
101
+ raise "Can't load file: #{source_path} / #{e}"
102
+ end
99
103
 
100
104
  obj.documents.each do |o|
101
105
  if o.is_a? Hash
@@ -182,24 +186,47 @@ module SmallCage
182
186
 
183
187
  def load_erb_base
184
188
  result = Class.new(SmallCage::ErbBase)
185
- class_names = load_classes(@helpers_dir, %r{([^/]+_helper)\.rb$})
186
- class_names.each do |class_name|
187
- result.class_eval("include SmallCage::#{class_name}")
189
+ class << result
190
+ def include_helpers(anon_module, mod_names)
191
+ smc_module = anon_module.const_get("SmallCage")
192
+ mod_names.each do |name|
193
+ helper_module = smc_module.const_get(name)
194
+ include helper_module
195
+ end
196
+ end
188
197
  end
198
+
199
+ helpers = load_anonymous(@helpers_dir, %r{([^/]+_helper)\.rb$})
200
+ result.include_helpers(helpers[:module], helpers[:names])
201
+
189
202
  return result
190
203
  end
191
204
  private :load_erb_base
192
205
 
193
- def load_classes(dir, rex)
194
- class_names = []
206
+ def load_anonymous(dir, rex)
207
+ module_names = []
208
+
209
+ mod = Module.new
195
210
  Dir.entries(dir).sort.each do |h|
196
211
  next unless h =~ rex
197
- require "#{dir}/#{h}"
198
- class_names << $1.camelize
212
+
213
+ # create anonymous module.
214
+ module_name = $1.camelize
215
+
216
+ src = File.read("#{dir}/#{h}")
217
+ begin
218
+ mod.module_eval(src, "#{dir}/#{h}")
219
+ rescue => ex
220
+ puts ex.to_s # TODO show error
221
+ load("#{dir}/#{h}", true) # try to know error line number.
222
+ raise "Can't load #{dir}/#{h} / line# unknown"
223
+ end
224
+ module_names << module_name
199
225
  end
200
- return class_names
226
+
227
+ return { :module => mod, :names => module_names }
201
228
  end
202
- private :load_classes
229
+ private :load_anonymous
203
230
 
204
231
  def filters(name)
205
232
  if @filters[name].nil?
@@ -212,15 +239,16 @@ module SmallCage
212
239
  result = {}
213
240
  return {} unless @filters_dir.directory?
214
241
 
215
- load_classes(@filters_dir, %r{([^/]+_filter)\.rb$})
242
+ filters = load_anonymous(@filters_dir, %r{([^/]+_filter)\.rb$})
216
243
 
217
244
  config = load_filters_config
218
245
  config.each do |filter_type,filter_list|
219
246
  result[filter_type] = []
247
+ smc_module = filters[:module].const_get("SmallCage")
220
248
  filter_list.each do |fc|
221
249
  fc = { "name" => fc } if fc.is_a? String
222
- klass = SmallCage.const_get(fc["name"].camelize)
223
- result[filter_type] << klass.new(fc)
250
+ filter_class = smc_module.const_get(fc["name"].camelize)
251
+ result[filter_type] << filter_class.new(fc)
224
252
  end
225
253
  end
226
254
  return result
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,8 +1,8 @@
1
1
  module SmallCage #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 0
5
- TINY = 9
4
+ MINOR = 1
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -2,11 +2,18 @@ module SmallCage
2
2
  module BaseHelper
3
3
  include ERB::Util
4
4
 
5
- def _glob(relpath, rex)
6
- base_dir = Pathname.new(@obj["path"]).parent
7
- base_dir = base_dir.join(relpath)
5
+ def _glob(path, rex)
6
+ base_dir = nil
7
+ if path.to_s[0] == ?/
8
+ base_dir = @obj["dirs"][0]["path"]
9
+ base_dir = base_dir.join(path[1..-1])
10
+ else
11
+ base_dir = @obj["dirs"].last["path"]
12
+ base_dir = base_dir.join(path)
13
+ end
8
14
 
9
15
  entries = Dir.glob("#{base_dir}/**/*")
16
+
10
17
  result = []
11
18
  entries.each do |path|
12
19
  result << path if path.to_s =~ rex
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,34 @@
1
+ module SmallCage
2
+ module BaseHelper
3
+ include ERB::Util
4
+
5
+ def _glob(relpath, rex)
6
+ base_dir = Pathname.new(@obj["path"]).parent
7
+ base_dir = base_dir.join(relpath)
8
+
9
+ entries = Dir.glob("#{base_dir}/**/*")
10
+ result = []
11
+ entries.each do |path|
12
+ result << path if path.to_s =~ rex
13
+ end
14
+ return result.sort
15
+ end
16
+
17
+ def _with(o)
18
+ tmpobj = @obj
19
+ @obj = o
20
+ yield
21
+ @obj = tmpobj
22
+ end
23
+
24
+ def _load(path)
25
+ path = Pathname.new(path)
26
+ @loader.load(path)
27
+ end
28
+
29
+ def _erb(body)
30
+ @renderer.render_string(body, @obj)
31
+ end
32
+
33
+ end
34
+ end
File without changes
@@ -1,12 +1,11 @@
1
1
  </div>
2
+ </div>
2
3
 
3
- <%= sidebar %>
4
4
 
5
+ <div id="footer">
6
+ <div class="copyright">&copy;<%= Time.now.year %> Site Owner All rights reserved.</div>
5
7
  </div>
6
8
 
7
- <div class="footer">
8
- <div class="copyright">&copy; 20XX-<%= Time.now.year %> Site Owner All rights reserved.</div>
9
9
  </div>
10
-
11
10
  </body>
12
11
  </html>
@@ -18,18 +18,20 @@
18
18
  <title><% if uri !~ %r{^/index.html$} %><%=h title %> | <% end %>Standard Site Template</title>
19
19
  </head>
20
20
  <body>
21
+ <div id="container">
22
+
23
+ <div id="header">
24
+ <h1><a href="/index.html">SmallCage</a></h1>
25
+ <h2>Lightweight CMS Package.</h2>
26
+ <%= menu %>
27
+ </div>
21
28
 
22
- <div class="header">
23
- <h1><a href="/index.html">Standard Site Template</a></h1>
24
29
 
25
- <div class="topicpath">
30
+ <div id="topicpath">
26
31
  <%= topic_path %>
27
32
  </div>
28
- </div>
29
33
 
30
34
 
31
- <div class="container">
32
-
35
+ <div id="main">
33
36
  <div class="contents">
34
-
35
- <h2><%=h title %></h2>
37
+ <h1><%=h title %></h1>
@@ -0,0 +1,7 @@
1
+ <div id="menu">
2
+ <ul>
3
+ <li class="<%= menu_active_rex(%r{^/index.html$}) %>"><a href="/index.html">Home</a></li>
4
+ <li class="<%= menu_active("menu1") %>"><a href="/menu1/index.html">Menu 1</a></li>
5
+ <li class="<%= menu_active("menu2") %>"><a href="/menu2/index.html">Menu 2</a></li>
6
+ </ul>
7
+ </div>
File without changes
@@ -1,9 +1,6 @@
1
- <div class="sidebar">
1
+ <div id="sidebar">
2
2
  <ul>
3
- <li class="<%= menu_active_rex(%r{^/index.html$}) %>"><a href="/index.html">Home</a></li>
4
- <li class="<%= menu_active("sample1") %>"><a href="/sample1/index.html">Sample 1</a></li>
5
- <li class="<%= menu_active("sample2") %>"><a href="/sample2/index.html">Sample 2</a></li>
6
- <li class="<%= menu_active("dummy") %>"><a href="/dummy/index.html">Dummy</a></li>
7
- <li class="<%= menu_active("about") %>"><a href="/about/index.html">About</a></li>
3
+ <li class="<%= menu_active("sample2/1") %>"><a href="/sample2/1">First page</a></li>
4
+ <li class="<%= menu_active("sample2/2") %>"><a href="/sample2/2">Second page</a></li>
8
5
  </ul>
9
6
  </div>
File without changes
File without changes
File without changes
@@ -3,95 +3,131 @@
3
3
  * {
4
4
  margin: 0;
5
5
  padding: 0;
6
- font-style: normal;
7
- font-weight: normal;
8
- text-decoration: none;
9
6
  }
10
7
 
11
- li {
12
- list-style: none;
8
+ a:link { text-decoration: none; color:#03c; }
9
+ a:visited { text-decoration: none; color:#03c; }
10
+ a:hover { text-decoration: none; color:#fff; background: #03c}
11
+ a:active { text-decoration: none; color:#03c; background: #fff}
12
+
13
+ body{
14
+ line-height: 1.7em;
15
+ font-family:Helvetica, sans-serif;
13
16
  }
14
17
 
15
- .header {
16
- background: black;
17
- color: white;
18
+ #container {
19
+ height: 100%;
20
+ min-width:760px;
18
21
  }
19
22
 
20
- .header h1 {
21
- padding: 1em;
22
- text-align: center;
23
+ #header {
24
+ background: #03c;
25
+ color: #FFF;
26
+ overflow: hidden;
27
+ position: relative;
28
+ width: 100%;
23
29
  }
24
30
 
25
- .header h1 a {
26
- color: white;
31
+ #header a:link { text-decoration: none; color:#fff; }
32
+ #header a:visited { text-decoration: none; color:#fff; }
33
+ #header a:hover { text-decoration: none; color:#fff; background: none}
34
+ #header a:active { text-decoration: none; color: none; background: none}
35
+
36
+ #header h1{
37
+ font-weight: normal;
38
+ font-size: 2em;
39
+ margin: 0.9em 0.9em 0.6em 0.9em;
27
40
  }
28
41
 
29
- .header h2 {
30
- padding: 0.2em;
42
+ #header h2 {
43
+ font-size: 1em;
44
+ font-weight: normal;
45
+ margin: 0 1.8em 1.8em 1.8em;
31
46
  }
32
47
 
33
- .topicpath {
34
- background: #EEE;
35
- padding: 0.4em;
48
+ #menu{
49
+ position: absolute;
50
+ left: 288px;
51
+ bottom: 1.8em;
36
52
  }
37
53
 
38
- .footer {
39
- clear: both;
40
- background: #EEE;
41
- padding: 0.4em;
42
- margin-top: 4em;
43
- text-align: right;
44
- color: #999;
54
+ #menu li{
55
+ display: inline;
56
+ padding-right: 1.8em;
57
+ }
58
+
59
+ #menu a{
60
+ padding: .6em 1.2em .6em 1.2em;
61
+ }
62
+
63
+ #menu a:hover{
64
+ color:#fff; background: #36f
45
65
  }
46
66
 
47
- .topicpath .delimiter {
67
+ #menu .active a,
68
+ #menu .active a:active{
69
+ color:#03c;
70
+ background: #fff
71
+ }
72
+
73
+ #topicpath {
74
+ background: #eee;
75
+ padding: 0.3em 1.8em 0.3em 1.8em;
76
+ }
77
+
78
+ #topicpath .delimiter {
48
79
  color: black;
49
- margin-left: 0.5em;
50
- margin-right: 0.5em;
80
+ margin-left: 0.3em;
81
+ margin-right: 0.3em;
82
+ font-size: .8em;
51
83
  }
52
84
 
53
- .topicpath a:hover {
54
- background: white;
55
- color: #600;
85
+ #topicpath a {
86
+ font-size: .8em;
56
87
  }
57
88
 
58
- .container {
59
- width: 780px;
60
- height: 100%;
89
+ #main {
90
+ width:100%;
61
91
  }
62
92
 
63
- .sidebar {
64
- float: left;
65
- width: 160px;
66
- line-height: 2em;
67
- background: #CCC;
68
- margin-top: 1px;
93
+ #main .contents {
94
+ margin-left: 288px;
95
+ padding: 1.2em 1.8em 1.8em 0;
69
96
  }
70
97
 
71
- .sidebar li {
72
- border-bottom: solid 1px white;
98
+ #main h1{
99
+ margin-left: .9em;
100
+ position: absolute;
101
+ left: 0;
73
102
  }
74
103
 
75
- .sidebar li a {
76
- padding: 0.5em;
77
- display: block;
104
+ #main h2{
105
+ font-size: 1.2em;
106
+ margin-bottom: .3em;
107
+ font-weight: bold;
78
108
  }
79
109
 
80
- .sidebar li a:hover {
81
- background: #EEE;
82
- color: #600;
110
+ #main h3{
111
+ font-size: 1em;
112
+ font-weight: bold;
83
113
  }
84
114
 
85
- .sidebar .active {
86
- background: yellow;
115
+ #main p{
116
+ margin-bottom: 1.8em;
87
117
  }
88
118
 
89
- .sidebar .active a:hover {
90
- background: #FFFFCC;
119
+ #main ul{
120
+ margin-left: 1.2em;
121
+ }
122
+
123
+
124
+ #footer {
125
+ clear: both;
126
+ padding: 1.2em 0 1.2em 0;
127
+ margin-top: 12em;
91
128
  }
92
129
 
93
- .contents {
94
- float: right;
95
- width: 580px;
96
- padding: 10px;
130
+ #footer .copyright{
131
+ margin-left: 288px;
132
+ font-size: 85%;
97
133
  }
File without changes
@@ -1,3 +1,13 @@
1
1
  title: Home
2
2
  --- |
3
- <p>Sample Body</p>
3
+ <h2><a href="/menu1/">Menu1</a></h2>
4
+ <p>Sample text.</p>
5
+
6
+
7
+ <h2><a href="/menu2/">Menu2</a></h2>
8
+ <p>Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text.</p>
9
+
10
+ <ul>
11
+ <li><a href="/menu2/1/">Sample1</a></li>
12
+ <li><a href="/menu2/2/">Sample2</a></li>
13
+ </ul>
@@ -0,0 +1 @@
1
+ topic: Menu1
@@ -0,0 +1,4 @@
1
+ title: Menu1
2
+ --- |
3
+ <h2>Menu1 index</h2>
4
+ <p>Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text. Sample text.</p>
File without changes
@@ -0,0 +1 @@
1
+ topic: 1
@@ -0,0 +1,4 @@
1
+ title: Sample1
2
+ --- |
3
+ <p>Sample1</p>
4
+
@@ -0,0 +1 @@
1
+ topic: 2
@@ -1,3 +1,4 @@
1
1
  title: Sample2
2
2
  --- |
3
- <p>Sample2 index</p>
3
+ <p>Sample2</p>
4
+
@@ -0,0 +1 @@
1
+ topic: Menu2
@@ -0,0 +1,8 @@
1
+ title: Menu2
2
+ --- |
3
+ <h2>Menu2 index</h2>
4
+ <ul>
5
+ <li><a href="./1/">Sample1</a></li>
6
+ <li><a href="./2/">Sample2</a></li>
7
+ <li><a href="redirect.html">Redirect to Sample1</a></li>
8
+ </ul>
@@ -0,0 +1,2 @@
1
+ template: redirect
2
+ redirect_uri: ./1/
data/script/destroy CHANGED
File without changes
data/script/destroy.cmd CHANGED
File without changes
data/script/generate CHANGED
File without changes
data/script/generate.cmd CHANGED
File without changes
data/setup.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/spec/export_spec.rb CHANGED
File without changes
data/spec/import_spec.rb CHANGED
File without changes
data/spec/loader_spec.rb CHANGED
File without changes
File without changes
data/spec/misc_spec.rb CHANGED
File without changes
File without changes
data/spec/spec.opts CHANGED
File without changes
data/spec/spec_helper.rb CHANGED
File without changes
File without changes
File without changes
data/tasks/rspec.rake CHANGED
File without changes
data/tasks/website.rake CHANGED
File without changes
data/test/test_helper.rb CHANGED
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smallcage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SAITO Toshihiro
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2008-04-21 00:00:00 +09:00
14
+ date: 2008-07-24 00:00:00 +09:00
15
15
  default_executable:
16
16
  dependencies: []
17
17
 
@@ -73,9 +73,11 @@ files:
73
73
  - project/relpath/_smc/filters/filters.yml
74
74
  - project/relpath/_smc/filters/relpath_filter.rb
75
75
  - project/standard/_dir.smc
76
+ - project/standard/_smc/helpers/base_helper.rb
76
77
  - project/standard/_smc/helpers/menu_helper.rb
77
78
  - project/standard/_smc/templates/footer.rhtml
78
79
  - project/standard/_smc/templates/header.rhtml
80
+ - project/standard/_smc/templates/menu.rhtml
79
81
  - project/standard/_smc/templates/redirect.rhtml
80
82
  - project/standard/_smc/templates/sidebar.rhtml
81
83
  - project/standard/_smc/templates/topic_path.rhtml
@@ -84,12 +86,16 @@ files:
84
86
  - project/standard/common/css/default.css
85
87
  - project/standard/common/css/print.css
86
88
  - project/standard/index.html.smc
87
- - project/standard/sample1/_dir.smc
88
- - project/standard/sample1/index.html.smc
89
- - project/standard/sample1/index2.html.smc
90
- - project/standard/sample1/redirect.html.smc
91
- - project/standard/sample2/_dir.smc
92
- - project/standard/sample2/index.html.smc
89
+ - project/standard/menu1/_dir.smc
90
+ - project/standard/menu1/index.html.smc
91
+ - project/standard/menu1/index2.html.smc
92
+ - project/standard/menu2/1/_dir.smc
93
+ - project/standard/menu2/1/index.html.smc
94
+ - project/standard/menu2/2/_dir.smc
95
+ - project/standard/menu2/2/index.html.smc
96
+ - project/standard/menu2/_dir.smc
97
+ - project/standard/menu2/index.html.smc
98
+ - project/standard/menu2/redirect.html.smc
93
99
  - script/destroy
94
100
  - script/destroy.cmd
95
101
  - script/generate
@@ -139,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
145
  requirements: []
140
146
 
141
147
  rubyforge_project: smallcage
142
- rubygems_version: 1.0.1
148
+ rubygems_version: 1.1.1
143
149
  signing_key:
144
150
  specification_version: 2
145
151
  summary: Lightweigt CMS Package.
@@ -1 +0,0 @@
1
- topic: Sample1
@@ -1,7 +0,0 @@
1
- title: Sample1
2
- --- |
3
- <p>First page of sample1.</p>
4
-
5
- <p><a href="index2.html">second page</a></p>
6
-
7
- <p><a href="redirect.html">redirect sample</a></p>
@@ -1,2 +0,0 @@
1
- template: redirect
2
- redirect_uri: ./index2.html
@@ -1 +0,0 @@
1
- topic: Sample2