octopress-codefence 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NDkzMjYyY2VkNmFiZTdkNGE0NmViYjE0ZGQ4ODE0ZDA0NmM2MDkwZA==
5
- data.tar.gz: !binary |-
6
- ZWQ2ZjgxOWJiNDljZWI3Zjg1NDg3MTQ4NDk3MmJjMjI5MWQyNzM2NA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- YmU2N2I5YTY5NTM2MTE5OTE1OThiOGViODFkMjljODgwZDdkNmZmNjAzOGI1
10
- ZDcwMTNmNmMxYzg3YjdhMGNmMWVlM2VhZmYyZTcwMGJhODI2OGNkNGY0NDNi
11
- NmY3NzQ1ZWUyYWJjYzg1MTc0NDZhYzJhNjJmODE2ZjU0NzI5Mjg=
12
- data.tar.gz: !binary |-
13
- MjE2NTAyZDE0ZDU3NmU5NjU0OTYzODhjN2YxOGIyZTg5NDk5YzVhMzA5MDQy
14
- YmVlZTdmMDRjNmEwOTI1YTFkNTZlNjFhOGM3NGQxOGYxMTAyYjAwYzRhYWQ5
15
- YTUxMGQ2MGZkMWE4YzZkOTJjYWQ3YjIyMWMwMmRiNTQ3MmI5YWI=
2
+ SHA1:
3
+ metadata.gz: 1e05864f86df9461d95cfef9504fea0d869124af
4
+ data.tar.gz: 0a9048acde5052dd04e71a2146801a85f71ce3b7
5
+ SHA512:
6
+ metadata.gz: deb2f127082e8b0bc2e31c526ce6231a6549174c50bfd20d4dde665f58d09dc9c72edec441c091b87daa8090fab303bd138513fbf94a487d05e98ffc2b8716f7
7
+ data.tar.gz: 4f37d81554a57afeae1d20b3d591617c23c8c12b781a52489f34a38bf2118b84d9869b5f9082eac8e0d6792d6fe63b3ffbf17198f2a71792888f67001eda6fc7
@@ -2,3 +2,4 @@ language: ruby
2
2
  rvm:
3
3
  - 2.0.0
4
4
  - 1.9.3
5
+ script: cd test && ruby test.rb
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.0
4
+ - Updated Octopress pygments, adding default Liquid escape.
5
+
3
6
  ## 1.1.0
4
7
  - Added support for language aliases in Jekyll config
5
8
 
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  class Codefence
3
- VERSION = "1.1.0"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.homepage = "https://github.com/octopress/octopress-codefence"
14
14
  gem.license = "MIT"
15
15
 
16
- gem.add_runtime_dependency 'octopress-pygments', '>= 1.2.1'
16
+ gem.add_runtime_dependency 'octopress-pygments', '>= 1.3.0'
17
17
  gem.add_runtime_dependency 'jekyll-page-hooks', '>= 1.0.2'
18
18
 
19
19
  gem.add_development_dependency 'rake'
@@ -1,5 +1,7 @@
1
1
  name: Your New Jekyll Site
2
2
  markdown: redcarpet
3
3
  pygments: true
4
+ destination: site
5
+ source: source
4
6
  pygments_aliases:
5
7
  abc: ruby
