spina 2.6.2 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of spina might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 608eba3a9c86a2c4f56fe560dac11892c73f2b1ba77b362cc6a7c582a6d02952
4
- data.tar.gz: 6a961ce11659d8a916a8b19406eae423e05990c05601d8cd704149ce193ea4e2
3
+ metadata.gz: 4427b93f80431167322b31e04f8a0c2cff178a00e823464457a143754a426985
4
+ data.tar.gz: 929ab111545d6df3fc712e7affc7efd9634abd68900bcd68d11b82f9152563a7
5
5
  SHA512:
6
- metadata.gz: d42a9e3d3da5afda73f058129fff78339ea207e04013662a2700086a1203a1544dbd920e8e9dbc910eb88110b8c66409c13d1f1763f6b3760526fe06dbe127c3
7
- data.tar.gz: 7b8bd12f09e61f9942d3ddfd3abfa3bc3f2876fc1bf8fb9ae1e0b3832210919c3c33fe5e95cf1fa874ba9fd17650f72aad024594b51c7106b862d24609ec3795
6
+ metadata.gz: 365102bbf088e48a2a17dbe34703d28824247cb724c46745ad58fdf3bb3ff92e19de9045dc88775621998cbb4dcae3a43cba79f9f2cdf18f39f66622aa55eea6
7
+ data.tar.gz: 3f0d074c8064125e80e3cd47b0973607bdfd928d73fce5096490429673a4f87b53df63d9a036aedbbb83e6f567e869442eb48cd371baaafcd342232d08764534
@@ -23,6 +23,8 @@ module Spina
23
23
  # 2. We destroy the entire record if the uploaded file is not an image
24
24
  def create
25
25
  @images = params[:image][:files].map do |file|
26
+ next if file.blank? # Skip the blank string posted by the hidden files[] field
27
+
26
28
  # Create the image and attach the file
27
29
  image = Image.create(media_folder_id: image_params[:media_folder_id])
28
30
  image.file.attach(file)
@@ -28,7 +28,7 @@ module Spina
28
28
  signed_blob_id.present?
29
29
  end
30
30
 
31
- def signed_id
31
+ def signed_id(expires_in: nil)
32
32
  signed_blob_id
33
33
  end
34
34
 
data/lib/spina/engine.rb CHANGED
@@ -11,6 +11,7 @@ require 'attr_json'
11
11
  require 'view_component'
12
12
  require 'jsonapi/serializer'
13
13
  require 'browser'
14
+ require 'sprockets/railtie'
14
15
 
15
16
  module Spina
16
17
  class Engine < ::Rails::Engine
data/lib/spina/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spina
2
- VERSION = "2.6.2"
2
+ VERSION = "2.7.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.2
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bram Jetten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-22 00:00:00.000000000 Z
11
+ date: 2021-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails