Hello community, here is the log from the commit of package rubygem-tilt for openSUSE:Factory checked in at 2017-07-26 13:05:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-tilt (Old) and /work/SRC/openSUSE:Factory/.rubygem-tilt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-tilt" Wed Jul 26 13:05:30 2017 rev:18 rq:512503 version:2.0.8 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-tilt/rubygem-tilt.changes 2017-04-12 18:22:47.258202934 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-tilt.new/rubygem-tilt.changes 2017-07-26 13:05:41.170785860 +0200 @@ -1,0 +2,10 @@ +Tue Jul 25 12:41:07 UTC 2017 - [email protected] + +- updated to version 2.0.8 + * Register .tsx for TypeScript + * Use Haml 5's new API + * Use correct parser options for CommonMarker + * Suppress warnings when no locals are used + * Haml: Accept outvar + +------------------------------------------------------------------- Old: ---- tilt-2.0.7.gem New: ---- tilt-2.0.8.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-tilt.spec ++++++ --- /var/tmp/diff_new_pack.X9R9gV/_old 2017-07-26 13:05:42.790557340 +0200 +++ /var/tmp/diff_new_pack.X9R9gV/_new 2017-07-26 13:05:42.794556776 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-tilt -Version: 2.0.7 +Version: 2.0.8 Release: 0 %define mod_name tilt %define mod_full_name %{mod_name}-%{version} ++++++ tilt-2.0.7.gem -> tilt-2.0.8.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2017-03-19 11:13:33.000000000 +0100 +++ new/CHANGELOG.md 2017-07-24 09:05:05.000000000 +0200 @@ -1,3 +1,13 @@ +## master + +## 2.0.8 (2017-07-24) + +* Register .tsx for TypeScript (#315, backus) +* Use Haml 5's new API (#312, k0kubun) +* Use correct parser options for CommonMarker (#320, rewritten) +* Suppress warnings when no locals are used (#304, amatsuda) +* Haml: Accept `outvar` (#317, k0kubun) + ## 2.0.7 (2017-03-19) * Do not modify BasicObject during template compilation on ruby 2.0+ (#309, jeremyevans) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile new/Gemfile --- old/Gemfile 2017-03-19 11:13:33.000000000 +0100 +++ new/Gemfile 2017-07-24 09:05:05.000000000 +0200 @@ -1,5 +1,7 @@ source 'https://rubygems.org' +gemspec + gem 'rake' gem 'minitest', '~> 5.0' @@ -12,7 +14,7 @@ group :primary do gem 'builder' - gem 'haml', '>= 2.2.11', '< 4' + gem 'haml', '>= 4' if RUBY_VERSION >= '2.0.0' gem 'erubis' gem 'markaby' gem 'sass' @@ -61,7 +63,3 @@ end end -## WHY do I have to do this?!? -platform :rbx do - gem 'rubysl' -end Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/tilt/commonmarker.rb new/lib/tilt/commonmarker.rb --- old/lib/tilt/commonmarker.rb 2017-03-19 11:13:33.000000000 +0100 +++ new/lib/tilt/commonmarker.rb 2017-07-24 09:05:05.000000000 +0200 @@ -11,7 +11,7 @@ end def evaluate(scope, locals, &block) - CommonMarker.render_html(data, :default) + CommonMarker.render_html(data, :DEFAULT) end def allows_script? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/tilt/haml.rb new/lib/tilt/haml.rb --- old/lib/tilt/haml.rb 2017-03-19 11:13:33.000000000 +0100 +++ new/lib/tilt/haml.rb 2017-07-24 09:05:05.000000000 +0200 @@ -7,51 +7,79 @@ class HamlTemplate < Template self.default_mime_type = 'text/html' - def prepare - options = @options.merge(:filename => eval_file, :line => line) - @engine = ::Haml::Engine.new(data, options) - end - - def evaluate(scope, locals, &block) - raise ArgumentError, 'invalid scope: must not be frozen' if scope.frozen? + # `Gem::Version.correct?` may return false because of Haml::VERSION #=> "3.1.8 (Separated Sally)". After Haml 4, it's always correct. + if Gem::Version.correct?(Haml::VERSION) && Gem::Version.new(Haml::VERSION) >= Gem::Version.new('5.0.0.beta.2') + def prepare + options = {}.update(@options).update(filename: eval_file, line: line) + if options.include?(:outvar) + options[:buffer] = options.delete(:outvar) + options[:save_buffer] = true + end + @engine = ::Haml::TempleEngine.new(options) + @engine.compile(data) + end - if @engine.respond_to?(:precompiled_method_return_value, true) + def evaluate(scope, locals, &block) + raise ArgumentError, 'invalid scope: must not be frozen' if scope.frozen? super - else - @engine.render(scope, locals, &block) end - end - # Precompiled Haml source. Taken from the precompiled_with_ambles - # method in Haml::Precompiler: - # http://github.com/nex3/haml/blob/master/lib/haml/precompiler.rb#L111-126 - def precompiled_template(locals) - @engine.precompiled - end - - def precompiled_preamble(locals) - local_assigns = super - @engine.instance_eval do - <<-RUBY - begin - extend Haml::Helpers - _hamlout = @haml_buffer = Haml::Buffer.new(@haml_buffer, #{options_for_buffer.inspect}) - _erbout = _hamlout.buffer + def precompiled_template(locals) + @engine.precompiled_with_ambles( + [], + after_preamble: <<-RUBY __in_erb_template = true _haml_locals = locals - #{local_assigns} - RUBY + RUBY + ) + end + else # Following definitions are for Haml <= 4 and deprecated. + def prepare + options = @options.merge(:filename => eval_file, :line => line) + @engine = ::Haml::Engine.new(data, options) + end + + def evaluate(scope, locals, &block) + raise ArgumentError, 'invalid scope: must not be frozen' if scope.frozen? + + if @engine.respond_to?(:precompiled_method_return_value, true) + super + else + @engine.render(scope, locals, &block) + end + end + + # Precompiled Haml source. Taken from the precompiled_with_ambles + # method in Haml::Precompiler: + # http://github.com/nex3/haml/blob/master/lib/haml/precompiler.rb#L111-126 + def precompiled_template(locals) + @engine.precompiled + end + + def precompiled_preamble(locals) + local_assigns = super + @engine.instance_eval do + <<-RUBY + begin + extend Haml::Helpers + _hamlout = @haml_buffer = Haml::Buffer.new(@haml_buffer, #{options_for_buffer.inspect}) + _erbout = _hamlout.buffer + __in_erb_template = true + _haml_locals = locals + #{local_assigns} + RUBY + end end - end - def precompiled_postamble(locals) - @engine.instance_eval do - <<-RUBY - #{precompiled_method_return_value} - ensure - @haml_buffer = @haml_buffer.upper if @haml_buffer - end - RUBY + def precompiled_postamble(locals) + @engine.instance_eval do + <<-RUBY + #{precompiled_method_return_value} + ensure + @haml_buffer = @haml_buffer.upper if @haml_buffer + end + RUBY + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/tilt/template.rb new/lib/tilt/template.rb --- old/lib/tilt/template.rb 2017-03-19 11:13:33.000000000 +0100 +++ new/lib/tilt/template.rb 2017-07-24 09:05:05.000000000 +0200 @@ -264,6 +264,7 @@ Thread.current[:tilt_vars] = [self, locals] class << self this, locals = Thread.current[:tilt_vars] + locals = locals this.instance_eval do #{local_code} RUBY diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/tilt.rb new/lib/tilt.rb --- old/lib/tilt.rb 2017-03-19 11:13:33.000000000 +0100 +++ new/lib/tilt.rb 2017-07-24 09:05:05.000000000 +0200 @@ -4,7 +4,7 @@ # Namespace for Tilt. This module is not intended to be included anywhere. module Tilt # Current version. - VERSION = '2.0.7' + VERSION = '2.0.8' @default_mapping = Mapping.new @@ -153,7 +153,7 @@ register_lazy :ScssTemplate, 'tilt/sass', 'scss' register_lazy :SigilTemplate, 'tilt/sigil', 'sigil' register_lazy :StringTemplate, 'tilt/string', 'str' - register_lazy :TypeScriptTemplate, 'tilt/typescript', 'ts' + register_lazy :TypeScriptTemplate, 'tilt/typescript', 'ts', 'tsx' register_lazy :WikiClothTemplate, 'tilt/wikicloth', 'wiki', 'mediawiki', 'mw' register_lazy :YajlTemplate, 'tilt/yajl', 'yajl' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2017-03-19 11:13:33.000000000 +0100 +++ new/metadata 2017-07-24 09:05:05.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: tilt version: !ruby/object:Gem::Version - version: 2.0.7 + version: 2.0.8 platform: ruby authors: - Ryan Tomayko autorequire: bindir: bin cert_chain: [] -date: 2017-03-19 00:00:00.000000000 Z +date: 2017-07-24 00:00:00.000000000 Z dependencies: [] description: Generic interface to multiple Ruby template engines email: [email protected] @@ -145,7 +145,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.6.8 +rubygems_version: 2.6.11 signing_key: specification_version: 2 summary: Generic interface to multiple Ruby template engines diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/tilt_typescript_test.rb new/test/tilt_typescript_test.rb --- old/test/tilt_typescript_test.rb 2017-03-19 11:13:33.000000000 +0100 +++ new/test/tilt_typescript_test.rb 2017-07-24 09:05:05.000000000 +0200 @@ -14,6 +14,10 @@ assert_equal Tilt::TypeScriptTemplate, Tilt['test.ts'] end + test "is registered for '.tsx' files" do + assert_equal Tilt::TypeScriptTemplate, Tilt['test.tsx'] + end + test "compiles and evaluates the template on #render" do template = Tilt::TypeScriptTemplate.new { @ts } assert_match @js, template.render diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tilt.gemspec new/tilt.gemspec --- old/tilt.gemspec 2017-03-19 11:13:33.000000000 +0100 +++ new/tilt.gemspec 2017-07-24 09:05:05.000000000 +0200 @@ -3,8 +3,8 @@ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.name = 'tilt' - s.version = '2.0.7' - s.date = '2017-03-19' + s.version = '2.0.8' + s.date = '2017-07-24' s.description = "Generic interface to multiple Ruby template engines" s.summary = s.description
