octopress-codefence 1.2.1 → 1.3.0

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: 177fbacb4643dac300f9739610e7aa3b0ef2b956
4
- data.tar.gz: 656596fdd278e060540b3e51120a6e152fa070fb
3
+ metadata.gz: 92a0c66a42f5313ac495169bcb19f3d4b20c02fc
4
+ data.tar.gz: df488b17e56493c8709539809d9f16acb5a28bdb
5
5
  SHA512:
6
- metadata.gz: 43562433a67c20bf7653cc8440c6ae2f2770fd13400ea0ca57e64e2df5699fcc08116ef3c03b9f19a162b4c7ee660593ce9c2cfc7135cf74e4a3687b6ddbcaaf
7
- data.tar.gz: 813a54702f796455b8d5869f789008f92099d5e86541283475ad4a31113777255cb1e2efba0b6bec5abec7a598aa421225c4c3647bc6b0d9d781c7e011c1f473
6
+ metadata.gz: 1d9b31623122e4ad64e391d39cd25ada15e768945bca0e55e051a9fb91c8df92eed6b662fd88b0e9acc043a8b744f842429578ebbbe7406245e2658cab6f8e86
7
+ data.tar.gz: 9b93f32c2f015a5d446a44f6f249f3ec9df8e3129f811b6c819ee1fdfe76b72f798a77f0694294676cc516978db7ee8cdbe937c8db5b9d5b7ee38db50f6e69fb
data/.gitignore CHANGED
@@ -18,3 +18,4 @@ tmp
18
18
  .DS_Store
19
19
  .pygments-cache
20
20
  _site
21
+ .sass-cache
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.1
4
+ - Updated to Octopress pygments 2.0. Now stylesheets can be added using Octopress Ink.
5
+
3
6
  ## 1.2.1
4
7
  - Updated Octopress pygments, setting escape option to true.
5
8
 
data/README.md CHANGED
@@ -2,8 +2,7 @@
2
2
 
3
3
  Write beautiful fenced code snippets within any template.
4
4
 
5
- [![Build
6
- Status](https://travis-ci.org/octopress/octopress-codefence.png?branch=master)](https://travis-ci.org/octopress/octopress-codefence)
5
+ [![Build Status](https://travis-ci.org/octopress/octopress-codefence.png?branch=master)](https://travis-ci.org/octopress/octopress-codefence)
7
6
 
8
7
  ## Installation
9
8
 
@@ -21,7 +20,49 @@ Or install it yourself as:
21
20
 
22
21
  ## Usage
23
22
 
24
- TODO: Write usage instructions here
23
+ First, add the gem to your Jekyll configuration.
24
+
25
+ ```yaml
26
+ gems:
27
+ - octopress-codefence
28
+ ```
29
+
30
+ Next, add the Octopress stlyesheets tag to your site layout this will inject stylesheet tags for all Octopress Ink plugins.
31
+
32
+ ```html
33
+ <!--Somewhere in your site's head-->
34
+ {% octopress_css %}
35
+ ```
36
+
37
+ Finally, give it a try.
38
+
39
+ ```ruby mark:2-4 title:"Testing codefence" url:"https://github.com/octopress/codefence" link_text:"plugin link"
40
+ class Float
41
+ def number_decimal_places
42
+ self.to_s.length-2
43
+ end
44
+
45
+ def to_fraction
46
+ higher = 10**self.number_decimal_places
47
+ lower = self*higher
48
+
49
+ gcden = greatest_common_divisor(higher, lower)
50
+
51
+ return (lower/gcden).round, (higher/gcden).round
52
+ end
53
+
54
+ private
55
+
56
+ def greatest_common_divisor(a, b)
57
+ while a%b != 0
58
+ a,b = b.round,(a%b).round
59
+ end
60
+ return b
61
+ end
62
+ end
63
+ ```
64
+
65
+ More documentation coming soon.
25
66
 
26
67
  ## Contributing
27
68
 
@@ -30,3 +71,28 @@ TODO: Write usage instructions here
30
71
  3. Commit your changes (`git commit -am 'Add some feature'`)
31
72
  4. Push to the branch (`git push origin my-new-feature`)
32
73
  5. Create new Pull Request
74
+
75
+ ## License MIT
76
+
77
+ Copyright (c) 2013 Brandon Mathis
78
+
79
+ MIT License
80
+
81
+ Permission is hereby granted, free of charge, to any person obtaining
82
+ a copy of this software and associated documentation files (the
83
+ "Software"), to deal in the Software without restriction, including
84
+ without limitation the rights to use, copy, modify, merge, publish,
85
+ distribute, sublicense, and/or sell copies of the Software, and to
86
+ permit persons to whom the Software is furnished to do so, subject to
87
+ the following conditions:
88
+
89
+ The above copyright notice and this permission notice shall be
90
+ included in all copies or substantial portions of the Software.
91
+
92
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
93
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
94
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
95
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
96
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
97
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
98
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  class Codefence
3
- VERSION = "1.2.1"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
@@ -13,12 +13,9 @@ 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.3.1'
16
+ gem.add_runtime_dependency 'octopress-pygments', '>= 2.0.0'
17
17
  gem.add_runtime_dependency 'jekyll-page-hooks', '>= 1.0.2'
18
18
 
19
- gem.add_development_dependency 'rake'
20
- gem.add_development_dependency 'rspec'
21
-
22
19
  gem.files = `git ls-files`.split($/)
23
20
  gem.require_paths = ["lib"]
24
21
  end
data/test/Gemfile CHANGED
@@ -1,5 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'jekyll'
4
- gem 'jekyll-page-hooks'
5
3
  gem 'octopress-codefence', :path => '../'
data/test/_config.yml CHANGED
@@ -5,3 +5,6 @@ destination: site
5
5
  source: source
6
6
  pygments_aliases:
7
7
  abc: ruby
8
+
9
+ gems:
10
+ - octopress-codefence
data/test/expected.html CHANGED
@@ -6,12 +6,8 @@
6
6
  <title></title>
7
7
  <meta name="viewport" content="width=device-width">
8
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
9
 
10
+ <link href='/stylesheets/site-all-391da67140fc22971f84f9b7dbfbf124.css' media='all' rel='stylesheet' type='text/css'>
15
11
  </head>
16
12
  <body>
17
13
 
@@ -22,12 +18,23 @@
22
18
  <a class="extra" href="/">home</a>
23
19
  </div>
24
20
 
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>
21
+ <figure class='pygments-code-figure'><div class='pygments-code'><pre class='pygments-code-pre ruby'><div data-line='1' class='pygments-code-row numbered'><div class='pygments-code-line'><span class="nb">puts</span> <span class="vi">@awesome</span> <span class="k">if</span> <span class="kp">true</span>
22
+ </div></div></pre></div></figure>
23
+
24
+
25
+ <figure class='pygments-code-figure'><div class='pygments-code'><pre class='pygments-code-pre plain'><div data-line='1' class='pygments-code-row numbered'><div class='pygments-code-line'>{{>will it work}}
26
+ </div></div><div data-line='2' class='pygments-code-row numbered'><div class='pygments-code-line'>{% it should %}</div></div></pre></div></figure>
27
27
 
28
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>
29
+ <figure class='pygments-code-figure'><figcaption class='pygments-code-caption'><span class='pygments-code-caption-title'>testing tabs</span></figcaption><div class='pygments-code'><pre class='pygments-code-pre plain'><div data-line='1' class='pygments-code-row numbered'><div class='pygments-code-line'>testing
30
+ </div></div><div data-line='2' class='pygments-code-row numbered'><div class='pygments-code-line'> tabs
31
+ </div></div><div data-line='3' class='pygments-code-row numbered'><div class='pygments-code-line'> because
32
+ </div></div><div data-line='4' class='pygments-code-row numbered'><div class='pygments-code-line'> sometimes
33
+ </div></div><div data-line='5' class='pygments-code-row numbered'><div class='pygments-code-line'> you
34
+ </div></div><div data-line='6' class='pygments-code-row numbered'><div class='pygments-code-line'> need
35
+ </div></div><div data-line='7' class='pygments-code-row numbered'><div class='pygments-code-line'> tabs
36
+ </div></div><div data-line='8' class='pygments-code-row numbered'><div class='pygments-code-line'> for
37
+ </div></div><div data-line='9' class='pygments-code-row numbered'><div class='pygments-code-line'>things</div></div></pre></div></figure>
31
38
 
32
39
 
33
40
 
data/test/site/index.html CHANGED
@@ -6,12 +6,8 @@
6
6
  <title></title>
7
7
  <meta name="viewport" content="width=device-width">
8
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
9
 
10
+ <link href='/stylesheets/site-all-391da67140fc22971f84f9b7dbfbf124.css' media='all' rel='stylesheet' type='text/css'>
15
11
  </head>
16
12
  <body>
17
13
 
@@ -22,12 +18,23 @@
22
18
  <a class="extra" href="/">home</a>
23
19
  </div>
24
20
 
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>
21
+ <figure class='pygments-code-figure'><div class='pygments-code'><pre class='pygments-code-pre ruby'><div data-line='1' class='pygments-code-row numbered'><div class='pygments-code-line'><span class="nb">puts</span> <span class="vi">@awesome</span> <span class="k">if</span> <span class="kp">true</span>
22
+ </div></div></pre></div></figure>
23
+
24
+
25
+ <figure class='pygments-code-figure'><div class='pygments-code'><pre class='pygments-code-pre plain'><div data-line='1' class='pygments-code-row numbered'><div class='pygments-code-line'>{{>will it work}}
26
+ </div></div><div data-line='2' class='pygments-code-row numbered'><div class='pygments-code-line'>{% it should %}</div></div></pre></div></figure>
27
27
 
28
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>
29
+ <figure class='pygments-code-figure'><figcaption class='pygments-code-caption'><span class='pygments-code-caption-title'>testing tabs</span></figcaption><div class='pygments-code'><pre class='pygments-code-pre plain'><div data-line='1' class='pygments-code-row numbered'><div class='pygments-code-line'>testing
30
+ </div></div><div data-line='2' class='pygments-code-row numbered'><div class='pygments-code-line'> tabs
31
+ </div></div><div data-line='3' class='pygments-code-row numbered'><div class='pygments-code-line'> because
32
+ </div></div><div data-line='4' class='pygments-code-row numbered'><div class='pygments-code-line'> sometimes
33
+ </div></div><div data-line='5' class='pygments-code-row numbered'><div class='pygments-code-line'> you
34
+ </div></div><div data-line='6' class='pygments-code-row numbered'><div class='pygments-code-line'> need
35
+ </div></div><div data-line='7' class='pygments-code-row numbered'><div class='pygments-code-line'> tabs
36
+ </div></div><div data-line='8' class='pygments-code-row numbered'><div class='pygments-code-line'> for
37
+ </div></div><div data-line='9' class='pygments-code-row numbered'><div class='pygments-code-line'>things</div></div></pre></div></figure>
31
38
 
32
39
 
33
40
 
@@ -0,0 +1 @@
1
+ .pygments-code .gd:after,.pygments-code .gd .x:after,.pygments-code .gi:after,.pygments-code .gi .x:after{content:"";position:absolute;z-index:-1;left:0;right:0;top:0;bottom:0}.pygments-code{border:1px solid #e5e5e5;background:#fff;color:#586e75}.pygments-code span{color:#586e75}.pygments-code span{font-style:normal;font-weight:normal}.pygments-code .c{color:#93a1a1;font-style:italic}.pygments-code .cm{color:#93a1a1;font-style:italic}.pygments-code .cp{color:#93a1a1;font-style:italic}.pygments-code .c1{color:#93a1a1;font-style:italic}.pygments-code .cs{color:#93a1a1;font-weight:bold;font-style:italic}.pygments-code .err{color:#dc322f;background:none}.pygments-code .k{color:#cb4b16}.pygments-code .o{color:#586e75;font-weight:bold}.pygments-code .p{color:#586e75}.pygments-code .ow{color:#2aa198;font-weight:bold}.pygments-code .gd{color:#586e75}.pygments-code .gd:after{background:#f6cbcb}.pygments-code .gd .x{color:#586e75}.pygments-code .gd .x:after{background:#f2b7b6}.pygments-code .ge{color:#586e75;font-style:italic}.pygments-code .gh{color:#93a1a1}.pygments-code .gi{color:#586e75}.pygments-code .gi:after{background:#e6eacc}.pygments-code .gi .x{color:#586e75}.pygments-code .gi .x:after{background:#ced699}.pygments-code .gs{color:#586e75;font-weight:bold}.pygments-code .gu{color:#6c71c4}.pygments-code .kc{color:#859900;font-weight:bold}.pygments-code .kd{color:#268bd2}.pygments-code .kp{color:#cb4b16;font-weight:bold}.pygments-code .kr{color:#d33682;font-weight:bold}.pygments-code .kt{color:#2aa198}.pygments-code .n{color:#268bd2}.pygments-code .na{color:#268bd2}.pygments-code .nb{color:#859900}.pygments-code .nc{color:#d33682}.pygments-code .no{color:#b58900}.pygments-code .nl{color:#859900}.pygments-code .ne{color:#268bd2;font-weight:bold}.pygments-code .nf{color:#268bd2;font-weight:bold}.pygments-code .nn{color:#b58900}.pygments-code .nt{color:#268bd2;font-weight:bold}.pygments-code .nx{color:#b58900}.pygments-code .vg{color:#268bd2}.pygments-code .vi{color:#268bd2}.pygments-code .nv{color:#268bd2}.pygments-code .mf{color:#2aa198}.pygments-code .m{color:#2aa198}.pygments-code .mh{color:#2aa198}.pygments-code .mi{color:#2aa198}.pygments-code .s{color:#2aa198}.pygments-code .sd{color:#2aa198}.pygments-code .s2{color:#2aa198}.pygments-code .se{color:#dc322f}.pygments-code .si{color:#268bd2}.pygments-code .sr{color:#2aa198}.pygments-code .s1{color:#2aa198}.pygments-code-figure{font-size:13px}.pygments-code-figure *{box-sizing:border-box}.pygments-code-pre{background:#fcfcfc;width:100%;margin-bottom:0;display:table}.pygments-code-row{display:table-row;width:100%}.pygments-code-row:before,.pygments-code-row .pygments-code-line{padding-left:1.6em;padding-right:1.6em}.pygments-code-row:first-child:before,.pygments-code-row:first-child .pygments-code-line{padding-top:0.8em}.pygments-code-row:last-child:before,.pygments-code-row:last-child .pygments-code-line{padding-bottom:0.8em}.pygments-code-row.numbered:before,.pygments-code-row.numbered .pygments-code-line{padding-left:0.8em;padding-right:0.8em}.pygments-code-row.numbered:before{display:table-cell;content:attr(data-line);min-width:1.2em;color:#93a1a1;text-align:right;line-height:1.45em;background:#fff;border-right:1px solid #ededed;text-shadow:#f7f7f7 0 -1px}.pygments-code-line{display:table-cell;width:100%;position:relative;z-index:1}.marked-line{position:relative}.marked-line .pygments-code-line:before{content:"";position:absolute;background:rgba(0,186,255,0.05);left:0;top:0;bottom:0;right:0;border-right:1px solid rgba(0,186,255,0.13)}.marked-line.unnumbered .pygments-code-line:before{border-left:3px solid rgba(0,186,255,0.5)}.marked-line.numbered:before{background:rgba(0,186,255,0.05);border-left:3px solid rgba(0,186,255,0.5);border-right-color:rgba(0,112,153,0.05)}.start-marked-line:before,.start-marked-line .pygments-code-line:before{border-top:1px solid rgba(0,186,255,0.13)}.end-marked-line:before,.end-marked-line .pygments-code-line:before{border-bottom:1px solid rgba(0,186,255,0.13)}.pygments-code{overflow:scroll;overflow-y:hidden;overflow-x:auto;line-height:1.45em}.pygments-code-table{margin-bottom:0;background:#fff}.pygments-code-table pre{padding:.8em;background:none;border-radius:0;border:none;margin-bottom:0}.pygments-code-figure{margin-left:0;margin-right:0;background:none;padding:0;border:0}.pygments-code-figure pre{margin-bottom:0}.pygments-code-caption{position:relative;text-align:center;line-height:2em;text-shadow:#fff 0 1px 0;color:#474747;font-weight:normal;margin-bottom:0;background-color:#ccc;background-image:linear-gradient(#fff, #f0f0f0 6%, #e5e5e5 90%, #e5e5e5);border-top-left-radius:5px;border-top-right-radius:5px;font-family:"Helvetica Neue", Arial, "Lucida Grande", "Lucida Sans Unicode", Lucida, sans-serif;border:1px solid #cbcbcb}.pygments-code-caption+.pygments-code{border-top:0}.pygments-code-caption-link{position:absolute;right:.8em;color:#666;z-index:1;text-shadow:#cbcccc 0 1px 0;padding-left:3em}pre{margin-top:0;font-size:13px;font-family:Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace}
@@ -6,12 +6,8 @@
6
6
  <title>{{ page.title }}</title>
7
7
  <meta name="viewport" content="width=device-width">
8
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
9
 
10
+ {% octopress_css %}
15
11
  </head>
16
12
  <body>
17
13
 
@@ -10,3 +10,15 @@ puts @awesome if true
10
10
  {{>will it work}}
11
11
  {% it should %}
12
12
  ```
13
+
14
+ ``` plain testing tabs
15
+ testing
16
+ tabs
17
+ because
18
+ sometimes
19
+ you
20
+ need
21
+ tabs
22
+ for
23
+ things
24
+ ```
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-codefence
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.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-11-17 00:00:00.000000000 Z
11
+ date: 2014-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octopress-pygments
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3.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: 1.3.1
26
+ version: 2.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jekyll-page-hooks
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,34 +38,6 @@ dependencies:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.0.2
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rspec
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - '>='
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
41
  description: Write beautiful fenced code snippets with in any template.
70
42
  email:
71
43
  - brandon@imathis.com
@@ -84,15 +56,13 @@ files:
84
56
  - lib/octopress-codefence.rb
85
57
  - lib/octopress-codefence/version.rb
86
58
  - octopress-codefence.gemspec
87
- - spec/octopress-codefence_spec.rb
88
- - spec/spec_helper.rb
89
59
  - test/Gemfile
90
60
  - test/_config.yml
91
61
  - test/expected.html
92
62
  - test/site/index.html
63
+ - test/site/stylesheets/site-all-391da67140fc22971f84f9b7dbfbf124.css
93
64
  - test/source/.gitignore
94
65
  - test/source/_layouts/default.html
95
- - test/source/_plugins/codefence.rb
96
66
  - test/source/index.html
97
67
  - test/test.rb
98
68
  homepage: https://github.com/octopress/octopress-codefence
@@ -115,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
85
  version: '0'
116
86
  requirements: []
117
87
  rubyforge_project:
118
- rubygems_version: 2.0.3
88
+ rubygems_version: 2.1.11
119
89
  signing_key:
120
90
  specification_version: 4
121
91
  summary: Write beautiful fenced code snippets with in any template.
@@ -1,30 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Octopress::Codefence do
4
- let(:render) { Proc.new { |str| Octopress::Codefence.new(str).render } }
5
- context "when converting a code block with surrounding text" do
6
- let(:content) do
7
- str = <<-EOF
8
-
9
- whatever
10
-
11
- ``` ruby
12
- puts awesome unless lame
13
- ```
14
-
15
- something
16
-
17
- EOF
18
- end
19
-
20
- it "converts the code fence" do
21
- expect(render.call(content)).to include("<figure class='code'><div class='highlight'><table><tr><td class='line-numbers' aria-hidden='true'><pre><div data-line='0' class='line-number'></div></pre></td><td class='main plain'><pre><div class='line'>puts awesome unless lame</div></pre></td></tr></table></div></figure>")
22
- end
23
-
24
- it "doesn't touch the other text" do
25
- expect(render.call(content)).to include("\nwhatever\n\n")
26
- expect(render.call(content)).to include("\n\n\nsomething\n\n")
27
- end
28
- end
29
-
30
- end
data/spec/spec_helper.rb DELETED
@@ -1,13 +0,0 @@
1
- require File.expand_path("../../lib/octopress-codefence.rb", __FILE__)
2
-
3
- RSpec.configure do |config|
4
- config.treat_symbols_as_metadata_keys_with_true_values = true
5
- config.run_all_when_everything_filtered = true
6
- config.filter_run :focus
7
-
8
- # Run specs in random order to surface order dependencies. If you find an
9
- # order dependency and want to debug it, you can fix the order by providing
10
- # the seed, which is printed after each run.
11
- # --seed 1234
12
- config.order = 'random'
13
- end
@@ -1 +0,0 @@
1
- require 'octopress-codefence'