jekyll-html-pipeline 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79b3b2da5b06f5577b46805ae5db216d0c0b68dd
4
- data.tar.gz: 58961e54bff495fe738d057a8d7ba4e103473021
3
+ metadata.gz: 4ca167c44eaf8a25909e6ac13e1f0fbdfbb492fb
4
+ data.tar.gz: dd56e13611898098c86023b66369f12484ff55cb
5
5
  SHA512:
6
- metadata.gz: e75a188072a3f649dc68915d7d9e6102582ea0583076f0e5937c4b0c6e46226c3c5309c5630e0998b74cf34d848d2ea52b508dce319350128a030e99a23e7fe3
7
- data.tar.gz: 731abf81870e6bf86d126587a628e8148a48e0d115e4be8a89634d50b9a2facee80a5ed4b50ef25e4c9e5f7a9d106e67496d07087fb22f23ac3790feec328892
6
+ metadata.gz: e051483901c5a9e91cf2b60a13babce680687030295e6b477e957c447e527acdb80d787f02524e65a154bf932a8c45784b3bbd73be48950af595d61e888cfcf5
7
+ data.tar.gz: fd656469fbc8a837ee973a95226041dba24608565973fa549ab395dc9067d4cf627bdaa819d6a2679cb6ad540685b5a2c1450be2dd845a6d6b980eb1495e0429
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "jekyll-html-pipeline"
3
- spec.version = "0.1.0"
3
+ spec.version = "0.1.1"
4
4
  spec.authors = ["Garen Torikian"]
5
5
  spec.email = ["gjtorikian@gmail.com"]
6
6
  spec.summary = %q{Use GitHub's HTML::Pipeline, in Jekyll!}
@@ -13,14 +13,13 @@ Gem::Specification.new do |spec|
13
13
  spec.test_files = spec.files.grep(%r{^(test)/})
14
14
  spec.require_paths = ["lib"]
15
15
 
16
- spec.add_dependency "jekyll", "~> 2.0.0.alpha.1 "
17
- spec.add_dependency('html-pipeline', "~> 1.0.0")
16
+ spec.add_dependency "jekyll", "~> 2.0.0"
17
+ spec.add_dependency 'html-pipeline', "~> 1.0.0"
18
18
 
19
19
  spec.add_development_dependency "bundler", "~> 1.4"
20
20
  spec.add_development_dependency "rake"
21
- spec.add_development_dependency('shoulda', "~> 3.5")
22
- spec.add_development_dependency('github-markdown', "~> 0.6.3")
23
- spec.add_development_dependency('sanitize', "~> 2.0.6")
24
- spec.add_development_dependency('gemoji', "~> 1.5.0")
25
- spec.add_development_dependency "rouge"
21
+ spec.add_development_dependency 'minitest', "~> 5.0"
22
+ spec.add_development_dependency 'github-markdown', "~> 0.6.3"
23
+ spec.add_development_dependency 'sanitize', "~> 2.0.6"
24
+ spec.add_development_dependency 'gemoji', "~> 1.5.0"
26
25
  end
@@ -0,0 +1,51 @@
1
+ require "rubygems"
2
+
3
+ require "jekyll"
4
+ require "liquid"
5
+
6
+ require 'minitest/autorun'
7
+
8
+ require "jekyll-html-pipeline"
9
+
10
+ # Send STDERR into the void to suppress program output messages
11
+ # STDERR.reopen(test(?e, '/dev/null') ? '/dev/null' : 'NUL:')
12
+
13
+ module Converter
14
+ class HTMLPipelineTestCase < MiniTest::Test
15
+ end
16
+ end
17
+
18
+ # module
19
+ # class Test::Unit::TestCase
20
+ # def dest_dir(*subdirs)
21
+ # test_dir('dest', *subdirs)
22
+ # end
23
+
24
+ # def source_dir(*subdirs)
25
+ # test_dir('source', *subdirs)
26
+ # end
27
+
28
+ # def clear_dest
29
+ # FileUtils.rm_rf(dest_dir)
30
+ # end
31
+
32
+ # def test_dir(*subdirs)
33
+ # File.join(File.dirname(__FILE__), *subdirs)
34
+ # end
35
+
36
+ # def directory_with_contents(path)
37
+ # FileUtils.rm_rf(path)
38
+ # FileUtils.mkdir(path)
39
+ # File.open("#{path}/index.html", "w"){ |f| f.write("I was previously generated.") }
40
+ # end
41
+
42
+ # def capture_stdout
43
+ # $old_stdout = $stdout
44
+ # $stdout = StringIO.new
45
+ # yield
46
+ # $stdout.rewind
47
+ # return $stdout.string
48
+ # ensure
49
+ # $stdout = $old_stdout
50
+ # end
51
+ # end
@@ -1,50 +1,48 @@
1
- require "helper"
1
+ require "test_helper"
2
2
 
3
- class HTMLPipeline < Test::Unit::TestCase
4
- context "html_pipeline" do
5
- setup do
6
- @config = {
7
- 'html_pipeline' => {
8
- 'filters' => ['markdownfilter', 'sanitizationfilter', 'emojifilter', 'mentionfilter'],
9
- 'context' => { 'asset_root' => "http://foo.com/icons", 'base_url' => "https://github.com/"}},
10
- 'markdown' => 'HTMLPipeline'
11
- }
12
- @markdown = Jekyll::Converters::Markdown.new @config
13
- end
3
+ class HTMLPipelineTest < Converter::HTMLPipelineTestCase
4
+ def setup
5
+ @config = {
6
+ 'html_pipeline' => {
7
+ 'filters' => ['markdownfilter', 'sanitizationfilter', 'emojifilter', 'mentionfilter'],
8
+ 'context' => { 'asset_root' => "http://foo.com/icons", 'base_url' => "https://github.com/"}},
9
+ 'markdown' => 'HTMLPipeline'
10
+ }
11
+ @markdown = Jekyll::Converters::Markdown.new @config
12
+ end
14
13
 
15
- should "pass regular options" do
16
- assert_equal "<h1>Some Header</h1>", @markdown.convert('# Some Header #').strip
17
- end
14
+ def test_passes_regular_options
15
+ assert_equal "<h1>Some Header</h1>", @markdown.convert('# Some Header #').strip
16
+ end
18
17
 
19
- should "pass rendering emoji" do
20
- assert_equal "<p><img class=\"emoji\" title=\":trollface:\" alt=\":trollface:\" src=\"http://foo.com/icons/emoji/trollface.png\" height=\"20\" width=\"20\" align=\"absmiddle\"></p>", @markdown.convert(':trollface:').strip
21
- end
18
+ def test_pass_rendering_emoji
19
+ assert_equal "<p><img class=\"emoji\" title=\":trollface:\" alt=\":trollface:\" src=\"http://foo.com/icons/emoji/trollface.png\" height=\"20\" width=\"20\" align=\"absmiddle\"></p>", @markdown.convert(':trollface:').strip
20
+ end
22
21
 
23
- should "pass rendering mentions" do
24
- assert_equal "<p><strong>Hey, <a href=\"https://github.com/mojombo\" class=\"user-mention\">@mojombo</a></strong>!</p>", @markdown.convert('**Hey, @mojombo**!').strip
25
- end
22
+ def test_pass_rendering_mentions
23
+ assert_equal "<p><strong>Hey, <a href=\"https://github.com/mojombo\" class=\"user-mention\">@mojombo</a></strong>!</p>", @markdown.convert('**Hey, @mojombo**!').strip
24
+ end
26
25
 
27
- should "fail when a library dependency is not met" do
28
- override = @config.dup
29
- override['html_pipeline']['filters'] << 'AutolinkFilter'
30
- markdown = Jekyll::Converters::Markdown.new override
31
- assert_raise(LoadError) { markdown.convert('http://www.github.com') }
32
- end
26
+ def test_fail_when_a_library_dependency_is_not_met
27
+ override = @config.dup
28
+ override['html_pipeline']['filters'] << 'AutolinkFilter'
29
+ markdown = Jekyll::Converters::Markdown.new override
30
+ assert_raises(LoadError) { markdown.convert('http://www.github.com') }
31
+ end
33
32
 
34
- should "fail when a context dependency is not met" do
35
- override = @config.dup
36
- override['html_pipeline'].delete 'context'
37
- markdown = Jekyll::Converters::Markdown.new override
38
- assert_raise(ArgumentError) { markdown.convert(':trollface:') }
39
- end
33
+ def test_fail_when_a_context_dependency_is_not_met
34
+ override = @config.dup
35
+ override['html_pipeline'].delete 'context'
36
+ markdown = Jekyll::Converters::Markdown.new override
37
+ assert_raises(ArgumentError) { markdown.convert(':trollface:') }
38
+ end
40
39
 
41
- should "work for custom filters" do
42
- require 'support/new_pipeline'
43
- override = @config.dup
44
- override['html_pipeline']['filters'] = ['HelpMarkdownFilter']
45
- markdown = Jekyll::Converters::Markdown.new override
46
- text = "\n {{#tip}}\n **Tip**: Wow! \n {{/tip}}"
47
- assert_equal "<div class=\"alert tip\"><br>\n <strong>Tip</strong>: Wow! <br>\n </div>", markdown.convert(text)
48
- end
40
+ def test_work_for_custom_filters
41
+ require 'support/new_pipeline'
42
+ override = @config.dup
43
+ override['html_pipeline']['filters'] = ['HelpMarkdownFilter']
44
+ markdown = Jekyll::Converters::Markdown.new override
45
+ text = "\n {{#tip}}\n **Tip**: Wow! \n {{/tip}}"
46
+ assert_equal "<div class=\"alert tip\"><br>\n <strong>Tip</strong>: Wow! <br>\n </div>", markdown.convert(text)
49
47
  end
50
48
  end
metadata CHANGED
@@ -1,141 +1,127 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-html-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-01 00:00:00.000000000 Z
11
+ date: 2014-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0.alpha.1
19
+ version: 2.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.0.alpha.1
26
+ version: 2.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: html-pipeline
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.4'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: shoulda
70
+ name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.5'
75
+ version: '5.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '3.5'
82
+ version: '5.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: github-markdown
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.6.3
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.6.3
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sanitize
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: 2.0.6
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 2.0.6
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: gemoji
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: 1.5.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: 1.5.0
125
- - !ruby/object:Gem::Dependency
126
- name: rouge
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - '>='
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - '>='
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
125
  description: 'This is a custom Markdown processor for Jekyll 2.0 and above. It allows
140
126
  you to use GitHub''s HTML::Pipeline in your Jekyll projects. '
141
127
  email:
@@ -144,16 +130,16 @@ executables: []
144
130
  extensions: []
145
131
  extra_rdoc_files: []
146
132
  files:
147
- - .gitignore
148
- - .travis.yml
133
+ - ".gitignore"
134
+ - ".travis.yml"
149
135
  - Gemfile
150
136
  - LICENSE.txt
151
137
  - README.md
152
138
  - Rakefile
153
139
  - jekyll-html-pipeline.gemspec
154
140
  - lib/jekyll-html-pipeline.rb
155
- - test/helper.rb
156
141
  - test/support/new_pipeline.rb
142
+ - test/test_helper.rb
157
143
  - test/test_jekyll_html_pipeline.rb
158
144
  homepage: ''
159
145
  licenses:
@@ -165,21 +151,21 @@ require_paths:
165
151
  - lib
166
152
  required_ruby_version: !ruby/object:Gem::Requirement
167
153
  requirements:
168
- - - '>='
154
+ - - ">="
169
155
  - !ruby/object:Gem::Version
170
156
  version: '0'
171
157
  required_rubygems_version: !ruby/object:Gem::Requirement
172
158
  requirements:
173
- - - '>='
159
+ - - ">="
174
160
  - !ruby/object:Gem::Version
175
161
  version: '0'
176
162
  requirements: []
177
163
  rubyforge_project:
178
- rubygems_version: 2.0.3
164
+ rubygems_version: 2.2.2
179
165
  signing_key:
180
166
  specification_version: 4
181
167
  summary: Use GitHub's HTML::Pipeline, in Jekyll!
182
168
  test_files:
183
- - test/helper.rb
184
169
  - test/support/new_pipeline.rb
170
+ - test/test_helper.rb
185
171
  - test/test_jekyll_html_pipeline.rb
@@ -1,48 +0,0 @@
1
- require "rubygems"
2
-
3
- require "jekyll"
4
- require "liquid"
5
-
6
- require 'test/unit'
7
- require 'shoulda'
8
-
9
- require "html/pipeline"
10
-
11
- require "jekyll-html-pipeline"
12
-
13
- # Send STDERR into the void to suppress program output messages
14
- # STDERR.reopen(test(?e, '/dev/null') ? '/dev/null' : 'NUL:')
15
-
16
- class Test::Unit::TestCase
17
- def dest_dir(*subdirs)
18
- test_dir('dest', *subdirs)
19
- end
20
-
21
- def source_dir(*subdirs)
22
- test_dir('source', *subdirs)
23
- end
24
-
25
- def clear_dest
26
- FileUtils.rm_rf(dest_dir)
27
- end
28
-
29
- def test_dir(*subdirs)
30
- File.join(File.dirname(__FILE__), *subdirs)
31
- end
32
-
33
- def directory_with_contents(path)
34
- FileUtils.rm_rf(path)
35
- FileUtils.mkdir(path)
36
- File.open("#{path}/index.html", "w"){ |f| f.write("I was previously generated.") }
37
- end
38
-
39
- def capture_stdout
40
- $old_stdout = $stdout
41
- $stdout = StringIO.new
42
- yield
43
- $stdout.rewind
44
- return $stdout.string
45
- ensure
46
- $stdout = $old_stdout
47
- end
48
- end