@@ -0,0 +1,53 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6
+ <title></title>
7
+ <meta name="viewport" content="width=device-width">
8
+
9
+ <!-- syntax highlighting CSS -->
10
+ <link rel="stylesheet" href="/css/syntax.css">
11
+
12
+ <!-- Custom CSS -->
13
+ <link rel="stylesheet" href="/css/main.css">
14
+
15
+ </head>
16
+ <body>
17
+
18
+ <div class="container">
19
+ <div class="site">
20
+ <div class="header">
21
+ <h1 class="title"><a href="/">Your New Jekyll Site</a></h1>
22
+ <a class="extra" href="/">home</a>
23
+ </div>
24
+
25
+ <figure class='code'><div class='highlight'><table><tr><td class='line-numbers' aria-hidden='true'><pre><div data-line='1' class='line-number'></div></pre></td><td class='main ruby'><pre><div class='line'><span class="nb">puts</span> <span class="vi">@awesome</span> <span class="k">if</span> <span class="kp">true</span>
26
+ </div></pre></td></tr></table></div></figure>
27
+
28
+
29
+ <figure class='code'><div class='highlight'><table><tr><td class='line-numbers' aria-hidden='true'><pre><div data-line='1' class='line-number'></div><div data-line='2' class='line-number'></div></pre></td><td class='main plain'><pre><div class='line'>{{>will it work}}
30
+ </div><div class='line'>{% it should %}</div></pre></td></tr></table></div></figure>
31
+
32
+
33
+
34
+ <div class="footer">
35
+ <div class="contact">
36
+ <p>
37
+ Your Name<br />
38
+ What You Are<br />
39
+ your@email.com
40
+ </p>
41
+ </div>
42
+ <div class="contact">
43
+ <p>
44
+ <a href="http://github.com/yourusername/">github.com/yourusername</a><br />
45
+ <a href="http://twitter.com/yourusername/">twitter.com/yourusername</a><br />
46
+ </p>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div> <!-- /container -->
51
+
52
+ </body>
53
+ </html>
@@ -0,0 +1,53 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6
+ <title></title>
7
+ <meta name="viewport" content="width=device-width">
8
+
9
+ <!-- syntax highlighting CSS -->
10
+ <link rel="stylesheet" href="/css/syntax.css">
11
+
12
+ <!-- Custom CSS -->
13
+ <link rel="stylesheet" href="/css/main.css">
14
+
15
+ </head>
16
+ <body>
17
+
18
+ <div class="container">
19
+ <div class="site">
20
+ <div class="header">
21
+ <h1 class="title"><a href="/">Your New Jekyll Site</a></h1>
22
+ <a class="extra" href="/">home</a>
23
+ </div>
24
+
25
+ <figure class='code'><div class='highlight'><table><tr><td class='line-numbers' aria-hidden='true'><pre><div data-line='1' class='line-number'></div></pre></td><td class='main ruby'><pre><div class='line'><span class="nb">puts</span> <span class="vi">@awesome</span> <span class="k">if</span> <span class="kp">true</span>
26
+ </div></pre></td></tr></table></div></figure>
27
+
28
+
29
+ <figure class='code'><div class='highlight'><table><tr><td class='line-numbers' aria-hidden='true'><pre><div data-line='1' class='line-number'></div><div data-line='2' class='line-number'></div></pre></td><td class='main plain'><pre><div class='line'>{{>will it work}}
30
+ </div><div class='line'>{% it should %}</div></pre></td></tr></table></div></figure>
31
+
32
+
33
+
34
+ <div class="footer">
35
+ <div class="contact">
36
+ <p>
37
+ Your Name<br />
38
+ What You Are<br />
39
+ your@email.com
40
+ </p>
41
+ </div>
42
+ <div class="contact">
43
+ <p>
44
+ <a href="http://github.com/yourusername/">github.com/yourusername</a><br />
45
+ <a href="http://twitter.com/yourusername/">twitter.com/yourusername</a><br />
46
+ </p>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div> <!-- /container -->
51
+
52
+ </body>
53
+ </html>
File without changes
@@ -5,3 +5,8 @@ layout: default
5
5
  ``` ruby
6
6
  puts @awesome if true
7
7
  ```
8
+
9
+ ```
10
+ {{>will it work}}
11
+ {% it should %}
12
+ ```
@@ -1,15 +1,13 @@
1
- require 'octopress-codefence'
1
+ require 'colorator'
2
2
 
3
- str = <<-EOF
3
+ `bundle exec jekyll build --trace`
4
4
 
5
- whatver
5
+ diff = `diff expected.html site/index.html`
6
6
 
7
- ``` ruby
8
- puts awesome unless lame
9
- ```
10
-
11
- something
12
-
13
- EOF
14
-
15
- puts Octopress::Codefence.new(str).render
7
+ if diff.size == 0
8
+ puts "passed".green
9
+ else
10
+ puts "failed".red
11
+ puts diff
12
+ abort
13
+ end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-codefence
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-11 00:00:00.000000000 Z
11
+ date: 2013-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octopress-pygments
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.1
19
+ version: 1.3.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: 1.2.1
26
+ version: 1.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jekyll-page-hooks
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.0.2
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.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
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: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
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
  description: Write beautiful fenced code snippets with in any template.
@@ -86,14 +86,14 @@ files:
86
86
  - octopress-codefence.gemspec
