Bundle update

This commit is contained in:
echarp 2018-09-15 15:05:21 +02:00
parent 61529e4ecf
commit c65ca2579c
11 changed files with 20 additions and 7 deletions

View File

@ -205,7 +205,8 @@ GEM
concurrent-ruby (~> 1.0)
i18n-active_record (0.2.2)
i18n (>= 0.5.0)
icalendar (2.4.1)
icalendar (2.5.0)
ice_cube (~> 0.16)
inherited_resources (1.9.0)
actionpack (>= 4.2, < 5.3)
has_scope (~> 0.6)
@ -245,7 +246,7 @@ GEM
lumberjack (1.0.13)
mail (2.7.0)
mini_mime (>= 0.1.1)
marcel (0.3.2)
marcel (0.3.3)
mimemagic (~> 0.3.2)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
@ -308,7 +309,7 @@ GEM
rails-assets-jquery-visible (1.2.0)
rails-assets-jquery (> 1.6.0)
rails-assets-leaflet (1.3.4)
rails-assets-leaflet.markercluster (1.4.0)
rails-assets-leaflet.markercluster (1.4.1)
rails-assets-leaflet (>= 1.3.1)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
@ -345,7 +346,7 @@ GEM
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
rubocop (0.58.2)
rubocop (0.59.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
@ -408,7 +409,7 @@ GEM
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
tinymce-rails (4.8.2)
tinymce-rails (4.8.3)
railties (>= 3.1.1)
tinymce-rails-langs (4.20180103)
tinymce-rails (~> 4.1, >= 4.1.10)
@ -428,7 +429,7 @@ GEM
simple_oauth (~> 0.3.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.18)
uglifier (4.1.19)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
@ -436,7 +437,7 @@ GEM
unicode-display_width (1.4.0)
warden (1.2.7)
rack (>= 1.0)
web-console (3.6.2)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)

View File

@ -88,6 +88,7 @@ class ModerationsController < ApplicationController
def generate_destroy_reason
@moderation.attributes = moderation_params
return if params[:reason] == 'r_4'
@moderation.reason = t "moderations.refuse.reason_#{params[:reason]}_long"
end
end

View File

@ -4,6 +4,7 @@ module DigestHelper
# link multiple times
def renumber_footnotes(id, description)
return if description.nil? || description.blank?
description.gsub(/\[(\d)+\]/, "[#{id}_\\1]")
end
end

View File

@ -64,6 +64,7 @@ class Event < ApplicationRecord
end)
scope :region, (lambda do |region|
return if region.nil? || region == 'all' || region.to_i.zero?
temp = Region.find region
where region: [temp, temp.regions].flatten
end)

View File

@ -9,12 +9,14 @@ class EventCallbacks
def self.after_create(event)
return unless event.event.nil?
EventMailer.create(event).deliver_now!
ModerationMailer.create(event).deliver_now!
end
def self.before_update(event)
return unless event.will_save_change_to_moderated? && event.moderated?
event.decision_time = Time.zone.now
create_repeats event if event.repeat.try(:positive?) && event.rule
end
@ -43,6 +45,7 @@ class EventCallbacks
def self.after_destroy(event)
return unless ActionMailer::Base.default_url_options[:host]
return if event.reason == 'r_0'
EventMailer.destroy(event).deliver_now
ModerationMailer.destroy(event).deliver_now
end

View File

@ -34,6 +34,7 @@ class Orga < ApplicationRecord
scope :kind, ->(kind) { where kind: kind }
scope :region, (lambda do |region|
return if region.nil? || region == 'all' || region.to_i.zero?
temp = Region.find region
where region: [temp, temp.regions].flatten
end)

View File

@ -9,6 +9,7 @@ class Region < ApplicationRecord
scope :local, ->(*) { where 'url IS NULL OR url = \'\'' }
scope :region, (lambda do |region|
return if region.nil? || region == 'all' || region.to_i.zero?
temp = Region.find region
where region: [temp, temp.regions].flatten
end)

View File

@ -3,6 +3,7 @@ def meta(xml, event)
xml.dc :date, event.start_time.iso8601
return unless event.latitude || event.longitude
xml.georss :point, event.latitude, ' ', event.longitude
end

View File

@ -4,6 +4,7 @@ class DeviseCreateAdminUsers < ActiveRecord::Migration
super
# Create a default user
return unless direction == :up
AdminUser.create!(email: 'admin@example.com', password: 'password',
password_confirmation: 'password')
end

View File

@ -4,6 +4,7 @@
class ChangeCollationForTagNames < ActiveRecord::Migration
def up
return unless ActsAsTaggableOn::Utils.using_mysql?
execute 'ALTER TABLE tags MODIFY name varchar(255)
CHARACTER SET utf8 COLLATE utf8_bin;'
end

View File

@ -3,6 +3,7 @@ class AddLuAndTn < ActiveRecord::Migration
def self.up
say 'Creates LU and TN regions'
return if Region.exists? name: 'Luxembourg'
[
{ name: 'Luxembourg', code: :LU, url: '//www.agendadulibre.org' },
{ name: 'Tunisie', code: :TN, url: '//www.agendadulibre.org' }