view_component-form 0.2.1 → 0.2.4

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: 5a9199cdd2815e1711c5799426cf9e8ba25ecd6352c34616c973a269894f4a71
4
- data.tar.gz: 21f504ee76b9eaf898ac3a125bab5234fef641df64e04554a3bdf5d748185858
3
+ metadata.gz: e34a41ebc599bd19cfcb44df6531abea9f69d6e411654bd30f51214f5d9b5689
4
+ data.tar.gz: 481a67aec41fb2ee179d9123f4140385a848ba2d1d92f0de0fdebb4eb8a07a8a
5
5
  SHA512:
6
- metadata.gz: 486ba4c74fd76b83e58c355234d0d65a2a06568634561d2a887b8623e115500c911ca810040f3fa5b41c66c37e3e80d58052065550281300bf7e355e635c3a76
7
- data.tar.gz: 56d58c623a852b428d5b6440aeeb6a4f3c18c93ffd748a759588c0a5a4726b5e089517d48bdfebc2431447753c23a43b4612d639679f429d01f7208bcde9a87b
6
+ metadata.gz: 1e7e7d6496ce356fd2409cd67822187d0b7619d9d56ae6c5172ef26dcfbb8f65af9c9bfe4025d5c5bf2b01ceb784bd6ef97263e508ac50e1a732d9bbf670ac97
7
+ data.tar.gz: 449e48d08d88438c70be0888074f68871dce0ebbc20b7bcfa45d35526c60e3dd30b0c32a7114cc54574969505469eb1e3b013836c69b92b10edeb33bdd6305b9
data/CHANGELOG.md CHANGED
@@ -7,9 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
  ## [Unreleased]
8
8
  Nothing yet
9
9
 
10
+ ## [0.2.4] - 2022-04-27
11
+ ### Changed
12
+ - Add ruby 3.1 to CI (#123)
13
+
14
+ ### Fixed
15
+ - Fix `FileFieldComponent` options for `direct_upload` and `include_hidden` (#122)
16
+
17
+ ## [0.2.3] - 2022-03-24
18
+ ### Fixed
19
+ - Declare empty RichTextAreaComponent if ActionText is not installed, to fix Zeitwerk error (#120)
20
+
21
+ ## [0.2.2] - 2022-03-23
22
+ ### Changed
23
+ - Improve conditional ActionText support (#118)
24
+
10
25
  ## [0.2.1] - 2022-03-17
11
26
  ### Added
12
- - Conditional ActionText in CI (#117)
27
+ - Conditional ActionText support (#117)
13
28
 
14
29
  ### Fixed
15
30
  - Fix broken gem initialization due to missing ViewComponent::Form constant (#114)
@@ -73,7 +88,9 @@ Nothing yet
73
88
  - Add CHANGELOG (#50)
74
89
  - Add CI (#2)
75
90
 
76
- [Unreleased]: https://github.com/pantographe/view_component-form/compare/v0.2.1...HEAD
91
+ [Unreleased]: https://github.com/pantographe/view_component-form/compare/v0.2.3...HEAD
92
+ [0.2.3]: https://github.com/pantographe/view_component-form/compare/v0.2.2...v0.2.3
93
+ [0.2.2]: https://github.com/pantographe/view_component-form/compare/v0.2.1...v0.2.2
77
94
  [0.2.1]: https://github.com/pantographe/view_component-form/compare/v0.2.0...v0.2.1
78
95
  [0.2.0]: https://github.com/pantographe/view_component-form/compare/v0.1.3...v0.2.0
79
96
  [0.1.3]: https://github.com/pantographe/view_component-form/compare/v0.1.2...v0.1.3
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  ## Compatibility
8
8
 
9
9
  This gem is tested on:
10
- - Rails 6.0+
10
+ - Rails 6.0+ (with or without ActionText)
11
11
  - Ruby 2.7+
12
12
 
13
13
  ## Installation
@@ -4,6 +4,15 @@ module ViewComponent
4
4
  module Form
5
5
  class FileFieldComponent < FieldComponent
6
6
  self.tag_klass = ActionView::Helpers::Tags::FileField
7
+
8
+ def before_render
9
+ if Gem::Version.new(Rails::VERSION::STRING) >= Gem::Version.new("7.0")
10
+ @options = { include_hidden: multiple_file_field_include_hidden }.merge!(options)
11
+ end
12
+ @options = convert_direct_upload_option_to_url(@options.dup)
13
+
14
+ super
15
+ end
7
16
  end
8
17
  end
9
18
  end
@@ -3,7 +3,9 @@
3
3
  module ViewComponent
4
4
  module Form
5
5
  class RichTextAreaComponent < FieldComponent
6
- self.tag_klass = ActionView::Helpers::Tags::ActionText
6
+ if defined?(ActionView::Helpers::Tags::ActionText) # rubocop:disable Style/IfUnlessModifier
7
+ self.tag_klass = ActionView::Helpers::Tags::ActionText
8
+ end
7
9
  end
8
10
  end
9
11
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ViewComponent
4
4
  module Form
5
- VERSION = "0.2.1"
5
+ VERSION = "0.2.4"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component-form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pantographe
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-17 00:00:00.000000000 Z
11
+ date: 2022-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -147,7 +147,7 @@ metadata:
147
147
  source_code_uri: https://github.com/pantographe/view_component-form
148
148
  bug_tracker_uri: https://github.com/pantographe/view_component-form/issues
149
149
  rubygems_mfa_required: 'true'
150
- post_install_message:
150
+ post_install_message:
151
151
  rdoc_options: []
152
152
  require_paths:
153
153
  - lib
@@ -162,8 +162,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  - !ruby/object:Gem::Version
163
163
  version: '0'
164
164
  requirements: []
165
- rubygems_version: 3.2.32
166
- signing_key:
165
+ rubygems_version: 3.3.12
166
+ signing_key:
167
167
  specification_version: 4
168
168
  summary: Rails FormBuilder for ViewComponent
169
169
  test_files: []