jekyll-asciidoc 2.1.1 → 3.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +26 -0
  3. data/Gemfile +4 -16
  4. data/LICENSE.adoc +1 -1
  5. data/README.adoc +370 -192
  6. data/jekyll-asciidoc.gemspec +23 -11
  7. data/lib/jekyll-asciidoc/compat.rb +5 -9
  8. data/lib/jekyll-asciidoc/converter.rb +89 -69
  9. data/lib/jekyll-asciidoc/filters.rb +2 -3
  10. data/lib/jekyll-asciidoc/integrator.rb +18 -29
  11. data/lib/jekyll-asciidoc/utils.rb +6 -3
  12. data/lib/jekyll-asciidoc/version.rb +1 -1
  13. metadata +48 -220
  14. data/Rakefile +0 -24
  15. data/spec/fixtures/alternate_page_attribute_prefix/_config.yml +0 -4
  16. data/spec/fixtures/alternate_page_attribute_prefix/_layouts/default.html +0 -12
  17. data/spec/fixtures/alternate_page_attribute_prefix/explicit-permalink.adoc +0 -4
  18. data/spec/fixtures/attributes_as_array/_config.yml +0 -7
  19. data/spec/fixtures/attributes_as_hash/_config.yml +0 -7
  20. data/spec/fixtures/basic_site/_config.yml +0 -2
  21. data/spec/fixtures/basic_site/_layouts/custom.html +0 -15
  22. data/spec/fixtures/basic_site/_layouts/page.html +0 -15
  23. data/spec/fixtures/basic_site/auto-layout.adoc +0 -4
  24. data/spec/fixtures/basic_site/bare-header.adoc +0 -4
  25. data/spec/fixtures/basic_site/custom-layout.adoc +0 -4
  26. data/spec/fixtures/basic_site/docid.adoc +0 -4
  27. data/spec/fixtures/basic_site/empty-layout.adoc +0 -4
  28. data/spec/fixtures/basic_site/empty-page-attribute.adoc +0 -4
  29. data/spec/fixtures/basic_site/liquid-enabled.adoc +0 -6
  30. data/spec/fixtures/basic_site/nil-layout.adoc +0 -4
  31. data/spec/fixtures/basic_site/no-doctitle.adoc +0 -2
  32. data/spec/fixtures/basic_site/no-liquid.adoc +0 -3
  33. data/spec/fixtures/basic_site/not-published.adoc +0 -4
  34. data/spec/fixtures/basic_site/section-with-id-and-role.adoc +0 -6
  35. data/spec/fixtures/basic_site/standalone-a.adoc +0 -4
  36. data/spec/fixtures/basic_site/standalone-b.adoc +0 -4
  37. data/spec/fixtures/basic_site/subdir/page-in-subdir.adoc +0 -7
  38. data/spec/fixtures/basic_site/with-front-matter-header-only.adoc +0 -4
  39. data/spec/fixtures/basic_site/with-front-matter-header.adoc +0 -6
  40. data/spec/fixtures/basic_site/without-front-matter-header.adoc +0 -3
  41. data/spec/fixtures/blank_page_attribute_prefix/_config.yml +0 -4
  42. data/spec/fixtures/blank_page_attribute_prefix/_layouts/default.html +0 -12
  43. data/spec/fixtures/blank_page_attribute_prefix/explicit-permalink.adoc +0 -4
  44. data/spec/fixtures/default_config/_config.yml +0 -2
  45. data/spec/fixtures/explicit_site_time/_config.yml +0 -4
  46. data/spec/fixtures/explicit_site_time/_layouts/default.html +0 -12
  47. data/spec/fixtures/explicit_site_time/home.adoc +0 -3
  48. data/spec/fixtures/fallback_to_default_layout/_blueprints/blueprint.adoc +0 -3
  49. data/spec/fixtures/fallback_to_default_layout/_config.yml +0 -5
  50. data/spec/fixtures/fallback_to_default_layout/_layouts/default.html +0 -15
  51. data/spec/fixtures/fallback_to_default_layout/_posts/2016-01-01-post.adoc +0 -4
  52. data/spec/fixtures/fallback_to_default_layout/home.adoc +0 -3
  53. data/spec/fixtures/front_matter_defaults/_config.yml +0 -10
  54. data/spec/fixtures/front_matter_defaults/_layouts/docs.html +0 -15
  55. data/spec/fixtures/front_matter_defaults/_layouts/general.html +0 -15
  56. data/spec/fixtures/front_matter_defaults/docs/page.adoc +0 -3
  57. data/spec/fixtures/front_matter_defaults/page.adoc +0 -3
  58. data/spec/fixtures/hybrid_config/_config.yml +0 -8
  59. data/spec/fixtures/imagesdir_relative_to_root/_config.yml +0 -5
  60. data/spec/fixtures/include_relative_to_docdir/_config.yml +0 -4
  61. data/spec/fixtures/include_relative_to_docdir/_layouts/default.html +0 -12
  62. data/spec/fixtures/include_relative_to_docdir/about/_people.adoc +0 -2
  63. data/spec/fixtures/include_relative_to_docdir/about/index.adoc +0 -13
  64. data/spec/fixtures/include_relative_to_root/source/_config.yml +0 -2
  65. data/spec/fixtures/include_relative_to_root/source/_layouts/default.html +0 -11
  66. data/spec/fixtures/include_relative_to_root/source/about/_people.adoc +0 -2
  67. data/spec/fixtures/include_relative_to_root/source/about/index.adoc +0 -13
  68. data/spec/fixtures/include_relative_to_source/_config.yml +0 -4
  69. data/spec/fixtures/include_relative_to_source/_layouts/default.html +0 -12
  70. data/spec/fixtures/include_relative_to_source/about/_people.adoc +0 -2
  71. data/spec/fixtures/include_relative_to_source/about/index.adoc +0 -13
  72. data/spec/fixtures/legacy_config/_config.yml +0 -5
  73. data/spec/fixtures/pygments_code_highlighting/_config.yml +0 -6
  74. data/spec/fixtures/pygments_code_highlighting/_layouts/page.html +0 -13
  75. data/spec/fixtures/pygments_code_highlighting/page-with-code.adoc +0 -16
  76. data/spec/fixtures/read_error/_config.yml +0 -2
  77. data/spec/fixtures/read_error/unreadable.adoc +0 -3
  78. data/spec/fixtures/require_front_matter_header/_config.yml +0 -4
  79. data/spec/fixtures/require_front_matter_header/_layouts/default.html +0 -12
  80. data/spec/fixtures/require_front_matter_header/with-front-matter-header.adoc +0 -5
  81. data/spec/fixtures/require_front_matter_header/without-front-matter-header.adoc +0 -3
  82. data/spec/fixtures/safe_mode/_config.yml +0 -4
  83. data/spec/fixtures/safe_mode/_layouts/home.html +0 -15
  84. data/spec/fixtures/safe_mode/home.adoc +0 -5
  85. data/spec/fixtures/tocify_filter/_config.yml +0 -2
  86. data/spec/fixtures/tocify_filter/_layouts/default.html +0 -15
  87. data/spec/fixtures/tocify_filter/index.adoc +0 -25
  88. data/spec/fixtures/with_custom_collection/_blueprints/blueprint-a.adoc +0 -4
  89. data/spec/fixtures/with_custom_collection/_blueprints/blueprint-b.adoc +0 -10
  90. data/spec/fixtures/with_custom_collection/_config.yml +0 -7
  91. data/spec/fixtures/with_custom_collection/_layouts/blueprint.html +0 -15
  92. data/spec/fixtures/with_custom_collection/_layouts/default.html +0 -15
  93. data/spec/fixtures/with_posts/_config.yml +0 -6
  94. data/spec/fixtures/with_posts/_drafts/a-draft-post.adoc +0 -5
  95. data/spec/fixtures/with_posts/_layouts/custom.html +0 -15
  96. data/spec/fixtures/with_posts/_layouts/post.html +0 -23
  97. data/spec/fixtures/with_posts/_posts/2016-01-01-welcome.adoc +0 -4
  98. data/spec/fixtures/with_posts/_posts/2016-01-02-empty-layout.adoc +0 -4
  99. data/spec/fixtures/with_posts/_posts/2016-01-03-auto-layout.adoc +0 -4
  100. data/spec/fixtures/with_posts/_posts/2016-01-04-custom-layout.adoc +0 -4
  101. data/spec/fixtures/with_posts/_posts/2016-01-05-nil-layout.adoc +0 -4
  102. data/spec/fixtures/with_posts/_posts/2016-02-01-post-with-categories.adoc +0 -4
  103. data/spec/fixtures/with_posts/_posts/2016-02-02-post-with-singular-vars.adoc +0 -7
  104. data/spec/fixtures/with_posts/_posts/2016-03-01-post-with-excerpt.adoc +0 -4
  105. data/spec/fixtures/with_posts/_posts/2016-04-01-show-me-the-title.adoc +0 -4
  106. data/spec/fixtures/with_posts/_posts/2016-05-31-automatic-title.adoc +0 -1
  107. data/spec/fixtures/with_posts/_posts/2016-06-15-post-with-date.adoc +0 -4
  108. data/spec/fixtures/with_posts/_posts/2016-07-15-post-with-date-and-tz.adoc +0 -4
  109. data/spec/fixtures/with_posts/_posts/2016-07-20-post-with-date-in-revision-line.adoc +0 -6
  110. data/spec/fixtures/with_posts/index.html +0 -22
  111. data/spec/fixtures/xhtml_syntax/_config.yml +0 -6
  112. data/spec/fixtures/xhtml_syntax/home.adoc +0 -5
  113. data/spec/fixtures/xhtml_syntax/images/sunset.jpg +0 -0
  114. data/spec/jekyll-asciidoc_spec.rb +0 -1103
  115. data/spec/spec_helper.rb +0 -64
@@ -1,64 +0,0 @@
1
- require 'jekyll'
2
- require 'fileutils'
3
-
4
- Jekyll::MIN_VERSION_3 = (Gem::Version.new Jekyll::VERSION) >= (Gem::Version.new '3.0.0') unless defined? Jekyll::MIN_VERSION_3
5
- Jekyll.logger.log_level = :error
6
-
7
- RSpec.configure do |config|
8
- config.before :suite do
9
- ::FileUtils.rm_rf output_dir
10
- end
11
-
12
- def fixture_site_params path
13
- {
14
- 'source' => (source_dir path),
15
- 'destination' => (output_dir path),
16
- 'url' => 'http://example.org'
17
- }
18
- end
19
-
20
- def source_dir path
21
- ::File.join (::File.expand_path '../fixtures', __FILE__) , path
22
- end
23
-
24
- def source_file path
25
- ::File.join site.config['source'], path
26
- end
27
-
28
- def output_dir path = nil
29
- base = ::File.expand_path '../../build/test-output', __FILE__
30
- path ? (::File.join base, path) : base
31
- end
32
-
33
- def output_file path
34
- ::File.join site.config['destination'], path
35
- end
36
-
37
- def find_page path
38
- site.pages.find {|p| p.path == path }
39
- end
40
-
41
- def find_post path
42
- path = %(_posts/#{path}) unless path.start_with? '_posts/'
43
- ((site.respond_to? :posts=) ? site.posts : site.posts.docs).find {|p| p.relative_path == path }
44
- end
45
-
46
- def find_draft path
47
- path = %(_drafts/#{path}) unless path.start_with? '_drafts/'
48
- if site.respond_to? :posts=
49
- path = %(/#{path})
50
- site.posts.find {|p| p.relative_path == path }
51
- else
52
- site.posts.docs.find {|p| p.relative_path == path }
53
- end
54
- end
55
-
56
- def find_doc path, collection_name
57
- path = %(_#{collection_name}/#{path}) unless path.start_with? %(_#{collection_name}/)
58
- site.collections[collection_name].docs.find {|p| p.relative_path == path }
59
- end
60
-
61
- def windows?
62
- ::RbConfig::CONFIG['host_os'] =~ /win|ming/
63
- end
64
- end