Les diff sont plus agréables à voir

This commit is contained in:
echarp 2014-10-03 01:14:45 +02:00
parent d45530a56f
commit 6e47d45d21
6 changed files with 6 additions and 9 deletions

View File

@ -67,7 +67,7 @@ gem 'email_validator'
# Email address obfuscation
gem 'actionview-encoded_mail_to'
# To display a patched diff for event descriptions
gem 'differ'
gem 'diffy'
# A generic library to administrate the tool
gem 'activeadmin', github: 'gregbell/active_admin'

View File

@ -101,7 +101,7 @@ GEM
thread_safe (~> 0.1)
warden (~> 1.2.3)
devise-i18n (0.11.1)
differ (0.1.2)
diffy (3.0.6)
docile (1.1.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
@ -329,7 +329,7 @@ DEPENDENCIES
compass-rails
devise
devise-i18n
differ
diffy
email_validator
font-awesome-rails
geocoder

View File

@ -1,5 +1,3 @@
require 'differ'
# Event management life cycle
class ModerationsController < ApplicationController
before_action :authenticate_user!

View File

@ -10,7 +10,7 @@
- prev = render file: '/events/show'
- @event = former
= raw Differ.diff new, prev
= raw Diffy::Diff.new new, prev
\
- if @current_user
= edit_moderation_url @event

View File

@ -27,7 +27,8 @@ hello world'
assert_match(/Édition de l'événement .*/, mail.subject)
assert_equal ['moderateurs@agendadulibre.org'], mail.to
assert_equal ['moderateurs@agendadulibre.org'], mail.from
assert_match(/^{/, mail.body.to_s)
assert_match(/^-/, mail.body.to_s)
assert_match(/^+/, mail.body.to_s)
end
test 'accept' do

View File

@ -1,5 +1,3 @@
require 'differ'
# Preview all emails at http://localhost:3000/rails/mailers/moderation_mailer
class ModerationMailerPreview < ActionMailer::Preview
# Preview this email at http://localhost:3000/rails/mailers/moderation_mailer/create