about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.circleci/config.yml25
-rw-r--r--app/models/concerns/attachmentable.rb2
2 files changed, 26 insertions, 1 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 8791965f0..2a1c84253 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -110,6 +110,13 @@ jobs:
         environment: *ruby_environment
     <<: *install_ruby_dependencies
 
+  install-ruby2.3:
+    <<: *defaults
+    docker:
+      - image: circleci/ruby:2.3.7-stretch-node
+        environment: *ruby_environment
+    <<: *install_ruby_dependencies
+
   build:
     <<: *defaults
     steps:
@@ -146,6 +153,17 @@ jobs:
       - image: circleci/redis:4.0.9-alpine
     <<: *test_steps
 
+  test-ruby2.3:
+    <<: *defaults
+    docker:
+      - image: circleci/ruby:2.3.7-stretch-node
+        environment: *ruby_environment
+      - image: circleci/postgres:10.3-alpine
+        environment:
+          POSTGRES_USER: root
+      - image: circleci/redis:4.0.9-alpine
+    <<: *test_steps
+
   test-webui:
     <<: *defaults
     docker:
@@ -174,6 +192,9 @@ workflows:
       - install-ruby2.4:
           requires:
             - install
+      - install-ruby2.3:
+          requires:
+            - install
       - build:
           requires:
             - install-ruby2.5
@@ -185,6 +206,10 @@ workflows:
           requires:
             - install-ruby2.4
             - build
+      - test-ruby2.3:
+          requires:
+            - install-ruby2.3
+            - build
       - test-webui:
           requires:
             - install
diff --git a/app/models/concerns/attachmentable.rb b/app/models/concerns/attachmentable.rb
index 44bdfa39a..de4cf8775 100644
--- a/app/models/concerns/attachmentable.rb
+++ b/app/models/concerns/attachmentable.rb
@@ -28,7 +28,7 @@ module Attachmentable
     self.class.attachment_definitions.each_key do |attachment_name|
       attachment = send(attachment_name)
 
-      next if attachment.blank? || !attachment.content_type.match?(/image.*/) || attachment.queued_for_write[:original].blank?
+      next if attachment.blank? || !/image.*/.match?(attachment.content_type) || attachment.queued_for_write[:original].blank?
 
       width, height = FastImage.size(attachment.queued_for_write[:original].path)