Hello community,
here is the log from the commit of package rubygem-validate_url for
openSUSE:Factory checked in at 2020-10-05 19:35:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-validate_url (Old)
and /work/SRC/openSUSE:Factory/.rubygem-validate_url.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-validate_url"
Mon Oct 5 19:35:16 2020 rev:4 rq:838093 version:1.0.13
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-validate_url/rubygem-validate_url.changes
2019-06-19 21:01:35.694148288 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-validate_url.new.4249/rubygem-validate_url.changes
2020-10-05 19:35:24.137333670 +0200
@@ -1,0 +2,6 @@
+Fri Sep 25 15:06:43 UTC 2020 - Stephan Kulow <[email protected]>
+
+updated to version 1.0.13
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
validate_url-1.0.8.gem
New:
----
validate_url-1.0.13.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-validate_url.spec ++++++
--- /var/tmp/diff_new_pack.lteMhW/_old 2020-10-05 19:35:25.997335487 +0200
+++ /var/tmp/diff_new_pack.lteMhW/_new 2020-10-05 19:35:26.001335491 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-validate_url
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# 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-validate_url
-Version: 1.0.8
+Version: 1.0.13
Release: 0
%define mod_name validate_url
%define mod_full_name %{mod_name}-%{version}
@@ -32,7 +32,7 @@
BuildRequires: %{rubygem gem2rpm}
BuildRequires: %{ruby}
BuildRequires: ruby-macros >= 5
-Url: http://github.com/perfectline/validates_url/tree/master
+URL: http://github.com/perfectline/validates_url/tree/master
Source: https://rubygems.org/gems/%{mod_full_name}.gem
Source1: gem2rpm.yml
Summary: Library for validating urls in Rails
++++++ validate_url-1.0.8.gem -> validate_url-1.0.13.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2019-04-03 08:20:55.000000000 +0200
+++ new/README.md 2020-09-23 06:46:15.000000000 +0200
@@ -8,7 +8,7 @@
# add this to your Gemfile
gem "validate_url"
-# and run
+# or run
sudo gem install validate_url
```
@@ -51,6 +51,22 @@
end
```
+### With RSpec
+
+Require the matcher in `spec_helper.rb` or `rails_helper.rb`:
+
+```ruby
+require 'validate_url/rspec_matcher'
+```
+
+In your spec:
+
+```ruby
+describe Unicorn
+ it { is_expected.to validate_url_of(:homepage) }
+end
+```
+
### I18n
The default error message `is not a valid URL`.
@@ -70,3 +86,15 @@
Validates URL is Copyright © 2010-2014
[PerfectLine](http://www.perfectline.co), LLC. It is free software, and may be
redistributed under the terms specified in the LICENSE file.
+
+## How to push new version
+
+```
+rake version:bump:patch
+rake gemspec
+```
+Fix validate_url.gemspec to remove unneeded wrong strings
+```
+gem build validate_url.gemspec
+gem push validate_url-1.0.8.gem
+```
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/locale/ar.yml new/lib/locale/ar.yml
--- old/lib/locale/ar.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/locale/ar.yml 2020-09-23 06:46:15.000000000 +0200
@@ -0,0 +1,4 @@
+ar:
+ errors:
+ messages:
+ url: عنوان الموقع غير صالح
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/locale/es.yml new/lib/locale/es.yml
--- old/lib/locale/es.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/locale/es.yml 2020-09-23 06:46:15.000000000 +0200
@@ -0,0 +1,4 @@
+es:
+ errors:
+ messages:
+ url: no es una URL válida
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/locale/ja.yml new/lib/locale/ja.yml
--- old/lib/locale/ja.yml 2019-04-03 08:20:55.000000000 +0200
+++ new/lib/locale/ja.yml 2020-09-23 06:46:15.000000000 +0200
@@ -1,4 +1,4 @@
ja:
errors:
messages:
- url: は不正なURLです。
+ url: は不正なURLです
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/locale/vi.yml new/lib/locale/vi.yml
--- old/lib/locale/vi.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/locale/vi.yml 2020-09-23 06:46:15.000000000 +0200
@@ -0,0 +1,4 @@
+vi:
+ errors:
+ messages:
+ url: không phải là một địa chỉ liên kết hợp lệ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rspec_matcher.rb new/lib/rspec_matcher.rb
--- old/lib/rspec_matcher.rb 2019-04-03 08:20:55.000000000 +0200
+++ new/lib/rspec_matcher.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-RSpec::Matchers.define :validate_url_of do |attribute|
- match do
- actual = subject.is_a?(Class) ? subject.new : subject
- actual.send(:"#{attribute}=", "htp://invalidurl")
- expect(actual).to be_invalid
- @expected_message ||= I18n.t("errors.messages.url")
- expect(actual.errors.messages[attribute.to_sym]).to
include(@expected_message)
- end
- chain :with_message do |message|
- @expected_message = message
- end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/validate_url/rspec_matcher.rb
new/lib/validate_url/rspec_matcher.rb
--- old/lib/validate_url/rspec_matcher.rb 1970-01-01 01:00:00.000000000
+0100
+++ new/lib/validate_url/rspec_matcher.rb 2020-09-23 06:46:15.000000000
+0200
@@ -0,0 +1,12 @@
+RSpec::Matchers.define :validate_url_of do |attribute|
+ match do
+ actual = subject.is_a?(Class) ? subject.new : subject
+ actual.send(:"#{attribute}=", "htp://invalidurl")
+ expect(actual).to be_invalid
+ @expected_message ||= I18n.t("errors.messages.url")
+ expect(actual.errors.messages[attribute.to_sym]).to
include(@expected_message)
+ end
+ chain :with_message do |message|
+ @expected_message = message
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/validate_url.rb new/lib/validate_url.rb
--- old/lib/validate_url.rb 2019-04-03 08:20:55.000000000 +0200
+++ new/lib/validate_url.rb 2020-09-23 06:46:15.000000000 +0200
@@ -20,20 +20,20 @@
def validate_each(record, attribute, value)
schemes = [*options.fetch(:schemes)].map(&:to_s)
begin
- escaped_uri = value ? URI.escape(value) : nil
- uri = URI.parse(escaped_uri)
+ uri = URI.parse(value)
host = uri && uri.host
scheme = uri && uri.scheme
- valid_suffix = !options.fetch(:public_suffix) || (host &&
PublicSuffix.valid?(host, :default_rule => nil))
- valid_no_local = !options.fetch(:no_local) || (host &&
host.include?('.'))
+ valid_raw_url = scheme && value =~ /\A#{URI::regexp([scheme])}\z/
valid_scheme = host && scheme && schemes.include?(scheme)
+ valid_no_local = !options.fetch(:no_local) || (host &&
host.include?('.'))
+ valid_suffix = !options.fetch(:public_suffix) || (host &&
PublicSuffix.valid?(host, :default_rule => nil))
- unless valid_scheme && valid_no_local && valid_suffix
+ unless valid_raw_url && valid_scheme && valid_no_local &&
valid_suffix
record.errors.add(attribute, options.fetch(:message), value: value)
end
rescue URI::InvalidURIError
- record.errors.add(attribute, :url, filtered_options(value))
+ record.errors.add(attribute, :url, **filtered_options(value))
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2019-04-03 08:20:55.000000000 +0200
+++ new/metadata 2020-09-23 06:46:15.000000000 +0200
@@ -1,16 +1,16 @@
--- !ruby/object:Gem::Specification
name: validate_url
version: !ruby/object:Gem::Version
- version: 1.0.8
+ version: 1.0.13
platform: ruby
authors:
- Tanel Suurhans
- Tarmo Lehtpuu
- Vladimir Krylov
-autorequire:
+autorequire:
bindir: bin
cert_chain: []
-date: 2019-04-03 00:00:00.000000000 Z
+date: 2020-09-23 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: jeweler
@@ -125,8 +125,10 @@
- README.md
- init.rb
- install.rb
+- lib/locale/ar.yml
- lib/locale/de.yml
- lib/locale/en.yml
+- lib/locale/es.yml
- lib/locale/fr.yml
- lib/locale/it.yml
- lib/locale/ja.yml
@@ -136,14 +138,15 @@
- lib/locale/ro.yml
- lib/locale/ru.yml
- lib/locale/tr.yml
+- lib/locale/vi.yml
- lib/locale/zh-CN.yml
- lib/locale/zh-TW.yml
-- lib/rspec_matcher.rb
- lib/validate_url.rb
+- lib/validate_url/rspec_matcher.rb
homepage: http://github.com/perfectline/validates_url/tree/master
licenses: []
metadata: {}
-post_install_message:
+post_install_message:
rdoc_options: []
require_paths:
- lib
@@ -158,9 +161,8 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubyforge_project:
-rubygems_version: 2.4.5.1
-signing_key:
+rubygems_version: 3.0.8
+signing_key:
specification_version: 4
summary: Library for validating urls in Rails.
test_files: []