haml-coderay 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -4
- data/VERSION +1 -1
- data/lib/haml-coderay.rb +8 -9
- metadata +59 -31
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
haml-coderay
|
2
2
|
============
|
3
3
|
|
4
|
+
[![Build Status](https://travis-ci.org/blom/haml-coderay.png)](https://travis-ci.org/blom/haml-coderay)
|
5
|
+
|
4
6
|
* [Homepage](https://github.com/blom/haml-coderay)
|
5
|
-
* [Documentation](http://
|
7
|
+
* [Documentation](http://rubydoc.info/gems/haml-coderay)
|
6
8
|
|
7
9
|
[CodeRay][1] filter for [Haml][2]. Specify which [language][3] to highlight
|
8
10
|
with a shebang followed by the language name:
|
@@ -28,6 +30,6 @@ Installation
|
|
28
30
|
gem install haml-coderay
|
29
31
|
|
30
32
|
[1]: http://coderay.rubychan.de/
|
31
|
-
[2]: http://haml
|
32
|
-
[3]: http://
|
33
|
-
[4]: http://
|
33
|
+
[2]: http://haml.info/
|
34
|
+
[3]: http://rubydoc.info/gems/coderay/CodeRay/Scanners
|
35
|
+
[4]: http://rubydoc.info/gems/coderay/CodeRay/Encoders
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/lib/haml-coderay.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require "coderay"
|
1
2
|
require "haml"
|
2
3
|
|
3
4
|
# CodeRay filter for Haml. Specify which language to highlight with a shebang
|
@@ -13,25 +14,24 @@ require "haml"
|
|
13
14
|
# end
|
14
15
|
#
|
15
16
|
# @see Haml::Filters::CodeRay_raw
|
16
|
-
# @see http://
|
17
|
-
# @see http://
|
17
|
+
# @see http://rubydoc.info/gems/haml/Haml/Filters
|
18
|
+
# @see http://rubydoc.info/gems/coderay/CodeRay/Scanners
|
18
19
|
module Haml::Filters::CodeRay
|
19
20
|
include Haml::Filters::Base
|
20
|
-
lazy_require "coderay"
|
21
21
|
|
22
22
|
ENCODER = :div
|
23
23
|
ENCODER_OPTIONS = {}
|
24
24
|
VERSION = File.read(File.expand_path("../../VERSION", __FILE__)).chomp
|
25
25
|
|
26
|
-
# Encoder (_default_:
|
26
|
+
# Encoder (_default_: {ENCODER}).
|
27
27
|
#
|
28
|
-
# @see http://
|
28
|
+
# @see http://rubydoc.info/gems/coderay/CodeRay/Encoders
|
29
29
|
attr_accessor :encoder
|
30
30
|
self.encoder ||= ENCODER
|
31
31
|
|
32
|
-
# Encoder options (_default_:
|
32
|
+
# Encoder options (_default_: {ENCODER_OPTIONS}).
|
33
33
|
#
|
34
|
-
# @see http://
|
34
|
+
# @see http://rubydoc.info/gems/coderay/CodeRay/Encoders
|
35
35
|
attr_accessor :encoder_options
|
36
36
|
self.encoder_options ||= ENCODER_OPTIONS
|
37
37
|
|
@@ -46,7 +46,7 @@ module Haml::Filters::CodeRay
|
|
46
46
|
# @param [String] text text to render
|
47
47
|
# @return [String] rendered text
|
48
48
|
#
|
49
|
-
# @see http://
|
49
|
+
# @see http://rubydoc.info/gems/coderay/CodeRay.scan
|
50
50
|
def render(text)
|
51
51
|
::CodeRay.scan(*prepare(text)).send(encoder, encoder_options)
|
52
52
|
end
|
@@ -66,7 +66,6 @@ end
|
|
66
66
|
# @see Haml::Filters::CodeRay
|
67
67
|
module Haml::Filters::CodeRay_raw
|
68
68
|
include Haml::Filters::Base
|
69
|
-
lazy_require "coderay"
|
70
69
|
|
71
70
|
def compile(precompiler, text)
|
72
71
|
text = Haml::Helpers::find_and_preserve(
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml-coderay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
default_executable:
|
12
|
+
date: 2013-02-18 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: coderay
|
17
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
18
|
requirements:
|
20
19
|
- - ! '>='
|
@@ -22,10 +21,15 @@ dependencies:
|
|
22
21
|
version: '0'
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
26
30
|
- !ruby/object:Gem::Dependency
|
27
31
|
name: haml
|
28
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
29
33
|
none: false
|
30
34
|
requirements:
|
31
35
|
- - ! '>='
|
@@ -33,21 +37,15 @@ dependencies:
|
|
33
37
|
version: '0'
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
|
-
version_requirements:
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: bluecloth
|
39
|
-
requirement: &2156332720 !ruby/object:Gem::Requirement
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
41
|
none: false
|
41
42
|
requirements:
|
42
43
|
- - ! '>='
|
43
44
|
- !ruby/object:Gem::Version
|
44
45
|
version: '0'
|
45
|
-
type: :development
|
46
|
-
prerelease: false
|
47
|
-
version_requirements: *2156332720
|
48
46
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
50
|
-
requirement:
|
47
|
+
name: kramdown
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
51
49
|
none: false
|
52
50
|
requirements:
|
53
51
|
- - ! '>='
|
@@ -55,10 +53,15 @@ dependencies:
|
|
55
53
|
version: '0'
|
56
54
|
type: :development
|
57
55
|
prerelease: false
|
58
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
59
62
|
- !ruby/object:Gem::Dependency
|
60
|
-
name:
|
61
|
-
requirement:
|
63
|
+
name: rake
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
62
65
|
none: false
|
63
66
|
requirements:
|
64
67
|
- - ! '>='
|
@@ -66,10 +69,15 @@ dependencies:
|
|
66
69
|
version: '0'
|
67
70
|
type: :development
|
68
71
|
prerelease: false
|
69
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
70
78
|
- !ruby/object:Gem::Dependency
|
71
79
|
name: rspec
|
72
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
73
81
|
none: false
|
74
82
|
requirements:
|
75
83
|
- - ~>
|
@@ -77,10 +85,31 @@ dependencies:
|
|
77
85
|
version: '2'
|
78
86
|
type: :development
|
79
87
|
prerelease: false
|
80
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '2'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: simplecov
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
81
110
|
- !ruby/object:Gem::Dependency
|
82
111
|
name: yard
|
83
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
84
113
|
none: false
|
85
114
|
requirements:
|
86
115
|
- - ! '>='
|
@@ -88,7 +117,12 @@ dependencies:
|
|
88
117
|
version: '0'
|
89
118
|
type: :development
|
90
119
|
prerelease: false
|
91
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
92
126
|
description: Adds a CodeRay syntax highlighting filter to Haml
|
93
127
|
email: blom@blom.tv
|
94
128
|
executables: []
|
@@ -99,7 +133,6 @@ files:
|
|
99
133
|
- LICENSE
|
100
134
|
- README.md
|
101
135
|
- VERSION
|
102
|
-
has_rdoc: true
|
103
136
|
homepage: https://github.com/blom/haml-coderay
|
104
137
|
licenses: []
|
105
138
|
post_install_message:
|
@@ -112,22 +145,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
145
|
- - ! '>='
|
113
146
|
- !ruby/object:Gem::Version
|
114
147
|
version: '0'
|
115
|
-
segments:
|
116
|
-
- 0
|
117
|
-
hash: 1768704131557402429
|
118
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
149
|
none: false
|
120
150
|
requirements:
|
121
151
|
- - ! '>='
|
122
152
|
- !ruby/object:Gem::Version
|
123
153
|
version: '0'
|
124
|
-
segments:
|
125
|
-
- 0
|
126
|
-
hash: 1768704131557402429
|
127
154
|
requirements: []
|
128
155
|
rubyforge_project:
|
129
|
-
rubygems_version: 1.
|
156
|
+
rubygems_version: 1.8.25
|
130
157
|
signing_key:
|
131
158
|
specification_version: 3
|
132
159
|
summary: CodeRay filter for Haml
|
133
160
|
test_files: []
|
161
|
+
has_rdoc:
|