habarico 7.4.0.pre.beta.2 → 7.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3e9e5072d8416451787255863417e7f43b3c5f6e3d80cae715fb3e2a8c16723
4
- data.tar.gz: f2f87fe69bf47624419fc21d9402ddc4818b4d64ee2b77cfebade347e219374d
3
+ metadata.gz: 18913c224c7e1cf564a4db30c0be67669f01d5493d548c99df3a74a97ad25e02
4
+ data.tar.gz: ff5633a3bc2af510d8c799103fe4d832be495a6673fcb956a42e4c0a2341c352
5
5
  SHA512:
6
- metadata.gz: b7e36e26c33eff54bfb406ecd3aa015b9b646e14e03371d23113a747472deb63531649b6476fdd4790f664be25cf401d36483131d8daf6f8b4859b957835e063
7
- data.tar.gz: e436e7e5df6bf374fb09a4e80a102163b0f02d44ef59a32f2677fd32b73f8548834a87cb2cf1a6961b696aa27c2a60487bdb5dfc455c7d0d25624f78a9465a82
6
+ metadata.gz: 8d06881c5f9f77d73eb5cb00e2911614d872d229fb6c85666156d26b2a9307ca02b3b4eaf02e893d9bd22b68e9a4047235b8c62fe84381394f68a04a0edc417e
7
+ data.tar.gz: fc4821593ce4e8ca9d58e78e13aab021209199e5a726de673954f59f921b20a427b00f07d938dda4a7063f9b442e1835b362592513beca9507cf2479f557b418
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.4.0-beta.2
1
+ 7.4.0
@@ -6,12 +6,21 @@ module Habarico
6
6
  raise Eluvia::Errors::StandardError.new('Argument `action` must be a Habarico::Action') unless action.is_a?(Habarico::Action)
7
7
  raise Eluvia::Errors::StandardError.new('Argument `action` must be of :"upload-files" type') unless action.type.to_sym == :"upload-files"
8
8
 
9
+ file_field = generate_file_field(action, context)
10
+ if file_field.blank?
11
+ # An action declared inline in an `ActionReference` carries no name of its own
12
+ raise Eluvia::Errors::StandardError.new(
13
+ "Upload-files action `#{action.name.presence || action.label}` of resource `#{resource_path&.last}` " \
14
+ 'has no `upload_files_file_field`, the field that holds the uploaded file.'
15
+ )
16
+ end
17
+
9
18
  # Create model
10
19
  Habarico::UploadFilesActionParameters.new(
11
20
  reference: Habarico::ResourceReference.build(generate_reference(action, context)),
12
21
  target: generate_target(action, context),
13
22
  accept: generate_accept(action, context),
14
- file_field: generate_file_field(action, context),
23
+ file_field: file_field,
15
24
  data: generate_data(action, context)
16
25
  )
17
26
  end
@@ -16,8 +16,8 @@ module Habarico
16
16
  # images only - set it whenever the action uploads other files.
17
17
  any_attr :accept
18
18
 
19
- # Field name on the target model that holds the uploaded file. Required by the
20
- # frontend to know which attribute to set on the record it creates for each upload.
19
+ # Field name on the target model that holds the uploaded file (required). The frontend sets it
20
+ # on the record it creates for each upload.
21
21
  string_attr :file_field
22
22
 
23
23
  # Additional data added to every file record the frontend creates for an upload
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: habarico
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.4.0.pre.beta.2
4
+ version: 7.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matěj Outlý
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-12 00:00:00.000000000 Z
11
+ date: 2026-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -325,9 +325,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
325
325
  version: '0'
326
326
  required_rubygems_version: !ruby/object:Gem::Requirement
327
327
  requirements:
328
- - - ">"
328
+ - - ">="
329
329
  - !ruby/object:Gem::Version
330
- version: 1.3.1
330
+ version: '0'
331
331
  requirements: []
332
332
  rubygems_version: 3.4.19
333
333
  signing_key: