Hello community,

here is the log from the commit of package rubygem-sprockets for 
openSUSE:Factory checked in at 2015-06-12 20:30:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-sprockets (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-sprockets.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-sprockets"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-sprockets/rubygem-sprockets.changes      
2015-05-11 19:49:24.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-sprockets.new/rubygem-sprockets.changes 
2015-06-12 20:30:54.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Jun  3 04:39:24 UTC 2015 - co...@suse.com
+
+- updated to version 3.2.0
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  sprockets-3.1.0.gem

New:
----
  sprockets-3.2.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-sprockets.spec ++++++
--- /var/tmp/diff_new_pack.CLxDVD/_old  2015-06-12 20:30:54.000000000 +0200
+++ /var/tmp/diff_new_pack.CLxDVD/_new  2015-06-12 20:30:54.000000000 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-sprockets
-Version:        3.1.0
+Version:        3.2.0
 Release:        0
 %define mod_name sprockets
 %define mod_full_name %{mod_name}-%{version}

++++++ sprockets-3.1.0.gem -> sprockets-3.2.0.gem ++++++
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/sprockets/asset.rb new/lib/sprockets/asset.rb
--- old/lib/sprockets/asset.rb  2015-05-10 21:29:32.000000000 +0200
+++ new/lib/sprockets/asset.rb  2015-06-02 22:21:36.000000000 +0200
@@ -19,7 +19,6 @@
       @content_type = attributes[:content_type]
       @filename     = attributes[:filename]
       @id           = attributes[:id]
-      @integrity    = attributes[:integrity]
       @load_path    = attributes[:load_path]
       @logical_path = attributes[:logical_path]
       @metadata     = attributes[:metadata]
@@ -140,7 +139,9 @@
     end
 
     # Public: A "named information" URL for subresource integrity.
-    attr_reader :integrity
+    def integrity
+      DigestUtils.integrity_uri(metadata[:digest])
+    end
 
     # Public: Add enumerator to allow `Asset` instances to be used as Rack
     # compatible body objects.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/sprockets/cache.rb new/lib/sprockets/cache.rb
--- old/lib/sprockets/cache.rb  2015-05-10 21:29:32.000000000 +0200
+++ new/lib/sprockets/cache.rb  2015-06-02 22:21:36.000000000 +0200
@@ -97,7 +97,7 @@
     # Public: Low level API to retrieve item directly from the backend cache
     # store.
     #
-    # This API may be used publicaly, but may have undefined behavior
+    # This API may be used publicly, but may have undefined behavior
     # depending on the backend store being used. Prefer the
     # Cache#fetch API over using this.
     #
@@ -120,7 +120,7 @@
 
     # Public: Low level API to set item directly to the backend cache store.
     #
-    # This API may be used publicaly, but may have undefined behavior
+    # This API may be used publicly, but may have undefined behavior
     # depending on the backend store being used. Prefer the
     # Cache#fetch API over using this.
     #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/sprockets/digest_utils.rb 
new/lib/sprockets/digest_utils.rb
--- old/lib/sprockets/digest_utils.rb   2015-05-10 21:29:32.000000000 +0200
+++ new/lib/sprockets/digest_utils.rb   2015-06-02 22:21:36.000000000 +0200
@@ -96,6 +96,15 @@
       bin.unpack('H*').first
     end
 
+    # Internal: Unpack a hex encoded digest string into binary bytes.
+    #
+    # hex - String hex
+    #
+    # Returns binary String.
+    def unpack_hexdigest(hex)
+      [hex].pack('H*')
+    end
+
     # Internal: Pack a binary digest to a base64 encoded string.
     #
     # bin - String bytes
@@ -117,17 +126,15 @@
       str
     end
 
-    # Internal: Maps digest class to the named information hash algorithm name.
-    #
-    # http://www.iana.org/assignments/named-information/named-information.xhtml
-    NI_HASH_ALGORITHMS = {
-      Digest::SHA256 => 'sha-256'.freeze,
-      Digest::SHA384 => 'sha-384'.freeze,
-      Digest::SHA512 => 'sha-512'.freeze
+    # Internal: Maps digest class to the CSP hash algorithm name.
+    HASH_ALGORITHMS = {
+      Digest::SHA256 => 'sha256'.freeze,
+      Digest::SHA384 => 'sha384'.freeze,
+      Digest::SHA512 => 'sha512'.freeze
     }
 
-    # Internal: Generate a "named information" URI for use in the `integrity`
-    # attribute of an asset tag as per the subresource integrity specification.
+    # Public: Generate hash for use in the `integrity` attribute of an asset 
tag
+    # as per the subresource integrity specification.
     #
     # digest - The String byte digest of the asset content.
     #
@@ -143,9 +150,19 @@
         raise TypeError, "unknown digest: #{digest.inspect}"
       end
 
-      if hash_name = NI_HASH_ALGORITHMS[digest_class]
+      if hash_name = HASH_ALGORITHMS[digest_class]
         "#{hash_name}-#{pack_base64digest(digest)}"
       end
     end
+
+    # Public: Generate hash for use in the `integrity` attribute of an asset 
tag
+    # as per the subresource integrity specification.
+    #
+    # digest - The String hexbyte digest of the asset content.
+    #
+    # Returns a String or nil if hash algorithm is incompatible.
+    def hexdigest_integrity_uri(hexdigest)
+      integrity_uri(unpack_hexdigest(hexdigest))
+    end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/sprockets/loader.rb new/lib/sprockets/loader.rb
--- old/lib/sprockets/loader.rb 2015-05-10 21:29:32.000000000 +0200
+++ new/lib/sprockets/loader.rb 2015-06-02 22:21:36.000000000 +0200
@@ -118,7 +118,6 @@
           content_type: type,
           source: source,
           metadata: metadata,
-          integrity: integrity_uri(metadata[:digest]),
           dependencies_digest: 
digest(resolve_dependencies(metadata[:dependencies]))
         }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/sprockets/manifest.rb 
new/lib/sprockets/manifest.rb
--- old/lib/sprockets/manifest.rb       2015-05-10 21:29:32.000000000 +0200
+++ new/lib/sprockets/manifest.rb       2015-06-02 22:21:36.000000000 +0200
@@ -165,7 +165,11 @@
           'mtime'        => asset.mtime.iso8601,
           'size'         => asset.bytesize,
           'digest'       => asset.hexdigest,
-          'integrity'    => asset.integrity
+
+          # Deprecated: Remove beta integrity attribute in next release.
+          # Callers should DigestUtils.hexdigest_integrity_uri to compute the
+          # digest themselves.
+          'integrity'    => 
DigestUtils.hexdigest_integrity_uri(asset.hexdigest)
         }
         assets[asset.logical_path] = asset.digest_path
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/sprockets/utils.rb new/lib/sprockets/utils.rb
--- old/lib/sprockets/utils.rb  2015-05-10 21:29:32.000000000 +0200
+++ new/lib/sprockets/utils.rb  2015-06-02 22:21:37.000000000 +0200
@@ -95,11 +95,11 @@
     #
     # Returns buf String.
     def concat_javascript_sources(buf, source)
-      if string_end_with_semicolon?(buf)
-        buf << source
-      else
-        buf << ";\n" << source
+      if buf.bytesize > 0
+        buf << ";" unless string_end_with_semicolon?(buf)
+        buf << "\n" unless buf.end_with?("\n")
       end
+      buf << source
     end
 
     # Internal: Prepends a leading "." to an extension if its missing.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/sprockets/version.rb new/lib/sprockets/version.rb
--- old/lib/sprockets/version.rb        2015-05-10 21:29:32.000000000 +0200
+++ new/lib/sprockets/version.rb        2015-06-02 22:21:37.000000000 +0200
@@ -1,3 +1,3 @@
 module Sprockets
-  VERSION = "3.1.0"
+  VERSION = "3.2.0"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2015-05-10 21:29:32.000000000 +0200
+++ new/metadata        2015-06-02 22:21:36.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: sprockets
 version: !ruby/object:Gem::Version
-  version: 3.1.0
+  version: 3.2.0
 platform: ruby
 authors:
 - Sam Stephenson
@@ -9,7 +9,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2015-05-10 00:00:00.000000000 Z
+date: 2015-06-02 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rack


Reply via email to