Hello community,

here is the log from the commit of package rubygem-turbolinks for 
openSUSE:Factory checked in at 2018-03-06 10:46:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-turbolinks (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-turbolinks.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-turbolinks"

Tue Mar  6 10:46:18 2018 rev:16 rq:581509 version:5.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-turbolinks/rubygem-turbolinks.changes    
2016-08-25 09:55:14.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-turbolinks.new/rubygem-turbolinks.changes   
    2018-03-06 10:46:20.102349549 +0100
@@ -1,0 +2,6 @@
+Tue Feb 27 05:38:35 UTC 2018 - factory-a...@kulow.org
+
+- updated to version 5.1.0
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  turbolinks-5.0.1.gem

New:
----
  turbolinks-5.1.0.gem

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

Other differences:
------------------
++++++ rubygem-turbolinks.spec ++++++
--- /var/tmp/diff_new_pack.3j3Vhu/_old  2018-03-06 10:46:21.162311258 +0100
+++ /var/tmp/diff_new_pack.3j3Vhu/_new  2018-03-06 10:46:21.166311114 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-turbolinks
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-turbolinks
-Version:        5.0.1
+Version:        5.1.0
 Release:        0
 %define mod_name turbolinks
 %define mod_full_name %{mod_name}-%{version}
@@ -33,7 +33,7 @@
 BuildRequires:  %{ruby}
 BuildRequires:  ruby-macros >= 5
 Url:            https://github.com/turbolinks/turbolinks
-Source:         http://rubygems.org/gems/%{mod_full_name}.gem
+Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        Turbolinks makes navigating your web application faster
 License:        MIT

++++++ turbolinks-5.0.1.gem -> turbolinks-5.1.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LICENSE new/LICENSE
--- old/LICENSE 2016-07-31 17:52:55.000000000 +0200
+++ new/LICENSE 2018-01-09 00:15:47.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright 2016 Basecamp, LLC
+Copyright 2018 Basecamp, LLC
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/turbolinks/assertions.rb 
new/lib/turbolinks/assertions.rb
--- old/lib/turbolinks/assertions.rb    1970-01-01 01:00:00.000000000 +0100
+++ new/lib/turbolinks/assertions.rb    2018-01-09 00:15:47.000000000 +0100
@@ -0,0 +1,46 @@
+module Turbolinks
+  module Assertions
+    TURBOLINKS_VISIT = /Turbolinks\.visit\("([^"]+)", {"action":"([^"]+)"}\)/
+
+    def assert_redirected_to(options = {}, message = nil)
+      if turbolinks_request?
+        assert_turbolinks_visited(options, message)
+      else
+        super
+      end
+    end
+
+    def assert_turbolinks_visited(options = {}, message = nil)
+      assert_response(:ok, message)
+      assert_equal("text/javascript", response.content_type)
+
+      visit_location, visit_action = turbolinks_visit_location_and_action
+
+      redirect_is       = normalize_argument_to_redirection(visit_location)
+      redirect_expected = normalize_argument_to_redirection(options)
+
+      message ||= "Expected response to be a Turbolinks visit to 
<#{redirect_expected}> but was a visit to <#{redirect_is}>"
+      assert_operator redirect_expected, :===, redirect_is, message
+    end
+
+    # Rough heuristic to detect whether this was a Turbolinks request:
+    # non-GET request with a text/javascript response.
+    #
+    # Technically we'd check that Turbolinks-Referrer request header is
+    # also set, but that'd require us to pass the header from post/patch/etc
+    # test methods by overriding them to provide a `turbolinks:` option.
+    #
+    # We can't check `request.xhr?` here, either, since the X-Requested-With
+    # header is cleared after controller action processing to prevent it
+    # from leaking into subsequent requests.
+    def turbolinks_request?
+      !request.get? && response.content_type == "text/javascript"
+    end
+
+    def turbolinks_visit_location_and_action
+      if response.body =~ TURBOLINKS_VISIT
+        [ $1, $2 ]
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/turbolinks/version.rb 
new/lib/turbolinks/version.rb
--- old/lib/turbolinks/version.rb       2016-07-31 17:52:55.000000000 +0200
+++ new/lib/turbolinks/version.rb       2018-01-09 00:15:47.000000000 +0100
@@ -1,3 +1,3 @@
 module Turbolinks
-  VERSION = '5.0.1'
+  VERSION = '5.1.0'
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/turbolinks.rb new/lib/turbolinks.rb
--- old/lib/turbolinks.rb       2016-07-31 17:52:55.000000000 +0200
+++ new/lib/turbolinks.rb       2018-01-09 00:15:47.000000000 +0100
@@ -1,5 +1,6 @@
 require 'turbolinks/version'
 require 'turbolinks/redirection'
+require 'turbolinks/assertions'
 require 'turbolinks/source'
 
 module Turbolinks
@@ -14,12 +15,14 @@
   class Engine < ::Rails::Engine
     config.turbolinks = ActiveSupport::OrderedOptions.new
     config.turbolinks.auto_include = true
-    config.assets.paths += [Turbolinks::Source.asset_path]
+    config.assets.paths += [Turbolinks::Source.asset_path] if 
config.respond_to?(:assets)
 
     initializer :turbolinks do |app|
       ActiveSupport.on_load(:action_controller) do
         if app.config.turbolinks.auto_include
           include Controller
+
+          ::ActionDispatch::Assertions.include ::Turbolinks::Assertions
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2016-07-31 17:52:55.000000000 +0200
+++ new/metadata        2018-01-09 00:15:47.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: turbolinks
 version: !ruby/object:Gem::Version
-  version: 5.0.1
+  version: 5.1.0
 platform: ruby
 authors:
 - David Heinemeier Hansson
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2016-07-31 00:00:00.000000000 Z
+date: 2018-01-08 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: turbolinks-source
@@ -16,14 +16,14 @@
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '5'
+        version: '5.1'
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '5'
+        version: '5.1'
 description: Rails engine for Turbolinks 5 support
 email: da...@loudthinking.com
 executables: []
@@ -33,6 +33,7 @@
 - LICENSE
 - README.md
 - lib/turbolinks.rb
+- lib/turbolinks/assertions.rb
 - lib/turbolinks/redirection.rb
 - lib/turbolinks/version.rb
 homepage: https://github.com/turbolinks/turbolinks
@@ -55,7 +56,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.4.8
+rubygems_version: 2.6.13
 signing_key: 
 specification_version: 4
 summary: Turbolinks makes navigating your web application faster


Reply via email to