bard-file_field 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/.nvmrc +1 -0
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +8 -0
  6. data/Gemfile.lock +98 -0
  7. data/LICENSE +21 -0
  8. data/README.md +29 -0
  9. data/Rakefile +4 -0
  10. data/app/assets/javascripts/bard-file.js +4913 -0
  11. data/app/controllers/bard/file_field/blobs_controller.rb +11 -0
  12. data/bard-file/.gitignore +1 -0
  13. data/bard-file/bun.lockb +0 -0
  14. data/bard-file/index.js +2 -0
  15. data/bard-file/package.json +20 -0
  16. data/bard-file/rollup.config.js +26 -0
  17. data/bard-file_field.gemspec +34 -0
  18. data/config/routes.rb +6 -0
  19. data/dummy/.gitattributes +7 -0
  20. data/dummy/.gitignore +36 -0
  21. data/dummy/Gemfile +29 -0
  22. data/dummy/Gemfile.lock +353 -0
  23. data/dummy/README.md +24 -0
  24. data/dummy/Rakefile +13 -0
  25. data/dummy/app/assets/config/manifest.js +3 -0
  26. data/dummy/app/assets/images/.keep +0 -0
  27. data/dummy/app/assets/stylesheets/application.css +22 -0
  28. data/dummy/app/controllers/application_controller.rb +2 -0
  29. data/dummy/app/controllers/concerns/.keep +0 -0
  30. data/dummy/app/controllers/edge_cases_controller.rb +23 -0
  31. data/dummy/app/controllers/posts_controller.rb +33 -0
  32. data/dummy/app/controllers/validations_controller.rb +18 -0
  33. data/dummy/app/helpers/application_helper.rb +2 -0
  34. data/dummy/app/javascript/application.js +2 -0
  35. data/dummy/app/javascript/controllers/application.js +9 -0
  36. data/dummy/app/javascript/controllers/index.js +11 -0
  37. data/dummy/app/models/application_record.rb +3 -0
  38. data/dummy/app/models/concerns/.keep +0 -0
  39. data/dummy/app/models/post.rb +9 -0
  40. data/dummy/app/views/edge_cases/rails_validation_error.html.erb +16 -0
  41. data/dummy/app/views/layouts/application.html.erb +18 -0
  42. data/dummy/app/views/layouts/mailer.html.erb +13 -0
  43. data/dummy/app/views/layouts/mailer.text.erb +1 -0
  44. data/dummy/app/views/posts/form.html.erb +39 -0
  45. data/dummy/app/views/posts/show.html.erb +16 -0
  46. data/dummy/app/views/validations/form.html.erb +19 -0
  47. data/dummy/app/views/validations/optional_file.html.erb +10 -0
  48. data/dummy/app/views/validations/optional_file_with_max_size.html.erb +10 -0
  49. data/dummy/app/views/validations/optional_image.html.erb +10 -0
  50. data/dummy/app/views/validations/required_file.html.erb +10 -0
  51. data/dummy/app/views/validations/required_media.html.erb +10 -0
  52. data/dummy/bin/bundle +114 -0
  53. data/dummy/bin/importmap +4 -0
  54. data/dummy/bin/rails +4 -0
  55. data/dummy/bin/rake +4 -0
  56. data/dummy/bin/setup +33 -0
  57. data/dummy/config/application.rb +22 -0
  58. data/dummy/config/boot.rb +4 -0
  59. data/dummy/config/cable.yml +10 -0
  60. data/dummy/config/credentials.yml.enc +1 -0
  61. data/dummy/config/cucumber.yml +2 -0
  62. data/dummy/config/database.yml +25 -0
  63. data/dummy/config/environment.rb +5 -0
  64. data/dummy/config/environments/development.rb +70 -0
  65. data/dummy/config/environments/production.rb +93 -0
  66. data/dummy/config/environments/test.rb +60 -0
  67. data/dummy/config/importmap.rb +4 -0
  68. data/dummy/config/initializers/assets.rb +12 -0
  69. data/dummy/config/initializers/content_security_policy.rb +25 -0
  70. data/dummy/config/initializers/filter_parameter_logging.rb +8 -0
  71. data/dummy/config/initializers/inflections.rb +16 -0
  72. data/dummy/config/initializers/permissions_policy.rb +11 -0
  73. data/dummy/config/locales/en.yml +33 -0
  74. data/dummy/config/puma.rb +43 -0
  75. data/dummy/config/routes.rb +7 -0
  76. data/dummy/config/storage.yml +34 -0
  77. data/dummy/config.ru +6 -0
  78. data/dummy/db/migrate/20231013175203_create_posts.rb +8 -0
  79. data/dummy/db/migrate/20231013175257_create_active_storage_tables.active_storage.rb +57 -0
  80. data/dummy/db/migrate/20231102131420_add_name_to_posts.rb +5 -0
  81. data/dummy/db/schema.rb +50 -0
  82. data/dummy/db/seeds.rb +7 -0
  83. data/dummy/features/edge_cases.feature +17 -0
  84. data/dummy/features/form-persistence.feature +40 -0
  85. data/dummy/features/form_bard_file_field_helper.feature +98 -0
  86. data/dummy/features/support/env.rb +21 -0
  87. data/dummy/features/support/fixtures/empty.3gpp +0 -0
  88. data/dummy/features/support/fixtures/empty.JPEG +0 -0
  89. data/dummy/features/support/fixtures/empty.M4V +0 -0
  90. data/dummy/features/support/fixtures/empty.avi +0 -0
  91. data/dummy/features/support/fixtures/empty.bmp +0 -0
  92. data/dummy/features/support/fixtures/empty.flv +0 -0
  93. data/dummy/features/support/fixtures/empty.gif +0 -0
  94. data/dummy/features/support/fixtures/empty.heic +0 -0
  95. data/dummy/features/support/fixtures/empty.jpeg +0 -0
  96. data/dummy/features/support/fixtures/empty.jpg +0 -0
  97. data/dummy/features/support/fixtures/empty.m4v +0 -0
  98. data/dummy/features/support/fixtures/empty.mkv +0 -0
  99. data/dummy/features/support/fixtures/empty.mov +0 -0
  100. data/dummy/features/support/fixtures/empty.mp4 +0 -0
  101. data/dummy/features/support/fixtures/empty.png +0 -0
  102. data/dummy/features/support/fixtures/empty.tiff +0 -0
  103. data/dummy/features/support/fixtures/empty.webm +0 -0
  104. data/dummy/features/support/fixtures/empty.wmv +0 -0
  105. data/dummy/features/support/fixtures/image.jpg +0 -0
  106. data/dummy/features/support/fixtures/image2.jpg +0 -0
  107. data/dummy/features/support/fixtures/video.mp4 +0 -0
  108. data/dummy/features/support/selectors.rb +63 -0
  109. data/dummy/features/support/step_definitions/download_steps.rb +4 -0
  110. data/dummy/features/support/step_definitions/web_steps.rb +94 -0
  111. data/dummy/features/validations.feature +71 -0
  112. data/dummy/lib/assets/.keep +0 -0
  113. data/dummy/lib/tasks/.keep +0 -0
  114. data/dummy/log/.keep +0 -0
  115. data/dummy/public/404.html +67 -0
  116. data/dummy/public/422.html +67 -0
  117. data/dummy/public/500.html +66 -0
  118. data/dummy/public/apple-touch-icon-precomposed.png +0 -0
  119. data/dummy/public/apple-touch-icon.png +0 -0
  120. data/dummy/public/favicon.ico +0 -0
  121. data/dummy/public/robots.txt +1 -0
  122. data/dummy/storage/.keep +0 -0
  123. data/dummy/test/application_system_test_case.rb +21 -0
  124. data/dummy/test/channels/application_cable/connection_test.rb +11 -0
  125. data/dummy/test/controllers/.keep +0 -0
  126. data/dummy/test/fixtures/files/.keep +0 -0
  127. data/dummy/test/helpers/.keep +0 -0
  128. data/dummy/test/integration/.keep +0 -0
  129. data/dummy/test/mailers/.keep +0 -0
  130. data/dummy/test/models/.keep +0 -0
  131. data/dummy/test/system/.keep +0 -0
  132. data/dummy/test/system/tests_test.rb +9 -0
  133. data/dummy/test/test_helper.rb +13 -0
  134. data/dummy/tmp/.keep +0 -0
  135. data/dummy/tmp/pids/.keep +0 -0
  136. data/dummy/tmp/storage/.keep +0 -0
  137. data/lib/bard/file_field/field.rb +27 -0
  138. data/lib/bard/file_field/form_builder.rb +12 -0
  139. data/lib/bard/file_field/version.rb +7 -0
  140. data/lib/bard/file_field.rb +20 -0
  141. metadata +197 -0
metadata ADDED
@@ -0,0 +1,197 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bard-file_field
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Micah Geisel
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-04-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activestorage
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 7.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 7.1.0
27
+ description: Enhanced file field
28
+ email:
29
+ - micah@botandrose.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".nvmrc"
35
+ - ".ruby-gemset"
36
+ - ".ruby-version"
37
+ - Gemfile
38
+ - Gemfile.lock
39
+ - LICENSE
40
+ - README.md
41
+ - Rakefile
42
+ - app/assets/javascripts/bard-file.js
43
+ - app/controllers/bard/file_field/blobs_controller.rb
44
+ - bard-file/.gitignore
45
+ - bard-file/bun.lockb
46
+ - bard-file/index.js
47
+ - bard-file/package.json
48
+ - bard-file/rollup.config.js
49
+ - bard-file_field.gemspec
50
+ - config/routes.rb
51
+ - dummy/.gitattributes
52
+ - dummy/.gitignore
53
+ - dummy/Gemfile
54
+ - dummy/Gemfile.lock
55
+ - dummy/README.md
56
+ - dummy/Rakefile
57
+ - dummy/app/assets/config/manifest.js
58
+ - dummy/app/assets/images/.keep
59
+ - dummy/app/assets/stylesheets/application.css
60
+ - dummy/app/controllers/application_controller.rb
61
+ - dummy/app/controllers/concerns/.keep
62
+ - dummy/app/controllers/edge_cases_controller.rb
63
+ - dummy/app/controllers/posts_controller.rb
64
+ - dummy/app/controllers/validations_controller.rb
65
+ - dummy/app/helpers/application_helper.rb
66
+ - dummy/app/javascript/application.js
67
+ - dummy/app/javascript/controllers/application.js
68
+ - dummy/app/javascript/controllers/index.js
69
+ - dummy/app/models/application_record.rb
70
+ - dummy/app/models/concerns/.keep
71
+ - dummy/app/models/post.rb
72
+ - dummy/app/views/edge_cases/rails_validation_error.html.erb
73
+ - dummy/app/views/layouts/application.html.erb
74
+ - dummy/app/views/layouts/mailer.html.erb
75
+ - dummy/app/views/layouts/mailer.text.erb
76
+ - dummy/app/views/posts/form.html.erb
77
+ - dummy/app/views/posts/show.html.erb
78
+ - dummy/app/views/validations/form.html.erb
79
+ - dummy/app/views/validations/optional_file.html.erb
80
+ - dummy/app/views/validations/optional_file_with_max_size.html.erb
81
+ - dummy/app/views/validations/optional_image.html.erb
82
+ - dummy/app/views/validations/required_file.html.erb
83
+ - dummy/app/views/validations/required_media.html.erb
84
+ - dummy/bin/bundle
85
+ - dummy/bin/importmap
86
+ - dummy/bin/rails
87
+ - dummy/bin/rake
88
+ - dummy/bin/setup
89
+ - dummy/config.ru
90
+ - dummy/config/application.rb
91
+ - dummy/config/boot.rb
92
+ - dummy/config/cable.yml
93
+ - dummy/config/credentials.yml.enc
94
+ - dummy/config/cucumber.yml
95
+ - dummy/config/database.yml
96
+ - dummy/config/environment.rb
97
+ - dummy/config/environments/development.rb
98
+ - dummy/config/environments/production.rb
99
+ - dummy/config/environments/test.rb
100
+ - dummy/config/importmap.rb
101
+ - dummy/config/initializers/assets.rb
102
+ - dummy/config/initializers/content_security_policy.rb
103
+ - dummy/config/initializers/filter_parameter_logging.rb
104
+ - dummy/config/initializers/inflections.rb
105
+ - dummy/config/initializers/permissions_policy.rb
106
+ - dummy/config/locales/en.yml
107
+ - dummy/config/puma.rb
108
+ - dummy/config/routes.rb
109
+ - dummy/config/storage.yml
110
+ - dummy/db/migrate/20231013175203_create_posts.rb
111
+ - dummy/db/migrate/20231013175257_create_active_storage_tables.active_storage.rb
112
+ - dummy/db/migrate/20231102131420_add_name_to_posts.rb
113
+ - dummy/db/schema.rb
114
+ - dummy/db/seeds.rb
115
+ - dummy/features/edge_cases.feature
116
+ - dummy/features/form-persistence.feature
117
+ - dummy/features/form_bard_file_field_helper.feature
118
+ - dummy/features/support/env.rb
119
+ - dummy/features/support/fixtures/empty.3gpp
120
+ - dummy/features/support/fixtures/empty.JPEG
121
+ - dummy/features/support/fixtures/empty.M4V
122
+ - dummy/features/support/fixtures/empty.avi
123
+ - dummy/features/support/fixtures/empty.bmp
124
+ - dummy/features/support/fixtures/empty.flv
125
+ - dummy/features/support/fixtures/empty.gif
126
+ - dummy/features/support/fixtures/empty.heic
127
+ - dummy/features/support/fixtures/empty.jpeg
128
+ - dummy/features/support/fixtures/empty.jpg
129
+ - dummy/features/support/fixtures/empty.m4v
130
+ - dummy/features/support/fixtures/empty.mkv
131
+ - dummy/features/support/fixtures/empty.mov
132
+ - dummy/features/support/fixtures/empty.mp4
133
+ - dummy/features/support/fixtures/empty.png
134
+ - dummy/features/support/fixtures/empty.tiff
135
+ - dummy/features/support/fixtures/empty.webm
136
+ - dummy/features/support/fixtures/empty.wmv
137
+ - dummy/features/support/fixtures/image.jpg
138
+ - dummy/features/support/fixtures/image2.jpg
139
+ - dummy/features/support/fixtures/video.mp4
140
+ - dummy/features/support/selectors.rb
141
+ - dummy/features/support/step_definitions/download_steps.rb
142
+ - dummy/features/support/step_definitions/web_steps.rb
143
+ - dummy/features/validations.feature
144
+ - dummy/lib/assets/.keep
145
+ - dummy/lib/tasks/.keep
146
+ - dummy/log/.keep
147
+ - dummy/public/404.html
148
+ - dummy/public/422.html
149
+ - dummy/public/500.html
150
+ - dummy/public/apple-touch-icon-precomposed.png
151
+ - dummy/public/apple-touch-icon.png
152
+ - dummy/public/favicon.ico
153
+ - dummy/public/robots.txt
154
+ - dummy/storage/.keep
155
+ - dummy/test/application_system_test_case.rb
156
+ - dummy/test/channels/application_cable/connection_test.rb
157
+ - dummy/test/controllers/.keep
158
+ - dummy/test/fixtures/files/.keep
159
+ - dummy/test/helpers/.keep
160
+ - dummy/test/integration/.keep
161
+ - dummy/test/mailers/.keep
162
+ - dummy/test/models/.keep
163
+ - dummy/test/system/.keep
164
+ - dummy/test/system/tests_test.rb
165
+ - dummy/test/test_helper.rb
166
+ - dummy/tmp/.keep
167
+ - dummy/tmp/pids/.keep
168
+ - dummy/tmp/storage/.keep
169
+ - lib/bard/file_field.rb
170
+ - lib/bard/file_field/field.rb
171
+ - lib/bard/file_field/form_builder.rb
172
+ - lib/bard/file_field/version.rb
173
+ homepage: https://github.com/botandrose/bard-file_field
174
+ licenses: []
175
+ metadata:
176
+ homepage_uri: https://github.com/botandrose/bard-file_field
177
+ source_code_uri: https://github.com/botandrose/bard-file_field
178
+ post_install_message:
179
+ rdoc_options: []
180
+ require_paths:
181
+ - lib
182
+ required_ruby_version: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: 3.0.0
187
+ required_rubygems_version: !ruby/object:Gem::Requirement
188
+ requirements:
189
+ - - ">="
190
+ - !ruby/object:Gem::Version
191
+ version: '0'
192
+ requirements: []
193
+ rubygems_version: 3.5.1
194
+ signing_key:
195
+ specification_version: 4
196
+ summary: Enhanced file field
197
+ test_files: []