Projects
openEuler:24.03:SP1:Everything:64G
rubygem-temple
_service:tar_scm:rubygem-temple-0.8.2-Use-Erubi...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:rubygem-temple-0.8.2-Use-Erubi-instead-of-Erubis.patch of Package rubygem-temple
From 8d6612db8086e5c839f045a1057daaad147383d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com> Date: Wed, 19 Aug 2020 14:19:22 +0200 Subject: [PATCH] Use Erubi instead of Erubis. Erubis is dead upstream for almost past 10 years, while Erubi is more lightweight alternative used by Ruby on Rails these days. --- temple.gemspec | 2 +- test/helper.rb | 4 ++-- test/test_erb.rb | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/temple.gemspec b/temple.gemspec index 8a84aee..2f1aa60 100644 --- a/temple.gemspec +++ b/temple.gemspec @@ -25,5 +25,5 @@ Gem::Specification.new do |s| s.add_development_dependency('tilt') s.add_development_dependency('bacon') s.add_development_dependency('rake') - s.add_development_dependency('erubis') + s.add_development_dependency('erubi') end diff --git a/test/helper.rb b/test/helper.rb index 608c54d..e06a90e 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -20,8 +20,8 @@ module TestHelper Temple::ERB::Template.new(options) { src }.render end - def erubis(src, options = {}) - Tilt::ErubisTemplate.new(options) { src }.render + def erubi(src, options = {}) + Tilt::ErubiTemplate.new(options) { src }.render end end diff --git a/test/test_erb.rb b/test/test_erb.rb index a82a1a2..31f39cc 100644 --- a/test/test_erb.rb +++ b/test/test_erb.rb @@ -1,5 +1,5 @@ require 'helper' -require 'tilt/erubis' +require 'tilt/erubi' describe Temple::ERB::Engine do it 'should compile erb' do @@ -11,7 +11,7 @@ describe Temple::ERB::Engine do <% end %> } - erb(src).should.equal erubis(src) + erb(src).should.equal erubi(src) end it 'should recognize comments' do @@ -20,7 +20,7 @@ hello <%# comment -- ignored -- useful in testing %> world} - erb(src).should.equal erubis(src) + erb(src).should.equal erubi(src) end it 'should recognize <%% and %%>' do @@ -55,7 +55,7 @@ world} <% end %> } - erb(src, trim: true).should.equal erubis(src, trim: true) - erb(src, trim: false).should.equal erubis(src, trim: false) + erb(src, trim: true).should.equal erubi(src, trim: true) + erb(src, trim: false).should.equal erubi(src, trim: false) end end -- 2.27.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2