Ruby 2.3.x or newer is required. Bump to 1.0.5

This commit is contained in:
Alexander Meindl
2019-05-15 20:06:35 +02:00
parent c670b5606d
commit bf8d2d3d4d
7 changed files with 17 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ Rails:
Enabled: true
AllCops:
TargetRubyVersion: 2.2
TargetRubyVersion: 2.3
TargetRailsVersion: 5.2
Metrics/AbcSize:
@@ -47,6 +47,9 @@ Performance/ChainArrayAllocation:
Style/AutoResourceCleanup:
Enabled: true
Style/FrozenStringLiteralComment:
Enabled: false
Style/Documentation:
Enabled: false

View File

@@ -1,9 +1,9 @@
language: ruby
rvm:
- 2.5.3
- 2.4.5
- 2.3.8
- 2.2.10
env:
- REDMINE_VER=4.0-stable DB=postgresql

View File

@@ -1,6 +1,12 @@
Changelog
=========
1.0.5
-----
- ruby 2.3.x or newer is required
1.0.4
-----

View File

@@ -57,7 +57,7 @@ Requirements
------------
* Redmine version >= 3.0.0
* Ruby version >= 2.2.10
* Ruby version >= 2.3.0
Installation

View File

@@ -29,7 +29,7 @@ class Messenger
username = Messenger.textfield_for_project(options[:project], :messenger_username)
params[:username] = username if username.present?
params[:attachments] = [options[:attachment]] if options[:attachment] && options[:attachment].any?
params[:attachments] = [options[:attachment]] if options[:attachment]&.any?
icon = Messenger.textfield_for_project(options[:project], :messenger_icon)
if icon.present?

View File

@@ -1,3 +1,5 @@
raise "\n\033[31mredmine_messenger requires ruby 2.3 or newer. Please update your ruby version.\033[0m" if RUBY_VERSION < '2.3'
require 'redmine'
require 'redmine_messenger'
@@ -7,7 +9,7 @@ Redmine::Plugin.register :redmine_messenger do
url 'https://github.com/alphanodes/redmine_messenger'
author_url 'https://alphanodes.com/'
description 'Messenger integration for Slack, Discord, Rocketchat and Mattermost support'
version '1.0.4'
version '1.0.5'
requires_redmine version_or_higher: '3.0.0'

View File

@@ -35,7 +35,7 @@ module RedmineMessenger
short: true }
end
if RedmineMessenger.setting?(:display_watchers) && watcher_users.count > 0
if RedmineMessenger.setting?(:display_watchers) && watcher_users.count.positive?
attachment[:fields] << {
title: I18n.t(:field_watcher),
value: ERB::Util.html_escape(watcher_users.join(', ')),