87
87
  - spec/octopress-codefence_spec.rb
88
88
  - spec/spec_helper.rb
89
- - test/.gitignore
90
89
  - test/Gemfile
91
90
  - test/_config.yml
92
- - test/_layouts/default.html
93
- - test/_plugins/codefence.rb
94
- - test/css/main.css
95
- - test/css/syntax.css
96
- - test/index.html
91
+ - test/expected.html
92
+ - test/site/index.html
93
+ - test/source/.gitignore
94
+ - test/source/_layouts/default.html
95
+ - test/source/_plugins/codefence.rb
96
+ - test/source/index.html
97
97
  - test/test.rb
98
98
  homepage: https://github.com/octopress/octopress-codefence
99
99
  licenses:
@@ -105,17 +105,17 @@ require_paths:
105
105
  - lib
106
106
  required_ruby_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ! '>='
108
+ - - '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - ! '>='
113
+ - - '>='
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
117
  rubyforge_project:
118
- rubygems_version: 2.0.7
118
+ rubygems_version: 2.0.3
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: Write beautiful fenced code snippets with in any template.
@@ -1,160 +0,0 @@
1
- /*****************************************************************************/
2
- /*
3
- /* Common
4
- /*
5
- /*****************************************************************************/
6
-
7
- /* Global Reset */
8
- * {
9
- margin: 0;
10
- padding: 0;
11
- }
12
-
13
- html, body { height: 100%; }
14
-
15
- body {
16
- background-color: #FFF;
17
- font: 13.34px Helvetica, Arial, sans-serif;
18
- font-size: small;
19
- text-align: center;
20
- }
21
-
22
- h1, h2, h3, h4, h5, h6 {
23
- font-size: 100%; }
24
-
25
- h1 { margin-bottom: 1em; }
26
- p { margin: 1em 0; }
27
-
28
- a { color: #00a; }
29
- a:hover { color: #000; }
30
- a:visited { color: #a0a; }
31
-
32
- /*****************************************************************************/
33
- /*
34
- /* Home
35
- /*
36
- /*****************************************************************************/
37
- ul.posts {
38
- list-style-type: none;
39
- margin-bottom: 2em;
40
- }
41
-
42
- ul.posts li {
43
- line-height: 1.75em;
44
- }
45
-
46
- ul.posts span {
47
- color: #aaa;
48
- font-family: Monaco, "Courier New", monospace;
49
- font-size: 80%;
50
- }
51
-
52
- /*****************************************************************************/
53
- /*
54
- /* Site
55
- /*
56
- /*****************************************************************************/
57
-
58
- .site {
59
- font-size: 115%;
60
- text-align: justify;
61
- width: 42em;
62
- margin: 3em auto 2em;
63
- line-height: 1.5em;
64
- }
65
-
66
- .site .header a {
67
- font-weight: bold;
68
- text-decoration: none;
69
- }
70
-
71
- .site .header h1.title {
72
- display: inline-block;
73
- margin-bottom: 2em;
74
- }
75
-
76
- .site .header h1.title a {
77
- color: #a00;
78
- }
79
-
80
- .site .header h1.title a:hover {
81
- color: #000;
82
- }
83
-
84
- .site .header a.extra {
85
- color: #aaa;
86
- margin-left: 1em;
87
- }
88
-
89
- .site .header a.extra:hover {
90
- color: #000;
91
- }
92
-
93
- .site .meta {
94
- color: #aaa;
95
- }
96
-
97
- .site .footer {
98
- font-size: 80%;
99
- color: #666;
100
- border-top: 4px solid #eee;
101
- margin-top: 2em;
102
- overflow: hidden;
103
- }
104
-
105
- .site .footer .contact {
106
- float: left;
107
- margin-right: 3em;
108
- }
109
-
110
- .site .footer .contact a {
111
- color: #8085C1;
112
- }
113
-
114
- .site .footer .rss {
115
- margin-top: 1.1em;
116
- margin-right: -.2em;
117
- float: right;
118
- }
119
-
120
- .site .footer .rss img {
121
- border: 0;
122
- }
123
-
124
- /*****************************************************************************/
125
- /*
126
- /* Posts
127
- /*
128
- /*****************************************************************************/
129
-
130
- /* standard */
131
- .post pre {
132
- border: 1px solid #ddd;
133
- background-color: #eef;
134
- padding: 0 .4em;
135
- }
136
-
137
- .post ul, .post ol {
138
- margin-left: 1.35em;
139
- }
140
-
141
- .post code {
142
- border: 1px solid #ddd;
143
- background-color: #eef;
144
- padding: 0 .2em;
145
- }
146
-
147
- .post pre code {
148
- border: none;
149
- }
150
-
151
- /* terminal */
152
- .post pre.terminal {
153
- border: 1px solid #000;
154
- background-color: #333;
155
- color: #FFF;
156
- }
157
-
158
- .post pre.terminal code {
159
- background-color: #333;
160
- }
@@ -1,60 +0,0 @@
1
- .highlight { background: #ffffff; }
2
- .highlight .c { color: #999988; font-style: italic } /* Comment */
3
- .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
4
- .highlight .k { font-weight: bold } /* Keyword */
5
- .highlight .o { font-weight: bold } /* Operator */
6
- .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
7
- .highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
8
- .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
9
- .highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
10
- .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
11
- .highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
12
- .highlight .ge { font-style: italic } /* Generic.Emph */
13
- .highlight .gr { color: #aa0000 } /* Generic.Error */
14
- .highlight .gh { color: #999999 } /* Generic.Heading */
15
- .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
16
- .highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
17
- .highlight .go { color: #888888 } /* Generic.Output */
18
- .highlight .gp { color: #555555 } /* Generic.Prompt */
19
- .highlight .gs { font-weight: bold } /* Generic.Strong */
20
- .highlight .gu { color: #aaaaaa } /* Generic.Subheading */
21
- .highlight .gt { color: #aa0000 } /* Generic.Traceback */
22
- .highlight .kc { font-weight: bold } /* Keyword.Constant */
23
- .highlight .kd { font-weight: bold } /* Keyword.Declaration */
24
- .highlight .kp { font-weight: bold } /* Keyword.Pseudo */
25
- .highlight .kr { font-weight: bold } /* Keyword.Reserved */
26
- .highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
27
- .highlight .m { color: #009999 } /* Literal.Number */
28
- .highlight .s { color: #d14 } /* Literal.String */
29
- .highlight .na { color: #008080 } /* Name.Attribute */
30
- .highlight .nb { color: #0086B3 } /* Name.Builtin */
31
- .highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
32
- .highlight .no { color: #008080 } /* Name.Constant */
33
- .highlight .ni { color: #800080 } /* Name.Entity */
34
- .highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
35
- .highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
36
- .highlight .nn { color: #555555 } /* Name.Namespace */
37
- .highlight .nt { color: #000080 } /* Name.Tag */
38
- .highlight .nv { color: #008080 } /* Name.Variable */
39
- .highlight .ow { font-weight: bold } /* Operator.Word */
40
- .highlight .w { color: #bbbbbb } /* Text.Whitespace */
41
- .highlight .mf { color: #009999 } /* Literal.Number.Float */
42
- .highlight .mh { color: #009999 } /* Literal.Number.Hex */
43
- .highlight .mi { color: #009999 } /* Literal.Number.Integer */
44
- .highlight .mo { color: #009999 } /* Literal.Number.Oct */
45
- .highlight .sb { color: #d14 } /* Literal.String.Backtick */
46
- .highlight .sc { color: #d14 } /* Literal.String.Char */
47
- .highlight .sd { color: #d14 } /* Literal.String.Doc */
48
- .highlight .s2 { color: #d14 } /* Literal.String.Double */
49
- .highlight .se { color: #d14 } /* Literal.String.Escape */
50
- .highlight .sh { color: #d14 } /* Literal.String.Heredoc */
51
- .highlight .si { color: #d14 } /* Literal.String.Interpol */
52
- .highlight .sx { color: #d14 } /* Literal.String.Other */
53
- .highlight .sr { color: #009926 } /* Literal.String.Regex */
54
- .highlight .s1 { color: #d14 } /* Literal.String.Single */
55
- .highlight .ss { color: #990073 } /* Literal.String.Symbol */
56
- .highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
57
- .highlight .vc { color: #008080 } /* Name.Variable.Class */
58
- .highlight .vg { color: #008080 } /* Name.Variable.Global */
59
- .highlight .vi { color: #008080 } /* Name.Variable.Instance */
60
- .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */