bp3-formtastic 0.1.2 → 0.2.1
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 +4 -4
- data/.rubocop.yml +0 -2
- data/CHANGELOG.md +10 -0
- data/Gemfile.lock +72 -53
- data/README.md +11 -1
- data/Rakefile +4 -3
- data/bp3-formtastic.gemspec +10 -8
- data/lib/bp3/formtastic/railtie.rb +3 -19
- data/lib/bp3/formtastic/version.rb +1 -1
- data/lib/bp3/formtastic/viz_form_builder.rb +55 -0
- data/lib/bp3/formtastic/viz_form_builder_with_create.rb +23 -0
- data/lib/bp3/formtastic.rb +6 -1
- metadata +44 -26
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '08532c4a91d95f44af218f6ae3d8a6654d56ab203f591644a3636480996446ad'
|
|
4
|
+
data.tar.gz: 77239e4c3ab2c980a2be5cad63e3b2e4c39f587fa57c8eec86b6b7db48028462
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e2bf675dcef6cac9f6e632d87a0129b3db9378bda79bf665b717cbe75f647dac0b3a2c3399d58245ab2d17f88db8878a7a9c3bcc0a0535213c4a70c3f2f6048
|
|
7
|
+
data.tar.gz: 6df43393c541cd157bb4313d21a46efc9d698aec342743a38498f748be1c803b6c6c2f2b87a66e0e0b97cf5e3270bdd5b5ed917d35639a3c330df938cc86b226
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.2.1] - 2024-11-18
|
|
4
|
+
|
|
5
|
+
- Relax gem constraints
|
|
6
|
+
|
|
7
|
+
## [0.2.0] - 2024-08-20
|
|
8
|
+
|
|
9
|
+
- Create form builders
|
|
10
|
+
- Update #input_wrapping to use new form builders
|
|
11
|
+
- Allow nil input_control_class_name
|
|
12
|
+
|
|
3
13
|
## [0.1.2] - 2024-07-01
|
|
4
14
|
|
|
5
15
|
- Check for builder.id
|
data/Gemfile.lock
CHANGED
|
@@ -1,46 +1,52 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
bp3-formtastic (0.1
|
|
5
|
-
actionpack (>= 7.1.2
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
bp3-formtastic (0.2.1)
|
|
5
|
+
actionpack (>= 7.1.2)
|
|
6
|
+
actionview (>= 7.1.2)
|
|
7
|
+
activesupport (>= 7.1.2)
|
|
8
|
+
formtastic (>= 5.0)
|
|
9
|
+
railties (>= 7.1.2)
|
|
8
10
|
|
|
9
11
|
GEM
|
|
10
12
|
remote: https://rubygems.org/
|
|
11
13
|
specs:
|
|
12
|
-
actionpack (
|
|
13
|
-
actionview (=
|
|
14
|
-
activesupport (=
|
|
14
|
+
actionpack (8.0.0)
|
|
15
|
+
actionview (= 8.0.0)
|
|
16
|
+
activesupport (= 8.0.0)
|
|
15
17
|
nokogiri (>= 1.8.5)
|
|
16
|
-
racc
|
|
17
18
|
rack (>= 2.2.4)
|
|
18
19
|
rack-session (>= 1.0.1)
|
|
19
20
|
rack-test (>= 0.6.3)
|
|
20
21
|
rails-dom-testing (~> 2.2)
|
|
21
22
|
rails-html-sanitizer (~> 1.6)
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
useragent (~> 0.16)
|
|
24
|
+
actionview (8.0.0)
|
|
25
|
+
activesupport (= 8.0.0)
|
|
24
26
|
builder (~> 3.1)
|
|
25
27
|
erubi (~> 1.11)
|
|
26
28
|
rails-dom-testing (~> 2.2)
|
|
27
29
|
rails-html-sanitizer (~> 1.6)
|
|
28
|
-
activesupport (
|
|
30
|
+
activesupport (8.0.0)
|
|
29
31
|
base64
|
|
32
|
+
benchmark (>= 0.3)
|
|
30
33
|
bigdecimal
|
|
31
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
34
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
32
35
|
connection_pool (>= 2.2.5)
|
|
33
36
|
drb
|
|
34
37
|
i18n (>= 1.6, < 2)
|
|
38
|
+
logger (>= 1.4.2)
|
|
35
39
|
minitest (>= 5.1)
|
|
36
|
-
|
|
37
|
-
tzinfo (~> 2.0)
|
|
40
|
+
securerandom (>= 0.3)
|
|
41
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
42
|
+
uri (>= 0.13.1)
|
|
38
43
|
ast (2.4.2)
|
|
39
44
|
base64 (0.2.0)
|
|
45
|
+
benchmark (0.4.0)
|
|
40
46
|
bigdecimal (3.1.8)
|
|
41
47
|
builder (3.3.0)
|
|
42
48
|
byebug (11.1.3)
|
|
43
|
-
concurrent-ruby (1.3.
|
|
49
|
+
concurrent-ruby (1.3.4)
|
|
44
50
|
connection_pool (2.4.1)
|
|
45
51
|
crass (1.0.6)
|
|
46
52
|
diff-lcs (1.5.1)
|
|
@@ -48,27 +54,35 @@ GEM
|
|
|
48
54
|
erubi (1.13.0)
|
|
49
55
|
formtastic (5.0.0)
|
|
50
56
|
actionpack (>= 6.0.0)
|
|
51
|
-
i18n (1.14.
|
|
57
|
+
i18n (1.14.6)
|
|
52
58
|
concurrent-ruby (~> 1.0)
|
|
53
|
-
|
|
59
|
+
io-console (0.7.2)
|
|
60
|
+
irb (1.14.1)
|
|
61
|
+
rdoc (>= 4.0.0)
|
|
62
|
+
reline (>= 0.4.2)
|
|
63
|
+
json (2.8.2)
|
|
54
64
|
language_server-protocol (3.17.0.3)
|
|
55
|
-
|
|
65
|
+
logger (1.6.1)
|
|
66
|
+
loofah (2.23.1)
|
|
56
67
|
crass (~> 1.0.2)
|
|
57
68
|
nokogiri (>= 1.12.0)
|
|
58
|
-
minitest (5.
|
|
59
|
-
|
|
60
|
-
nokogiri (1.16.6-x86_64-darwin)
|
|
69
|
+
minitest (5.25.1)
|
|
70
|
+
nokogiri (1.16.7-x86_64-darwin)
|
|
61
71
|
racc (~> 1.4)
|
|
62
|
-
parallel (1.
|
|
63
|
-
parser (3.3.
|
|
72
|
+
parallel (1.26.3)
|
|
73
|
+
parser (3.3.6.0)
|
|
64
74
|
ast (~> 2.4.1)
|
|
65
75
|
racc
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
psych (5.2.0)
|
|
77
|
+
stringio
|
|
78
|
+
racc (1.8.1)
|
|
79
|
+
rack (3.1.8)
|
|
68
80
|
rack-session (2.0.0)
|
|
69
81
|
rack (>= 3.0.0)
|
|
70
82
|
rack-test (2.1.0)
|
|
71
83
|
rack (>= 1.3)
|
|
84
|
+
rackup (2.2.1)
|
|
85
|
+
rack (>= 3)
|
|
72
86
|
rails-dom-testing (2.2.0)
|
|
73
87
|
activesupport (>= 5.0.0)
|
|
74
88
|
minitest
|
|
@@ -76,55 +90,60 @@ GEM
|
|
|
76
90
|
rails-html-sanitizer (1.6.0)
|
|
77
91
|
loofah (~> 2.21)
|
|
78
92
|
nokogiri (~> 1.14)
|
|
93
|
+
railties (8.0.0)
|
|
94
|
+
actionpack (= 8.0.0)
|
|
95
|
+
activesupport (= 8.0.0)
|
|
96
|
+
irb (~> 1.13)
|
|
97
|
+
rackup (>= 1.0.0)
|
|
98
|
+
rake (>= 12.2)
|
|
99
|
+
thor (~> 1.0, >= 1.2.2)
|
|
100
|
+
zeitwerk (~> 2.6)
|
|
79
101
|
rainbow (3.1.1)
|
|
80
102
|
rake (13.2.1)
|
|
103
|
+
rdoc (6.7.0)
|
|
104
|
+
psych (>= 4.0.0)
|
|
81
105
|
regexp_parser (2.9.2)
|
|
82
|
-
|
|
83
|
-
|
|
106
|
+
reline (0.5.11)
|
|
107
|
+
io-console (~> 0.5)
|
|
84
108
|
rspec (3.13.0)
|
|
85
109
|
rspec-core (~> 3.13.0)
|
|
86
110
|
rspec-expectations (~> 3.13.0)
|
|
87
111
|
rspec-mocks (~> 3.13.0)
|
|
88
|
-
rspec-core (3.13.
|
|
112
|
+
rspec-core (3.13.2)
|
|
89
113
|
rspec-support (~> 3.13.0)
|
|
90
|
-
rspec-expectations (3.13.
|
|
114
|
+
rspec-expectations (3.13.3)
|
|
91
115
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
92
116
|
rspec-support (~> 3.13.0)
|
|
93
|
-
rspec-mocks (3.13.
|
|
117
|
+
rspec-mocks (3.13.2)
|
|
94
118
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
95
119
|
rspec-support (~> 3.13.0)
|
|
96
120
|
rspec-support (3.13.1)
|
|
97
|
-
rubocop (1.
|
|
121
|
+
rubocop (1.68.0)
|
|
98
122
|
json (~> 2.3)
|
|
99
123
|
language_server-protocol (>= 3.17.0)
|
|
100
124
|
parallel (~> 1.10)
|
|
101
125
|
parser (>= 3.3.0.2)
|
|
102
126
|
rainbow (>= 2.2.2, < 4.0)
|
|
103
|
-
regexp_parser (>=
|
|
104
|
-
|
|
105
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
127
|
+
regexp_parser (>= 2.4, < 3.0)
|
|
128
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
|
106
129
|
ruby-progressbar (~> 1.7)
|
|
107
130
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
108
|
-
rubocop-ast (1.
|
|
131
|
+
rubocop-ast (1.36.1)
|
|
109
132
|
parser (>= 3.3.1.0)
|
|
110
|
-
rubocop-capybara (2.21.0)
|
|
111
|
-
rubocop (~> 1.41)
|
|
112
|
-
rubocop-factory_bot (2.26.1)
|
|
113
|
-
rubocop (~> 1.61)
|
|
114
133
|
rubocop-rake (0.6.0)
|
|
115
134
|
rubocop (~> 1.0)
|
|
116
|
-
rubocop-rspec (2.
|
|
117
|
-
rubocop (~> 1.40)
|
|
118
|
-
rubocop-capybara (~> 2.17)
|
|
119
|
-
rubocop-factory_bot (~> 2.22)
|
|
120
|
-
rubocop-rspec_rails (~> 2.28)
|
|
121
|
-
rubocop-rspec_rails (2.29.1)
|
|
135
|
+
rubocop-rspec (3.2.0)
|
|
122
136
|
rubocop (~> 1.61)
|
|
123
137
|
ruby-progressbar (1.13.0)
|
|
124
|
-
|
|
138
|
+
securerandom (0.3.2)
|
|
139
|
+
stringio (3.1.2)
|
|
140
|
+
thor (1.3.2)
|
|
125
141
|
tzinfo (2.0.6)
|
|
126
142
|
concurrent-ruby (~> 1.0)
|
|
127
|
-
unicode-display_width (2.
|
|
143
|
+
unicode-display_width (2.6.0)
|
|
144
|
+
uri (1.0.2)
|
|
145
|
+
useragent (0.16.10)
|
|
146
|
+
zeitwerk (2.7.1)
|
|
128
147
|
|
|
129
148
|
PLATFORMS
|
|
130
149
|
x86_64-darwin-22
|
|
@@ -132,11 +151,11 @@ PLATFORMS
|
|
|
132
151
|
DEPENDENCIES
|
|
133
152
|
bp3-formtastic!
|
|
134
153
|
byebug
|
|
135
|
-
rake (
|
|
136
|
-
rspec (
|
|
137
|
-
rubocop (
|
|
138
|
-
rubocop-rake (
|
|
139
|
-
rubocop-rspec (
|
|
154
|
+
rake (>= 13.0)
|
|
155
|
+
rspec (>= 3.0)
|
|
156
|
+
rubocop (>= 1.21)
|
|
157
|
+
rubocop-rake (>= 0.6)
|
|
158
|
+
rubocop-rspec (>= 2.25)
|
|
140
159
|
|
|
141
160
|
BUNDLED WITH
|
|
142
|
-
2.5.
|
|
161
|
+
2.5.17
|
data/README.md
CHANGED
|
@@ -19,12 +19,22 @@ Or install it yourself as:
|
|
|
19
19
|
$ gem install bp3-formtastic
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
|
-
In your application's `config/initializers/bp3-
|
|
22
|
+
In your application's `config/initializers/bp3-formtastic` initializer, specify the name of the class
|
|
23
23
|
that controls whether to show a formtastic input control or not:
|
|
24
24
|
```ruby
|
|
25
25
|
Bp3::Formtastic.input_control_class_name = 'Vizfact::Input'
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
In your application's formtastic configuration file (typically `config/initializers/formtastic`),
|
|
29
|
+
specify which form builder to use:
|
|
30
|
+
```ruby
|
|
31
|
+
Rails.application.config.after_initialize do
|
|
32
|
+
Formtastic::Helpers::FormHelper.builder = Bp3::Formtastic::VizFormBuilder
|
|
33
|
+
end
|
|
34
|
+
```
|
|
35
|
+
Specify `Bp3::Formtastice::VizFormBuilderWithCreate` if you want new `Bp3::Formtastic.input_control_class_name`
|
|
36
|
+
records to be added for each form input encountered on a form.
|
|
37
|
+
|
|
28
38
|
## Development
|
|
29
39
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
30
40
|
`rake spec` to run the tests. You can also run `bin/console` for an interactive
|
data/Rakefile
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'bundler/setup'
|
|
3
4
|
require 'bundler/gem_tasks'
|
|
4
5
|
require 'rspec/core/rake_task'
|
|
5
|
-
|
|
6
|
-
RSpec::Core::RakeTask.new(:spec)
|
|
7
|
-
|
|
8
6
|
require 'rubocop/rake_task'
|
|
9
7
|
|
|
8
|
+
Dir.glob('lib/tasks/**/*.rake').each { |file| load file }
|
|
9
|
+
|
|
10
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
10
11
|
RuboCop::RakeTask.new
|
|
11
12
|
|
|
12
13
|
task default: %i[spec rubocop]
|
data/bp3-formtastic.gemspec
CHANGED
|
@@ -31,16 +31,18 @@ Gem::Specification.new do |spec|
|
|
|
31
31
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
32
32
|
spec.require_paths = ['lib']
|
|
33
33
|
|
|
34
|
-
spec.add_dependency 'actionpack',
|
|
35
|
-
spec.add_dependency '
|
|
36
|
-
spec.add_dependency '
|
|
34
|
+
spec.add_dependency 'actionpack', '>= 7.1.2'
|
|
35
|
+
spec.add_dependency 'actionview', '>= 7.1.2'
|
|
36
|
+
spec.add_dependency 'activesupport', '>= 7.1.2'
|
|
37
|
+
spec.add_dependency 'formtastic', '>= 5.0'
|
|
38
|
+
spec.add_dependency 'railties', '>= 7.1.2'
|
|
37
39
|
|
|
38
40
|
spec.add_development_dependency 'byebug'
|
|
39
|
-
spec.add_development_dependency 'rake', '
|
|
40
|
-
spec.add_development_dependency 'rspec', '
|
|
41
|
-
spec.add_development_dependency 'rubocop', '
|
|
42
|
-
spec.add_development_dependency 'rubocop-rake', '
|
|
43
|
-
spec.add_development_dependency 'rubocop-rspec', '
|
|
41
|
+
spec.add_development_dependency 'rake', '>= 13.0'
|
|
42
|
+
spec.add_development_dependency 'rspec', '>= 3.0'
|
|
43
|
+
spec.add_development_dependency 'rubocop', '>= 1.21'
|
|
44
|
+
spec.add_development_dependency 'rubocop-rake', '>= 0.6'
|
|
45
|
+
spec.add_development_dependency 'rubocop-rspec', '>= 2.25'
|
|
44
46
|
|
|
45
47
|
# For more information and examples about making a new gem, check out our
|
|
46
48
|
# guide at: https://bundler.io/guides/creating_gem.html
|
|
@@ -12,31 +12,16 @@ module Bp3
|
|
|
12
12
|
EXCLUDED_COLUMNS = %w[rqid sqnr].freeze
|
|
13
13
|
UUID_REGEX = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
|
|
14
14
|
|
|
15
|
-
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
|
16
15
|
# PrependInputs provides formtastic input overrides
|
|
17
16
|
module PrependInputs
|
|
18
17
|
def input_wrapping(&)
|
|
19
18
|
return super if column.nil? # e.g. when called for individual details fields
|
|
19
|
+
return super if Bp3::Formtastic.input_control_class.nil?
|
|
20
|
+
return super unless builder.respond_to?(:viz)
|
|
20
21
|
return nil if column.name.in?(EXCLUDED_COLUMNS)
|
|
21
22
|
|
|
22
|
-
# url = template.controller.request.url
|
|
23
|
-
site = template.controller.send(:current_site)
|
|
24
|
-
# tenant = template.controller.send(:current_tenant)
|
|
25
|
-
# workspace = template.controller.send(:current_workspace)
|
|
26
|
-
controller = template.controller.class.name
|
|
27
|
-
action = template.controller.action_name
|
|
28
23
|
builder.id&.gsub(/_#{UUID_REGEX}/, '')
|
|
29
|
-
|
|
30
|
-
# "e:#{method} n:#{field_name} as:#{options[:as].inspect}"
|
|
31
|
-
|
|
32
|
-
viz = input_control_class.where(sites_site: site,
|
|
33
|
-
element_controller: controller,
|
|
34
|
-
element_action: action,
|
|
35
|
-
element_name: field_name)
|
|
36
|
-
.or(input_control_class.where(sites_site: site,
|
|
37
|
-
element_controller: controller,
|
|
38
|
-
element_action: action,
|
|
39
|
-
element_ident: dom_id)).first
|
|
24
|
+
viz = builder.viz(field_name, dom_id)
|
|
40
25
|
return nil if viz.present? && !viz.show_element
|
|
41
26
|
|
|
42
27
|
super
|
|
@@ -52,7 +37,6 @@ module Bp3
|
|
|
52
37
|
"#{object_name}[#{input_name}]"
|
|
53
38
|
end
|
|
54
39
|
end
|
|
55
|
-
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
|
56
40
|
|
|
57
41
|
module Base
|
|
58
42
|
prepend PrependInputs
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'active_support'
|
|
4
|
+
require 'action_view/helpers/form_options_helper'
|
|
5
|
+
require 'rails/engine'
|
|
6
|
+
require 'formtastic'
|
|
7
|
+
|
|
8
|
+
module Bp3
|
|
9
|
+
module Formtastic
|
|
10
|
+
class VizFormBuilder < ::Formtastic::FormBuilder
|
|
11
|
+
attr_reader :vizfacts
|
|
12
|
+
|
|
13
|
+
def initialize(...)
|
|
14
|
+
super
|
|
15
|
+
load_vizfacts
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def input(method, options = {})
|
|
19
|
+
super
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def viz(element_name, element_ident)
|
|
23
|
+
return if vizfacts.nil?
|
|
24
|
+
|
|
25
|
+
vizfacts.detect { |vf| vf.element_name == element_name || vf.element_ident == element_ident }
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
def vizfact_attrs(element_name, element_ident)
|
|
31
|
+
{
|
|
32
|
+
element_controller: template.controller.class.name,
|
|
33
|
+
element_action: template.controller.action_name,
|
|
34
|
+
element_name:,
|
|
35
|
+
element_ident:,
|
|
36
|
+
show_element: true
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def load_vizfacts
|
|
41
|
+
return if input_control_class.nil?
|
|
42
|
+
|
|
43
|
+
site = template.controller.send(:current_site)
|
|
44
|
+
controller = template.controller.class.name
|
|
45
|
+
action = template.controller.action_name
|
|
46
|
+
@vizfacts = input_control_class.where(sites_site: site, element_controller: controller,
|
|
47
|
+
element_action: action).to_a
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def input_control_class
|
|
51
|
+
Bp3::Formtastic.input_control_class
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Bp3
|
|
4
|
+
module Formtastic
|
|
5
|
+
class VizFormBuilderWithCreate < VizFormBuilder
|
|
6
|
+
def viz(element_name, element_ident)
|
|
7
|
+
return if vizfacts.nil?
|
|
8
|
+
|
|
9
|
+
record = super
|
|
10
|
+
return record if record
|
|
11
|
+
|
|
12
|
+
create_input_control_record(element_name, element_ident)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
def create_input_control_record(element_name, element_ident)
|
|
18
|
+
attrs = vizfact_attrs(element_name, element_ident)
|
|
19
|
+
Vizfact::Input.unscoped.create!(attrs)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
data/lib/bp3/formtastic.rb
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
require 'active_support/core_ext/module/attribute_accessors'
|
|
4
4
|
require 'active_support/inflector'
|
|
5
|
+
require 'action_dispatch' # to avoid the following ActionDispatch loading error
|
|
6
|
+
# uninitialized constant Rails::Engine::Configuration::ActionDispatch
|
|
7
|
+
# ./vendor/bundle/ruby/3.2.0/gems/railties-8.0.0/lib/rails/engine/configuration.rb:47:in `initialize'
|
|
5
8
|
|
|
9
|
+
require_relative 'formtastic/viz_form_builder'
|
|
10
|
+
require_relative 'formtastic/viz_form_builder_with_create'
|
|
6
11
|
require_relative 'formtastic/railtie'
|
|
7
12
|
require_relative 'formtastic/version'
|
|
8
13
|
|
|
@@ -11,7 +16,7 @@ module Bp3
|
|
|
11
16
|
mattr_accessor :input_control_class_name
|
|
12
17
|
|
|
13
18
|
def self.input_control_class
|
|
14
|
-
@@input_control_class ||= input_control_class_name
|
|
19
|
+
@@input_control_class ||= input_control_class_name&.constantize # rubocop:disable Style/ClassVars
|
|
15
20
|
end
|
|
16
21
|
end
|
|
17
22
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bp3-formtastic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Wim den Braven
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actionpack
|
|
@@ -17,9 +17,6 @@ dependencies:
|
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: 7.1.2
|
|
20
|
-
- - "<"
|
|
21
|
-
- !ruby/object:Gem::Version
|
|
22
|
-
version: '8'
|
|
23
20
|
type: :runtime
|
|
24
21
|
prerelease: false
|
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -27,9 +24,20 @@ dependencies:
|
|
|
27
24
|
- - ">="
|
|
28
25
|
- !ruby/object:Gem::Version
|
|
29
26
|
version: 7.1.2
|
|
30
|
-
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: actionview
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 7.1.2
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
31
39
|
- !ruby/object:Gem::Version
|
|
32
|
-
version:
|
|
40
|
+
version: 7.1.2
|
|
33
41
|
- !ruby/object:Gem::Dependency
|
|
34
42
|
name: activesupport
|
|
35
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -37,9 +45,6 @@ dependencies:
|
|
|
37
45
|
- - ">="
|
|
38
46
|
- !ruby/object:Gem::Version
|
|
39
47
|
version: 7.1.2
|
|
40
|
-
- - "<"
|
|
41
|
-
- !ruby/object:Gem::Version
|
|
42
|
-
version: '8'
|
|
43
48
|
type: :runtime
|
|
44
49
|
prerelease: false
|
|
45
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -47,23 +52,34 @@ dependencies:
|
|
|
47
52
|
- - ">="
|
|
48
53
|
- !ruby/object:Gem::Version
|
|
49
54
|
version: 7.1.2
|
|
50
|
-
- - "<"
|
|
51
|
-
- !ruby/object:Gem::Version
|
|
52
|
-
version: '8'
|
|
53
55
|
- !ruby/object:Gem::Dependency
|
|
54
56
|
name: formtastic
|
|
55
57
|
requirement: !ruby/object:Gem::Requirement
|
|
56
58
|
requirements:
|
|
57
|
-
- - "
|
|
59
|
+
- - ">="
|
|
58
60
|
- !ruby/object:Gem::Version
|
|
59
61
|
version: '5.0'
|
|
60
62
|
type: :runtime
|
|
61
63
|
prerelease: false
|
|
62
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
63
65
|
requirements:
|
|
64
|
-
- - "
|
|
66
|
+
- - ">="
|
|
65
67
|
- !ruby/object:Gem::Version
|
|
66
68
|
version: '5.0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: railties
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: 7.1.2
|
|
76
|
+
type: :runtime
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: 7.1.2
|
|
67
83
|
- !ruby/object:Gem::Dependency
|
|
68
84
|
name: byebug
|
|
69
85
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -82,70 +98,70 @@ dependencies:
|
|
|
82
98
|
name: rake
|
|
83
99
|
requirement: !ruby/object:Gem::Requirement
|
|
84
100
|
requirements:
|
|
85
|
-
- - "
|
|
101
|
+
- - ">="
|
|
86
102
|
- !ruby/object:Gem::Version
|
|
87
103
|
version: '13.0'
|
|
88
104
|
type: :development
|
|
89
105
|
prerelease: false
|
|
90
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
91
107
|
requirements:
|
|
92
|
-
- - "
|
|
108
|
+
- - ">="
|
|
93
109
|
- !ruby/object:Gem::Version
|
|
94
110
|
version: '13.0'
|
|
95
111
|
- !ruby/object:Gem::Dependency
|
|
96
112
|
name: rspec
|
|
97
113
|
requirement: !ruby/object:Gem::Requirement
|
|
98
114
|
requirements:
|
|
99
|
-
- - "
|
|
115
|
+
- - ">="
|
|
100
116
|
- !ruby/object:Gem::Version
|
|
101
117
|
version: '3.0'
|
|
102
118
|
type: :development
|
|
103
119
|
prerelease: false
|
|
104
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
105
121
|
requirements:
|
|
106
|
-
- - "
|
|
122
|
+
- - ">="
|
|
107
123
|
- !ruby/object:Gem::Version
|
|
108
124
|
version: '3.0'
|
|
109
125
|
- !ruby/object:Gem::Dependency
|
|
110
126
|
name: rubocop
|
|
111
127
|
requirement: !ruby/object:Gem::Requirement
|
|
112
128
|
requirements:
|
|
113
|
-
- - "
|
|
129
|
+
- - ">="
|
|
114
130
|
- !ruby/object:Gem::Version
|
|
115
131
|
version: '1.21'
|
|
116
132
|
type: :development
|
|
117
133
|
prerelease: false
|
|
118
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
119
135
|
requirements:
|
|
120
|
-
- - "
|
|
136
|
+
- - ">="
|
|
121
137
|
- !ruby/object:Gem::Version
|
|
122
138
|
version: '1.21'
|
|
123
139
|
- !ruby/object:Gem::Dependency
|
|
124
140
|
name: rubocop-rake
|
|
125
141
|
requirement: !ruby/object:Gem::Requirement
|
|
126
142
|
requirements:
|
|
127
|
-
- - "
|
|
143
|
+
- - ">="
|
|
128
144
|
- !ruby/object:Gem::Version
|
|
129
145
|
version: '0.6'
|
|
130
146
|
type: :development
|
|
131
147
|
prerelease: false
|
|
132
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
133
149
|
requirements:
|
|
134
|
-
- - "
|
|
150
|
+
- - ">="
|
|
135
151
|
- !ruby/object:Gem::Version
|
|
136
152
|
version: '0.6'
|
|
137
153
|
- !ruby/object:Gem::Dependency
|
|
138
154
|
name: rubocop-rspec
|
|
139
155
|
requirement: !ruby/object:Gem::Requirement
|
|
140
156
|
requirements:
|
|
141
|
-
- - "
|
|
157
|
+
- - ">="
|
|
142
158
|
- !ruby/object:Gem::Version
|
|
143
159
|
version: '2.25'
|
|
144
160
|
type: :development
|
|
145
161
|
prerelease: false
|
|
146
162
|
version_requirements: !ruby/object:Gem::Requirement
|
|
147
163
|
requirements:
|
|
148
|
-
- - "
|
|
164
|
+
- - ">="
|
|
149
165
|
- !ruby/object:Gem::Version
|
|
150
166
|
version: '2.25'
|
|
151
167
|
description:
|
|
@@ -169,6 +185,8 @@ files:
|
|
|
169
185
|
- lib/bp3/formtastic.rb
|
|
170
186
|
- lib/bp3/formtastic/railtie.rb
|
|
171
187
|
- lib/bp3/formtastic/version.rb
|
|
188
|
+
- lib/bp3/formtastic/viz_form_builder.rb
|
|
189
|
+
- lib/bp3/formtastic/viz_form_builder_with_create.rb
|
|
172
190
|
- sig/bp3/formtastic.rbs
|
|
173
191
|
homepage: https://www.black-phoebe.com
|
|
174
192
|
licenses:
|
|
@@ -194,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
194
212
|
- !ruby/object:Gem::Version
|
|
195
213
|
version: '0'
|
|
196
214
|
requirements: []
|
|
197
|
-
rubygems_version: 3.5.
|
|
215
|
+
rubygems_version: 3.5.17
|
|
198
216
|
signing_key:
|
|
199
217
|
specification_version: 4
|
|
200
218
|
summary: bp3-formtastic adapts formtastic for BP3 (persuavis/black_phoebe_3).
|