From 5a8ba8b1c2fa8805808c5f38d50e331b7bd3ca59 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 28 Jan 2016 19:55:15 +0100 Subject: [PATCH] Updated gems, prepared for bundle-audit. --- Gemfile | 6 +- Gemfile.lock | 101 ++++++++++++++--------------- app/models/channel/email_parser.rb | 16 ++--- test/unit/email_parser_test.rb | 2 +- 4 files changed, 60 insertions(+), 65 deletions(-) diff --git a/Gemfile b/Gemfile index 7a4287ca6..12e7be0d8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,8 @@ -source 'http://rubygems.org' +source 'https://rubygems.org' ruby '2.2.3' -gem 'rails', '4.2.5' +gem 'rails', '4.2.5.1' gem 'rails-observers' gem 'activerecord-session_store' @@ -36,7 +36,7 @@ gem 'zendesk_api' gem 'twitter' gem 'koala' -gem 'mail', '~> 2.5.0' +gem 'mail' gem 'mime-types' diff --git a/Gemfile.lock b/Gemfile.lock index 5105567e0..bbf90e2a1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,41 +1,41 @@ GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: abstract_type (0.0.7) - actionmailer (4.2.5) - actionpack (= 4.2.5) - actionview (= 4.2.5) - activejob (= 4.2.5) + actionmailer (4.2.5.1) + actionpack (= 4.2.5.1) + actionview (= 4.2.5.1) + activejob (= 4.2.5.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.5) - actionview (= 4.2.5) - activesupport (= 4.2.5) + actionpack (4.2.5.1) + actionview (= 4.2.5.1) + activesupport (= 4.2.5.1) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.5) - activesupport (= 4.2.5) + actionview (4.2.5.1) + activesupport (= 4.2.5.1) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.5) - activesupport (= 4.2.5) + activejob (4.2.5.1) + activesupport (= 4.2.5.1) globalid (>= 0.3.0) - activemodel (4.2.5) - activesupport (= 4.2.5) + activemodel (4.2.5.1) + activesupport (= 4.2.5.1) builder (~> 3.1) - activerecord (4.2.5) - activemodel (= 4.2.5) - activesupport (= 4.2.5) + activerecord (4.2.5.1) + activemodel (= 4.2.5.1) + activesupport (= 4.2.5.1) arel (~> 6.0) activerecord-session_store (0.1.2) actionpack (>= 4.0.0, < 5) activerecord (>= 4.0.0, < 5) railties (>= 4.0.0, < 5) - activesupport (4.2.5) + activesupport (4.2.5.1) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) @@ -117,7 +117,7 @@ GEM guard-compat (~> 1.0) multi_json (~> 1.8) hashie (3.4.3) - http (0.9.8) + http (1.0.2) addressable (~> 2.3) http-cookie (~> 1.0) http-form_data (~> 1.0.1) @@ -142,22 +142,21 @@ GEM loofah (2.0.3) nokogiri (>= 1.5.9) lumberjack (1.0.10) - mail (2.5.4) - mime-types (~> 1.16) - treetop (~> 1.4.8) + mail (2.6.3) + mime-types (>= 1.16, < 3) memoizable (0.4.2) thread_safe (~> 0.3, >= 0.3.1) method_source (0.8.2) - mime-types (1.25.1) + mime-types (2.99) mini_portile2 (2.0.0) - minitest (5.8.3) + minitest (5.8.4) multi_json (1.11.2) multi_xml (0.5.5) multipart-post (2.0.0) naught (1.1.0) nenv (0.2.0) net-ldap (0.13.0) - nokogiri (1.6.7.1) + nokogiri (1.6.7.2) mini_portile2 (~> 2.0.0.rc2) notiffany (0.0.8) nenv (~> 0.1) @@ -191,11 +190,10 @@ GEM omniauth-twitter (1.2.1) json (~> 1.3) omniauth-oauth (~> 1.1) - parser (2.3.0.1) + parser (2.3.0.2) ast (~> 2.2) pg (0.18.4) pluginator (1.3.0) - polyglot (0.3.5) power_assert (0.2.7) powerpack (0.1.1) pre-commit (0.26.0) @@ -204,22 +202,22 @@ GEM coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - puma (2.15.3) + puma (2.16.0) rack (1.6.4) rack-livereload (0.3.16) rack rack-test (0.6.3) rack (>= 1.0) - rails (4.2.5) - actionmailer (= 4.2.5) - actionpack (= 4.2.5) - actionview (= 4.2.5) - activejob (= 4.2.5) - activemodel (= 4.2.5) - activerecord (= 4.2.5) - activesupport (= 4.2.5) + rails (4.2.5.1) + actionmailer (= 4.2.5.1) + actionpack (= 4.2.5.1) + actionview (= 4.2.5.1) + activejob (= 4.2.5.1) + activemodel (= 4.2.5.1) + activerecord (= 4.2.5.1) + activesupport (= 4.2.5.1) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.5) + railties (= 4.2.5.1) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) @@ -227,16 +225,16 @@ GEM activesupport (>= 4.2.0.beta, < 5.0) nokogiri (~> 1.6.0) rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.2) + rails-html-sanitizer (1.0.3) loofah (~> 2.0) rails-observers (0.1.2) activemodel (~> 4.0) - railties (4.2.5) - actionpack (= 4.2.5) - activesupport (= 4.2.5) + railties (4.2.5.1) + actionpack (= 4.2.5.1) + activesupport (= 4.2.5.1) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rainbow (2.0.0) + rainbow (2.1.0) rake (10.5.0) rb-fsevent (0.9.7) rb-inotify (0.9.5) @@ -257,7 +255,7 @@ GEM sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) scrub_rb (1.0.1) - selenium-webdriver (2.49.0) + selenium-webdriver (2.50.0) childprocess (~> 0.5) multi_json (~> 1.0) rubyzip (~> 1.0) @@ -282,7 +280,7 @@ GEM activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.3.11) - test-unit (3.1.5) + test-unit (3.1.7) power_assert therubyracer (0.12.2) libv8 (~> 3.16.14.0) @@ -290,15 +288,12 @@ GEM thor (0.19.1) thread_safe (0.3.5) tilt (2.0.2) - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) - twitter (5.15.0) + twitter (5.16.0) addressable (~> 2.3) buftok (~> 0.2.0) equalizer (= 0.0.10) faraday (~> 0.9.0) - http (>= 0.4, < 0.10) + http (~> 1.0) http_parser.rb (~> 0.6.0) json (~> 1.8) memoizable (~> 0.4.0) @@ -314,11 +309,11 @@ GEM unf_ext (0.0.7.1) websocket (1.2.2) writeexcel (1.0.5) - zendesk_api (1.13.1) + zendesk_api (1.13.4) faraday (~> 0.9) hashie (>= 1.2, < 4.0, != 3.3.0) inflection - mime-types + mime-types (~> 2.99) multipart-post (~> 2.0) scrub_rb (~> 1.0.1) @@ -346,7 +341,7 @@ DEPENDENCIES json koala libv8 - mail (~> 2.5.0) + mail mime-types net-ldap omniauth @@ -358,7 +353,7 @@ DEPENDENCIES pre-commit puma rack-livereload - rails (= 4.2.5) + rails (= 4.2.5.1) rails-observers rb-fsevent rubocop diff --git a/app/models/channel/email_parser.rb b/app/models/channel/email_parser.rb index 3412db4e3..8a5bc0066 100644 --- a/app/models/channel/email_parser.rb +++ b/app/models/channel/email_parser.rb @@ -279,9 +279,11 @@ class Channel::EmailParser begin filename = file.header[:content_disposition].filename rescue - result = file.header[:content_disposition].to_s.scan( /filename=("|)(.+?)("|);/i ) - if result && result[0] && result[0][1] - filename = result[0][1] + begin + result = file.header[:content_disposition].to_s.scan( /filename=("|)(.+?)("|);/i ) + if result && result[0] && result[0][1] + filename = result[0][1] + end end end @@ -393,12 +395,10 @@ retrns # create to and cc user ['raw-to', 'raw-cc'].each { |item| - next if !mail[item.to_sym] - next if !mail[item.to_sym].tree - - items = mail[item.to_sym].tree - items.addresses.each {|address_data| + next if !mail[item.to_sym].addrs + items = mail[item.to_sym].addrs + items.each {|address_data| user_create( firstname: address_data.display_name, lastname: '', diff --git a/test/unit/email_parser_test.rb b/test/unit/email_parser_test.rb index 2c7f8c9a3..bb0e8042b 100644 --- a/test/unit/email_parser_test.rb +++ b/test/unit/email_parser_test.rb @@ -461,7 +461,7 @@ Freemont and pulling out several minutes. from_email: 'marketingmanager@nthcpghana.com', from_display_name: '', subject: nil, - to: 'undisclosed-recipients: ;', + to: '', }, }, {