habarico 7.4.0.pre.beta.1 → 7.4.0.pre.beta.3
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 498c987b5f3d547ea2ead62bdd5faccebdead6de8a9744760159502c78e4fd94
|
|
4
|
+
data.tar.gz: 65d660341f76bc7ba2e9886266aedbab756bc95b36209f3bc6f6296fa36a39fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a011b55c1d069ac072be06a0edf1828a5ddd643dc821a29fa36fcc98f45105935d5eb92f225e71293acc6185118a2b5402b1eba6d0ed089cb256cdf718ccf1d9
|
|
7
|
+
data.tar.gz: 52df8f7f30fd4dbb9a34ce98b961107fa96e97be83e96649a1ef3619ce16ab00d2f812019404fbbf097ace17916edf8729515749d03c8c46597324894db5c235
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
7.4.0-beta.
|
|
1
|
+
7.4.0-beta.3
|
|
@@ -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:
|
|
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.
|
|
20
|
-
#
|
|
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,29 +1,35 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: habarico
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.4.0.pre.beta.
|
|
4
|
+
version: 7.4.0.pre.beta.3
|
|
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-
|
|
11
|
+
date: 2026-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '7.0'
|
|
20
|
+
- - "<"
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: '9'
|
|
20
23
|
type: :runtime
|
|
21
24
|
prerelease: false
|
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
26
|
requirements:
|
|
24
|
-
- - "
|
|
27
|
+
- - ">="
|
|
25
28
|
- !ruby/object:Gem::Version
|
|
26
29
|
version: '7.0'
|
|
30
|
+
- - "<"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '9'
|
|
27
33
|
- !ruby/object:Gem::Dependency
|
|
28
34
|
name: pundit
|
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -58,14 +64,14 @@ dependencies:
|
|
|
58
64
|
requirements:
|
|
59
65
|
- - ">="
|
|
60
66
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 3.
|
|
67
|
+
version: 3.43.0
|
|
62
68
|
type: :runtime
|
|
63
69
|
prerelease: false
|
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
71
|
requirements:
|
|
66
72
|
- - ">="
|
|
67
73
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: 3.
|
|
74
|
+
version: 3.43.0
|
|
69
75
|
description: With this library you can define a bunch of admin resources and connect
|
|
70
76
|
it to a Habarico frontend to automatically generate an admin user interface.
|
|
71
77
|
email:
|