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 +4 -4
- data/.gitignore +3 -0
- data/CHANGELOG.md +3 -0
- data/lib/octopress-gist.rb +1 -1
- data/lib/octopress-gist/gist.rb +5 -5
- data/lib/octopress-gist/version.rb +1 -1
- data/octopress-gist.gemspec +1 -3
- metadata +5 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a1a5c9c562e46e66eb9b02a5b70a0bdf8279cb8
|
4
|
+
data.tar.gz: d252afa6512a481e828940e6b0a0915dae956d6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8c9cdef0fc885872a682308ceb876852e516a98c94d7ad6f3517bdb1847fc84e84820be7892e1351b9748c1d0f0f68382bf374b400d71dec83170a347b95f66
|
7
|
+
data.tar.gz: 3f487a5254db39ed6fba51b3e9cb793a9f6e361727dc932c4e496493ad31a605d1ff2921e1dc08e7af91150a78b0b06514ae12a89ee4df117d08241d7c77d651
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/octopress-gist.rb
CHANGED
data/lib/octopress-gist/gist.rb
CHANGED
@@ -10,7 +10,7 @@ module Octopress
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def render(context)
|
13
|
-
if
|
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 =
|
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 =
|
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
|
40
|
+
rescue => e
|
41
41
|
markup = "{% #{@tag_name} #{@markup.strip} %}"
|
42
|
-
|
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"
|
data/octopress-gist.gemspec
CHANGED
@@ -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-
|
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
|
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-
|
11
|
+
date: 2014-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: octopress-
|
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:
|
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:
|
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
|