Bundle update
This commit is contained in:
parent
61529e4ecf
commit
c65ca2579c
15
Gemfile.lock
15
Gemfile.lock
@ -205,7 +205,8 @@ GEM
|
|||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
i18n-active_record (0.2.2)
|
i18n-active_record (0.2.2)
|
||||||
i18n (>= 0.5.0)
|
i18n (>= 0.5.0)
|
||||||
icalendar (2.4.1)
|
icalendar (2.5.0)
|
||||||
|
ice_cube (~> 0.16)
|
||||||
inherited_resources (1.9.0)
|
inherited_resources (1.9.0)
|
||||||
actionpack (>= 4.2, < 5.3)
|
actionpack (>= 4.2, < 5.3)
|
||||||
has_scope (~> 0.6)
|
has_scope (~> 0.6)
|
||||||
@ -245,7 +246,7 @@ GEM
|
|||||||
lumberjack (1.0.13)
|
lumberjack (1.0.13)
|
||||||
mail (2.7.0)
|
mail (2.7.0)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
marcel (0.3.2)
|
marcel (0.3.3)
|
||||||
mimemagic (~> 0.3.2)
|
mimemagic (~> 0.3.2)
|
||||||
memoizable (0.4.2)
|
memoizable (0.4.2)
|
||||||
thread_safe (~> 0.3, >= 0.3.1)
|
thread_safe (~> 0.3, >= 0.3.1)
|
||||||
@ -308,7 +309,7 @@ GEM
|
|||||||
rails-assets-jquery-visible (1.2.0)
|
rails-assets-jquery-visible (1.2.0)
|
||||||
rails-assets-jquery (> 1.6.0)
|
rails-assets-jquery (> 1.6.0)
|
||||||
rails-assets-leaflet (1.3.4)
|
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-assets-leaflet (>= 1.3.1)
|
||||||
rails-controller-testing (1.0.2)
|
rails-controller-testing (1.0.2)
|
||||||
actionpack (~> 5.x, >= 5.0.1)
|
actionpack (~> 5.x, >= 5.0.1)
|
||||||
@ -345,7 +346,7 @@ GEM
|
|||||||
responders (2.4.0)
|
responders (2.4.0)
|
||||||
actionpack (>= 4.2.0, < 5.3)
|
actionpack (>= 4.2.0, < 5.3)
|
||||||
railties (>= 4.2.0, < 5.3)
|
railties (>= 4.2.0, < 5.3)
|
||||||
rubocop (0.58.2)
|
rubocop (0.59.1)
|
||||||
jaro_winkler (~> 1.5.1)
|
jaro_winkler (~> 1.5.1)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 2.5, != 2.5.1.1)
|
parser (>= 2.5, != 2.5.1.1)
|
||||||
@ -408,7 +409,7 @@ GEM
|
|||||||
thor (0.20.0)
|
thor (0.20.0)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.8)
|
tilt (2.0.8)
|
||||||
tinymce-rails (4.8.2)
|
tinymce-rails (4.8.3)
|
||||||
railties (>= 3.1.1)
|
railties (>= 3.1.1)
|
||||||
tinymce-rails-langs (4.20180103)
|
tinymce-rails-langs (4.20180103)
|
||||||
tinymce-rails (~> 4.1, >= 4.1.10)
|
tinymce-rails (~> 4.1, >= 4.1.10)
|
||||||
@ -428,7 +429,7 @@ GEM
|
|||||||
simple_oauth (~> 0.3.0)
|
simple_oauth (~> 0.3.0)
|
||||||
tzinfo (1.2.5)
|
tzinfo (1.2.5)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (4.1.18)
|
uglifier (4.1.19)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
unf_ext
|
unf_ext
|
||||||
@ -436,7 +437,7 @@ GEM
|
|||||||
unicode-display_width (1.4.0)
|
unicode-display_width (1.4.0)
|
||||||
warden (1.2.7)
|
warden (1.2.7)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
web-console (3.6.2)
|
web-console (3.7.0)
|
||||||
actionview (>= 5.0)
|
actionview (>= 5.0)
|
||||||
activemodel (>= 5.0)
|
activemodel (>= 5.0)
|
||||||
bindex (>= 0.4.0)
|
bindex (>= 0.4.0)
|
||||||
|
@ -88,6 +88,7 @@ class ModerationsController < ApplicationController
|
|||||||
def generate_destroy_reason
|
def generate_destroy_reason
|
||||||
@moderation.attributes = moderation_params
|
@moderation.attributes = moderation_params
|
||||||
return if params[:reason] == 'r_4'
|
return if params[:reason] == 'r_4'
|
||||||
|
|
||||||
@moderation.reason = t "moderations.refuse.reason_#{params[:reason]}_long"
|
@moderation.reason = t "moderations.refuse.reason_#{params[:reason]}_long"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4,6 +4,7 @@ module DigestHelper
|
|||||||
# link multiple times
|
# link multiple times
|
||||||
def renumber_footnotes(id, description)
|
def renumber_footnotes(id, description)
|
||||||
return if description.nil? || description.blank?
|
return if description.nil? || description.blank?
|
||||||
|
|
||||||
description.gsub(/\[(\d)+\]/, "[#{id}_\\1]")
|
description.gsub(/\[(\d)+\]/, "[#{id}_\\1]")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -64,6 +64,7 @@ class Event < ApplicationRecord
|
|||||||
end)
|
end)
|
||||||
scope :region, (lambda do |region|
|
scope :region, (lambda do |region|
|
||||||
return if region.nil? || region == 'all' || region.to_i.zero?
|
return if region.nil? || region == 'all' || region.to_i.zero?
|
||||||
|
|
||||||
temp = Region.find region
|
temp = Region.find region
|
||||||
where region: [temp, temp.regions].flatten
|
where region: [temp, temp.regions].flatten
|
||||||
end)
|
end)
|
||||||
|
@ -9,12 +9,14 @@ class EventCallbacks
|
|||||||
|
|
||||||
def self.after_create(event)
|
def self.after_create(event)
|
||||||
return unless event.event.nil?
|
return unless event.event.nil?
|
||||||
|
|
||||||
EventMailer.create(event).deliver_now!
|
EventMailer.create(event).deliver_now!
|
||||||
ModerationMailer.create(event).deliver_now!
|
ModerationMailer.create(event).deliver_now!
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.before_update(event)
|
def self.before_update(event)
|
||||||
return unless event.will_save_change_to_moderated? && event.moderated?
|
return unless event.will_save_change_to_moderated? && event.moderated?
|
||||||
|
|
||||||
event.decision_time = Time.zone.now
|
event.decision_time = Time.zone.now
|
||||||
create_repeats event if event.repeat.try(:positive?) && event.rule
|
create_repeats event if event.repeat.try(:positive?) && event.rule
|
||||||
end
|
end
|
||||||
@ -43,6 +45,7 @@ class EventCallbacks
|
|||||||
def self.after_destroy(event)
|
def self.after_destroy(event)
|
||||||
return unless ActionMailer::Base.default_url_options[:host]
|
return unless ActionMailer::Base.default_url_options[:host]
|
||||||
return if event.reason == 'r_0'
|
return if event.reason == 'r_0'
|
||||||
|
|
||||||
EventMailer.destroy(event).deliver_now
|
EventMailer.destroy(event).deliver_now
|
||||||
ModerationMailer.destroy(event).deliver_now
|
ModerationMailer.destroy(event).deliver_now
|
||||||
end
|
end
|
||||||
|
@ -34,6 +34,7 @@ class Orga < ApplicationRecord
|
|||||||
scope :kind, ->(kind) { where kind: kind }
|
scope :kind, ->(kind) { where kind: kind }
|
||||||
scope :region, (lambda do |region|
|
scope :region, (lambda do |region|
|
||||||
return if region.nil? || region == 'all' || region.to_i.zero?
|
return if region.nil? || region == 'all' || region.to_i.zero?
|
||||||
|
|
||||||
temp = Region.find region
|
temp = Region.find region
|
||||||
where region: [temp, temp.regions].flatten
|
where region: [temp, temp.regions].flatten
|
||||||
end)
|
end)
|
||||||
|
@ -9,6 +9,7 @@ class Region < ApplicationRecord
|
|||||||
scope :local, ->(*) { where 'url IS NULL OR url = \'\'' }
|
scope :local, ->(*) { where 'url IS NULL OR url = \'\'' }
|
||||||
scope :region, (lambda do |region|
|
scope :region, (lambda do |region|
|
||||||
return if region.nil? || region == 'all' || region.to_i.zero?
|
return if region.nil? || region == 'all' || region.to_i.zero?
|
||||||
|
|
||||||
temp = Region.find region
|
temp = Region.find region
|
||||||
where region: [temp, temp.regions].flatten
|
where region: [temp, temp.regions].flatten
|
||||||
end)
|
end)
|
||||||
|
@ -3,6 +3,7 @@ def meta(xml, event)
|
|||||||
xml.dc :date, event.start_time.iso8601
|
xml.dc :date, event.start_time.iso8601
|
||||||
|
|
||||||
return unless event.latitude || event.longitude
|
return unless event.latitude || event.longitude
|
||||||
|
|
||||||
xml.georss :point, event.latitude, ' ', event.longitude
|
xml.georss :point, event.latitude, ' ', event.longitude
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ class DeviseCreateAdminUsers < ActiveRecord::Migration
|
|||||||
super
|
super
|
||||||
# Create a default user
|
# Create a default user
|
||||||
return unless direction == :up
|
return unless direction == :up
|
||||||
|
|
||||||
AdminUser.create!(email: 'admin@example.com', password: 'password',
|
AdminUser.create!(email: 'admin@example.com', password: 'password',
|
||||||
password_confirmation: 'password')
|
password_confirmation: 'password')
|
||||||
end
|
end
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
class ChangeCollationForTagNames < ActiveRecord::Migration
|
class ChangeCollationForTagNames < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
return unless ActsAsTaggableOn::Utils.using_mysql?
|
return unless ActsAsTaggableOn::Utils.using_mysql?
|
||||||
|
|
||||||
execute 'ALTER TABLE tags MODIFY name varchar(255)
|
execute 'ALTER TABLE tags MODIFY name varchar(255)
|
||||||
CHARACTER SET utf8 COLLATE utf8_bin;'
|
CHARACTER SET utf8 COLLATE utf8_bin;'
|
||||||
end
|
end
|
||||||
|
@ -3,6 +3,7 @@ class AddLuAndTn < ActiveRecord::Migration
|
|||||||
def self.up
|
def self.up
|
||||||
say 'Creates LU and TN regions'
|
say 'Creates LU and TN regions'
|
||||||
return if Region.exists? name: 'Luxembourg'
|
return if Region.exists? name: 'Luxembourg'
|
||||||
|
|
||||||
[
|
[
|
||||||
{ name: 'Luxembourg', code: :LU, url: '//www.agendadulibre.org' },
|
{ name: 'Luxembourg', code: :LU, url: '//www.agendadulibre.org' },
|
||||||
{ name: 'Tunisie', code: :TN, url: '//www.agendadulibre.org' }
|
{ name: 'Tunisie', code: :TN, url: '//www.agendadulibre.org' }
|
||||||
|
Loading…
Reference in New Issue
Block a user