nanoc-asciidoctor 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +48 -0
- data/LICENSE +19 -0
- data/NEWS.md +5 -0
- data/README.md +19 -0
- data/Rakefile +10 -0
- data/lib/nanoc-asciidoctor.rb +3 -0
- data/lib/nanoc/asciidoctor.rb +9 -0
- data/lib/nanoc/asciidoctor/filter.rb +18 -0
- data/lib/nanoc/asciidoctor/version.rb +9 -0
- data/nanoc-asciidoctor.gemspec +30 -0
- data/test/filters/test_asciidoctor.rb +16 -0
- data/test/helper.rb +9 -0
- metadata +110 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OThkOTZlOWYxNzViY2Q0MDFhOWNlOGQ3OWMyMmI4ZmUwNGY5MDQ0OQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MDhkZmYyNTdhMmJjNTgxMmM0YzQ5MGU1OWFjZjg0YmEwNThkYTg1OA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NTdlZWU4NjRkY2YwYjcwOTRhNWRlMDIyYTMyN2NhOWJlNmUzZGFkMDVjOTEw
|
10
|
+
MDlkY2FjMzg5ZTdhZGJiYWQ3NTRlYTA3Y2MwNzI2ZTcxMDIzMjk1MjQzYjU0
|
11
|
+
MDA3YjYxZDgzNjllMjIzMzcyYjJmMzNlMTNiZjZlNjAwMGE3Y2E=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MDIzZDJkNmE5MmJiODdkZjExNTgxMTAzMzY2MGE4OGMwOTJmY2VjY2VmMzRi
|
14
|
+
YmI1MGU2ZWRjOTYyYWZkZWVhYzJhOGIyY2M1Njg3ZWIwZTc2YzZjMzRkNjUz
|
15
|
+
ODk5NTIyOTYxOWI2OTc1YTNkZTM1MTc1YTc4NmRlYjgyZWJhNDQ=
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
nanoc-asciidoctor (0.1.0)
|
5
|
+
asciidoctor
|
6
|
+
nanoc (>= 3.6.7, < 4.0.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
asciidoctor (0.1.4)
|
12
|
+
colored (1.2)
|
13
|
+
coveralls (0.7.0)
|
14
|
+
multi_json (~> 1.3)
|
15
|
+
rest-client
|
16
|
+
simplecov (>= 0.7)
|
17
|
+
term-ansicolor
|
18
|
+
thor
|
19
|
+
cri (2.4.1)
|
20
|
+
colored (>= 1.2)
|
21
|
+
docile (1.1.3)
|
22
|
+
mime-types (2.1)
|
23
|
+
minitest (5.2.3)
|
24
|
+
multi_json (1.8.4)
|
25
|
+
nanoc (3.6.7)
|
26
|
+
cri (~> 2.3)
|
27
|
+
rake (10.1.1)
|
28
|
+
rest-client (1.6.7)
|
29
|
+
mime-types (>= 1.16)
|
30
|
+
simplecov (0.8.2)
|
31
|
+
docile (~> 1.1.0)
|
32
|
+
multi_json
|
33
|
+
simplecov-html (~> 0.8.0)
|
34
|
+
simplecov-html (0.8.0)
|
35
|
+
term-ansicolor (1.3.0)
|
36
|
+
tins (~> 1.0)
|
37
|
+
thor (0.18.1)
|
38
|
+
tins (1.0.0)
|
39
|
+
|
40
|
+
PLATFORMS
|
41
|
+
ruby
|
42
|
+
|
43
|
+
DEPENDENCIES
|
44
|
+
bundler
|
45
|
+
coveralls
|
46
|
+
minitest
|
47
|
+
nanoc-asciidoctor!
|
48
|
+
rake
|
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2014 Denis Defreyne and contributors
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
11
|
+
copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
+
SOFTWARE.
|
data/NEWS.md
ADDED
data/README.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/nanoc/nanoc-asciidoctor.png)](https://travis-ci.org/nanoc/nanoc-asciidoctor)
|
2
|
+
[![Code Climate](https://codeclimate.com/github/nanoc/nanoc-asciidoctor.png)](https://codeclimate.com/github/nanoc/nanoc-asciidoctor)
|
3
|
+
[![Coverage Status](https://coveralls.io/repos/nanoc/nanoc-asciidoctor/badge.png?branch=master)](https://coveralls.io/r/nanoc/nanoc-asciidoctor)
|
4
|
+
|
5
|
+
# nanoc-asciidoctor
|
6
|
+
|
7
|
+
This provides a filter for [Asciidoctor](http://asciidoctor.org/), a Ruby processor for [AsciiDoc](http://asciidoc.org/).
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
`gem install nanoc-asciidoctor`
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
filter :asciidoctor
|
17
|
+
```
|
18
|
+
|
19
|
+
Options passed to this filter will be passed on to `Asciidoctor.render`.
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'asciidoctor'
|
4
|
+
require 'erb'
|
5
|
+
|
6
|
+
module Nanoc::Asciidoctor
|
7
|
+
|
8
|
+
class Filter < Nanoc::Filter
|
9
|
+
|
10
|
+
identifier :asciidoctor
|
11
|
+
|
12
|
+
def run(content, params={})
|
13
|
+
Asciidoctor.render(content, params)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift(File.expand_path('../lib/', __FILE__))
|
4
|
+
require 'nanoc/asciidoctor/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = 'nanoc-asciidoctor'
|
8
|
+
s.version = Nanoc::Asciidoctor::VERSION
|
9
|
+
s.homepage = 'http://nanoc.ws/'
|
10
|
+
s.summary = 'Plugin template for nanoc'
|
11
|
+
s.description = 'Provides an :asciidoctor filter for nanoc'
|
12
|
+
|
13
|
+
s.author = 'Denis Defreyne'
|
14
|
+
s.email = 'denis.defreyne@stoneship.org'
|
15
|
+
s.license = 'MIT'
|
16
|
+
|
17
|
+
s.required_ruby_version = '>= 1.9.3'
|
18
|
+
|
19
|
+
s.files = Dir['[A-Z]*'] +
|
20
|
+
Dir['{lib,test}/**/*'] +
|
21
|
+
[ 'nanoc-asciidoctor.gemspec' ]
|
22
|
+
s.require_paths = [ 'lib' ]
|
23
|
+
|
24
|
+
s.rdoc_options = [ '--main', 'README.md' ]
|
25
|
+
s.extra_rdoc_files = [ 'LICENSE', 'README.md', 'NEWS.md' ]
|
26
|
+
|
27
|
+
s.add_runtime_dependency('nanoc', '>= 3.6.7', '< 4.0.0')
|
28
|
+
s.add_runtime_dependency('asciidoctor', '~> 0.1')
|
29
|
+
s.add_development_dependency('bundler', '~> 1.5')
|
30
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'helper'
|
4
|
+
|
5
|
+
class Nanoc::Asciidoctor::FilterTest < Minitest::Test
|
6
|
+
|
7
|
+
def test_filter
|
8
|
+
# Create filter
|
9
|
+
filter = ::Nanoc::Asciidoctor::Filter.new
|
10
|
+
|
11
|
+
# Run filter
|
12
|
+
result = filter.setup_and_run("== Blah blah")
|
13
|
+
assert_match %r{<h2 id="_blah_blah">Blah blah</h2>}, result
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
data/test/helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nanoc-asciidoctor
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Denis Defreyne
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-02-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nanoc
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.6.7
|
20
|
+
- - <
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 4.0.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.6.7
|
30
|
+
- - <
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 4.0.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: asciidoctor
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ~>
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0.1'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ~>
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0.1'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: bundler
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.5'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ~>
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '1.5'
|
61
|
+
description: Provides an :asciidoctor filter for nanoc
|
62
|
+
email: denis.defreyne@stoneship.org
|
63
|
+
executables: []
|
64
|
+
extensions: []
|
65
|
+
extra_rdoc_files:
|
66
|
+
- LICENSE
|
67
|
+
- README.md
|
68
|
+
- NEWS.md
|
69
|
+
files:
|
70
|
+
- Gemfile
|
71
|
+
- Gemfile.lock
|
72
|
+
- LICENSE
|
73
|
+
- NEWS.md
|
74
|
+
- README.md
|
75
|
+
- Rakefile
|
76
|
+
- lib/nanoc-asciidoctor.rb
|
77
|
+
- lib/nanoc/asciidoctor.rb
|
78
|
+
- lib/nanoc/asciidoctor/filter.rb
|
79
|
+
- lib/nanoc/asciidoctor/version.rb
|
80
|
+
- nanoc-asciidoctor.gemspec
|
81
|
+
- test/filters/test_asciidoctor.rb
|
82
|
+
- test/helper.rb
|
83
|
+
homepage: http://nanoc.ws/
|
84
|
+
licenses:
|
85
|
+
- MIT
|
86
|
+
metadata: {}
|
87
|
+
post_install_message:
|
88
|
+
rdoc_options:
|
89
|
+
- --main
|
90
|
+
- README.md
|
91
|
+
require_paths:
|
92
|
+
- lib
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ! '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: 1.9.3
|
98
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ! '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
requirements: []
|
104
|
+
rubyforge_project:
|
105
|
+
rubygems_version: 2.2.2
|
106
|
+
signing_key:
|
107
|
+
specification_version: 4
|
108
|
+
summary: Plugin template for nanoc
|
109
|
+
test_files: []
|
110
|
+
has_rdoc:
|