rouge-rails 0.1.1 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +4 -0
- data/lib/rouge/rails/template_handler.rb +10 -1
- data/lib/rouge/rails/version.rb +1 -1
- data/rouge-rails.gemspec +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 330227a9302c0125a8809094d307358661c4e106
|
4
|
+
data.tar.gz: 8dcba00c5852d9dcdf121d210ccfa8fa0a1cfce5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e333ca3276e31cdfcd19a3a34977314b2820e5ba2d45065b6d78168f15213bf70165ae2c8e461e2131b94a92330088f0ea9355845d2e3689c6d39a1e86f0f6d
|
7
|
+
data.tar.gz: 6c0c5d4bcffb07f7a37b36c34bcf35fca601ed4e4719decbf0ea77ae380faebc8bf0225f5fed0770bc943e2107082ae541e2f6eb1ce31caf0cc9d180041c9372
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Rouge::Rails
|
2
2
|
|
3
|
+
Give rails the power to render code samples in [rouge][rouge] colored glory.
|
4
|
+
|
3
5
|
## Installation
|
4
6
|
|
5
7
|
Add this line to your application's Gemfile:
|
@@ -86,3 +88,5 @@ https://github.com/jacobsimeon/rouge-rails.
|
|
86
88
|
The gem is available as open source under the terms of the [MIT
|
87
89
|
License](http://opensource.org/licenses/MIT).
|
88
90
|
|
91
|
+
|
92
|
+
[rouge]: https://github.com/jneen/rouge
|
@@ -35,11 +35,20 @@ module Rouge::Rails
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def source
|
38
|
-
template
|
38
|
+
"begin; #{erb_handler.call(template)} end"
|
39
39
|
end
|
40
40
|
|
41
41
|
def default_lexer
|
42
42
|
"Rouge::Lexers::PlainText"
|
43
43
|
end
|
44
|
+
|
45
|
+
def self.erb_handler
|
46
|
+
@erb_handler ||= ActionView::Template.handler_for_extension(:erb)
|
47
|
+
end
|
48
|
+
|
49
|
+
def erb_handler
|
50
|
+
self.class.erb_handler
|
51
|
+
end
|
52
|
+
|
44
53
|
end
|
45
54
|
end
|
data/lib/rouge/rails/version.rb
CHANGED
data/rouge-rails.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rouge-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Morris
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rouge
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: capybara
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
description:
|
112
126
|
email:
|
113
127
|
- jacob.s.morris@gmail.com
|
@@ -176,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
190
|
version: '0'
|
177
191
|
requirements: []
|
178
192
|
rubyforge_project:
|
179
|
-
rubygems_version: 2.
|
193
|
+
rubygems_version: 2.6.2
|
180
194
|
signing_key:
|
181
195
|
specification_version: 4
|
182
196
|
summary: Simple template handler for rouge code samples
|