smartgen 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +0 -8
  3. data/Gemfile.lock +25 -31
  4. data/lib/smartgen/object_hash.rb +2 -2
  5. data/lib/smartgen/version.rb +1 -1
  6. metadata +138 -194
  7. data/spec/fixtures/expectations/common/another_index.html +0 -13
  8. data/spec/fixtures/expectations/common/index.html +0 -8
  9. data/spec/fixtures/expectations/common/other_index.html +0 -13
  10. data/spec/fixtures/expectations/erb/index.html +0 -15
  11. data/spec/fixtures/expectations/erb/with_layout/index.html +0 -19
  12. data/spec/fixtures/expectations/indexer/index_with_indexer.html +0 -16
  13. data/spec/fixtures/expectations/indexer/index_with_indexer_and_numbered_index.html +0 -16
  14. data/spec/fixtures/expectations/with_layout/index.html +0 -12
  15. data/spec/fixtures/expectations/with_layout/index_with_metadata.html +0 -43
  16. data/spec/fixtures/expectations/with_layout/index_with_specific_metadata.html +0 -44
  17. data/spec/fixtures/src/assets/images/image.gif +0 -0
  18. data/spec/fixtures/src/assets/javascripts/somelib.js +0 -2
  19. data/spec/fixtures/src/assets/stylesheets/style.css +0 -2
  20. data/spec/fixtures/src/common/another_index.md +0 -12
  21. data/spec/fixtures/src/common/index.textile +0 -10
  22. data/spec/fixtures/src/common/other_index.markdown +0 -12
  23. data/spec/fixtures/src/common/somefile +0 -10
  24. data/spec/fixtures/src/erb/index.html.erb +0 -7
  25. data/spec/fixtures/src/erb/with_layout/index.html.erb +0 -7
  26. data/spec/fixtures/src/erb/with_layout/layout.html.erb +0 -5
  27. data/spec/fixtures/src/indexer/index_with_indexer.textile +0 -26
  28. data/spec/fixtures/src/indexer/index_with_indexer_and_numbered_index.textile +0 -26
  29. data/spec/fixtures/src/layout.html.erb +0 -5
  30. data/spec/fixtures/src/layout_with_metadata.html.erb +0 -22
  31. data/spec/fixtures/src/layout_with_specific_metadata.html.erb +0 -23
  32. data/spec/fixtures/src/metadata.yml +0 -43
  33. data/spec/fixtures/src/with_layout/index.textile +0 -10
  34. data/spec/fixtures/src/with_layout/index_with_specific_metadata.textile +0 -10
  35. data/spec/lib/smartgen/configuration_spec.rb +0 -5
  36. data/spec/lib/smartgen/engines/base_spec.rb +0 -92
  37. data/spec/lib/smartgen/engines/erb_spec.rb +0 -37
  38. data/spec/lib/smartgen/engines/markdown_spec.rb +0 -23
  39. data/spec/lib/smartgen/engines/textile_spec.rb +0 -19
  40. data/spec/lib/smartgen/generator_spec.rb +0 -272
  41. data/spec/lib/smartgen/indexer_spec.rb +0 -122
  42. data/spec/lib/smartgen/markup_file_spec.rb +0 -168
  43. data/spec/lib/smartgen/object_hash_spec.rb +0 -91
  44. data/spec/lib/smartgen/renderers/erb_spec.rb +0 -38
  45. data/spec/lib/smartgen/resource_spec.rb +0 -73
  46. data/spec/lib/smartgen/watcher_spec.rb +0 -71
  47. data/spec/lib/smartgen_spec.rb +0 -18
  48. data/spec/sandbox/.gitkeep +0 -0
  49. data/spec/spec_helper.rb +0 -37
