From 5daed4a83268d09ed20c210ea2dcf0d922c63d49 Mon Sep 17 00:00:00 2001 From: echarp Date: Sun, 26 Oct 2014 16:21:00 +0100 Subject: [PATCH] =?UTF-8?q?Retour=20=C3=A0=20un=20diff=20plus=20l=C3=A9ger?= =?UTF-8?q?,=20qui=20risque=20moins=20les=20soucis=20de=20m=C3=A9moire=20e?= =?UTF-8?q?n=20production=20(car=20appel=20de=20diff=20syst=C3=A8me=20fork?= =?UTF-8?q?=20un=20process=20suppl=C3=A9mentaire,=20qui=20double=20la=20m?= =?UTF-8?q?=C3=A9moire=20utilis=C3=A9e)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 2 +- Gemfile.lock | 18 ++++++++++++------ app/views/moderation_mailer/update.text.haml | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index de96310c..a9e28be5 100644 --- a/Gemfile +++ b/Gemfile @@ -67,7 +67,7 @@ gem 'email_validator' # Email address obfuscation gem 'actionview-encoded_mail_to' # To display a patched diff for event descriptions -gem 'diffy' +gem 'differ', github: 'genuitytech/differ', branch: 'add_patch_format' # A generic library to administrate the tool gem 'activeadmin', github: 'gregbell/active_admin' diff --git a/Gemfile.lock b/Gemfile.lock index 2e48e6ae..fd039f85 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,9 +6,16 @@ GIT jquery-rails rails (>= 3.2.2) +GIT + remote: git://github.com/genuitytech/differ.git + revision: ff1a29ab2fa87620149e001d07aa48bef92de850 + branch: add_patch_format + specs: + differ (0.1.2) + GIT remote: git://github.com/gregbell/active_admin.git - revision: 8b6586c23a623b3281c136b057d856cc8fb5457e + revision: 944af76ace89f941a7baa92775854d2e1d0e6dba specs: activeadmin (1.0.0.pre) arbre (~> 1.0, >= 1.0.2) @@ -96,7 +103,7 @@ GEM builder (3.2.2) celluloid (0.16.0) timers (~> 4.0.0) - chunky_png (1.3.2) + chunky_png (1.3.3) coderay (1.1.0) coffee-rails (4.1.0) coffee-script (>= 2.2.0) @@ -128,7 +135,6 @@ GEM thread_safe (~> 0.1) warden (~> 1.2.3) devise-i18n (0.11.2) - diffy (3.0.7) docile (1.1.5) em-websocket (0.5.1) eventmachine (>= 0.12.9) @@ -193,7 +199,7 @@ GEM inherited_resources (1.4.1) has_scope (~> 0.6.0.rc) responders (~> 1.0.0.rc) - jbuilder (2.2.3) + jbuilder (2.2.4) activesupport (>= 3.0.0, < 5) multi_json (~> 1.2) jquery-rails (3.1.2) @@ -304,7 +310,7 @@ GEM select2-rails (3.5.9.1) thor (~> 0.14) sexp_processor (4.4.4) - simple_calendar (1.1.5) + simple_calendar (1.1.6) rails (>= 3.0) simple_oauth (0.2.0) simplecov (0.9.1) @@ -379,7 +385,7 @@ DEPENDENCIES compass-rails devise devise-i18n - diffy + differ! email_validator font-awesome-rails geocoder diff --git a/app/views/moderation_mailer/update.text.haml b/app/views/moderation_mailer/update.text.haml index 65f8e094..e2f4fbcb 100644 --- a/app/views/moderation_mailer/update.text.haml +++ b/app/views/moderation_mailer/update.text.haml @@ -10,7 +10,7 @@ - prev = render file: '/events/show' - @event = former -= raw Diffy::Diff.new prev, new += Differ.diff(new, prev).format_as(:patch).gsub(/\[\d{1,2}m/, '') \ - if @current_user = edit_moderation_url @event