Skip to content

Commit 38bca72

Browse files
committed
Support Haml 4
1 parent e50e55b commit 38bca72

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

lib/haml-coderay.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require "coderay"
12
require "haml"
23

34
# CodeRay filter for Haml. Specify which language to highlight with a shebang
@@ -17,7 +18,6 @@
1718
# @see http://rubydoc.info/gems/coderay/CodeRay/Scanners
1819
module Haml::Filters::CodeRay
1920
include Haml::Filters::Base
20-
lazy_require "coderay"
2121

2222
ENCODER = :div
2323
ENCODER_OPTIONS = {}
@@ -66,7 +66,6 @@ def render(text)
6666
# @see Haml::Filters::CodeRay
6767
module Haml::Filters::CodeRay_raw
6868
include Haml::Filters::Base
69-
lazy_require "coderay"
7069

7170
def compile(precompiler, text)
7271
text = Haml::Helpers::find_and_preserve(

spec/haml-coderay_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
require "spec_helper"
22

3-
Haml::Filters::CodeRay.send(:resolve_lazy_requires)
4-
53
describe Haml::Filters::CodeRay do
64
it_should_behave_like "haml-coderay filters"
75

spec/spec_helper.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@
2020
end
2121
end
2222

23-
RSpec::Matchers.define :lazy_require do |library|
24-
match do |filter|
25-
filter.instance_variable_get(:@lazy_requires).include?(library.to_s)
26-
end
27-
end
28-
2923
shared_examples_for "haml-coderay filters" do
3024
it { should include_module Haml::Filters::Base }
31-
it { should lazy_require :coderay }
3225
end

0 commit comments

Comments
 (0)