simple_form 3.0.4 → 5.0.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.
Files changed (107) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +199 -33
  3. data/MIT-LICENSE +2 -1
  4. data/README.md +453 -128
  5. data/lib/generators/simple_form/install_generator.rb +4 -3
  6. data/lib/generators/simple_form/templates/README +3 -5
  7. data/lib/generators/simple_form/templates/_form.html.erb +2 -0
  8. data/lib/generators/simple_form/templates/_form.html.haml +2 -0
  9. data/lib/generators/simple_form/templates/_form.html.slim +1 -0
  10. data/lib/generators/simple_form/templates/config/initializers/simple_form.rb +47 -16
  11. data/lib/generators/simple_form/templates/config/initializers/simple_form_bootstrap.rb +418 -23
  12. data/lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb +101 -5
  13. data/lib/generators/simple_form/templates/config/locales/simple_form.en.yml +7 -2
  14. data/lib/simple_form/action_view_extensions/builder.rb +2 -0
  15. data/lib/simple_form/action_view_extensions/form_helper.rb +10 -3
  16. data/lib/simple_form/components/errors.rb +39 -6
  17. data/lib/simple_form/components/hints.rb +3 -2
  18. data/lib/simple_form/components/html5.rb +16 -5
  19. data/lib/simple_form/components/label_input.rb +21 -2
  20. data/lib/simple_form/components/labels.rb +22 -11
  21. data/lib/simple_form/components/maxlength.rb +9 -5
  22. data/lib/simple_form/components/min_max.rb +2 -1
  23. data/lib/simple_form/components/minlength.rb +38 -0
  24. data/lib/simple_form/components/pattern.rb +2 -1
  25. data/lib/simple_form/components/placeholders.rb +4 -3
  26. data/lib/simple_form/components/readonly.rb +2 -1
  27. data/lib/simple_form/components.rb +2 -0
  28. data/lib/simple_form/error_notification.rb +1 -0
  29. data/lib/simple_form/form_builder.rb +220 -89
  30. data/lib/simple_form/helpers/autofocus.rb +1 -0
  31. data/lib/simple_form/helpers/disabled.rb +1 -0
  32. data/lib/simple_form/helpers/readonly.rb +1 -0
  33. data/lib/simple_form/helpers/required.rb +1 -0
  34. data/lib/simple_form/helpers/validators.rb +2 -1
  35. data/lib/simple_form/helpers.rb +6 -5
  36. data/lib/simple_form/i18n_cache.rb +1 -0
  37. data/lib/simple_form/inputs/base.rb +62 -16
  38. data/lib/simple_form/inputs/block_input.rb +2 -1
  39. data/lib/simple_form/inputs/boolean_input.rb +40 -16
  40. data/lib/simple_form/inputs/collection_check_boxes_input.rb +3 -2
  41. data/lib/simple_form/inputs/collection_input.rb +37 -14
  42. data/lib/simple_form/inputs/collection_radio_buttons_input.rb +9 -13
  43. data/lib/simple_form/inputs/collection_select_input.rb +5 -2
  44. data/lib/simple_form/inputs/color_input.rb +14 -0
  45. data/lib/simple_form/inputs/date_time_input.rb +24 -9
  46. data/lib/simple_form/inputs/file_input.rb +5 -2
  47. data/lib/simple_form/inputs/grouped_collection_select_input.rb +16 -3
  48. data/lib/simple_form/inputs/hidden_input.rb +5 -2
  49. data/lib/simple_form/inputs/numeric_input.rb +6 -4
  50. data/lib/simple_form/inputs/password_input.rb +6 -3
  51. data/lib/simple_form/inputs/priority_input.rb +5 -6
  52. data/lib/simple_form/inputs/range_input.rb +2 -1
  53. data/lib/simple_form/inputs/rich_text_area_input.rb +12 -0
  54. data/lib/simple_form/inputs/string_input.rb +7 -4
  55. data/lib/simple_form/inputs/text_input.rb +6 -3
  56. data/lib/simple_form/inputs.rb +3 -0
  57. data/lib/simple_form/map_type.rb +1 -0
  58. data/lib/simple_form/railtie.rb +8 -0
  59. data/lib/simple_form/tags.rb +13 -2
  60. data/lib/simple_form/version.rb +2 -1
  61. data/lib/simple_form/wrappers/builder.rb +7 -6
  62. data/lib/simple_form/wrappers/leaf.rb +29 -0
  63. data/lib/simple_form/wrappers/many.rb +7 -6
  64. data/lib/simple_form/wrappers/root.rb +10 -3
  65. data/lib/simple_form/wrappers/single.rb +7 -4
  66. data/lib/simple_form/wrappers.rb +2 -0
  67. data/lib/simple_form.rb +137 -21
  68. data/test/action_view_extensions/builder_test.rb +64 -45
  69. data/test/action_view_extensions/form_helper_test.rb +36 -16
  70. data/test/components/custom_components_test.rb +62 -0
  71. data/test/components/label_test.rb +70 -41
  72. data/test/form_builder/association_test.rb +85 -37
  73. data/test/form_builder/button_test.rb +11 -10
  74. data/test/form_builder/error_notification_test.rb +2 -1
  75. data/test/form_builder/error_test.rb +146 -33
  76. data/test/form_builder/general_test.rb +183 -81
  77. data/test/form_builder/hint_test.rb +24 -18
  78. data/test/form_builder/input_field_test.rb +105 -75
  79. data/test/form_builder/label_test.rb +68 -13
  80. data/test/form_builder/wrapper_test.rb +197 -22
  81. data/test/generators/simple_form_generator_test.rb +8 -7
  82. data/test/inputs/boolean_input_test.rb +97 -6
  83. data/test/inputs/collection_check_boxes_input_test.rb +117 -25
  84. data/test/inputs/collection_radio_buttons_input_test.rb +176 -54
  85. data/test/inputs/collection_select_input_test.rb +189 -77
  86. data/test/inputs/color_input_test.rb +10 -0
  87. data/test/inputs/datetime_input_test.rb +121 -50
  88. data/test/inputs/disabled_test.rb +29 -15
  89. data/test/inputs/discovery_test.rb +79 -6
  90. data/test/inputs/file_input_test.rb +3 -2
  91. data/test/inputs/general_test.rb +23 -22
  92. data/test/inputs/grouped_collection_select_input_test.rb +54 -17
  93. data/test/inputs/hidden_input_test.rb +5 -4
  94. data/test/inputs/numeric_input_test.rb +48 -44
  95. data/test/inputs/priority_input_test.rb +17 -16
  96. data/test/inputs/readonly_test.rb +20 -19
  97. data/test/inputs/required_test.rb +58 -13
  98. data/test/inputs/rich_text_area_input_test.rb +15 -0
  99. data/test/inputs/string_input_test.rb +58 -36
  100. data/test/inputs/text_input_test.rb +20 -7
  101. data/test/simple_form_test.rb +9 -0
  102. data/test/support/discovery_inputs.rb +40 -2
  103. data/test/support/misc_helpers.rb +113 -5
  104. data/test/support/mock_controller.rb +7 -1
  105. data/test/support/models.rb +162 -39
  106. data/test/test_helper.rb +19 -4
  107. metadata +51 -43
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ffed0afbf1694b8176a255206fc6d658e4a539af
4
- data.tar.gz: 7af2a7a0199551b2b17491d9510c2477aa125265
2
+ SHA256:
3
+ metadata.gz: 184b100fac3f2109461f1678b8a7fc1d0691e285946a5c2395bcba13a90ac4cd
4
+ data.tar.gz: bd14c6e07ab469e8d8df1822545c0707231412d10b18eaa00c1bfd015dfee4d5
5
5
  SHA512:
6
- metadata.gz: bbf22389176622fe689c4d401526d5c973124245cb3b587b3ff2428053377930a358c31eaf8088ffb2b030cef016d0b59ee790984fdedd1219c4d3daab76ff23
7
- data.tar.gz: a3e826bd625da954e73d5df1cfe546117024c5b7eb08a1ea9eb37e187e25b3479d9549a13b6e853520e68e8eb3d54ed1ead89e2f0de7318df3478d624654c611
6
+ metadata.gz: 99a5a7a83a866c5582d413b49ef6a5c14571b943e0e3c8a72b88084e24b91d46aa04f308566ce9aae0b6a6e7475e747f08fb82945f6f4122da84f9b0672c95d0
7
+ data.tar.gz: c6ae34fe070436f81a1cd79c18a359853e3a3dab4b5413c302011d82623d523e6c4826f44b4b58b59d1faddf319e3dae1da835d55e6c756f93cae4195d403e42
data/CHANGELOG.md CHANGED
@@ -1,49 +1,215 @@
1
- ## 3.0.4
1
+ ## 5.0.3
2
2
 
3
- ### bug fix
4
- * Fix method reflection for Ruby 2.1+. [@badosu](https://github.com/badosu)
5
- * Do not remove HTML attributes if components are not present.
3
+ ### Bug fix
4
+ * Fix for ActiveStorage::Attached::Many. [@enriquez](https://github.com/enriquez)
5
+
6
+ ## 5.0.2
7
+
8
+ ### Enhancements
9
+ * Remove instruction to use form-inline class. [@goalaleo](https://github.com/goalaleo)
10
+ * Added RichTextAreaInput for ActionText. [itsterry](https://github.com/itsterry)
11
+ * Skip valid_class check if no class defined. [TALlama](https://github.com/TALlama)
12
+
13
+ ### Bug fix
14
+ * Fix 'aria-required' field generated by prompt. [@CarlosAlbertoSantos](https://github.com/CarlosAlbertoSantos)
15
+
16
+ ## 5.0.1
17
+
18
+ ### Bug fix
19
+ * Replace `_url` with `remote_url` when trying to guess file inputs [@tegon](https://github.com/tegon). This has the side-effect of changing carrierwave's support from `0.2.1` to `0.2.2`.
20
+
21
+ ## 5.0.0
22
+
23
+ ### Enhancements
24
+ * Set multiple attribute for grouped selects also. [@ollym](https://github.com/ollym)
25
+ * Removes or renames label classes. [Abduvakilov](https://github.com/Abduvakilov)
26
+ * Support to label custom classes for inline collections. [@feliperenan](https://github.com/feliperenan)
27
+ * Update bootstrap generator template to match v4.3.x. [@m5o](https://github.com/m5o)
28
+ * Allow "required" attribute in generated select elements of PriorityInput. [@mcountis](https://github.com/mcountis)
29
+
30
+ ### Bug fix
31
+ * Do not call `#send` in form object to check whether the attribute is a file input. [@tegon](https://github.com/tegon)
32
+
33
+ ## Deprecations
34
+ * The config `SimpleForm.file_methods` is deprecated and it has no effect. Simple Form now supports automatically discover of file inputs for the following Gems: activestorage, carrierwave, paperclip, refile and shrine. If you are using a custom method that is not from one of the supported Gems, please change your forms to pass the input type explicitly:
35
+
36
+ ```erb
37
+ <%= form.input :avatar, as: :file %>
38
+ ```
39
+
40
+ See http://blog.plataformatec.com.br/2019/09/incorrect-access-control-in-simple-form-cve-2019-16676 for more information.
41
+
42
+ ## 4.1.0
43
+
44
+ ### Enhancements
45
+ * Guess input type more carefully. [@sringling](https://github.com/sringling)
46
+ * Allow custom error on forms without model. [@victorperez](https://github.com/victorperez)
47
+ * Do not support Ruby < 2.3 anymore. [@gssbzn](https://github.com/gssbzn)
48
+ * Add color input type. [@gssbzn](https://github.com/gssbzn)
49
+
50
+ ### Bug fix
51
+ * Improve disabled option to input_field. [@betelgeuse](https://github.com/betelgeuse)
52
+ * Memoize `input_html_classes` in `SimpleForm::Inputs::Base`. [@RigoTheDev](https://github.com/RigoTheDev)
53
+ * Fix column type citext HTML5 input type bug. [@brucew](https://github.com/brucew)
54
+ * Use form attribute in the nested boolean hidden field when it is given. [@feliperenan](https://github.com/feliperenan)
55
+
56
+ ## 4.0.1
57
+
58
+ ### Bug fix
59
+ * Do not support Rails 4 anymore. [@rafaelfranca](https://github.com/rafaelfranca)
60
+ * Add missing comma. [@vill](https://github.com/vill)
61
+
62
+ ## 4.0.0
63
+
64
+ ### Enhancements
65
+ * Add bootstrap v4.1 generator template. [@m5o](https://github.com/m5o)
66
+ * Add Rails 5.2 support. [@gobijan](https://github.com/gobijan)
67
+ * Add API to register custom components.[@feliperenan](https://github.com/feliperenan)
68
+ * Allow custom errors classes to inputs.[@feliperenan](https://github.com/feliperenan)
69
+ * Remove support from Rails 4.0, 4.1 and 4.2. [@feliperenan](https://github.com/feliperenan)
70
+ * Add support for citext, hstore, json & jsonb column types. [@swrobel](https://github.com/swrobel)
71
+ * Add :valid_class on input wrapper when value is present and valid [@aeberlin](https://github.com/aeberlin), [@m5o](https://github.com/m5o)
72
+ * Allow :valid_class to inputs when value is present and valid. [@m5o](https://github.com/m5o)
73
+ * Allow validation classes on input_field. [@feliperenan](https://github.com/feliperenan)
74
+ * Add basic ActiveStorage support. [@murb](https://github.com/murb)
75
+
76
+ ### Bug fix
77
+ * Fix horizontal form label position, from right to text-right. [@cavpollo](https://github.com/cavpollo)
78
+ * Add base error display alongside existing errors. [@bluefalcon26](https://github.com/bluefalcon26)
79
+ * Silent deprication warning for placeholder_text. [@moofkit](https://github.com/moofkit)
80
+ * Use custom i18n scope for label required html. [@tvdeyen](https://github.com/tvdeyen)
81
+
82
+ ## 3.5.1
83
+
84
+ ### Enhancements
85
+ * Exclude hidden field when unchecked_value: false. [@fschwahn](https://github.com/fschwahn)
86
+ * Add frozen_string_literal magic comment to several files. [@oniofchaos](https://github.com/oniofchaos)
87
+ * Try convert @object to model in case we got decorated object [@timurvafin](https://github.com/timurvafin)
88
+ - From now, if you are using some object that inherits from `SimpleDelegator`, you must implement
89
+ `def to_model; self; end`. Otherwise, *Simple Form* will convert the decorated object to the model
90
+ since `SimpleDelegator` will delegate it to the model.
91
+ * Code cleanup [@Fornacula](https://github.com/Fornacula)
6
92
 
7
- ## 3.0.3
93
+ ### Bug fix
94
+ * Fix error when the scope from association has parameter. [@feliperenan](https://github.com/feliperenan)
95
+ * Only call `where` on associations when they respond to it. [@anicholson](https://github.com/anicholson)
96
+ * require 'action_pack' before using it. [@etagwerker](https://github.com/etagwerker)
97
+ * Check if Rails.env is defined. [@etagwerker](https://github.com/etagwerker)
98
+ * Fix minlength. [@mameier](https://github.com/mameier)
99
+ * Make errors_on_attribute return [] when not present. [@redrick](https://github.com/redrick)
100
+ * Fix boolean inputs in nested style for label non-string. [@feliperenan](https://github.com/feliperenan)
101
+
102
+ ## 3.5.0
103
+
104
+ * Updated gem dependency to support Rails 5.1.x.
105
+
106
+ ## 3.4.0
107
+
108
+ * Removed Ruby 2.4.0 `Integer` unification deprecation warning.
109
+ * Removed EOL Ruby 1.9.3 from the build matrix.
110
+ * Added `minlength` component.
111
+ * `boolean_label_class` can be set on a per-input basis.
112
+
113
+ ## 3.3.1
114
+
115
+ ### Bug fix
116
+
117
+ * Fix support for symbols when looking up types with `ActiveModel::Type`.
118
+
119
+ ## 3.3.0
120
+
121
+ ### enhancements
122
+ * Add the `aria-invalid` attribute on inputs with errors.
123
+ * Added support for the new `ActiveModel::Type` API over Active Record's
124
+ column objects.
8
125
 
9
126
  ### bug fix
10
- * Fix XSS vulnerability on error components.
127
+ * Fix `merge_wrapper_options` to correctly merge options with duplicated keys. [@herminiotorres](https://github.com/herminiotorres)
128
+ Closes [#1278](https://github.com/heartcombo/simple_form/issues/1278).
11
129
 
12
- ## 3.0.2
130
+ ## 3.2.1
13
131
 
14
132
  ### enhancements
133
+ * Updated gem dependency to support Rails 5.0.x.
134
+
135
+ ## 3.2.0
15
136
 
16
- * Support Rails 4.1
137
+ ### bug fix
138
+ * Improve performance of input generation by disabling support for `_html` translations. This reverts the feature introduced on the 3.1.0 branch
139
+
140
+ ## 3.1.1
17
141
 
18
- ## 3.0.1
142
+ ### enhancements
143
+ * Add the `disabled_class` to the label when the input is disabled. [@rhodrid](https://github.com/rhodrid)
19
144
 
20
145
  ### bug fix
21
- * Fix XSS vulnerability on label, hint and error components.
146
+ * Make it possible to override `required` value that was previously set in the wrapper. [@nashby](https://github.com/nashby)
147
+
148
+ * `date/time/datetime` inputs now correctly generate the label `for` attribute when
149
+ HTML5 compatibility is explicitly enabled. [@ericsullivan](https://github.com/ericsullivan)
150
+
151
+ * The datetime, date, and time inputs now have a nice format by default on bootstrap.
152
+ [@ulissesalmeida](https://github.com/ulissesalmeida) [@eltonchrls](https://github.com/eltonchrls)
153
+
154
+ * Now it is possible to set custom input mappings for collections.
22
155
 
23
- ## 3.0.0
156
+ Example:
157
+
158
+ ```ruby
159
+ # On configuration:
160
+ config.input_mappings = { /gender$/ => :check_boxes }
161
+
162
+ # On form:
163
+ f.input :gender, collection: [:male, :female]
164
+ ```
165
+ [strangeworks](https://github.com/strangeworks)
166
+
167
+ ## 3.1.0
24
168
 
25
169
  ### enhancements
26
- * New `input_class` global config option to set a class to be generated in all inputs.
27
- * Collection tags accept html attributes as the last element of collection [@nashby](https://github.com/nashby)
28
- * Change default `:value_method` of collection tags from `:last` to `:second` [@nashby](https://github.com/nashby)
29
- * Support `Proc` object in `:conditions` option of associations [@bradly](https://github.com/bradly)
30
- * `input_field` supports `html5` component [@nashby](https://github.com/nashby)
31
- * Make `field_error_proc` configurable [@dfens](https://github.com/dfens)
32
- * Support to Rails 4.
33
- * Removed deprecated methods.
34
- * SimpleForm no longer sets the `size` attribute automatically and the `default_input_size` setting
35
- is now deprecated.
36
- * Support to aria-required attribute to required fields [@ckundo](https://github.com/ckundo)
170
+ * Update foundation generator to version 5. [@jorge-d](https://github.com/jorge-d)
171
+ * Add mapping to `uuid` columns.
172
+ * Add custom namespaces for custom inputs feature. [@vala](https://github.com/vala)
173
+ * Add `:unless_blank` option to the wrapper API. [@IanVaughan](https://github.com/IanVaughan)
174
+ * Add support to html markup in the I18n options. [@laurocaetano](https://github.com/laurocaetano)
175
+ * Add the `full_error` component. [@laurocaetano](https://github.com/laurocaetano)
176
+ * Add support to `scope` to be used on associations. [@laurocaetano](https://github.com/laurocaetano)
177
+ * Execute the association `condition` in the object context. [@laurocaetano](https://github.com/laurocaetano)
178
+ * Check if the given association responds to `order` before calling it. [@laurocaetano](https://github.com/laurocaetano)
179
+ * Add Bootstrap 3 initializer template.
180
+ * For radio or checkbox collection always use `:item_wrapper_tag` to wrap the content and add `label` when using `boolean_style` with `:nested` [@kassio](https://github.com/kassio) and [@erichkist](https://github.com/erichkist)
181
+ * `input_field` uses the same wrapper as input but only with attribute components. [@nashby](https://github.com/nashby)
182
+ * Add wrapper mapping per form basis [@rcillo](https://github.com/rcillo) and [@bernardoamc](https://github.com/bernardoamc)
183
+ * Add `for` attribute to `label` when collections are rendered as radio or checkbox [@erichkist](https://github.com/erichkist), [@ulissesalmeida](https://github.com/ulissesalmeida) and [@fabioyamate](https://github.com/fabioyamate)
184
+ * Add `include_default_input_wrapper_class` config [@luizcosta](https://github.com/luizcosta)
185
+ * Map `datetime`, `date` and `time` input types to their respective HTML5 input tags
186
+ when the `:html5` is set to `true` [@volmer](https://github.com/volmer)
187
+ * Add `boolean_label_class` config.
188
+ * Add `:html` option to include additional attributes on custom wrappers [@remofritzsche](https://github.com/remofritzsche) and [@ulissesalmeida](https://github.com/ulissesalmeida)
189
+ * Make possible to use the Wrappers API to define attributes for the components.
190
+ See https://github.com/heartcombo/simple_form/pull/997 for more information.
191
+ * Put a whitespace before the `inline_label` options of boolean input if it is present.
192
+ * Add support to configure the `label_text` proc at the wrapper level. [@NOX73](https://github.com/NOX73)
193
+ * `label_text` proc now receive three arguments (label, request, and if the label was explicit). [@timscott](https://github.com/timscott)
194
+ * Add I18n support to `:include_blank` and `:prompt` when `:translate` is used as value. [@haines](https://github.com/heartcombo/simple_form/pull/616)
195
+ * Add support to define custom error messages for the attributes.
196
+ * Add support to change the I18n scope to be used in Simple Form. [@nielsbuus](https://github.com/nielsbuus)
197
+ * The default form class can now be overridden with `html: { :class }`. [@rmm5t](https://github.com/rmm5t)
37
198
 
38
199
  ### bug fix
39
- * Make `DateTimeInput#label_target` method to work with string values in `I18n.t('date.order')` (default
40
- behaviour in Rails 4)
41
- Closes [#846](https://github.com/plataformatec/simple_form/issues/846) [@mjankowski](https://github.com/mjankowski)
42
- * Add "checkbox" class to the label of boolean input when there is no `:label`
43
- in `generate_additional_classes_for` config option [@nashby](https://github.com/nashby)
44
- * Support models with digits in their names [@webgago](https://github.com/webgago)
45
- * Remove deprecation warnings related to `Relation#all` from Rails 4.
46
- * Form builder can be used outside the context of a controller [@jasonwebster](https://github.com/jasonwebster)
47
- * Skip pattern attribute when using `validates_format_of` with `:without` option [@glebm](https://github.com/glebm)
48
-
49
- Please check [v2.1](https://github.com/plataformatec/simple_form/blob/v2.1/CHANGELOG.md) for previous changes.
200
+ * Fix `full_error` when the attribute is an association. [@mvdamme](https://github.com/jorge-d)
201
+ * Fix suppport to `:namespace` and `:index` options for nested check boxes and radio buttons when the attribute is an association.
202
+ * Collection input that uses automatic collection translation properly sets checked values.
203
+ Closes [#971](https://github.com/heartcombo/simple_form/issues/971) [@nashby](https://github.com/nashby)
204
+ * Collection input generates `required` attribute if it has `prompt` option. [@nashby](https://github.com/nashby)
205
+ * Grouped collection uses the first non-empty object to detect label and value methods.
206
+
207
+ ## deprecation
208
+ * Methods on custom inputs now accept a required argument with the wrapper options.
209
+ See https://github.com/heartcombo/simple_form/pull/997 for more information.
210
+ * SimpleForm.form_class is deprecated in favor of SimpleForm.default_form_class.
211
+ Future versions of Simple Form will not generate `simple_form` class for the form
212
+ element.
213
+ See https://github.com/heartcombo/simple_form/pull/1109 for more information.
214
+
215
+ Please check [v3.0](https://github.com/heartcombo/simple_form/blob/v3.0/CHANGELOG.md) for previous changes.
data/MIT-LICENSE CHANGED
@@ -1,4 +1,5 @@
1
- Copyright (c) 2009-2013 Plataformatec http://plataformatec.com.br/
1
+ Copyright (c) 2020 Rafael França, Carlos Antônio da Silva
2
+ Copyright (c) 2009-2019 Plataformatec
2
3
 
3
4
  Permission is hereby granted, free of charge, to any person obtaining
4
5
  a copy of this software and associated documentation files (the