From 2f68d540e37e4b65e0af479c6e747128191bf951 Mon Sep 17 00:00:00 2001 From: Xavier J Date: Mon, 7 Nov 2016 11:23:21 +0100 Subject: [PATCH] Migrate to ruby 2.3.1 --- .ruby-version | 2 +- Gemfile | 6 ++-- Gemfile.lock | 38 --------------------- app/decorators/procedure_decorator.rb | 3 +- spec/decorators/procedure_decorator_spec.rb | 2 +- 5 files changed, 7 insertions(+), 44 deletions(-) diff --git a/.ruby-version b/.ruby-version index cd57a8b95..2bf1c1ccf 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.1.5 +2.3.1 diff --git a/Gemfile b/Gemfile index 026ba7955..b92fc4cbe 100644 --- a/Gemfile +++ b/Gemfile @@ -104,9 +104,9 @@ group :test do gem 'simplecov', require: false gem 'poltergeist' gem 'timecop' - gem 'guard' - gem 'guard-rspec', require: false - gem 'guard-livereload', '~> 2.4', require: false + # gem 'guard' + # gem 'guard-rspec', require: false + # gem 'guard-livereload', '~> 2.4', require: false gem 'vcr' end diff --git a/Gemfile.lock b/Gemfile.lock index a7599faa6..706c620e8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -136,11 +136,7 @@ GEM activemodel (>= 3.0) activesupport (>= 3.0) request_store (~> 1.0) - em-websocket (0.5.1) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0.6.0) erubis (2.7.0) - eventmachine (1.0.8) excon (0.49.0) execjs (2.7.0) factory_girl (4.5.0) @@ -283,24 +279,6 @@ GEM formatador (0.2.5) globalid (0.3.7) activesupport (>= 4.1.0) - guard (2.13.0) - formatador (>= 0.2.4) - listen (>= 2.7, <= 4.0) - lumberjack (~> 1.0) - nenv (~> 0.1) - notiffany (~> 0.0) - pry (>= 0.9.12) - shellany (~> 0.0) - thor (>= 0.18.1) - guard-compat (1.2.1) - guard-livereload (2.5.1) - em-websocket (~> 0.5) - guard (~> 2.8) - guard-compat (~> 1.0) - multi_json (~> 1.8) - guard-rspec (4.3.1) - guard (~> 2.1) - rspec (>= 2.14, < 4.0) haml (4.0.6) tilt haml-rails (0.9.0) @@ -318,7 +296,6 @@ GEM ruby_parser (~> 3.5) http-cookie (1.0.2) domain_name (~> 0.5) - http_parser.rb (0.6.0) httpclient (2.6.0.1) i18n (0.7.0) inflecto (0.0.2) @@ -346,16 +323,12 @@ GEM railties (>= 3.1) leaflet-rails (0.7.4) libv8 (3.16.14.7) - listen (3.0.4) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) logstash-event (1.2.02) logstasher (0.6.5) logstash-event (~> 1.2.0) request_store loofah (2.0.3) nokogiri (>= 1.5.9) - lumberjack (1.0.9) mail (2.6.4) mime-types (>= 1.16, < 4) mailjet (1.1.0) @@ -369,14 +342,10 @@ GEM minitest (5.9.0) multi_json (1.11.2) multipart-post (2.0.0) - nenv (0.2.0) netrc (0.10.3) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) - notiffany (0.0.8) - nenv (~> 0.1) - shellany (~> 0.0) nyan-cat-formatter (0.11) rspec (>= 2.99, >= 2.14.2, < 4) open4 (1.3.4) @@ -451,9 +420,6 @@ GEM rainbow (2.0.0) raindrops (0.13.0) rake (11.2.2) - rb-fsevent (0.9.6) - rb-inotify (0.9.5) - ffi (>= 0.5.0) rbvmomi (1.8.2) builder nokogiri (>= 1.4.1) @@ -528,7 +494,6 @@ GEM sentry-raven (0.13.1) faraday (>= 0.7.6) sexp_processor (4.6.0) - shellany (0.0.1) shoulda-matchers (2.8.0) activesupport (>= 3.0.0) simplecov (0.9.1) @@ -643,9 +608,6 @@ DEPENDENCIES fog fog-openstack font-awesome-rails - guard - guard-livereload (~> 2.4) - guard-rspec haml-rails hashie jbuilder (~> 2.0) diff --git a/app/decorators/procedure_decorator.rb b/app/decorators/procedure_decorator.rb index cefb52444..f78a02d88 100644 --- a/app/decorators/procedure_decorator.rb +++ b/app/decorators/procedure_decorator.rb @@ -1,4 +1,5 @@ class ProcedureDecorator < Draper::Decorator + delegate_all def lien @@ -10,7 +11,7 @@ class ProcedureDecorator < Draper::Decorator end def logo_img - return image_url(LOGO_NAME) if logo.blank? + return h.image_url(LOGO_NAME) if logo.blank? File.join(STORAGE_URL, File.basename(logo.path)) end def geographic_information diff --git a/spec/decorators/procedure_decorator_spec.rb b/spec/decorators/procedure_decorator_spec.rb index 789257668..d94025473 100644 --- a/spec/decorators/procedure_decorator_spec.rb +++ b/spec/decorators/procedure_decorator_spec.rb @@ -16,7 +16,7 @@ describe ProcedureDecorator do describe 'logo_img' do subject { super().logo_img } - it { is_expected.to eq(image_url(LOGO_NAME)) } + it { is_expected.to match(/http.*#{ActionController::Base.helpers.image_url(LOGO_NAME)}/) } end describe 'geographic_information' do