Hello community,
here is the log from the commit of package urlwatch for openSUSE:Factory checked in at 2018-10-25 09:11:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/urlwatch (Old)
and /work/SRC/openSUSE:Factory/.urlwatch.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "urlwatch"
Thu Oct 25 09:11:20 2018 rev:14 rq:644180 version:2.15
Changes:
--------
--- /work/SRC/openSUSE:Factory/urlwatch/urlwatch.changes 2018-10-17 08:41:26.345854049 +0200
+++ /work/SRC/openSUSE:Factory/.urlwatch.new/urlwatch.changes 2018-10-25 09:11:24.566323301 +0200
@@ -1,0 +2,8 @@
+Wed Oct 24 07:43:03 UTC 2018 - mvetter@suse.com
+
+- Update to 2.15:
+ * Added support for Mailgun regions (by Daniel Peukert, PR#280)
+ * Added allowing multiple occurences of 'filter' when adding jobs in CLI (PR#278)
+ * Fixed incorrect name for chat_id config in the default config (by Robin B, PR#276)
+
+-------------------------------------------------------------------
Old:
----
urlwatch-2.14.tar.gz
New:
----
urlwatch-2.15.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ urlwatch.spec ++++++
--- /var/tmp/diff_new_pack.ZnpgAF/_old 2018-10-25 09:11:24.974323057 +0200
+++ /var/tmp/diff_new_pack.ZnpgAF/_new 2018-10-25 09:11:24.978323054 +0200
@@ -12,12 +12,12 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via https://bugs.opensuse.org/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: urlwatch
-Version: 2.14
+Version: 2.15
Release: 0
Summary: A tool for monitoring webpages for updates
License: BSD-3-Clause
++++++ urlwatch-2.14.tar.gz -> urlwatch-2.15.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urlwatch-2.14/CHANGELOG.md new/urlwatch-2.15/CHANGELOG.md
--- old/urlwatch-2.14/CHANGELOG.md 2018-08-30 10:36:16.000000000 +0200
+++ new/urlwatch-2.15/CHANGELOG.md 2018-10-23 19:58:17.000000000 +0200
@@ -4,6 +4,16 @@
The format mostly follows [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
+## [2.15] -- 2018-10-23
+
+### Added
+- Support for Mailgun regions (by Daniel Peukert, PR#280)
+- CLI: Allow multiple occurences of 'filter' when adding jobs (PR#278)
+
+### Changed
+- Fixed incorrect name for chat_id config in the default config (by Robin B, PR#276)
+
+
## [2.14] -- 2018-08-30
### Added
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urlwatch-2.14/lib/urlwatch/__init__.py new/urlwatch-2.15/lib/urlwatch/__init__.py
--- old/urlwatch-2.14/lib/urlwatch/__init__.py 2018-08-30 10:36:16.000000000 +0200
+++ new/urlwatch-2.15/lib/urlwatch/__init__.py 2018-10-23 19:58:17.000000000 +0200
@@ -12,5 +12,5 @@
__author__ = 'Thomas Perl '
__license__ = 'BSD'
__url__ = 'https://thp.io/2008/urlwatch/'
-__version__ = '2.14'
+__version__ = '2.15'
__user_agent__ = '%s/%s (+https://thp.io/2008/urlwatch/info.html)' % (pkgname, __version__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urlwatch-2.14/lib/urlwatch/command.py new/urlwatch-2.15/lib/urlwatch/command.py
--- old/urlwatch-2.14/lib/urlwatch/command.py 2018-08-30 10:36:16.000000000 +0200
+++ new/urlwatch-2.15/lib/urlwatch/command.py 2018-10-23 19:58:17.000000000 +0200
@@ -145,7 +145,13 @@
save = False
if self.urlwatch_config.add is not None:
- d = {k: v for k, v in (item.split('=', 1) for item in self.urlwatch_config.add.split(','))}
+ # Allow multiple specifications of filter=, so that multiple filters can be specified on the CLI
+ items = [item.split('=', 1) for item in self.urlwatch_config.add.split(',')]
+ filters = [v for k, v in items if k == 'filter']
+ items = [(k, v) for k, v in items if k != 'filter']
+ d = {k: v for k, v in items}
+ d['filter'] = ','.join(filters)
+
job = JobBase.unserialize(d)
print('Adding %r' % (job,))
self.urlwatcher.jobs.append(job)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urlwatch-2.14/lib/urlwatch/reporters.py new/urlwatch-2.15/lib/urlwatch/reporters.py
--- old/urlwatch-2.14/lib/urlwatch/reporters.py 2018-08-30 10:36:16.000000000 +0200
+++ new/urlwatch-2.15/lib/urlwatch/reporters.py 2018-10-23 19:58:17.000000000 +0200
@@ -447,17 +447,24 @@
class MailGunReporter(TextReporter):
- """Custom email reporter that use mailgun service"""
+ """Custom email reporter that uses Mailgun"""
__kind__ = 'mailgun'
def submit(self):
+ region = self.config.get('region', '')
domain = self.config['domain']
api_key = self.config['api_key']
from_name = self.config['from_name']
from_mail = self.config['from_mail']
to = self.config['to']
+ if region == 'us':
+ region = ''
+
+ if region != '':
+ region = ".{0}".format(region)
+
filtered_job_states = list(self.report.get_filtered_job_states(self.job_states))
subject_args = {
'count': len(filtered_job_states),
@@ -469,12 +476,12 @@
body_html = '\n'.join(self.convert(HtmlReporter).submit())
if not body_text:
- logger.debug('Not calling mailgun API (no changes)')
+ logger.debug('Not calling Mailgun API (no changes)')
return
- logger.debug("Sending mailgun request for domain:'{0}'".format(domain))
+ logger.debug("Sending Mailgun request for domain:'{0}'".format(domain))
result = requests.post(
- "https://api.mailgun.net/v3/{0}/messages".format(domain),
+ "https://api{0}.mailgun.net/v3/{1}/messages".format(region, domain),
auth=("api", api_key),
data={"from": "{0} <{1}>".format(from_name, from_mail),
"to": to,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urlwatch-2.14/lib/urlwatch/storage.py new/urlwatch-2.15/lib/urlwatch/storage.py
--- old/urlwatch-2.14/lib/urlwatch/storage.py 2018-08-30 10:36:16.000000000 +0200
+++ new/urlwatch-2.15/lib/urlwatch/storage.py 2018-10-23 19:58:17.000000000 +0200
@@ -100,10 +100,11 @@
'telegram': {
'enabled': False,
'bot_token': '',
- 'chat-id': '',
+ 'chat_id': '',
},
'mailgun': {
'enabled': False,
+ 'region': 'us',
'api_key': '',
'domain': '',
'from_mail': '',