Hello community, here is the log from the commit of package rubygem-uglifier for openSUSE:Factory checked in at 2015-03-01 14:47:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-uglifier (Old) and /work/SRC/openSUSE:Factory/.rubygem-uglifier.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-uglifier" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-uglifier/rubygem-uglifier.changes 2015-02-10 20:23:02.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-uglifier.new/rubygem-uglifier.changes 2015-03-01 14:47:50.000000000 +0100 @@ -1,0 +2,6 @@ +Sat Feb 28 05:30:18 UTC 2015 - co...@suse.com + +- updated to version 2.7.1 + - fix compatibility with experimental Alaska ExecJS runtime + +------------------------------------------------------------------- Old: ---- uglifier-2.7.0.gem New: ---- uglifier-2.7.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-uglifier.spec ++++++ --- /var/tmp/diff_new_pack.T9Fsie/_old 2015-03-01 14:47:51.000000000 +0100 +++ /var/tmp/diff_new_pack.T9Fsie/_new 2015-03-01 14:47:51.000000000 +0100 @@ -24,7 +24,7 @@ # Name: rubygem-uglifier -Version: 2.7.0 +Version: 2.7.1 Release: 0 %define mod_name uglifier %define mod_full_name %{mod_name}-%{version} ++++++ uglifier-2.7.0.gem -> uglifier-2.7.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 2015-01-08 22:47:54.000000000 +0100 +++ new/.gitignore 2015-02-27 21:41:52.000000000 +0100 @@ -11,6 +11,7 @@ # bundler .bundle Gemfile.lock +gemfiles/*.lock # jeweler generated pkg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2015-01-08 22:47:54.000000000 +0100 +++ new/.travis.yml 2015-02-27 21:41:52.000000000 +0100 @@ -21,3 +21,10 @@ gemfile: gemfiles/rubyracer - rvm: jruby-19mode gemfile: gemfiles/rubyrhino + - rvm: 2.2.0 + gemfile: gemfiles/alaska + env: ALASKA=1 + allow_failures: + - rvm: 2.2.0 + gemfile: gemfiles/alaska + env: ALASKA=1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2015-01-08 22:47:54.000000000 +0100 +++ new/CHANGELOG.md 2015-02-27 21:41:52.000000000 +0100 @@ -1,3 +1,7 @@ +## 2.7.1 (27 February 2015) + +- fix compatibility with experimental Alaska ExecJS runtime + ## 2.7.0 (8 January 2015) - copyright comment preservation also includes comments starting with a bang (!) Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/alaska new/gemfiles/alaska --- old/gemfiles/alaska 1970-01-01 01:00:00.000000000 +0100 +++ new/gemfiles/alaska 2015-02-27 21:41:52.000000000 +0100 @@ -0,0 +1,4 @@ +source "https://rubygems.org" + +gemspec :path=> "../" +gem "alaska", github: "mavenlink/alaska" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/uglifier/version.rb new/lib/uglifier/version.rb --- old/lib/uglifier/version.rb 2015-01-08 22:47:54.000000000 +0100 +++ new/lib/uglifier/version.rb 2015-02-27 21:41:52.000000000 +0100 @@ -1,4 +1,4 @@ class Uglifier # Current version of Uglifier. - VERSION = "2.7.0" + VERSION = "2.7.1" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/uglifier.rb new/lib/uglifier.rb --- old/lib/uglifier.rb 2015-01-08 22:47:54.000000000 +0100 +++ new/lib/uglifier.rb 2015-02-27 21:41:52.000000000 +0100 @@ -10,67 +10,68 @@ Error = ExecJS::Error # JavaScript code to call UglifyJS JS = <<-JS - function comments(option) { - if (Object.prototype.toString.call(option) === '[object Array]') { - return new RegExp(option[0], option[1]); - } else if (option == "jsdoc") { - return function(node, comment) { - if (comment.type == "comment2") { - return /@preserve|@license|@cc_on/i.test(comment.value); - } else { - return false; + (function(options) { + function comments(option) { + if (Object.prototype.toString.call(option) === '[object Array]') { + return new RegExp(option[0], option[1]); + } else if (option == "jsdoc") { + return function(node, comment) { + if (comment.type == "comment2") { + return /@preserve|@license|@cc_on/i.test(comment.value); + } else { + return false; + } } + } else { + return option; } - } else { - return option; } - } - var options = %s; - var source = options.source; - var ast = UglifyJS.parse(source, options.parse_options); - ast.figure_out_scope(); - - if (options.compress) { - var compressor = UglifyJS.Compressor(options.compress); - ast = ast.transform(compressor); + var source = options.source; + var ast = UglifyJS.parse(source, options.parse_options); ast.figure_out_scope(); - } - if (options.mangle) { - ast.compute_char_frequency(); - ast.mangle_names(options.mangle); - } + if (options.compress) { + var compressor = UglifyJS.Compressor(options.compress); + ast = ast.transform(compressor); + ast.figure_out_scope(); + } - if (options.enclose) { - ast = ast.wrap_enclose(options.enclose); - } + if (options.mangle) { + ast.compute_char_frequency(); + ast.mangle_names(options.mangle); + } - var gen_code_options = options.output; - gen_code_options.comments = comments(options.output.comments); + if (options.enclose) { + ast = ast.wrap_enclose(options.enclose); + } - if (options.generate_map) { - var source_map = UglifyJS.SourceMap(options.source_map_options); - gen_code_options.source_map = source_map; - } + var gen_code_options = options.output; + gen_code_options.comments = comments(options.output.comments); - var stream = UglifyJS.OutputStream(gen_code_options); + if (options.generate_map) { + var source_map = UglifyJS.SourceMap(options.source_map_options); + gen_code_options.source_map = source_map; + } - ast.print(stream); + var stream = UglifyJS.OutputStream(gen_code_options); - if (options.source_map_options.map_url) { - stream += "\\n//# sourceMappingURL=" + options.source_map_options.map_url; - } + ast.print(stream); - if (options.source_map_options.url) { - stream += "\\n//# sourceURL=" + options.source_map_options.url; - } + if (options.source_map_options.map_url) { + stream += "\\n//# sourceMappingURL=" + options.source_map_options.map_url; + } - if (options.generate_map) { - return [stream.toString(), source_map.toString()]; - } else { - return stream.toString(); - } + if (options.source_map_options.url) { + stream += "\\n//# sourceURL=" + options.source_map_options.url; + } + + if (options.generate_map) { + return [stream.toString(), source_map.toString()]; + } else { + return stream.toString(); + } + }) JS # UglifyJS source path @@ -197,7 +198,7 @@ # Run UglifyJS for given source code def run_uglifyjs(source, generate_map) - @context.exec(Uglifier::JS % json_encode( + options = { :source => read_source(source), :output => output_options, :compress => compressor_options, @@ -206,7 +207,9 @@ :source_map_options => source_map_options, :generate_map => generate_map, :enclose => enclose_options - )) + } + + @context.call(Uglifier::JS, options) end def read_source(source) @@ -296,10 +299,6 @@ end end - def json_encode(obj) - JSON.dump(obj) - end - def encode_regexp(regexp) modifiers = if regexp.casefold? "i" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2015-01-08 22:47:54.000000000 +0100 +++ new/metadata 2015-02-27 21:41:52.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: uglifier version: !ruby/object:Gem::Version - version: 2.7.0 + version: 2.7.1 platform: ruby authors: - Ville Lautanala autorequire: bindir: bin cert_chain: [] -date: 2015-01-08 00:00:00.000000000 Z +date: 2015-02-27 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: execjs @@ -132,6 +132,7 @@ - LICENSE.txt - README.md - Rakefile +- gemfiles/alaska - gemfiles/rubyracer - gemfiles/rubyrhino - lib/es5.js diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/spec_helper.rb new/spec/spec_helper.rb --- old/spec/spec_helper.rb 2015-01-08 22:47:54.000000000 +0100 +++ new/spec/spec_helper.rb 2015-02-27 21:41:52.000000000 +0100 @@ -7,6 +7,12 @@ # in ./support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } +if ENV["ALASKA"] + require 'alaska' + require 'tempfile' + ExecJS.runtime = Alaska::Runtime.new +end + RSpec.configure do |config| config.mock_with :rspec do |mock| mock.syntax = :expect -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org