@@ -1,13 +0,0 @@
1
- <h1>Here is some header</h1>
2
-
3
- <p>And here is a paragraph</p>
4
-
5
- <ul>
6
- <li>some bullet lists with <strong>style</strong></li>
7
- <li>some bullet lists with <em>style</em></li>
8
- </ul>
9
-
10
-
11
- <h2>Another header</h2>
12
-
13
- <p>With some text</p>
@@ -1,8 +0,0 @@
1
- <h1>Here is some header</h1>
2
- <p>And here is a paragraph</p>
3
- <ul>
4
- <li>some bullet lists with <strong>style</strong></li>
5
- <li>some bullet lists with <em>style</em></li>
6
- </ul>
7
- <h2>Another header</h2>
8
- <p>With some text</p>
@@ -1,13 +0,0 @@
1
- <h1>Here is some header</h1>
2
-
3
- <p>And here is a paragraph</p>
4
-
5
- <ul>
6
- <li>some bullet lists with <strong>style</strong></li>
7
- <li>some bullet lists with <em>style</em></li>
8
- </ul>
9
-
10
-
11
- <h2>Another header</h2>
12
-
13
- <p>With some text</p>
@@ -1,15 +0,0 @@
1
- <h1>Aqui vai um titulo</h1>
2
-
3
- <ul>
4
-
5
- <li>1</li>
6
-
7
- <li>2</li>
8
-
9
- <li>3</li>
10
-
11
- <li>4</li>
12
-
13
- <li>5</li>
14
-
15
- </ul>
@@ -1,19 +0,0 @@
1
- <html>
2
- <body>
3
- <h1>Aqui vai um titulo</h1>
4
-
5
- <ul>
6
-
7
- <li>1</li>
8
-
9
- <li>2</li>
10
-
11
- <li>3</li>
12
-
13
- <li>4</li>
14
-
15
- <li>5</li>
16
-
17
- </ul>
18
- </body>
19
- </html>
@@ -1,16 +0,0 @@
1
- <h1 id="here-is-some-header">Here is some header</h1>
2
- <p>And here is a paragraph</p>
3
- <ul>
4
- <li>some bullet lists with <strong>style</strong></li>
5
- <li>some bullet lists with <em>style</em></li>
6
- </ul>
7
- <h2 id="another-header">Another header</h2>
8
- <p>With some text</p>
9
- <h3 id="another-minor-header">Another minor header</h3>
10
- <p>With some other text</p>
11
- <h4 id="yet-another-smaller-header">Yet another smaller header</h4>
12
- <p>Again some text</p>
13
- <h3 id="a-minor-header">A minor header</h3>
14
- <p>Something</p>
15
- <h2 id="a-header">A header</h2>
16
- <p>With something</p>
@@ -1,16 +0,0 @@
1
- <h1 id="here-is-some-header">1 Here is some header</h1>
2
- <p>And here is a paragraph</p>
3
- <ul>
4
- <li>some bullet lists with <strong>style</strong></li>
5
- <li>some bullet lists with <em>style</em></li>
6
- </ul>
7
- <h2 id="another-header">1.1 Another header</h2>
8
- <p>With some text</p>
9
- <h3 id="another-minor-header">1.1.1 Another minor header</h3>
10
- <p>With some other text</p>
11
- <h4 id="yet-another-smaller-header">1.1.1.1 Yet another smaller header</h4>
12
- <p>Again some text</p>
13
- <h3 id="a-minor-header">1.1.2 A minor header</h3>
14
- <p>Something</p>
15
- <h2 id="a-header">1.2 A header</h2>
16
- <p>With something</p>
@@ -1,12 +0,0 @@
1
- <html>
2
- <body>
3
- <h1>Here is some header</h1>
4
- <p>And here is a paragraph</p>
5
- <ul>
6
- <li>some bullet lists with <strong>style</strong></li>
7
- <li>some bullet lists with <em>style</em></li>
8
- </ul>
9
- <h2>Another header</h2>
10
- <p>With some text</p>
11
- </body>
12
- </html>
@@ -1,43 +0,0 @@
1
- <html>
2
- <head>
3
- <title>Common title</title>
4
- </head>
5
- <body>
6
- <section id="menu">
7
- <dl>
8
-
9
- <dt>Common pages</dt>
10
-
11
- <dd><a href="http://link.com" title="Some description of page">Some page</a></dd>
12
-
13
- <dd><a href="http://index.com" title="Description for index page">Index Page</a></dd>
14
-
15
- <dd><a href="http://other_link.com" title="Some description of other page">Some other page</a></dd>
16
-
17
- <dd><a href="http://another_link.com" title="Some description of another page">Another page</a></dd>
18
-
19
- <hr/>
20
-
21
- <dt>Sample pages</dt>
22
-
23
- <dd><a href="http://sample.com" title="Some description of sample page">Sample page</a></dd>
24
-
25
- <dd><a href="http://sample_link.com" title="Some description of some sample page">Some sample page</a></dd>
26
-
27
-
28
-
29
- </dl>
30
- </section>
31
-
32
- <section id="contents">
33
- <h1>Here is some header</h1>
34
- <p>And here is a paragraph</p>
35
- <ul>
36
- <li>some bullet lists with <strong>style</strong></li>
37
- <li>some bullet lists with <em>style</em></li>
38
- </ul>
39
- <h2>Another header</h2>
40
- <p>With some text</p>
41
- </section>
42
- </body>
43
- </html>
@@ -1,44 +0,0 @@
1
- <html>
2
- <head>
3
- <title>Index Page :: Common title</title>
4
- <meta name="description" content="Description for index page"/>
5
- </head>
6
- <body>
7
- <section id="menu">
8
- <dl>
9
-
10
- <dt>Common pages</dt>
11
-
12
- <dd><a href="http://link.com" title="Some description of page">Some page</a></dd>
13
-
14
- <dd><a href="http://index.com" title="Description for index page">Index Page</a></dd>
15
-
16
- <dd><a href="http://other_link.com" title="Some description of other page">Some other page</a></dd>
17
-
18
- <dd><a href="http://another_link.com" title="Some description of another page">Another page</a></dd>
19
-
20
- <hr/>
21
-
22
- <dt>Sample pages</dt>
23
-
24
- <dd><a href="http://sample.com" title="Some description of sample page">Sample page</a></dd>
25
-
26
- <dd><a href="http://sample_link.com" title="Some description of some sample page">Some sample page</a></dd>
27
-
28
-
29
-
30
- </dl>
31
- </section>
32
-
33
- <section id="contents">
34
- <h1>Here is some header</h1>
35
- <p>And here is a paragraph</p>
36
- <ul>
37
- <li>some bullet lists with <strong>style</strong></li>
38
- <li>some bullet lists with <em>style</em></li>
39
- </ul>
40
- <h2>Another header</h2>
41
- <p>With some text</p>
42
- </section>
43
- </body>
44
- </html>
@@ -1,2 +0,0 @@
1
- // Some javascript file
2
- var x = 0;
@@ -1,2 +0,0 @@
1
- #some-id { color: #fff; }
2
- .some-class { color: #000; }
@@ -1,12 +0,0 @@
1
- Here is some header
2
- ===================
3
-
4
- And here is a paragraph
5
-
6
- * some bullet lists with **style**
7
- * some bullet lists with _style_
8
-
9
- Another header
10
- --------------
11
-
12
- With some text
@@ -1,10 +0,0 @@
1
- h1. Here is some header
2
-
3
- And here is a paragraph
4
-
5
- * some bullet lists with *style*
6
- * some bullet lists with _style_
7
-
8
- h2. Another header
9
-
10
- With some text
@@ -1,12 +0,0 @@
1
- Here is some header
2
- ===================
3
-
4
- And here is a paragraph
5
-
6
- * some bullet lists with **style**
7
- * some bullet lists with _style_
8
-
9
- Another header
10
- --------------
11
-
12
- With some text
@@ -1,10 +0,0 @@
1
- h1. Here is some header
2
-
3
- And here is a paragraph
4
-
5
- * some bullet lists with *style*
6
- * some bullet lists with _style_
7
-
8
- h2. Another header
9
-
10
- With some text
@@ -1,7 +0,0 @@
1
- <h1>Aqui vai um titulo</h1>
2
-
3
- <ul>
4
- <% 1.upto(5) do |i| %>
5
- <li><%= i %></li>
6
- <% end %>
7
- </ul>
@@ -1,7 +0,0 @@
1
- <h1>Aqui vai um titulo</h1>
2
-
3
- <ul>
4
- <% 1.upto(5) do |i| %>
5
- <li><%= i %></li>
6
- <% end %>
7
- </ul>
@@ -1,5 +0,0 @@
1
- <html>
2
- <body>
3
- <%= markup_file.contents %>
4
- </body>
5
- </html>
@@ -1,26 +0,0 @@
1
- h1. Here is some header
2
-
3
- And here is a paragraph
4
-
5
- * some bullet lists with *style*
6
- * some bullet lists with _style_
7
-
8
- h2. Another header
9
-
10
- With some text
11
-
12
- h3. Another minor header
13
-
14
- With some other text
15
-
16
- h4. Yet another smaller header
17
-
18
- Again some text
19
-
20
- h3. A minor header
21
-
22
- Something
23
-
24
- h2. A header
25
-
26
- With something
@@ -1,26 +0,0 @@
1
- h1. Here is some header
2
-
3
- And here is a paragraph
4
-
5
- * some bullet lists with *style*
6
- * some bullet lists with _style_
7
-
8
- h2. Another header
9
-
10
- With some text
11
-
12
- h3. Another minor header
13
-
14
- With some other text
15
-
16
- h4. Yet another smaller header
17
-
18
- Again some text
19
-
20
- h3. A minor header
21
-
22
- Something
23
-
24
- h2. A header
25
-
26
- With something
@@ -1,5 +0,0 @@
1
- <html>
2
- <body>
3
- <%= markup_file.contents %>
4
- </body>
5
- </html>
@@ -1,22 +0,0 @@
1
- <html>
2
- <head>
3
- <title><%= metadata.title %></title>
4
- </head>
5
- <body>
6
- <section id="menu">
7
- <dl>
8
- <% metadata.menu.each do |entry| %>
9
- <dt><%= entry.category %></dt>
10
- <% entry.pages.each do |page| %>
11
- <dd><a href="<%= page.link %>" title="<%= page.description %>"><%= page.title %></a></dd>
12
- <% end %>
13
- <% unless metadata.menu.last == entry %><hr/><% end %>
14
- <% end %>
15
- </dl>
16
- </section>
17
-
18
- <section id="contents">
19
- <%= markup_file.contents %>
20
- </section>
21
- </body>
22
- </html>
@@ -1,23 +0,0 @@
1
- <html>
2
- <head>
3
- <title><%= metadata.current_page.title %> :: <%= metadata.title %></title>
4
- <meta name="description" content="<%= metadata.current_page.description %>"/>
5
- </head>
6
- <body>
7
- <section id="menu">
8
- <dl>
9
- <% metadata.menu.each do |entry| %>
10
- <dt><%= entry.category %></dt>
11
- <% entry.pages.each do |page| %>
12
- <dd><a href="<%= page.link %>" title="<%= page.description %>"><%= page.title %></a></dd>
13
- <% end %>
14
- <% unless metadata.menu.last == entry %><hr/><% end %>
15
- <% end %>
16
- </dl>
17
- </section>
18
-
19
- <section id="contents">
20
- <%= markup_file.contents %>
21
- </section>
22
- </body>
23
- </html>
@@ -1,43 +0,0 @@
1
- title: Common title
2
- pages:
3
- - &index
4
- file: index_with_specific_metadata
5
- title: Index Page
6
- description: Description for index page
7
- link: "http://index.com"
8
- menu:
9
- - {
10
- category: Common pages,
11
- pages:
12
- [{
13
- title: Some page,
14
- description: Some description of page,
15
- link: "http://link.com"
16
- },
17
- *index,
18
- {
19
- title: Some other page,
20
- description: Some description of other page,
21
- link: "http://other_link.com"
22
- },
23
- {
24
- title: Another page,
25
- description: Some description of another page,
26
- link: "http://another_link.com"
27
- }]
28
- }
29
- - {
30
- category: Sample pages,
31
- pages:
32
- [{
33
- title: Sample page,
34
- description: Some description of sample page,
35
- link: "http://sample.com"
36
- },
37
- {
38
- title: Some sample page,
39
- description: Some description of some sample page,
40
- link: "http://sample_link.com"
41
- }]
42
- }
43
-