Hello community, here is the log from the commit of package rubygem-js-routes for openSUSE:Factory checked in at 2018-03-06 10:45:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-js-routes (Old) and /work/SRC/openSUSE:Factory/.rubygem-js-routes.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-js-routes" Tue Mar 6 10:45:18 2018 rev:16 rq:574051 version:1.4.3 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-js-routes/rubygem-js-routes.changes 2017-09-12 19:56:58.309773492 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-js-routes.new/rubygem-js-routes.changes 2018-03-06 10:45:19.636534016 +0100 @@ -1,0 +2,16 @@ +Tue Jan 9 07:33:54 UTC 2018 - [email protected] + +- updated to version 1.4.3 + see installed CHANGELOG.md + +------------------------------------------------------------------- +Sun Dec 3 19:23:22 UTC 2017 - [email protected] + +- updated to version 1.4.2 + see installed CHANGELOG.md + + ## v1.4.2 + + * Added JsRoutes namespace to Engine #230 + +------------------------------------------------------------------- Old: ---- js-routes-1.4.1.gem New: ---- js-routes-1.4.3.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-js-routes.spec ++++++ --- /var/tmp/diff_new_pack.rTlD7Q/_old 2018-03-06 10:45:20.256511615 +0100 +++ /var/tmp/diff_new_pack.rTlD7Q/_new 2018-03-06 10:45:20.256511615 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-js-routes # -# Copyright (c) 2017 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-js-routes -Version: 1.4.1 +Version: 1.4.3 Release: 0 %define mod_name js-routes %define mod_full_name %{mod_name}-%{version} ++++++ js-routes-1.4.1.gem -> js-routes-1.4.3.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2017-09-05 15:04:17.000000000 +0200 +++ new/.travis.yml 2017-12-18 14:37:02.000000000 +0100 @@ -16,14 +16,14 @@ gemfile: - gemfiles/rails32.gemfile - - gemfiles/rails40.gemfile - - gemfiles/rails40_sprockets3.gemfile - - gemfiles/rails41.gemfile - - gemfiles/rails41_sprockets3.gemfile - - gemfiles/rails42.gemfile - - gemfiles/rails42_sprockets3.gemfile - - gemfiles/rails50.gemfile - - gemfiles/rails50_sprockets3.gemfile + - gemfiles/rails40_sprockets_2.gemfile + - gemfiles/rails40_sprockets_3.gemfile + - gemfiles/rails41_sprockets_2.gemfile + - gemfiles/rails41_sprockets_3.gemfile + - gemfiles/rails42_sprockets_2.gemfile + - gemfiles/rails42_sprockets_3.gemfile + - gemfiles/rails50_sprockets_3.gemfile + - gemfiles/rails51_sprockets_3.gemfile sudo: false @@ -40,21 +40,20 @@ - rvm: jruby-19mode - rvm: ruby-head - rvm: jruby-head - - gemfile: gemfiles/rails50.gemfile exclude: - rvm: 2.0 - gemfile: gemfiles/rails50.gemfile - - rvm: 2.0 - gemfile: gemfiles/rails50_sprockets3.gemfile + gemfile: gemfiles/rails50_sprockets_3.gemfile - rvm: 2.1 - gemfile: gemfiles/rails50.gemfile + gemfile: gemfiles/rails50_sprockets_3.gemfile + - rvm: 2.0 + gemfile: gemfiles/rails51_sprockets_3.gemfile - rvm: 2.1 - gemfile: gemfiles/rails50_sprockets3.gemfile + gemfile: gemfiles/rails51_sprockets_3.gemfile - rvm: 2.4.1 - gemfile: gemfiles/rails40.gemfile # Segmentation fault (core dumped) for 2.4 + gemfile: gemfiles/rails40_sprockets_2.gemfile # Segmentation fault (core dumped) for 2.4 - rvm: 2.4.1 - gemfile: gemfiles/rails40_sprockets3.gemfile # Segmentation fault (core dumped) for 2.4 + gemfile: gemfiles/rails40_sprockets_3.gemfile # Segmentation fault (core dumped) for 2.4 - rvm: 2.4.1 - gemfile: gemfiles/rails41.gemfile # Segmentation fault (core dumped) for 2.4 + gemfile: gemfiles/rails41_sprockets_2.gemfile # Segmentation fault (core dumped) for 2.4 - rvm: 2.4.1 - gemfile: gemfiles/rails41_sprockets3.gemfile # Segmentation fault (core dumped) for 2.4 + gemfile: gemfiles/rails41_sprockets_3.gemfile # Segmentation fault (core dumped) for 2.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Appraisals new/Appraisals --- old/Appraisals 2017-09-05 15:04:17.000000000 +0200 +++ new/Appraisals 2017-12-18 14:37:02.000000000 +0100 @@ -3,14 +3,21 @@ gem 'tzinfo' end -{rails40: '4.0.13', rails41: '4.1.16', rails42: '4.2.8', rails50: '5.0.2'}.each do |rails, version| - appraise "#{rails}" do - gem "railties", "~> #{version}" - gem "sprockets", "< 3" +def define_appraisal(rails, version, sprockets) + sprockets.each do |sprocket| + appraise "#{rails}-sprockets-#{sprocket}" do + gem "railties", "~> #{version}" + gem "sprockets", "~> #{sprocket}.0" + end end +end - appraise "#{rails}-sprockets3" do - gem "railties", "~> #{version}" - gem "sprockets", "~> 3.0" - end +[ + [:rails40, '4.0.13', [2, 3]], + [:rails41, '4.1.16', [2, 3]], + [:rails42, '4.2.9', [2, 3]], + [:rails50, '5.0.5', [3]], + [:rails51, '5.1.3', [3]] +].each do |name, version, sprockets| + define_appraisal(name, version, sprockets) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2017-09-05 15:04:17.000000000 +0200 +++ new/CHANGELOG.md 2017-12-18 14:37:02.000000000 +0100 @@ -1,5 +1,9 @@ ## master +## v1.4.2 + +* Added JsRoutes namespace to Engine #230 + ## v1.4.1 * Fixed bug when js-routes is used in envs without window.location #224 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 2017-09-05 15:04:17.000000000 +0200 +++ new/Rakefile 2017-12-18 14:37:02.000000000 +0100 @@ -22,6 +22,7 @@ namespace :spec do + desc "Print all routes defined in test env" task :routes do require './spec/spec_helper' require 'action_dispatch/routing/inspector' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Readme.md new/Readme.md --- old/Readme.md 2017-09-05 15:04:17.000000000 +0200 +++ new/Readme.md 2017-12-18 14:37:02.000000000 +0100 @@ -1,5 +1,6 @@ # JsRoutes [](https://travis-ci.org/railsware/js-routes) +[](https://app.fossa.io/projects/git%2Bgithub.com%2Frailsware%2Fjs-routes?ref=badge_shield) Generates javascript file that defines all Rails named routes as javascript helpers @@ -52,7 +53,7 @@ * `default_url_options` - default parameters used when generating URLs * Option is configurable at JS level with `Routes.configure()` - * Example: {:format => "json", :trailing\_slash => true, :protocol => "https", :host => "example.com", :port => 3000} + * Example: {:format => "json", :trailing\_slash => true, :protocol => "https", :subdomain => "api", :host => "example.com", :port => 3000} * Default: {} * `exclude` - Array of regexps to exclude from js routes. * Default: [] @@ -244,3 +245,7 @@ #### Thanks to [Contributors](https://github.com/railsware/js-routes/contributors) #### Have fun + + +## License +[](https://app.fossa.io/projects/git%2Bgithub.com%2Frailsware%2Fjs-routes?ref=badge_large) \ No newline at end of file Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails40.gemfile new/gemfiles/rails40.gemfile --- old/gemfiles/rails40.gemfile 2017-09-05 15:04:17.000000000 +0200 +++ new/gemfiles/rails40.gemfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "railties", "~> 4.0.13" -gem "sprockets", "< 3" - -gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails40_sprockets3.gemfile new/gemfiles/rails40_sprockets3.gemfile --- old/gemfiles/rails40_sprockets3.gemfile 2017-09-05 15:04:17.000000000 +0200 +++ new/gemfiles/rails40_sprockets3.gemfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "railties", "~> 4.0.13" -gem "sprockets", "~> 3.0" - -gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails40_sprockets_2.gemfile new/gemfiles/rails40_sprockets_2.gemfile --- old/gemfiles/rails40_sprockets_2.gemfile 1970-01-01 01:00:00.000000000 +0100 +++ new/gemfiles/rails40_sprockets_2.gemfile 2017-12-18 14:37:03.000000000 +0100 @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "http://rubygems.org" + +gem "railties", "~> 4.0.13" +gem "sprockets", "~> 2.0" + +gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails40_sprockets_3.gemfile new/gemfiles/rails40_sprockets_3.gemfile --- old/gemfiles/rails40_sprockets_3.gemfile 1970-01-01 01:00:00.000000000 +0100 +++ new/gemfiles/rails40_sprockets_3.gemfile 2017-12-18 14:37:03.000000000 +0100 @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "http://rubygems.org" + +gem "railties", "~> 4.0.13" +gem "sprockets", "~> 3.0" + +gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails41.gemfile new/gemfiles/rails41.gemfile --- old/gemfiles/rails41.gemfile 2017-09-05 15:04:17.000000000 +0200 +++ new/gemfiles/rails41.gemfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "railties", "~> 4.1.16" -gem "sprockets", "< 3" - -gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails41_sprockets3.gemfile new/gemfiles/rails41_sprockets3.gemfile --- old/gemfiles/rails41_sprockets3.gemfile 2017-09-05 15:04:17.000000000 +0200 +++ new/gemfiles/rails41_sprockets3.gemfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "railties", "~> 4.1.16" -gem "sprockets", "~> 3.0" - -gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails41_sprockets_2.gemfile new/gemfiles/rails41_sprockets_2.gemfile --- old/gemfiles/rails41_sprockets_2.gemfile 1970-01-01 01:00:00.000000000 +0100 +++ new/gemfiles/rails41_sprockets_2.gemfile 2017-12-18 14:37:03.000000000 +0100 @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "http://rubygems.org" + +gem "railties", "~> 4.1.16" +gem "sprockets", "~> 2.0" + +gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails41_sprockets_3.gemfile new/gemfiles/rails41_sprockets_3.gemfile --- old/gemfiles/rails41_sprockets_3.gemfile 1970-01-01 01:00:00.000000000 +0100 +++ new/gemfiles/rails41_sprockets_3.gemfile 2017-12-18 14:37:03.000000000 +0100 @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "http://rubygems.org" + +gem "railties", "~> 4.1.16" +gem "sprockets", "~> 3.0" + +gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails42.gemfile new/gemfiles/rails42.gemfile --- old/gemfiles/rails42.gemfile 2017-09-05 15:04:17.000000000 +0200 +++ new/gemfiles/rails42.gemfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "railties", "~> 4.2.8" -gem "sprockets", "< 3" - -gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails42_sprockets3.gemfile new/gemfiles/rails42_sprockets3.gemfile --- old/gemfiles/rails42_sprockets3.gemfile 2017-09-05 15:04:17.000000000 +0200 +++ new/gemfiles/rails42_sprockets3.gemfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "railties", "~> 4.2.8" -gem "sprockets", "~> 3.0" - -gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails42_sprockets_2.gemfile new/gemfiles/rails42_sprockets_2.gemfile --- old/gemfiles/rails42_sprockets_2.gemfile 1970-01-01 01:00:00.000000000 +0100 +++ new/gemfiles/rails42_sprockets_2.gemfile 2017-12-18 14:37:03.000000000 +0100 @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "http://rubygems.org" + +gem "railties", "~> 4.2.9" +gem "sprockets", "~> 2.0" + +gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails42_sprockets_3.gemfile new/gemfiles/rails42_sprockets_3.gemfile --- old/gemfiles/rails42_sprockets_3.gemfile 1970-01-01 01:00:00.000000000 +0100 +++ new/gemfiles/rails42_sprockets_3.gemfile 2017-12-18 14:37:03.000000000 +0100 @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "http://rubygems.org" + +gem "railties", "~> 4.2.9" +gem "sprockets", "~> 3.0" + +gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails50.gemfile new/gemfiles/rails50.gemfile --- old/gemfiles/rails50.gemfile 2017-09-05 15:04:17.000000000 +0200 +++ new/gemfiles/rails50.gemfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "railties", "~> 5.0.2" -gem "sprockets", "< 3" - -gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails50_sprockets3.gemfile new/gemfiles/rails50_sprockets3.gemfile --- old/gemfiles/rails50_sprockets3.gemfile 2017-09-05 15:04:17.000000000 +0200 +++ new/gemfiles/rails50_sprockets3.gemfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "railties", "~> 5.0.2" -gem "sprockets", "~> 3.0" - -gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails50_sprockets_3.gemfile new/gemfiles/rails50_sprockets_3.gemfile --- old/gemfiles/rails50_sprockets_3.gemfile 1970-01-01 01:00:00.000000000 +0100 +++ new/gemfiles/rails50_sprockets_3.gemfile 2017-12-18 14:37:03.000000000 +0100 @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "http://rubygems.org" + +gem "railties", "~> 5.0.5" +gem "sprockets", "~> 3.0" + +gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails51_sprockets_3.gemfile new/gemfiles/rails51_sprockets_3.gemfile --- old/gemfiles/rails51_sprockets_3.gemfile 1970-01-01 01:00:00.000000000 +0100 +++ new/gemfiles/rails51_sprockets_3.gemfile 2017-12-18 14:37:03.000000000 +0100 @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "http://rubygems.org" + +gem "railties", "~> 5.1.3" +gem "sprockets", "~> 3.0" + +gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/js_routes/engine.rb new/lib/js_routes/engine.rb --- old/lib/js_routes/engine.rb 2017-09-05 15:04:17.000000000 +0200 +++ new/lib/js_routes/engine.rb 2017-12-18 14:37:03.000000000 +0100 @@ -1,4 +1,5 @@ -class JsRoutesSprocketsExtension +class JsRoutes +class SprocketsExtension def initialize(filename, &block) @filename = filename @source = block.call @@ -55,14 +56,14 @@ if is_running_rails_32 Rails.application.assets.register_preprocessor( "application/javascript", - JsRoutesSprocketsExtension, + SprocketsExtension, ) else # Other rails version, assumed newer Rails.application.config.assets.configure do |config| config.register_preprocessor( "application/javascript", - JsRoutesSprocketsExtension, + SprocketsExtension, ) end end @@ -71,3 +72,4 @@ end end end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/js_routes/version.rb new/lib/js_routes/version.rb --- old/lib/js_routes/version.rb 2017-09-05 15:04:17.000000000 +0200 +++ new/lib/js_routes/version.rb 2017-12-18 14:37:03.000000000 +0100 @@ -1,3 +1,3 @@ class JsRoutes - VERSION = "1.4.1" + VERSION = "1.4.3" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/js_routes.rb new/lib/js_routes.rb --- old/lib/js_routes.rb 2017-09-05 15:04:17.000000000 +0200 +++ new/lib/js_routes.rb 2017-12-18 14:37:03.000000000 +0100 @@ -37,7 +37,7 @@ } LAST_OPTIONS_KEY = "options".freeze - FILTERED_DEFAULT_PARTS = [:controller, :action, :subdomain] + FILTERED_DEFAULT_PARTS = [:controller, :action] URL_OPTIONS = [:protocol, :domain, :host, :port, :subdomain] class Configuration < Struct.new(*DEFAULTS.keys) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/routes.js new/lib/routes.js --- old/lib/routes.js 2017-09-05 15:04:17.000000000 +0200 +++ new/lib/routes.js 2017-12-18 14:37:03.000000000 +0100 @@ -22,7 +22,7 @@ DeprecatedBehavior = DEPRECATED_BEHAVIOR; - ReservedOptions = ['anchor', 'trailing_slash', 'host', 'port', 'protocol']; + ReservedOptions = ['anchor', 'trailing_slash', 'subdomain', 'host', 'port', 'protocol']; Utils = { configuration: { @@ -352,7 +352,7 @@ return path_fn; }, route_url: function(route_defaults) { - var hostname, port, protocol; + var hostname, port, protocol, subdomain; if (typeof route_defaults === 'string') { return route_defaults; } @@ -360,10 +360,11 @@ if (!hostname) { return ''; } + subdomain = route_defaults.subdomain ? route_defaults.subdomain + '.' : ''; protocol = route_defaults.protocol || Utils.current_protocol(); port = route_defaults.port || (!route_defaults.host ? Utils.current_port() : void 0); port = port ? ":" + port : ''; - return protocol + "://" + hostname + port; + return protocol + "://" + subdomain + hostname + port; }, has_location: function() { return (typeof window !== "undefined" && window !== null ? window.location : void 0) != null; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/routes.js.coffee new/lib/routes.js.coffee --- old/lib/routes.js.coffee 2017-09-05 15:04:17.000000000 +0200 +++ new/lib/routes.js.coffee 2017-12-18 14:37:03.000000000 +0100 @@ -15,6 +15,7 @@ ReservedOptions = [ 'anchor' 'trailing_slash' + 'subdomain' 'host' 'port' 'protocol' @@ -281,11 +282,12 @@ return '' unless hostname + subdomain = if route_defaults.subdomain then route_defaults.subdomain + '.' else '' protocol = route_defaults.protocol || Utils.current_protocol() port = route_defaults.port || (Utils.current_port() unless route_defaults.host) port = if port then ":#{port}" else '' - protocol + "://" + hostname + port + protocol + "://" + subdomain + hostname + port has_location: -> window?.location? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2017-09-05 15:04:17.000000000 +0200 +++ new/metadata 2017-12-18 14:37:02.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: js-routes version: !ruby/object:Gem::Version - version: 1.4.1 + version: 1.4.3 platform: ruby authors: - Bogdan Gusiev autorequire: bindir: bin cert_chain: [] -date: 2017-09-05 00:00:00.000000000 Z +date: 2017-12-18 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: railties @@ -156,14 +156,14 @@ - Readme.md - app/assets/javascripts/js-routes.js.erb - gemfiles/rails32.gemfile -- gemfiles/rails40.gemfile -- gemfiles/rails40_sprockets3.gemfile -- gemfiles/rails41.gemfile -- gemfiles/rails41_sprockets3.gemfile -- gemfiles/rails42.gemfile -- gemfiles/rails42_sprockets3.gemfile -- gemfiles/rails50.gemfile -- gemfiles/rails50_sprockets3.gemfile +- gemfiles/rails40_sprockets_2.gemfile +- gemfiles/rails40_sprockets_3.gemfile +- gemfiles/rails41_sprockets_2.gemfile +- gemfiles/rails41_sprockets_3.gemfile +- gemfiles/rails42_sprockets_2.gemfile +- gemfiles/rails42_sprockets_3.gemfile +- gemfiles/rails50_sprockets_3.gemfile +- gemfiles/rails51_sprockets_3.gemfile - js-routes.gemspec - lib/js-routes.rb - lib/js_routes.rb @@ -202,7 +202,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.6.11 +rubygems_version: 2.6.14 signing_key: specification_version: 4 summary: Brings Rails named routes to javascript diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/js_routes/options_spec.rb new/spec/js_routes/options_spec.rb --- old/spec/js_routes/options_spec.rb 2017-09-05 15:04:17.000000000 +0200 +++ new/spec/js_routes/options_spec.rb 2017-12-18 14:37:03.000000000 +0100 @@ -349,8 +349,8 @@ expect(evaljs("Routes.sso_url()")).to eq("http://sso.example.com:3000" + test_routes.sso_path) end - it "does not override port when specified in route" do - expect(evaljs("Routes.portals_url()")).to eq("http://example.com:8080#{test_routes.portals_path}") + it "does not override parts when specified in route" do + expect(evaljs("Routes.secret_root_url()")).to eq(test_routes.secret_root_url) end end @@ -358,9 +358,6 @@ let(:_options) { { :camel_case => true, :url_links => true, :default_url_options => {:host => "example.com"} } } it "should generate path and url links" do expect(evaljs("Routes.inboxUrl(1)")).to eq("http://example.com#{test_routes.inbox_path(1)}") - expect(evaljs("Routes.newSessionUrl()")).to eq("https://example.com#{test_routes.new_session_path}") - expect(evaljs("Routes.ssoUrl()")).to eq(test_routes.sso_url) - expect(evaljs("Routes.portalsUrl()")).to eq("http://example.com:8080#{test_routes.portals_path}") end end @@ -368,9 +365,6 @@ let(:_options) { { :prefix => "/api", :url_links => true, :default_url_options => {:host => 'example.com'} } } it "should generate path and url links" do expect(evaljs("Routes.inbox_url(1)")).to eq("http://example.com/api#{test_routes.inbox_path(1)}") - expect(evaljs("Routes.new_session_url()")).to eq("https://example.com/api#{test_routes.new_session_path}") - expect(evaljs("Routes.sso_url()")).to eq("http://sso.example.com/api#{test_routes.sso_path}") - expect(evaljs("Routes.portals_url()")).to eq("http://example.com:8080/api#{test_routes.portals_path}") end end @@ -378,9 +372,6 @@ let(:_options) { { :compact => true, :url_links => true, :default_url_options => {:host => 'example.com'} } } it "does not affect url helpers" do expect(evaljs("Routes.inbox_url(1)")).to eq("http://example.com#{test_routes.inbox_path(1)}") - expect(evaljs("Routes.new_session_url()")).to eq("https://example.com#{test_routes.new_session_path}") - expect(evaljs("Routes.sso_url()")).to eq(test_routes.sso_url) - expect(evaljs("Routes.portals_url()")).to eq("http://example.com:8080#{test_routes.portals_path}") end end end @@ -408,20 +399,27 @@ expect(evaljs("Routes.inbox_url(1)")).to eq("http://current.example.com#{test_routes.inbox_path(1)}") expect(evaljs("Routes.inbox_url(1, { test_key: \"test_val\" })")).to eq("http://current.example.com#{test_routes.inbox_path(1, :test_key => "test_val")}") expect(evaljs("Routes.new_session_url()")).to eq("https://current.example.com#{test_routes.new_session_path}") - expect(evaljs("Routes.sso_url()")).to eq("http://sso.example.com#{test_routes.sso_path}") end + it "doesn't use current when specified in the route" do + expect(evaljs("Routes.sso_url()")).to eq(test_routes.sso_url) + end + it "uses host option as an argument" do - expect(evaljs("Routes.portals_url({host: 'another.com'})")).to eq(test_routes.portals_url(host: 'another.com')) + expect(evaljs("Routes.secret_root_url({host: 'another.com'})")).to eq(test_routes.secret_root_url(host: 'another.com')) end it "uses port option as an argument" do - expect(evaljs("Routes.portals_url({host: 'localhost', port: 8080})")).to eq(test_routes.portals_url(host: 'localhost', port: 8080)) + expect(evaljs("Routes.secret_root_url({host: 'localhost', port: 8080})")).to eq(test_routes.secret_root_url(host: 'localhost', port: 8080)) end it "uses protocol option as an argument" do - expect(evaljs("Routes.portals_url({host: 'localhost', protocol: 'https'})")).to eq(test_routes.portals_url(protocol: 'https', host: 'localhost')) + expect(evaljs("Routes.secret_root_url({host: 'localhost', protocol: 'https'})")).to eq(test_routes.secret_root_url(protocol: 'https', host: 'localhost')) + end + + it "uses subdomain option as an argument" do + expect(evaljs("Routes.secret_root_url({subdomain: 'custom'})")).to eq(test_routes.secret_root_url(subdomain: 'custom')) end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/js_routes/rails_routes_compatibility_spec.rb new/spec/js_routes/rails_routes_compatibility_spec.rb --- old/spec/js_routes/rails_routes_compatibility_spec.rb 2017-09-05 15:04:17.000000000 +0200 +++ new/spec/js_routes/rails_routes_compatibility_spec.rb 2017-12-18 14:37:03.000000000 +0100 @@ -332,9 +332,6 @@ expect(evaljs("Routes.inbox_message_path(5, {id: 7, q: 'hello', _options: true})")).to eq(test_routes.inbox_message_path(5, id: 7, q: 'hello')) end - it "should check for options special key" do - end - it "should support 0 as an id option" do expect(evaljs("Routes.inbox_path({id: 0})")).to eq(test_routes.inbox_path(0)) end 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 2017-09-05 15:04:17.000000000 +0200 +++ new/spec/spec_helper.rb 2017-12-18 14:37:03.000000000 +0100 @@ -107,7 +107,7 @@ value.to_h.map do |k,v| [k, inspectify(v)] end.to_h - when String, nil, Fixnum, FalseClass, TrueClass + when String, nil, Integer, FalseClass, TrueClass value else raise "wtf #{value.class}?" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/support/routes.rb new/spec/support/routes.rb --- old/spec/support/routes.rb 2017-09-05 15:04:17.000000000 +0200 +++ new/spec/support/routes.rb 2017-12-18 14:37:03.000000000 +0100 @@ -8,25 +8,24 @@ get 'support(/page/:page)', to: BlogEngine::Engine, as: 'support' - resources :inboxes do - resources :messages do - resources :attachments + resources :inboxes, only: [:index, :show] do + resources :messages, only: [:index, :show] do + resources :attachments, only: [:new, :show] end end root :to => "inboxes#index" namespace :admin do - resources :users + resources :users, only: [:index] end scope "/returns/:return" do - resources :objects + resources :objects, only: [:show] end - resources :returns scope "(/optional/:optional_id)" do - resources :things + resources :things, only: [:show, :index] end get "(/sep1/:first_optional)/sep2/:second_required/sep3/:third_required(/:forth_optional)", @@ -51,11 +50,11 @@ get '/привет' => "foo#foo", :as => :hello get '(/o/:organization)/search/:q' => "foo#foo", as: :search - resources :sessions, :only => [:new, :create, :destroy], :protocol => 'https' - + resources :sessions, :only => [:new, :create], :protocol => 'https' get '/' => 'sso#login', host: 'sso.example.com', as: :sso + get "/" => "a#b", subdomain: 'www', host: 'example.com', port: 88, as: :secret_root - resources :portals, :port => 8080 + resources :portals, :port => 8080, only: [:index] get '/with_defaults' => 'foo#foo', defaults: { bar: 'tested', format: :json }, format: :true @@ -63,7 +62,7 @@ get "/purchases" => "purchases#index" end - resources :budgies do + resources :budgies, only: [:show, :index] do get "descendents" end
