nanoc-typohero 1.0.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5dd4277ba1ef2bed08ca136b53950048ee064261
4
+ data.tar.gz: 6a623dcfb39162f499aca0cefe2072fa76ae9aae
5
+ SHA512:
6
+ metadata.gz: 8758d3e72e21a5730669e0f746136d2c5619d2ccaacfae067741cc0bfbb0637e9234265a1ea01e25ae6b83ae6eb93ad43de5451b2419f03ee1e3b1ec57b15925
7
+ data.tar.gz: 3dbbe7dd21dbff41b20f4001539d4d484a1b0186628c7c6c5e5ea62f6ee46282e17d0b88f4e2911e465771ad95e4724d46e7e1cc8de9d656e30f403958d38330
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ gem 'minitest'
6
+ gem 'rake'
7
+ gem 'coveralls', require: false
data/Gemfile.lock ADDED
@@ -0,0 +1,48 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ nanoc-typohero (1.0.0)
5
+ nanoc (>= 3.6.7, < 4.0.0)
6
+ typohero (>= 0.0.4, < 1.0.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ colored (1.2)
12
+ coveralls (0.7.2)
13
+ multi_json (~> 1.3)
14
+ rest-client (= 1.6.7)
15
+ simplecov (>= 0.7)
16
+ term-ansicolor (= 1.2.2)
17
+ thor (= 0.18.1)
18
+ cri (2.6.1)
19
+ colored (~> 1.2)
20
+ docile (1.1.5)
21
+ mime-types (2.4.3)
22
+ minitest (5.5.0)
23
+ multi_json (1.10.1)
24
+ nanoc (3.7.4)
25
+ cri (~> 2.3)
26
+ rake (10.4.2)
27
+ rest-client (1.6.7)
28
+ mime-types (>= 1.16)
29
+ simplecov (0.9.1)
30
+ docile (~> 1.1.0)
31
+ multi_json (~> 1.0)
32
+ simplecov-html (~> 0.8.0)
33
+ simplecov-html (0.8.0)
34
+ term-ansicolor (1.2.2)
35
+ tins (~> 0.8)
36
+ thor (0.18.1)
37
+ tins (0.13.2)
38
+ typohero (0.0.4)
39
+
40
+ PLATFORMS
41
+ ruby
42
+
43
+ DEPENDENCIES
44
+ bundler (~> 1.5)
45
+ coveralls
46
+ minitest
47
+ nanoc-typohero!
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
@@ -0,0 +1,5 @@
1
+ # nanoc-typohero news
2
+
3
+ ## 1.0.0
4
+
5
+ Initial release.
data/README.md ADDED
@@ -0,0 +1,19 @@
1
+ [![Build Status](https://travis-ci.org/nanoc/nanoc-typohero.png)](https://travis-ci.org/nanoc/nanoc-typohero)
2
+ [![Code Climate](https://codeclimate.com/github/nanoc/nanoc-typohero.png)](https://codeclimate.com/github/nanoc/nanoc-typohero)
3
+ [![Coverage Status](https://coveralls.io/repos/nanoc/nanoc-typohero/badge.png?branch=master)](https://coveralls.io/r/nanoc/nanoc-typohero)
4
+
5
+ # nanoc-typohero
6
+
7
+ This provides a filter for [TypoHero](https://github.com/minad/typohero), a Ruby text enhancement library.
8
+
9
+ ## Installation
10
+
11
+ `gem install nanoc-typohero`
12
+
13
+ ## Usage
14
+
15
+ ```ruby
16
+ filter :typohero
17
+ ```
18
+
19
+ This filter takes no options.
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.libs = %w( lib test )
7
+ t.test_files = FileList['test/**/test_*.rb', 'test/**/*_spec.rb']
8
+ end
9
+
10
+ task :default => :test
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+
3
+ require 'typohero'
4
+
5
+ module Nanoc
6
+ module TypoHero
7
+ class Filter < Nanoc::Filter
8
+ identifier :typohero
9
+
10
+ def run(content, _params = {})
11
+ ::TypoHero.enhance(content)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,7 @@
1
+ # encoding: utf-8
2
+
3
+ module Nanoc
4
+ module TypoHero
5
+ VERSION = '1.0.0'
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+
3
+ module Nanoc
4
+ module TypoHero
5
+ end
6
+ end
7
+
8
+ require 'nanoc/typohero/version'
9
+ require 'nanoc/typohero/filter'
@@ -0,0 +1,3 @@
1
+ # encoding: utf-8
2
+
3
+ require 'nanoc/typohero'
@@ -0,0 +1,30 @@
1
+ # encoding: utf-8
2
+
3
+ $LOAD_PATH.unshift(File.expand_path('../lib/', __FILE__))
4
+ require 'nanoc/typohero/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'nanoc-typohero'
8
+ s.version = Nanoc::TypoHero::VERSION
9
+ s.homepage = 'http://nanoc.ws/'
10
+ s.summary = 'TypoHero support for nanoc'
11
+ s.description = 'Provides a :typohero 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-typohero.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('typohero', '>= 0.0.4', '< 1.0.0')
29
+ s.add_development_dependency('bundler', '~> 1.5')
30
+ end
@@ -0,0 +1,18 @@
1
+ # encoding: utf-8
2
+
3
+ require 'helper'
4
+
5
+ class Nanoc::TypoHero::FilterTest < Minitest::Test
6
+ NBSP = ' '
7
+
8
+ def test_filter
9
+ # Get filter
10
+ filter = ::Nanoc::TypoHero::Filter.new
11
+
12
+ # Run filter
13
+ a = '"TypoHero makes HTML look smarter &amp; better, don\'t you think?"'
14
+ b = "<span class=\"dquo\">“</span>TypoHero makes <span class=\"caps\">HTML</span> look smarter <span class=\"amp\">&amp;</span> better, don’t you#{NBSP}think?”"
15
+ result = filter.setup_and_run(a)
16
+ assert_equal(b, result)
17
+ end
18
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+
3
+ require 'coveralls'
4
+ Coveralls.wear!
5
+
6
+ require 'minitest'
7
+ require 'minitest/autorun'
8
+ require 'nanoc'
9
+ require 'nanoc-typohero'
metadata ADDED
@@ -0,0 +1,116 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nanoc-typohero
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: 2015-01-11 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: typohero
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 0.0.4
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: 1.0.0
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 0.0.4
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: 1.0.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: bundler
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '1.5'
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '1.5'
67
+ description: Provides a :typohero filter for nanoc
68
+ email: denis.defreyne@stoneship.org
69
+ executables: []
70
+ extensions: []
71
+ extra_rdoc_files:
72
+ - LICENSE
73
+ - README.md
74
+ - NEWS.md
75
+ files:
76
+ - Gemfile
77
+ - Gemfile.lock
78
+ - LICENSE
79
+ - NEWS.md
80
+ - README.md
81
+ - Rakefile
82
+ - lib/nanoc-typohero.rb
83
+ - lib/nanoc/typohero.rb
84
+ - lib/nanoc/typohero/filter.rb
85
+ - lib/nanoc/typohero/version.rb
86
+ - nanoc-typohero.gemspec
87
+ - test/filters/test_typohero.rb
88
+ - test/helper.rb
89
+ homepage: http://nanoc.ws/
90
+ licenses:
91
+ - MIT
92
+ metadata: {}
93
+ post_install_message:
94
+ rdoc_options:
95
+ - "--main"
96
+ - README.md
97
+ require_paths:
98
+ - lib
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 1.9.3
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ requirements: []
110
+ rubyforge_project:
111
+ rubygems_version: 2.4.5
112
+ signing_key:
113
+ specification_version: 4
114
+ summary: TypoHero support for nanoc
115
+ test_files: []
116
+ has_rdoc: