octopress-gist 1.0.2 → 1.1.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: 9e9a8c29068b389c6585948d1f5e8222999af8dc
4
- data.tar.gz: 31bd291c115639164cd0fc4a87e4dd7f71484d5a
3
+ metadata.gz: 2a1a5c9c562e46e66eb9b02a5b70a0bdf8279cb8
4
+ data.tar.gz: d252afa6512a481e828940e6b0a0915dae956d6e
5
5
  SHA512:
6
- metadata.gz: 5f264eb8387f2d4c6c22997868c651c6fd1132c7e19ca80225a07e66eaba26c5e864305c6ddf2276f774c4767cecd921a0a8b349e1bc670c3db15692bf745619
7
- data.tar.gz: 1b0e9435c8cba851b92559221a5e647b6ea562e007e61e7cb18de822ab9fcadfd1a335f9ab98110997117e61153551f0964ba5ccbdf4f840624afc1832881bb5
6
+ metadata.gz: a8c9cdef0fc885872a682308ceb876852e516a98c94d7ad6f3517bdb1847fc84e84820be7892e1351b9748c1d0f0f68382bf374b400d71dec83170a347b95f66
7
+ data.tar.gz: 3f487a5254db39ed6fba51b3e9cb793a9f6e361727dc932c4e496493ad31a605d1ff2921e1dc08e7af91150a78b0b06514ae12a89ee4df117d08241d7c77d651
data/.gitignore CHANGED
@@ -19,3 +19,6 @@ tmp
19
19
  .pygments-cache
20
20
  _site
21
21
  .gist-cache
22
+ .code-highlighter-cache
23
+ .sass-cache
24
+ site
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.0
4
+ - Switched to the new octopress-code-highlighter gem.
5
+
3
6
  ## 1.0.2
4
7
  - Updated to latest Octopress pygments.
5
8
  - Now using Octopress Ink.
@@ -1,5 +1,5 @@
1
1
  require 'liquid'
2
- require 'octopress-pygments'
2
+ require 'octopress-code-highlighter'
3
3
  require 'open-uri'
4
4
  require 'json'
5
5
 
@@ -10,7 +10,7 @@ module Octopress
10
10
  end
11
11
 
12
12
  def render(context)
13
- if Pygments.clean_markup(@markup) =~ /([\S]*)\s*(\S*)/
13
+ if CodeHighlighter.clean_markup(@markup) =~ /([\S]*)\s*(\S*)/
14
14
  gist_id, filename = $1.strip, $2.strip
15
15
  filename = $2.strip == "" ? nil : $2.strip
16
16
  options = {
@@ -18,7 +18,7 @@ module Octopress
18
18
  cache: !@cache_disabled,
19
19
  escape: false
20
20
  }
21
- options = Pygments.parse_markup(@markup, options)
21
+ options = CodeHighlighter.parse_markup(@markup, options)
22
22
 
23
23
  if @cache_disabled or ! gist = Cache.read_cache(options)
24
24
  gist = download_gist(options)
@@ -34,12 +34,12 @@ module Octopress
34
34
  lang: file['language'].downcase
35
35
  }.merge(options)
36
36
  begin
37
- code = Pygments.highlight(file['content'], opt)
37
+ code = CodeHighlighter.highlight(file['content'], opt)
38
38
  code = "<notextile>#{code}</notextile>" if context.registers[:page]['path'].match(/textile/)
39
39
  output << code
40
- rescue MentosError => e
40
+ rescue => e
41
41
  markup = "{% #{@tag_name} #{@markup.strip} %}"
42
- Pygments.highlight_failed(e, "{% #{@tag_name} [gist_id] [file_name] [options...] %}", markup, file['content'])
42
+ CodeHighlighter.highlight_failed(e, "{% #{@tag_name} [gist_id] [file_name] [options...] %}", markup, file['content'])
43
43
  end
44
44
  end
45
45
  output.join "\n"
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Gist
3
- VERSION = "1.0.2"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -13,9 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.homepage = "https://github.com/octopress/octopress-gist"
14
14
  gem.license = "MIT"
15
15
 
16
- gem.add_runtime_dependency 'octopress-pygments', '~> 2.0.1'
17
- gem.add_runtime_dependency 'liquid', '~> 2.5.0'
18
- gem.add_runtime_dependency 'json'
16
+ gem.add_runtime_dependency 'octopress-code-highlighter', '~> 3.0.1'
19
17
 
20
18
  gem.add_development_dependency 'rake'
21
19
  gem.add_development_dependency 'rspec'
metadata CHANGED
@@ -1,57 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-gist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.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: 2014-01-19 00:00:00.000000000 Z
11
+ date: 2014-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: octopress-pygments
14
+ name: octopress-code-highlighter
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.1
19
+ version: 3.0.1
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.1
27
- - !ruby/object:Gem::Dependency
28
- name: liquid
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ~>
32
- - !ruby/object:Gem::Version
33
- version: 2.5.0
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ~>
39
- - !ruby/object:Gem::Version
40
- version: 2.5.0
41
- - !ruby/object:Gem::Dependency
42
- name: json
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
26
+ version: 3.0.1
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: rake
57
29
  requirement: !ruby/object:Gem::Requirement