From 5c229f24f561a0d711144b31305105d7ef9ff6bd Mon Sep 17 00:00:00 2001 From: evertsalinas Date: Mon, 1 Nov 2021 21:52:10 -0600 Subject: [PATCH 01/29] Add places controller --- app/assets/images/markergc.png | Bin 0 -> 706 bytes app/views/fields/nested_has_many/_form.html.erb | 2 ++ 2 files changed, 2 insertions(+) create mode 100644 app/assets/images/markergc.png diff --git a/app/assets/images/markergc.png b/app/assets/images/markergc.png new file mode 100644 index 0000000000000000000000000000000000000000..230fffc5d7ebf1ccc02b9c505e6245c76bbf78f8 GIT binary patch literal 706 zcmV;z0zLhSP)$AX6t)&oHDO>*m(E0pnZgDviBz>rp#A|!*}Jq`GBv`LSSmG@ z$k3tSHh=($%7US7eDQI2G*v?Ei__*OIr6)A{=W0+-E#;Lq;sXT)oB+5*qjK09Ej3t zSYDpITq0@^Ivc;7mGvkM3KM0#{ZxP!&&13SxdK7ibCxScaVeZ3pKpRh2BXsuc4FSE zm)rsI^u3o^Vze1+wNa?Iu3h1DtbwwCHl9aGr>S22Wz?Y1txCymo#Q=z(~_E0~n z&C1@gGmaLZ>f3Xcit1h$s$M;zh|A-_;^l5&b#G1%-@C~ha})Aarg1@JalG)Hm1;L0 zXb!R+sGgp~h!Di;(bjTbpBgy7!tNC1#<>`c-T#F{#l8A#S0s2IL(20U^>MH}g|Jj; z=g|g%7;d1yIy|rDho!Bk=T2JA_vF;<4+0e~B5V}b28T{V8XOE5#1Pig5QDyd1~G*d o7Gj{cXmYj&Vz*)Q`8dLgzq~jJJ#1g>kpKVy07*qoM6N<$f{mR;9RL6T literal 0 HcmV?d00001 diff --git a/app/views/fields/nested_has_many/_form.html.erb b/app/views/fields/nested_has_many/_form.html.erb index 8e7e80c..1ffa74d 100644 --- a/app/views/fields/nested_has_many/_form.html.erb +++ b/app/views/fields/nested_has_many/_form.html.erb @@ -1,6 +1,7 @@
<%= f.label field.attribute %> <%= f.fields_for field.association_name do |nested_form| %> +
<%= render( partial: "fields/nested_has_many/fields", locals: { @@ -8,6 +9,7 @@ field: field, }, ) %> +
<% end %>
From 2c6daf39f07475e778f93c504043c07a708ef9cf Mon Sep 17 00:00:00 2001 From: evertsalinas Date: Mon, 1 Nov 2021 22:10:31 -0600 Subject: [PATCH 02/29] test --- app/views/fields/nested_has_many/_form.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/fields/nested_has_many/_form.html.erb b/app/views/fields/nested_has_many/_form.html.erb index 1ffa74d..a6287ba 100644 --- a/app/views/fields/nested_has_many/_form.html.erb +++ b/app/views/fields/nested_has_many/_form.html.erb @@ -1,4 +1,5 @@
+

PROBANDOPRONAGO

<%= f.label field.attribute %> <%= f.fields_for field.association_name do |nested_form| %>
From f1fb3bf7fe2de6d92e04392edb789101232d6183 Mon Sep 17 00:00:00 2001 From: evertsalinas Date: Tue, 2 Nov 2021 09:58:35 -0600 Subject: [PATCH 03/29] help --- app/views/fields/nested_has_many/_form.html.erb | 1 + app/views/fields/nested_has_many/_show.html.erb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/fields/nested_has_many/_form.html.erb b/app/views/fields/nested_has_many/_form.html.erb index a6287ba..438e1ec 100644 --- a/app/views/fields/nested_has_many/_form.html.erb +++ b/app/views/fields/nested_has_many/_form.html.erb @@ -1,3 +1,4 @@ +

PROBANDOPRONAGO

PROBANDOPRONAGO

<%= f.label field.attribute %> diff --git a/app/views/fields/nested_has_many/_show.html.erb b/app/views/fields/nested_has_many/_show.html.erb index 7ef8bd9..13c0eac 100644 --- a/app/views/fields/nested_has_many/_show.html.erb +++ b/app/views/fields/nested_has_many/_show.html.erb @@ -21,6 +21,7 @@ from the associated resource class's dashboard. <% if field.resources.any? %> <% order = field.order_from_params(params.fetch(field.name, {})) %> <% page_number = params.fetch(field.name, {}).fetch(:page, nil) %> +

PROBANDOPRONAGO

<%= render( "collection", collection_presenter: field.associated_collection(order), From 98db8a8bd3e6a37c59199bd9ac8864b9435397c6 Mon Sep 17 00:00:00 2001 From: evertsalinas Date: Tue, 2 Nov 2021 10:50:41 -0600 Subject: [PATCH 04/29] add more details --- app/views/fields/nested_has_many/_form.html.erb | 4 ++-- app/views/fields/nested_has_many/_show.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/fields/nested_has_many/_form.html.erb b/app/views/fields/nested_has_many/_form.html.erb index 438e1ec..66e0ba6 100644 --- a/app/views/fields/nested_has_many/_form.html.erb +++ b/app/views/fields/nested_has_many/_form.html.erb @@ -1,6 +1,6 @@ -

PROBANDOPRONAGO

+

fuera _form

-

PROBANDOPRONAGO

+

dentro _form

<%= f.label field.attribute %> <%= f.fields_for field.association_name do |nested_form| %>
diff --git a/app/views/fields/nested_has_many/_show.html.erb b/app/views/fields/nested_has_many/_show.html.erb index 13c0eac..e83a4f5 100644 --- a/app/views/fields/nested_has_many/_show.html.erb +++ b/app/views/fields/nested_has_many/_show.html.erb @@ -21,7 +21,7 @@ from the associated resource class's dashboard. <% if field.resources.any? %> <% order = field.order_from_params(params.fetch(field.name, {})) %> <% page_number = params.fetch(field.name, {}).fetch(:page, nil) %> -

PROBANDOPRONAGO

+

show _form

<%= render( "collection", collection_presenter: field.associated_collection(order), From 8eb8d56ec682cb702044686617daece9aaa233ad Mon Sep 17 00:00:00 2001 From: evertsalinas Date: Tue, 2 Nov 2021 10:52:32 -0600 Subject: [PATCH 05/29] Changes --- app/views/fields/nested_has_many/_fields.html.erb | 2 +- app/views/fields/nested_has_many/_form.html.erb | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/views/fields/nested_has_many/_fields.html.erb b/app/views/fields/nested_has_many/_fields.html.erb index 7046192..a16671a 100644 --- a/app/views/fields/nested_has_many/_fields.html.erb +++ b/app/views/fields/nested_has_many/_fields.html.erb @@ -1,6 +1,6 @@
<% field.nested_fields_for_builder(f).each do |attribute| -%> -
+
<%= render_field attribute, f: f %>
<% end -%> diff --git a/app/views/fields/nested_has_many/_form.html.erb b/app/views/fields/nested_has_many/_form.html.erb index 66e0ba6..6efcdd1 100644 --- a/app/views/fields/nested_has_many/_form.html.erb +++ b/app/views/fields/nested_has_many/_form.html.erb @@ -3,7 +3,6 @@

dentro _form

<%= f.label field.attribute %> <%= f.fields_for field.association_name do |nested_form| %> -
<%= render( partial: "fields/nested_has_many/fields", locals: { @@ -11,7 +10,6 @@ field: field, }, ) %> -
<% end %>
From c6aee4eb356c09b49c5535a8eb62a34728a8a298 Mon Sep 17 00:00:00 2001 From: evertsalinas Date: Tue, 2 Nov 2021 11:19:23 -0600 Subject: [PATCH 06/29] Remove unnecessary code --- app/views/fields/nested_has_many/_form.html.erb | 2 -- app/views/fields/nested_has_many/_show.html.erb | 1 - 2 files changed, 3 deletions(-) diff --git a/app/views/fields/nested_has_many/_form.html.erb b/app/views/fields/nested_has_many/_form.html.erb index 6efcdd1..8e7e80c 100644 --- a/app/views/fields/nested_has_many/_form.html.erb +++ b/app/views/fields/nested_has_many/_form.html.erb @@ -1,6 +1,4 @@ -

fuera _form

-

dentro _form

<%= f.label field.attribute %> <%= f.fields_for field.association_name do |nested_form| %> <%= render( diff --git a/app/views/fields/nested_has_many/_show.html.erb b/app/views/fields/nested_has_many/_show.html.erb index e83a4f5..7ef8bd9 100644 --- a/app/views/fields/nested_has_many/_show.html.erb +++ b/app/views/fields/nested_has_many/_show.html.erb @@ -21,7 +21,6 @@ from the associated resource class's dashboard. <% if field.resources.any? %> <% order = field.order_from_params(params.fetch(field.name, {})) %> <% page_number = params.fetch(field.name, {}).fetch(:page, nil) %> -

show _form

<%= render( "collection", collection_presenter: field.associated_collection(order), From c5a61793faa7e1ace7595cf27b342a2aec43a439 Mon Sep 17 00:00:00 2001 From: evertsalinas Date: Tue, 2 Nov 2021 11:27:41 -0600 Subject: [PATCH 07/29] Fix stim controller --- app/views/fields/nested_has_many/_fields.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/fields/nested_has_many/_fields.html.erb b/app/views/fields/nested_has_many/_fields.html.erb index a16671a..518f4bc 100644 --- a/app/views/fields/nested_has_many/_fields.html.erb +++ b/app/views/fields/nested_has_many/_fields.html.erb @@ -1,6 +1,6 @@ -
+
<% field.nested_fields_for_builder(f).each do |attribute| -%> -
+
<%= render_field attribute, f: f %>
<% end -%> From fd515fccc130eb0849e295ad6f23c050342ff676 Mon Sep 17 00:00:00 2001 From: evertsalinas Date: Thu, 4 Nov 2021 16:08:26 -0600 Subject: [PATCH 08/29] Setup places controller only if attribute is location --- app/views/fields/nested_has_many/_fields.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/fields/nested_has_many/_fields.html.erb b/app/views/fields/nested_has_many/_fields.html.erb index 518f4bc..5185dda 100644 --- a/app/views/fields/nested_has_many/_fields.html.erb +++ b/app/views/fields/nested_has_many/_fields.html.erb @@ -1,4 +1,4 @@ -
+
" data-action="google-maps-callback@window->places#initMap" data-places-imageurl-value="<%= asset_path 'markergc.png' %>"> <% field.nested_fields_for_builder(f).each do |attribute| -%>
<%= render_field attribute, f: f %> From 8782f14830164d3326f2fe9667b927b0e89ab262 Mon Sep 17 00:00:00 2001 From: evertsalinas Date: Thu, 4 Nov 2021 16:10:40 -0600 Subject: [PATCH 09/29] Include? method fix --- app/views/fields/nested_has_many/_fields.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/fields/nested_has_many/_fields.html.erb b/app/views/fields/nested_has_many/_fields.html.erb index 5185dda..761ea51 100644 --- a/app/views/fields/nested_has_many/_fields.html.erb +++ b/app/views/fields/nested_has_many/_fields.html.erb @@ -1,4 +1,4 @@ -
" data-action="google-maps-callback@window->places#initMap" data-places-imageurl-value="<%= asset_path 'markergc.png' %>"> +
" data-action="google-maps-callback@window->places#initMap" data-places-imageurl-value="<%= asset_path 'markergc.png' %>"> <% field.nested_fields_for_builder(f).each do |attribute| -%>
<%= render_field attribute, f: f %> From e7c2615216e5bd286f7b77a0dccc2724b5795919 Mon Sep 17 00:00:00 2001 From: evertsalinas Date: Thu, 4 Nov 2021 16:15:42 -0600 Subject: [PATCH 10/29] fix conditional --- .../fields/nested_has_many/_fields.html.erb | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/app/views/fields/nested_has_many/_fields.html.erb b/app/views/fields/nested_has_many/_fields.html.erb index 761ea51..d5ed23d 100644 --- a/app/views/fields/nested_has_many/_fields.html.erb +++ b/app/views/fields/nested_has_many/_fields.html.erb @@ -1,9 +1,21 @@ -
" data-action="google-maps-callback@window->places#initMap" data-places-imageurl-value="<%= asset_path 'markergc.png' %>"> - <% field.nested_fields_for_builder(f).each do |attribute| -%> -
- <%= render_field attribute, f: f %> -
- <% end -%> +<% if field.associated_class_name.downcase.include?("location") %> +
+ <% field.nested_fields_for_builder(f).each do |attribute| -%> +
+ <%= render_field attribute, f: f %> +
+ <% end -%> - <%= link_to_remove_association I18n.t("administrate.fields.nested_has_many.remove", resource: field.associated_class_name.titleize), f %> -
+ <%= link_to_remove_association I18n.t("administrate.fields.nested_has_many.remove", resource: field.associated_class_name.titleize), f %> +
+<% else %> +
+ <% field.nested_fields_for_builder(f).each do |attribute| -%> +
+ <%= render_field attribute, f: f %> +
+ <% end -%> + + <%= link_to_remove_association I18n.t("administrate.fields.nested_has_many.remove", resource: field.associated_class_name.titleize), f %> +
+<% end %> From 4556fb28b3216a3504c63fb6e2f4351034bf1a5e Mon Sep 17 00:00:00 2001 From: evertsalinas Date: Thu, 4 Nov 2021 16:18:23 -0600 Subject: [PATCH 11/29] test --- app/views/fields/nested_has_many/_fields.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/fields/nested_has_many/_fields.html.erb b/app/views/fields/nested_has_many/_fields.html.erb index d5ed23d..ffa531a 100644 --- a/app/views/fields/nested_has_many/_fields.html.erb +++ b/app/views/fields/nested_has_many/_fields.html.erb @@ -1,3 +1,4 @@ +

<%= field.associated_class_name.downcase %>

<% if field.associated_class_name.downcase.include?("location") %>
<% field.nested_fields_for_builder(f).each do |attribute| -%> From e240ab5fa1095874fb7fb224554226651b3a2313 Mon Sep 17 00:00:00 2001 From: evertsalinas Date: Thu, 4 Nov 2021 16:33:13 -0600 Subject: [PATCH 12/29] minor change --- app/views/fields/nested_has_many/_fields.html.erb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/fields/nested_has_many/_fields.html.erb b/app/views/fields/nested_has_many/_fields.html.erb index ffa531a..d5ed23d 100644 --- a/app/views/fields/nested_has_many/_fields.html.erb +++ b/app/views/fields/nested_has_many/_fields.html.erb @@ -1,4 +1,3 @@ -

<%= field.associated_class_name.downcase %>

<% if field.associated_class_name.downcase.include?("location") %>
<% field.nested_fields_for_builder(f).each do |attribute| -%> From 94500b6355a291f3ae604333561f1b3e0b57df10 Mon Sep 17 00:00:00 2001 From: thedarkside Date: Tue, 8 Feb 2022 11:55:29 +0100 Subject: [PATCH 13/29] Add German locale (#53) --- config/locales/administrate-field-nested_has_many.de.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 config/locales/administrate-field-nested_has_many.de.yml diff --git a/config/locales/administrate-field-nested_has_many.de.yml b/config/locales/administrate-field-nested_has_many.de.yml new file mode 100644 index 0000000..91690ed --- /dev/null +++ b/config/locales/administrate-field-nested_has_many.de.yml @@ -0,0 +1,7 @@ +--- +de: + administrate: + fields: + nested_has_many: + add: "%{resource} hinzufügen" + remove: "%{resource} entfernen" From 16bd94603e773f1e5731569462a36b9cb62a6742 Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 17:36:31 +0000 Subject: [PATCH 14/29] Pin Administrate below 0.20.0 (#68) 0.20.0 introduces a change relating to attribute grouping and makes it incompatible. We'll pin this here and release a new version with this change so that a future breaking change can be marked as such. https://github.com/nickcharlton/administrate-field-nested_has_many/issues/65 --- administrate-field-nested_has_many.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrate-field-nested_has_many.gemspec b/administrate-field-nested_has_many.gemspec index 48cac8c..e93acd0 100644 --- a/administrate-field-nested_has_many.gemspec +++ b/administrate-field-nested_has_many.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |gem| gem.files = `git ls-files`.split("\n") gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") - gem.add_dependency "administrate", ">= 0.15", "< 1" + gem.add_dependency "administrate", ">= 0.15", "< 0.20.0" gem.add_dependency "cocoon", "~> 1.2", ">= 1.2.11" gem.add_development_dependency "appraisal" From 6b38711845e857a11a7330d07e9272e7056ed1f9 Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 18:07:08 +0000 Subject: [PATCH 15/29] Refresh Appraisals (#69) `master` on Administrate is now `main`, so we can't bundle that, but it's also incompatible since #68, so this is an acceptable middleground to let us test for regressions. --- Appraisals | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Appraisals b/Appraisals index 7cc1bd9..13ac7bc 100644 --- a/Appraisals +++ b/Appraisals @@ -4,6 +4,7 @@ appraise "administrate-0.15" do gem "administrate", "0.15.0" end -appraise "administrate-master" do - gem "administrate", git: "https://github.com/thoughtbot/administrate", branch: "master" +appraise "administrate-0.19" do + gem "administrate", "0.19.0" end + From bdb533c20ba02f7e8a8a97a5b3d84117054be1a7 Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 18:18:37 +0000 Subject: [PATCH 16/29] Refresh Appraisals (properly) (#71) The previous commit missed running the update command, which this does in addition to rationalising Bundler versions in the lock files. --- gemfiles/administrate_0.15.gemfile.lock | 264 +++++++++++++---------- gemfiles/administrate_0.19.gemfile | 8 + gemfiles/administrate_0.19.gemfile.lock | 267 ++++++++++++++++++++++++ 3 files changed, 434 insertions(+), 105 deletions(-) create mode 100644 gemfiles/administrate_0.19.gemfile create mode 100644 gemfiles/administrate_0.19.gemfile.lock diff --git a/gemfiles/administrate_0.15.gemfile.lock b/gemfiles/administrate_0.15.gemfile.lock index dc9524c..0938a3b 100644 --- a/gemfiles/administrate_0.15.gemfile.lock +++ b/gemfiles/administrate_0.15.gemfile.lock @@ -2,38 +2,46 @@ PATH remote: .. specs: administrate-field-nested_has_many (1.3.0) - administrate (>= 0.15, < 1) + administrate (>= 0.15, < 0.20.0) cocoon (~> 1.2, >= 1.2.11) GEM remote: https://rubygems.org/ specs: - actionpack (6.1.3.1) - actionview (= 6.1.3.1) - activesupport (= 6.1.3.1) - rack (~> 2.0, >= 2.0.9) + actionpack (7.1.3) + actionview (= 7.1.3) + activesupport (= 7.1.3) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.1.3.1) - activesupport (= 6.1.3.1) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actionview (7.1.3) + activesupport (= 7.1.3) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.1.3.1) - activesupport (= 6.1.3.1) - activerecord (6.1.3.1) - activemodel (= 6.1.3.1) - activesupport (= 6.1.3.1) - activesupport (6.1.3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activemodel (7.1.3) + activesupport (= 7.1.3) + activerecord (7.1.3) + activemodel (= 7.1.3) + activesupport (= 7.1.3) + timeout (>= 0.4.0) + activesupport (7.1.3) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) administrate (0.15.0) actionpack (>= 5.0) actionview (>= 5.0) @@ -44,113 +52,151 @@ GEM momentjs-rails (~> 2.8) sassc-rails (~> 2.1) selectize-rails (~> 0.6) - appraisal (2.4.0) + appraisal (2.5.0) bundler rake thor (>= 0.14.0) ast (2.4.2) + base64 (0.2.0) + better_html (2.0.2) + actionview (>= 6.0) + activesupport (>= 6.0) + ast (~> 2.0) + erubi (~> 1.4) + parser (>= 2.4) + smart_properties + bigdecimal (3.1.6) builder (3.2.4) - capybara (3.35.3) + capybara (3.39.2) addressable + matrix mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - childprocess (3.0.0) cocoon (1.2.15) - concurrent-ruby (1.1.8) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) crass (1.0.6) datetime_picker_rails (0.0.7) momentjs-rails (>= 2.8.1) - diff-lcs (1.4.4) - erubi (1.10.0) - factory_bot (6.1.0) + diff-lcs (1.5.0) + drb (2.2.0) + ruby2_keywords + erubi (1.12.0) + factory_bot (6.4.5) activesupport (>= 5.0.0) - ffi (1.15.0) - highline (2.0.3) - i18n (1.8.10) + ffi (1.16.3) + highline (3.0.1) + i18n (1.14.1) concurrent-ruby (~> 1.0) - i18n-tasks (0.9.34) + i18n-tasks (1.0.13) activesupport (>= 4.0.2) ast (>= 2.1.0) + better_html (>= 1.0, < 3.0) erubi highline (>= 2.0.0) i18n - parser (>= 2.2.3.0) + parser (>= 3.2.2.1) rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) - jquery-rails (4.4.0) + io-console (0.7.2) + irb (1.11.1) + rdoc + reline (>= 0.4.2) + jquery-rails (4.6.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - kaminari (1.2.1) + kaminari (1.2.2) activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.1) - kaminari-activerecord (= 1.2.1) - kaminari-core (= 1.2.1) - kaminari-actionview (1.2.1) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) actionview - kaminari-core (= 1.2.1) - kaminari-activerecord (1.2.1) + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) activerecord - kaminari-core (= 1.2.1) - kaminari-core (1.2.1) - loofah (2.9.1) + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) + loofah (2.22.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) - method_source (1.0.0) - mini_mime (1.0.3) - minitest (5.14.4) - momentjs-rails (2.20.1) + nokogiri (>= 1.12.0) + matrix (0.4.2) + mini_mime (1.1.5) + mini_portile2 (2.8.5) + minitest (5.21.2) + momentjs-rails (2.29.4.1) railties (>= 3.1) - nokogiri (1.11.3-x86_64-linux) + mutex_m (0.2.0) + nokogiri (1.16.0) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - parser (3.0.0.0) + parser (3.3.0.5) ast (~> 2.4.1) - pg (1.2.3) - public_suffix (4.0.6) - racc (1.5.2) - rack (2.2.3) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + racc + pg (1.5.4) + psych (5.1.2) + stringio + public_suffix (5.0.4) + racc (1.7.3) + rack (3.0.8) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.1.0) + rack (>= 1.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) - loofah (~> 2.3) - rails-i18n (6.0.0) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + rails-i18n (7.0.8) i18n (>= 0.7, < 2) - railties (>= 6.0.0, < 7) - railties (6.1.3.1) - actionpack (= 6.1.3.1) - activesupport (= 6.1.3.1) - method_source - rake (>= 0.8.7) - thor (~> 1.0) - rainbow (3.0.0) - rake (13.0.3) - regexp_parser (2.1.1) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + railties (>= 6.0.0, < 8) + railties (7.1.3) + actionpack (= 7.1.3) + activesupport (= 7.1.3) + irb + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rainbow (3.1.1) + rake (13.1.0) + rdoc (6.6.2) + psych (>= 4.0.0) + regexp_parser (2.9.0) + reline (0.4.2) + io-console (~> 0.5) + rexml (3.2.6) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.2) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-rails (5.0.1) - actionpack (>= 5.2) - activesupport (>= 5.2) - railties (>= 5.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) - rspec-support (3.10.2) - rubyzip (2.3.0) + rspec-support (~> 3.12.0) + rspec-rails (6.1.1) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.12) + rspec-expectations (~> 3.12) + rspec-mocks (~> 3.12) + rspec-support (~> 3.12) + rspec-support (3.12.1) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) @@ -160,27 +206,35 @@ GEM sprockets-rails tilt selectize-rails (0.12.6) - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) - rubyzip (>= 1.2.2) - sprockets (4.0.2) + selenium-webdriver (4.17.0) + base64 (~> 0.2) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + smart_properties (1.17.0) + sprockets (4.2.1) concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.4.2) - terminal-table (3.0.0) - unicode-display_width (~> 1.1, >= 1.1.1) - thor (1.1.0) - tilt (2.0.10) - tzinfo (2.0.4) + sqlite3 (1.7.1) + mini_portile2 (~> 2.8.0) + stringio (3.1.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + thor (1.3.0) + tilt (2.3.0) + timeout (0.4.1) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (1.7.0) + unicode-display_width (2.5.0) + webrick (1.8.1) + websocket (1.2.10) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.4.2) + zeitwerk (2.6.12) PLATFORMS ruby @@ -199,4 +253,4 @@ DEPENDENCIES sqlite3 BUNDLED WITH - 2.1.4 + 2.5.3 diff --git a/gemfiles/administrate_0.19.gemfile b/gemfiles/administrate_0.19.gemfile new file mode 100644 index 0000000..a86aab6 --- /dev/null +++ b/gemfiles/administrate_0.19.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "pg" +gem "administrate", "0.19.0" + +gemspec path: "../" diff --git a/gemfiles/administrate_0.19.gemfile.lock b/gemfiles/administrate_0.19.gemfile.lock new file mode 100644 index 0000000..05fc647 --- /dev/null +++ b/gemfiles/administrate_0.19.gemfile.lock @@ -0,0 +1,267 @@ +PATH + remote: .. + specs: + administrate-field-nested_has_many (1.3.0) + administrate (>= 0.15, < 0.20.0) + cocoon (~> 1.2, >= 1.2.11) + +GEM + remote: https://rubygems.org/ + specs: + actionpack (7.1.3) + actionview (= 7.1.3) + activesupport (= 7.1.3) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actionview (7.1.3) + activesupport (= 7.1.3) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activemodel (7.1.3) + activesupport (= 7.1.3) + activerecord (7.1.3) + activemodel (= 7.1.3) + activesupport (= 7.1.3) + timeout (>= 0.4.0) + activesupport (7.1.3) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + administrate (0.19.0) + actionpack (>= 5.0) + actionview (>= 5.0) + activerecord (>= 5.0) + jquery-rails (>= 4.0) + kaminari (>= 1.0) + sassc-rails (~> 2.1) + selectize-rails (~> 0.6) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + base64 (0.2.0) + better_html (2.0.2) + actionview (>= 6.0) + activesupport (>= 6.0) + ast (~> 2.0) + erubi (~> 1.4) + parser (>= 2.4) + smart_properties + bigdecimal (3.1.6) + builder (3.2.4) + capybara (3.39.2) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + cocoon (1.2.15) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) + crass (1.0.6) + diff-lcs (1.5.0) + drb (2.2.0) + ruby2_keywords + erubi (1.12.0) + factory_bot (6.4.5) + activesupport (>= 5.0.0) + ffi (1.16.3) + highline (3.0.1) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + i18n-tasks (1.0.13) + activesupport (>= 4.0.2) + ast (>= 2.1.0) + better_html (>= 1.0, < 3.0) + erubi + highline (>= 2.0.0) + i18n + parser (>= 3.2.2.1) + rails-i18n + rainbow (>= 2.2.2, < 4.0) + terminal-table (>= 1.5.1) + io-console (0.7.2) + irb (1.11.1) + rdoc + reline (>= 0.4.2) + jquery-rails (4.6.0) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + kaminari (1.2.2) + activesupport (>= 4.1.0) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) + actionview + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) + activerecord + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + matrix (0.4.2) + mini_mime (1.1.5) + minitest (5.21.2) + mutex_m (0.2.0) + nokogiri (1.16.0-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.0-arm-linux) + racc (~> 1.4) + nokogiri (1.16.0-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.0-x86-linux) + racc (~> 1.4) + nokogiri (1.16.0-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.0-x86_64-linux) + racc (~> 1.4) + parser (3.3.0.5) + ast (~> 2.4.1) + racc + pg (1.5.4) + psych (5.1.2) + stringio + public_suffix (5.0.4) + racc (1.7.3) + rack (3.0.8) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.1.0) + rack (>= 1.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + rails-i18n (7.0.8) + i18n (>= 0.7, < 2) + railties (>= 6.0.0, < 8) + railties (7.1.3) + actionpack (= 7.1.3) + activesupport (= 7.1.3) + irb + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rainbow (3.1.1) + rake (13.1.0) + rdoc (6.6.2) + psych (>= 4.0.0) + regexp_parser (2.9.0) + reline (0.4.2) + io-console (~> 0.5) + rexml (3.2.6) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-rails (6.1.1) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.12) + rspec-expectations (~> 3.12) + rspec-mocks (~> 3.12) + rspec-support (~> 3.12) + rspec-support (3.12.1) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + sassc (2.4.0) + ffi (~> 1.9) + sassc-rails (2.1.2) + railties (>= 4.0.0) + sassc (>= 2.0) + sprockets (> 3.0) + sprockets-rails + tilt + selectize-rails (0.12.6) + selenium-webdriver (4.17.0) + base64 (~> 0.2) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + smart_properties (1.17.0) + sprockets (4.2.1) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + sqlite3 (1.7.1-aarch64-linux) + sqlite3 (1.7.1-arm-linux) + sqlite3 (1.7.1-arm64-darwin) + sqlite3 (1.7.1-x86-linux) + sqlite3 (1.7.1-x86_64-darwin) + sqlite3 (1.7.1-x86_64-linux) + stringio (3.1.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + thor (1.3.0) + tilt (2.3.0) + timeout (0.4.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + webrick (1.8.1) + websocket (1.2.10) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.6.12) + +PLATFORMS + aarch64-linux + arm-linux + arm64-darwin + x86-linux + x86_64-darwin + x86_64-linux + +DEPENDENCIES + administrate (= 0.19.0) + administrate-field-nested_has_many! + appraisal + capybara + factory_bot + i18n-tasks + pg + rake + rspec-rails + selenium-webdriver + sqlite3 + +BUNDLED WITH + 2.5.3 From 4259dd8213f2ce2bfc8e8efe57ed4cde596cf0ff Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 18:28:27 +0000 Subject: [PATCH 17/29] Drop SQLite development dependency (#70) On CI, we run using Postgres and so this shouldn't be necessary. It should fix this failure: sqlite3-1.7.1-x86_64-linux requires ruby version < 3.4.dev, >= 3.0, which is incompatible with the current version, ruby 2.7.0p0 --- administrate-field-nested_has_many.gemspec | 1 - gemfiles/administrate_0.15.gemfile.lock | 3 --- gemfiles/administrate_0.19.gemfile.lock | 7 ------- 3 files changed, 11 deletions(-) diff --git a/administrate-field-nested_has_many.gemspec b/administrate-field-nested_has_many.gemspec index e93acd0..318b51c 100644 --- a/administrate-field-nested_has_many.gemspec +++ b/administrate-field-nested_has_many.gemspec @@ -25,5 +25,4 @@ Gem::Specification.new do |gem| gem.add_development_dependency "i18n-tasks" gem.add_development_dependency "rake" gem.add_development_dependency "rspec-rails" - gem.add_development_dependency "sqlite3" end diff --git a/gemfiles/administrate_0.15.gemfile.lock b/gemfiles/administrate_0.15.gemfile.lock index 0938a3b..1a1c8eb 100644 --- a/gemfiles/administrate_0.15.gemfile.lock +++ b/gemfiles/administrate_0.15.gemfile.lock @@ -219,8 +219,6 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.7.1) - mini_portile2 (~> 2.8.0) stringio (3.1.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) @@ -250,7 +248,6 @@ DEPENDENCIES rake rspec-rails selenium-webdriver - sqlite3 BUNDLED WITH 2.5.3 diff --git a/gemfiles/administrate_0.19.gemfile.lock b/gemfiles/administrate_0.19.gemfile.lock index 05fc647..04a6f4c 100644 --- a/gemfiles/administrate_0.19.gemfile.lock +++ b/gemfiles/administrate_0.19.gemfile.lock @@ -221,12 +221,6 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.7.1-aarch64-linux) - sqlite3 (1.7.1-arm-linux) - sqlite3 (1.7.1-arm64-darwin) - sqlite3 (1.7.1-x86-linux) - sqlite3 (1.7.1-x86_64-darwin) - sqlite3 (1.7.1-x86_64-linux) stringio (3.1.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) @@ -261,7 +255,6 @@ DEPENDENCIES rake rspec-rails selenium-webdriver - sqlite3 BUNDLED WITH 2.5.3 From 85c33f0cd96eec3e5e59f8afe31b0b4d1777a0cd Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 18:34:49 +0000 Subject: [PATCH 18/29] Upgrade Ruby to v3.3.0 (#67) https://www.ruby-lang.org/en/news/2023/12/25/ruby-3-3-0-released/ --- .circleci/config.yml | 2 +- .ruby-version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1ecc42f..41a2af7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: build: working_directory: ~/administrate-field-nested_has_many docker: - - image: circleci/ruby:2.7.0-node-browsers + - image: cimg/ruby:3.3-browsers environment: PGHOST: localhost PGUSER: administrate-field-nested_has_many diff --git a/.ruby-version b/.ruby-version index ccfb6ef..03463f3 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.7.0 +ruby-3.3.0 From fed29c831eb435ab678b1013855c9f99fd5454bb Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 18:43:34 +0000 Subject: [PATCH 19/29] Drop Administrate support below v0.19.0 (#72) --- Appraisals | 5 - README.md | 10 +- gemfiles/administrate_0.15.gemfile | 8 - gemfiles/administrate_0.15.gemfile.lock | 253 ---------------------- gemfiles/administrate_master.gemfile | 8 - gemfiles/administrate_master.gemfile.lock | 210 ------------------ 6 files changed, 5 insertions(+), 489 deletions(-) delete mode 100644 gemfiles/administrate_0.15.gemfile delete mode 100644 gemfiles/administrate_0.15.gemfile.lock delete mode 100644 gemfiles/administrate_master.gemfile delete mode 100644 gemfiles/administrate_master.gemfile.lock diff --git a/Appraisals b/Appraisals index 13ac7bc..6c70a59 100644 --- a/Appraisals +++ b/Appraisals @@ -1,10 +1,5 @@ #!/usr/bin/env ruby -appraise "administrate-0.15" do - gem "administrate", "0.15.0" -end - appraise "administrate-0.19" do gem "administrate", "0.19.0" end - diff --git a/README.md b/README.md index cca255b..8450e05 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ some versions of this gem will be compatible only with some versions of Administ This is a table of known compatibilities. It is accurate to the best of our knowledge. Please let us know if you detect other incompatibilities: -| Versions of this gem | should work with these versions of Administrate | -|----------------------|-------------------------------------------------| -| prior to v1.3.0 | unknown | -| v1.3.0 | up to master (last known: v0.15) | -| master | from v0.15 | +| `nested_has_many` | Administrate | +|-------------------|---------------| +| v1.3.0 | up to v0.15 | +| `#726d8gc` | from v0.16 | +| `master` | up to v0.19.0 | ## Usage diff --git a/gemfiles/administrate_0.15.gemfile b/gemfiles/administrate_0.15.gemfile deleted file mode 100644 index 3574dea..0000000 --- a/gemfiles/administrate_0.15.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "pg" -gem "administrate", "0.15.0" - -gemspec path: "../" diff --git a/gemfiles/administrate_0.15.gemfile.lock b/gemfiles/administrate_0.15.gemfile.lock deleted file mode 100644 index 1a1c8eb..0000000 --- a/gemfiles/administrate_0.15.gemfile.lock +++ /dev/null @@ -1,253 +0,0 @@ -PATH - remote: .. - specs: - administrate-field-nested_has_many (1.3.0) - administrate (>= 0.15, < 0.20.0) - cocoon (~> 1.2, >= 1.2.11) - -GEM - remote: https://rubygems.org/ - specs: - actionpack (7.1.3) - actionview (= 7.1.3) - activesupport (= 7.1.3) - nokogiri (>= 1.8.5) - racc - rack (>= 2.2.4) - rack-session (>= 1.0.1) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - actionview (7.1.3) - activesupport (= 7.1.3) - builder (~> 3.1) - erubi (~> 1.11) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - activemodel (7.1.3) - activesupport (= 7.1.3) - activerecord (7.1.3) - activemodel (= 7.1.3) - activesupport (= 7.1.3) - timeout (>= 0.4.0) - activesupport (7.1.3) - base64 - bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) - administrate (0.15.0) - actionpack (>= 5.0) - actionview (>= 5.0) - activerecord (>= 5.0) - datetime_picker_rails (~> 0.0.7) - jquery-rails (>= 4.0) - kaminari (>= 1.0) - momentjs-rails (~> 2.8) - sassc-rails (~> 2.1) - selectize-rails (~> 0.6) - appraisal (2.5.0) - bundler - rake - thor (>= 0.14.0) - ast (2.4.2) - base64 (0.2.0) - better_html (2.0.2) - actionview (>= 6.0) - activesupport (>= 6.0) - ast (~> 2.0) - erubi (~> 1.4) - parser (>= 2.4) - smart_properties - bigdecimal (3.1.6) - builder (3.2.4) - capybara (3.39.2) - addressable - matrix - mini_mime (>= 0.1.3) - nokogiri (~> 1.8) - rack (>= 1.6.0) - rack-test (>= 0.6.3) - regexp_parser (>= 1.5, < 3.0) - xpath (~> 3.2) - cocoon (1.2.15) - concurrent-ruby (1.2.3) - connection_pool (2.4.1) - crass (1.0.6) - datetime_picker_rails (0.0.7) - momentjs-rails (>= 2.8.1) - diff-lcs (1.5.0) - drb (2.2.0) - ruby2_keywords - erubi (1.12.0) - factory_bot (6.4.5) - activesupport (>= 5.0.0) - ffi (1.16.3) - highline (3.0.1) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - i18n-tasks (1.0.13) - activesupport (>= 4.0.2) - ast (>= 2.1.0) - better_html (>= 1.0, < 3.0) - erubi - highline (>= 2.0.0) - i18n - parser (>= 3.2.2.1) - rails-i18n - rainbow (>= 2.2.2, < 4.0) - terminal-table (>= 1.5.1) - io-console (0.7.2) - irb (1.11.1) - rdoc - reline (>= 0.4.2) - jquery-rails (4.6.0) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - kaminari (1.2.2) - activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.2) - kaminari-activerecord (= 1.2.2) - kaminari-core (= 1.2.2) - kaminari-actionview (1.2.2) - actionview - kaminari-core (= 1.2.2) - kaminari-activerecord (1.2.2) - activerecord - kaminari-core (= 1.2.2) - kaminari-core (1.2.2) - loofah (2.22.0) - crass (~> 1.0.2) - nokogiri (>= 1.12.0) - matrix (0.4.2) - mini_mime (1.1.5) - mini_portile2 (2.8.5) - minitest (5.21.2) - momentjs-rails (2.29.4.1) - railties (>= 3.1) - mutex_m (0.2.0) - nokogiri (1.16.0) - mini_portile2 (~> 2.8.2) - racc (~> 1.4) - parser (3.3.0.5) - ast (~> 2.4.1) - racc - pg (1.5.4) - psych (5.1.2) - stringio - public_suffix (5.0.4) - racc (1.7.3) - rack (3.0.8) - rack-session (2.0.0) - rack (>= 3.0.0) - rack-test (2.1.0) - rack (>= 1.3) - rackup (2.1.0) - rack (>= 3) - webrick (~> 1.8) - rails-dom-testing (2.2.0) - activesupport (>= 5.0.0) - minitest - nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) - loofah (~> 2.21) - nokogiri (~> 1.14) - rails-i18n (7.0.8) - i18n (>= 0.7, < 2) - railties (>= 6.0.0, < 8) - railties (7.1.3) - actionpack (= 7.1.3) - activesupport (= 7.1.3) - irb - rackup (>= 1.0.0) - rake (>= 12.2) - thor (~> 1.0, >= 1.2.2) - zeitwerk (~> 2.6) - rainbow (3.1.1) - rake (13.1.0) - rdoc (6.6.2) - psych (>= 4.0.0) - regexp_parser (2.9.0) - reline (0.4.2) - io-console (~> 0.5) - rexml (3.2.6) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.6) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-rails (6.1.1) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) - rspec-core (~> 3.12) - rspec-expectations (~> 3.12) - rspec-mocks (~> 3.12) - rspec-support (~> 3.12) - rspec-support (3.12.1) - ruby2_keywords (0.0.5) - rubyzip (2.3.2) - sassc (2.4.0) - ffi (~> 1.9) - sassc-rails (2.1.2) - railties (>= 4.0.0) - sassc (>= 2.0) - sprockets (> 3.0) - sprockets-rails - tilt - selectize-rails (0.12.6) - selenium-webdriver (4.17.0) - base64 (~> 0.2) - rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2, < 3.0) - websocket (~> 1.0) - smart_properties (1.17.0) - sprockets (4.2.1) - concurrent-ruby (~> 1.0) - rack (>= 2.2.4, < 4) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - sprockets (>= 3.0.0) - stringio (3.1.0) - terminal-table (3.0.2) - unicode-display_width (>= 1.1.1, < 3) - thor (1.3.0) - tilt (2.3.0) - timeout (0.4.1) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) - webrick (1.8.1) - websocket (1.2.10) - xpath (3.2.0) - nokogiri (~> 1.8) - zeitwerk (2.6.12) - -PLATFORMS - ruby - -DEPENDENCIES - administrate (= 0.15.0) - administrate-field-nested_has_many! - appraisal - capybara - factory_bot - i18n-tasks - pg - rake - rspec-rails - selenium-webdriver - -BUNDLED WITH - 2.5.3 diff --git a/gemfiles/administrate_master.gemfile b/gemfiles/administrate_master.gemfile deleted file mode 100644 index 0142dee..0000000 --- a/gemfiles/administrate_master.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "pg" -gem "administrate", git: "https://github.com/thoughtbot/administrate", branch: "master" - -gemspec path: "../" diff --git a/gemfiles/administrate_master.gemfile.lock b/gemfiles/administrate_master.gemfile.lock deleted file mode 100644 index 074c4a4..0000000 --- a/gemfiles/administrate_master.gemfile.lock +++ /dev/null @@ -1,210 +0,0 @@ -GIT - remote: https://github.com/thoughtbot/administrate - revision: f51153f2074d99e96e89ed909103e0a5e8c4f89d - branch: master - specs: - administrate (0.15.0) - actionpack (>= 5.0) - actionview (>= 5.0) - activerecord (>= 5.0) - datetime_picker_rails (~> 0.0.7) - jquery-rails (>= 4.0) - kaminari (>= 1.0) - momentjs-rails (~> 2.8) - sassc-rails (~> 2.1) - selectize-rails (~> 0.6) - -PATH - remote: .. - specs: - administrate-field-nested_has_many (1.3.0) - administrate (>= 0.15, < 1) - cocoon (~> 1.2, >= 1.2.11) - -GEM - remote: https://rubygems.org/ - specs: - actionpack (6.1.3.1) - actionview (= 6.1.3.1) - activesupport (= 6.1.3.1) - rack (~> 2.0, >= 2.0.9) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.1.3.1) - activesupport (= 6.1.3.1) - builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.1.3.1) - activesupport (= 6.1.3.1) - activerecord (6.1.3.1) - activemodel (= 6.1.3.1) - activesupport (= 6.1.3.1) - activesupport (6.1.3.1) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) - appraisal (2.4.0) - bundler - rake - thor (>= 0.14.0) - ast (2.4.2) - builder (3.2.4) - capybara (3.35.3) - addressable - mini_mime (>= 0.1.3) - nokogiri (~> 1.8) - rack (>= 1.6.0) - rack-test (>= 0.6.3) - regexp_parser (>= 1.5, < 3.0) - xpath (~> 3.2) - childprocess (3.0.0) - cocoon (1.2.15) - concurrent-ruby (1.1.8) - crass (1.0.6) - datetime_picker_rails (0.0.7) - momentjs-rails (>= 2.8.1) - diff-lcs (1.4.4) - erubi (1.10.0) - factory_bot (6.1.0) - activesupport (>= 5.0.0) - ffi (1.15.0) - highline (2.0.3) - i18n (1.8.10) - concurrent-ruby (~> 1.0) - i18n-tasks (0.9.34) - activesupport (>= 4.0.2) - ast (>= 2.1.0) - erubi - highline (>= 2.0.0) - i18n - parser (>= 2.2.3.0) - rails-i18n - rainbow (>= 2.2.2, < 4.0) - terminal-table (>= 1.5.1) - jquery-rails (4.4.0) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - kaminari (1.2.1) - activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.1) - kaminari-activerecord (= 1.2.1) - kaminari-core (= 1.2.1) - kaminari-actionview (1.2.1) - actionview - kaminari-core (= 1.2.1) - kaminari-activerecord (1.2.1) - activerecord - kaminari-core (= 1.2.1) - kaminari-core (1.2.1) - loofah (2.9.1) - crass (~> 1.0.2) - nokogiri (>= 1.5.9) - method_source (1.0.0) - mini_mime (1.1.0) - mini_portile2 (2.5.0) - minitest (5.14.4) - momentjs-rails (2.20.1) - railties (>= 3.1) - nokogiri (1.11.3) - mini_portile2 (~> 2.5.0) - racc (~> 1.4) - parser (3.0.1.0) - ast (~> 2.4.1) - pg (1.2.3) - public_suffix (4.0.6) - racc (1.5.2) - rack (2.2.3) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) - nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) - loofah (~> 2.3) - rails-i18n (6.0.0) - i18n (>= 0.7, < 2) - railties (>= 6.0.0, < 7) - railties (6.1.3.1) - actionpack (= 6.1.3.1) - activesupport (= 6.1.3.1) - method_source - rake (>= 0.8.7) - thor (~> 1.0) - rainbow (3.0.0) - rake (13.0.3) - regexp_parser (2.1.1) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-rails (5.0.1) - actionpack (>= 5.2) - activesupport (>= 5.2) - railties (>= 5.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) - rspec-support (3.10.2) - rubyzip (2.3.0) - sassc (2.4.0) - ffi (~> 1.9) - sassc-rails (2.1.2) - railties (>= 4.0.0) - sassc (>= 2.0) - sprockets (> 3.0) - sprockets-rails - tilt - selectize-rails (0.12.6) - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) - rubyzip (>= 1.2.2) - sprockets (4.0.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - sqlite3 (1.4.2) - terminal-table (3.0.0) - unicode-display_width (~> 1.1, >= 1.1.1) - thor (1.1.0) - tilt (2.0.10) - tzinfo (2.0.4) - concurrent-ruby (~> 1.0) - unicode-display_width (1.7.0) - xpath (3.2.0) - nokogiri (~> 1.8) - zeitwerk (2.4.2) - -PLATFORMS - ruby - -DEPENDENCIES - administrate! - administrate-field-nested_has_many! - appraisal - capybara - factory_bot - i18n-tasks - pg - rake - rspec-rails - selenium-webdriver - sqlite3 - -BUNDLED WITH - 2.1.4 From d7cb720530172db7f7b94412b2ba520b9a4a722e Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 19:49:36 +0000 Subject: [PATCH 20/29] Add a bin/setup script (#73) --- bin/setup | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/setup diff --git a/bin/setup b/bin/setup new file mode 100755 index 0000000..c9f35b8 --- /dev/null +++ b/bin/setup @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +gem install bundler --conservative +bundle check || bundle install + +bundle exec appraisal install + +bundle exec rake db:setup + +# Add binstubs to PATH via export PATH=".git/safe/../../bin:$PATH" in ~/.zshenv +mkdir -p .git/safe From 66257819eca0d614be0d53120d3c3de411a38e25 Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 19:51:55 +0000 Subject: [PATCH 21/29] Add a script to build the changelog (#74) Inspired by the one on Administrate itself: https://github.com/thoughtbot/administrate/blob/main/bin/build-changelog --- bin/build-changelog | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 bin/build-changelog diff --git a/bin/build-changelog b/bin/build-changelog new file mode 100755 index 0000000..8dd8c34 --- /dev/null +++ b/bin/build-changelog @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +if ! command -v gh > /dev/null; then + echo "Please install the GitHub CLI: https://cli.github.com/" + exit 1 +fi + +last_release=$(git describe --tag --abbrev=0) + +revision_range="${last_release}..origin/main" +commit_format="--pretty=tformat:%h %s" +commits_since=$(git log --author="^(?!dependabot).*$" --perl-regexp "${revision_range}" "${commit_format}") + +echo "$commits_since" | while read -r line; do + sha=$(echo "${line}" | awk '{print $1}') + commit_message=$(echo "${line}" | awk '{print substr($0, index($0, " ")+1)}') + + pr_number=$(gh pr list --search "$sha" --state merged --json number --jq '.[].number') + trimmed_commit=$(echo "${commit_message}"| sed "s/ (\#$pr_number)//g") + + echo "* ${trimmed_commit} (#${pr_number})" +done From e8a3254f5a5bd05be431c05efac43d5d8a3b50f2 Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 20:00:40 +0000 Subject: [PATCH 22/29] Add LICENSE (#75) Originally, this project was done as part of work on Administrate itself and the license in the Gemspec has been MIT. --- LICENSE.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..c141f44 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2024 thoughtbot, inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. From 39a5fe3cef698d2578f9610860684dbb2b86dfc8 Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 20:01:45 +0000 Subject: [PATCH 23/29] Add SECURITY (#77) --- SECURITY.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..47a5b2c --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,16 @@ +# Security Policy + +## Supported Versions + +We only expect to support the latest version of Administrate (and it's related +projects) as a given time. If you find a security issue with an older version, +please try updating to the latest version first. + +If for some reason you can't update to the latest version, please let us know +your reasons so that we can have a better understanding of your situation. + +## Reporting a Vulnerability + +For security inquiries or vulnerability reports, please email +. +If you'd like, you can use our PGP key when reporting vulnerabilities. From bcf4c745aa3035bade7678b3cd55db5ff8b915be Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 20:02:05 +0000 Subject: [PATCH 24/29] Add the thoughtbot CoC (#76) --- CODE_OF_CONDUCT.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..848a59a --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,6 @@ +# Code of conduct + +By participating in this project, you agree to abide by the +[thoughtbot code of conduct][1]. + +[1]: https://thoughtbot.com/open-source-code-of-conduct From 194e887e62b5c257db019c35e97077de4ef08b3c Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 20:03:12 +0000 Subject: [PATCH 25/29] Add CONTRIBUTING (#78) --- CONTRIBUTING.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..924a401 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Contributing Guide + +## Code of Conduct + +We welcome pull requests from everyone. By participating in this project, you +agree to abide by the thoughtbot [code of conduct]. + +We expect everyone to follow the code of conduct anywhere in thoughtbot's +project codebases, issue trackers, chat-rooms, and mailing lists. + +[code of conduct]: https://thoughtbot.com/open-source-code-of-conduct + +## Getting Started + +`administrate-field-nested_has_many` is a field plugin for [Administrate][], +that allows for nested `has_many` forms. + +To maintain compatibility with different dependency versions, we use +[Appraisal][]. + +[Administrate]: https://github.com/thoughtbot/administrate +[Appraisal]: https://github.com/thoughtbot/appraisal + +### Opening a PR + +1. Fork the repo, +2. Run `./bin/setup` to install the base dependencies and setup a local + database, +3. Run the test suite: `bundle exec rspec && bundle exec appraisal rspec`, +4. Make your changes, +5. Push your fork and open a pull request. + +A good PR will solve the smallest problem it possibly can, have good test +coverage and (where necessary) have internationalisation support. + +## Security + +See the [security policy](./SECURITY.md). From 2baa53f65c60686dd6a425a7320dbdc6149f89bd Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Thu, 25 Jan 2024 20:09:01 +0000 Subject: [PATCH 26/29] Release 2.0.0 --- CHANGELOG.md | 23 ++++++++++++++++++++++ administrate-field-nested_has_many.gemspec | 2 +- gemfiles/administrate_0.19.gemfile.lock | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f09934..d2f3f95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # CHANGELOG +## 2.0.0 + +* Add CONTRIBUTING (#78) +* Add the thoughtbot CoC (#76) +* Add SECURITY (#77) +* Add LICENSE (#75) +* Add a script to build the changelog (#74) +* Add a bin/setup script (#73) +* Drop Administrate support below v0.19.0 (#72) +* Upgrade Ruby to v3.3.0 (#67) +* Drop SQLite development dependency (#70) +* Refresh Appraisals (properly) (#71) +* Refresh Appraisals (#69) +* Pin Administrate below 0.20.0 (#68) +* Add German locale (#53) +* Align #show pagination with 0.16.0 (#52) +* Let Administrate figure out the associations (#44) +* Avoid having to add assets to the host manifest (#45) +* Add French locale (#51) +* Fix build to work with Rails 6.1 (#47) +* Remove old compatibility (#46) +* Remind users to declare accepts_nested_attributes_for (#48) + ## 1.3.0 * Cover more test cases ([#43][]) diff --git a/administrate-field-nested_has_many.gemspec b/administrate-field-nested_has_many.gemspec index 318b51c..855d887 100644 --- a/administrate-field-nested_has_many.gemspec +++ b/administrate-field-nested_has_many.gemspec @@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__) Gem::Specification.new do |gem| gem.name = "administrate-field-nested_has_many" - gem.version = "1.3.0" + gem.version = "2.0.0" gem.authors = ["Nick Charlton", "Grayson Wright"] gem.email = ["nick@nickcharlton.net", "wright.grayson@gmail.com"] gem.homepage = "https://github.com/nickcharlton/" \ diff --git a/gemfiles/administrate_0.19.gemfile.lock b/gemfiles/administrate_0.19.gemfile.lock index 04a6f4c..960711b 100644 --- a/gemfiles/administrate_0.19.gemfile.lock +++ b/gemfiles/administrate_0.19.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - administrate-field-nested_has_many (1.3.0) + administrate-field-nested_has_many (2.0.0) administrate (>= 0.15, < 0.20.0) cocoon (~> 1.2, >= 1.2.11) From 526b7c7f962c6376b83fd05332aa7bb149f66583 Mon Sep 17 00:00:00 2001 From: jubilee2 Date: Thu, 25 Jan 2024 14:30:32 -0600 Subject: [PATCH 27/29] Add Selectize support for the select boxes (#64) --- .../administrate-field-nested_has_many/application.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/assets/javascripts/administrate-field-nested_has_many/application.js b/app/assets/javascripts/administrate-field-nested_has_many/application.js index 357aa61..d0e8ddf 100644 --- a/app/assets/javascripts/administrate-field-nested_has_many/application.js +++ b/app/assets/javascripts/administrate-field-nested_has_many/application.js @@ -1 +1,7 @@ //= require cocoon +$(document).on('ready page:load turbolinks:load turbo:load cocoon:after-insert', function() { + $('.field-unit--select select').selectize({}); + $('.field-unit--belongs-to select').selectize({}); + $(".field-unit--has-many select").selectize({}); + $('.field-unit--polymorphic select').selectize({}); +}); From e2ee13011c910ad17cb41414455e5bfe1d279d85 Mon Sep 17 00:00:00 2001 From: Trevor <673838+trevorrjohn@users.noreply.github.com> Date: Wed, 14 Feb 2024 06:26:48 -0500 Subject: [PATCH 28/29] Add support for attribute grouping (#79) In Administrate v0.20.0, support was added for grouping fields but this was not compatible with this field type. https://github.com/thoughtbot/administrate/pull/2422 Fixes #65 --- Appraisals | 8 + administrate-field-nested_has_many.gemspec | 2 +- gemfiles/administrate_0.19.gemfile.lock | 2 +- gemfiles/administrate_0.20.gemfile | 8 + gemfiles/administrate_0.20.gemfile.lock | 260 ++++++++++++++++++++ gemfiles/administrate_main.gemfile | 8 + gemfiles/administrate_main.gemfile.lock | 266 +++++++++++++++++++++ lib/administrate/field/nested_has_many.rb | 8 +- spec/dummy/db/schema.rb | 11 +- 9 files changed, 564 insertions(+), 9 deletions(-) create mode 100644 gemfiles/administrate_0.20.gemfile create mode 100644 gemfiles/administrate_0.20.gemfile.lock create mode 100644 gemfiles/administrate_main.gemfile create mode 100644 gemfiles/administrate_main.gemfile.lock diff --git a/Appraisals b/Appraisals index 6c70a59..fcf263a 100644 --- a/Appraisals +++ b/Appraisals @@ -3,3 +3,11 @@ appraise "administrate-0.19" do gem "administrate", "0.19.0" end + +appraise "administrate-0.20" do + gem "administrate", "0.20.0" +end + +appraise "administrate-main" do + gem "administrate", git: "https://github.com/thoughtbot/administrate", branch: "main" +end diff --git a/administrate-field-nested_has_many.gemspec b/administrate-field-nested_has_many.gemspec index 855d887..9bf195f 100644 --- a/administrate-field-nested_has_many.gemspec +++ b/administrate-field-nested_has_many.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |gem| gem.files = `git ls-files`.split("\n") gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") - gem.add_dependency "administrate", ">= 0.15", "< 0.20.0" + gem.add_dependency "administrate", ">= 0.19", "< 1" gem.add_dependency "cocoon", "~> 1.2", ">= 1.2.11" gem.add_development_dependency "appraisal" diff --git a/gemfiles/administrate_0.19.gemfile.lock b/gemfiles/administrate_0.19.gemfile.lock index 960711b..d0a52f7 100644 --- a/gemfiles/administrate_0.19.gemfile.lock +++ b/gemfiles/administrate_0.19.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: .. specs: administrate-field-nested_has_many (2.0.0) - administrate (>= 0.15, < 0.20.0) + administrate (>= 0.19, < 1) cocoon (~> 1.2, >= 1.2.11) GEM diff --git a/gemfiles/administrate_0.20.gemfile b/gemfiles/administrate_0.20.gemfile new file mode 100644 index 0000000..f41bd28 --- /dev/null +++ b/gemfiles/administrate_0.20.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "pg" +gem "administrate", "0.20.0" + +gemspec path: "../" diff --git a/gemfiles/administrate_0.20.gemfile.lock b/gemfiles/administrate_0.20.gemfile.lock new file mode 100644 index 0000000..f810ef2 --- /dev/null +++ b/gemfiles/administrate_0.20.gemfile.lock @@ -0,0 +1,260 @@ +PATH + remote: .. + specs: + administrate-field-nested_has_many (2.0.0) + administrate (>= 0.19, < 1) + cocoon (~> 1.2, >= 1.2.11) + +GEM + remote: https://rubygems.org/ + specs: + actionpack (7.1.3) + actionview (= 7.1.3) + activesupport (= 7.1.3) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actionview (7.1.3) + activesupport (= 7.1.3) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activemodel (7.1.3) + activesupport (= 7.1.3) + activerecord (7.1.3) + activemodel (= 7.1.3) + activesupport (= 7.1.3) + timeout (>= 0.4.0) + activesupport (7.1.3) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + administrate (0.20.0) + actionpack (>= 6.0, < 8.0) + actionview (>= 6.0, < 8.0) + activerecord (>= 6.0, < 8.0) + jquery-rails (~> 4.6.0) + kaminari (~> 1.2.2) + sassc-rails (~> 2.1) + selectize-rails (~> 0.6) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + base64 (0.2.0) + better_html (2.0.2) + actionview (>= 6.0) + activesupport (>= 6.0) + ast (~> 2.0) + erubi (~> 1.4) + parser (>= 2.4) + smart_properties + bigdecimal (3.1.6) + builder (3.2.4) + capybara (3.39.2) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + cocoon (1.2.15) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) + crass (1.0.6) + diff-lcs (1.5.0) + drb (2.2.0) + ruby2_keywords + erubi (1.12.0) + factory_bot (6.4.5) + activesupport (>= 5.0.0) + ffi (1.16.3) + highline (3.0.1) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + i18n-tasks (1.0.13) + activesupport (>= 4.0.2) + ast (>= 2.1.0) + better_html (>= 1.0, < 3.0) + erubi + highline (>= 2.0.0) + i18n + parser (>= 3.2.2.1) + rails-i18n + rainbow (>= 2.2.2, < 4.0) + terminal-table (>= 1.5.1) + io-console (0.7.2) + irb (1.11.1) + rdoc + reline (>= 0.4.2) + jquery-rails (4.6.0) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + kaminari (1.2.2) + activesupport (>= 4.1.0) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) + actionview + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) + activerecord + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + matrix (0.4.2) + mini_mime (1.1.5) + minitest (5.21.2) + mutex_m (0.2.0) + nokogiri (1.16.0-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.0-arm-linux) + racc (~> 1.4) + nokogiri (1.16.0-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.0-x86-linux) + racc (~> 1.4) + nokogiri (1.16.0-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.0-x86_64-linux) + racc (~> 1.4) + parser (3.3.0.5) + ast (~> 2.4.1) + racc + pg (1.5.4) + psych (5.1.2) + stringio + public_suffix (5.0.4) + racc (1.7.3) + rack (3.0.8) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.1.0) + rack (>= 1.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + rails-i18n (7.0.8) + i18n (>= 0.7, < 2) + railties (>= 6.0.0, < 8) + railties (7.1.3) + actionpack (= 7.1.3) + activesupport (= 7.1.3) + irb + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rainbow (3.1.1) + rake (13.1.0) + rdoc (6.6.2) + psych (>= 4.0.0) + regexp_parser (2.9.0) + reline (0.4.2) + io-console (~> 0.5) + rexml (3.2.6) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-rails (6.1.1) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.12) + rspec-expectations (~> 3.12) + rspec-mocks (~> 3.12) + rspec-support (~> 3.12) + rspec-support (3.12.1) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + sassc (2.4.0) + ffi (~> 1.9) + sassc-rails (2.1.2) + railties (>= 4.0.0) + sassc (>= 2.0) + sprockets (> 3.0) + sprockets-rails + tilt + selectize-rails (0.12.6) + selenium-webdriver (4.17.0) + base64 (~> 0.2) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + smart_properties (1.17.0) + sprockets (4.2.1) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + stringio (3.1.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + thor (1.3.0) + tilt (2.3.0) + timeout (0.4.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + webrick (1.8.1) + websocket (1.2.10) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.6.12) + +PLATFORMS + aarch64-linux + arm-linux + arm64-darwin + x86-linux + x86_64-darwin + x86_64-linux + +DEPENDENCIES + administrate (= 0.20.0) + administrate-field-nested_has_many! + appraisal + capybara + factory_bot + i18n-tasks + pg + rake + rspec-rails + selenium-webdriver + +BUNDLED WITH + 2.5.3 diff --git a/gemfiles/administrate_main.gemfile b/gemfiles/administrate_main.gemfile new file mode 100644 index 0000000..230e85c --- /dev/null +++ b/gemfiles/administrate_main.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "pg" +gem "administrate", git: "https://github.com/thoughtbot/administrate", branch: "main" + +gemspec path: "../" diff --git a/gemfiles/administrate_main.gemfile.lock b/gemfiles/administrate_main.gemfile.lock new file mode 100644 index 0000000..647438f --- /dev/null +++ b/gemfiles/administrate_main.gemfile.lock @@ -0,0 +1,266 @@ +GIT + remote: https://github.com/thoughtbot/administrate + revision: aa923813e4ea48dc9f4eb2c748875580ae4c5012 + branch: main + specs: + administrate (0.20.1) + actionpack (>= 6.0, < 8.0) + actionview (>= 6.0, < 8.0) + activerecord (>= 6.0, < 8.0) + jquery-rails (~> 4.6.0) + kaminari (~> 1.2.2) + sassc-rails (~> 2.1) + selectize-rails (~> 0.6) + +PATH + remote: .. + specs: + administrate-field-nested_has_many (2.0.0) + administrate (>= 0.19, < 1) + cocoon (~> 1.2, >= 1.2.11) + +GEM + remote: https://rubygems.org/ + specs: + actionpack (7.1.3) + actionview (= 7.1.3) + activesupport (= 7.1.3) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actionview (7.1.3) + activesupport (= 7.1.3) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activemodel (7.1.3) + activesupport (= 7.1.3) + activerecord (7.1.3) + activemodel (= 7.1.3) + activesupport (= 7.1.3) + timeout (>= 0.4.0) + activesupport (7.1.3) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + base64 (0.2.0) + better_html (2.0.2) + actionview (>= 6.0) + activesupport (>= 6.0) + ast (~> 2.0) + erubi (~> 1.4) + parser (>= 2.4) + smart_properties + bigdecimal (3.1.6) + builder (3.2.4) + capybara (3.39.2) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + cocoon (1.2.15) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) + crass (1.0.6) + diff-lcs (1.5.0) + drb (2.2.0) + ruby2_keywords + erubi (1.12.0) + factory_bot (6.4.5) + activesupport (>= 5.0.0) + ffi (1.16.3) + highline (3.0.1) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + i18n-tasks (1.0.13) + activesupport (>= 4.0.2) + ast (>= 2.1.0) + better_html (>= 1.0, < 3.0) + erubi + highline (>= 2.0.0) + i18n + parser (>= 3.2.2.1) + rails-i18n + rainbow (>= 2.2.2, < 4.0) + terminal-table (>= 1.5.1) + io-console (0.7.2) + irb (1.11.1) + rdoc + reline (>= 0.4.2) + jquery-rails (4.6.0) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + kaminari (1.2.2) + activesupport (>= 4.1.0) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) + actionview + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) + activerecord + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + matrix (0.4.2) + mini_mime (1.1.5) + minitest (5.21.2) + mutex_m (0.2.0) + nokogiri (1.16.0-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.0-arm-linux) + racc (~> 1.4) + nokogiri (1.16.0-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.0-x86-linux) + racc (~> 1.4) + nokogiri (1.16.0-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.0-x86_64-linux) + racc (~> 1.4) + parser (3.3.0.5) + ast (~> 2.4.1) + racc + pg (1.5.4) + psych (5.1.2) + stringio + public_suffix (5.0.4) + racc (1.7.3) + rack (3.0.8) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.1.0) + rack (>= 1.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + rails-i18n (7.0.8) + i18n (>= 0.7, < 2) + railties (>= 6.0.0, < 8) + railties (7.1.3) + actionpack (= 7.1.3) + activesupport (= 7.1.3) + irb + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rainbow (3.1.1) + rake (13.1.0) + rdoc (6.6.2) + psych (>= 4.0.0) + regexp_parser (2.9.0) + reline (0.4.2) + io-console (~> 0.5) + rexml (3.2.6) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-rails (6.1.1) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.12) + rspec-expectations (~> 3.12) + rspec-mocks (~> 3.12) + rspec-support (~> 3.12) + rspec-support (3.12.1) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + sassc (2.4.0) + ffi (~> 1.9) + sassc-rails (2.1.2) + railties (>= 4.0.0) + sassc (>= 2.0) + sprockets (> 3.0) + sprockets-rails + tilt + selectize-rails (0.12.6) + selenium-webdriver (4.17.0) + base64 (~> 0.2) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + smart_properties (1.17.0) + sprockets (4.2.1) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + stringio (3.1.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + thor (1.3.0) + tilt (2.3.0) + timeout (0.4.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + webrick (1.8.1) + websocket (1.2.10) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.6.12) + +PLATFORMS + aarch64-linux + arm-linux + arm64-darwin + x86-linux + x86_64-darwin + x86_64-linux + +DEPENDENCIES + administrate! + administrate-field-nested_has_many! + appraisal + capybara + factory_bot + i18n-tasks + pg + rake + rspec-rails + selenium-webdriver + +BUNDLED WITH + 2.5.3 diff --git a/lib/administrate/field/nested_has_many.rb b/lib/administrate/field/nested_has_many.rb index 5cfd3ee..7e51924 100644 --- a/lib/administrate/field/nested_has_many.rb +++ b/lib/administrate/field/nested_has_many.rb @@ -27,7 +27,13 @@ class Engine < ::Rails::Engine DEFAULT_ATTRIBUTES = %i(id _destroy).freeze def nested_fields - associated_form.attributes.reject do |nested_field| + all_fields = if Administrate::VERSION >= "0.20.0" + associated_form.attributes.values.flatten + else + associated_form.attributes + end + + all_fields.reject do |nested_field| skipped_fields.include?(nested_field.attribute) end end diff --git a/spec/dummy/db/schema.rb b/spec/dummy/db/schema.rb index 44321e6..be22a61 100644 --- a/spec/dummy/db/schema.rb +++ b/spec/dummy/db/schema.rb @@ -10,22 +10,21 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2018_09_07_104703) do - +ActiveRecord::Schema[7.1].define(version: 2018_09_07_104703) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" create_table "schools", force: :cascade do |t| t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "students", force: :cascade do |t| t.string "name" t.bigint "school_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["school_id"], name: "index_students_on_school_id" end From cccd786d14e5a1cbc69caec0f5f3a637cb32141b Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Fri, 15 Mar 2024 15:58:18 +0000 Subject: [PATCH 29/29] Release 2.1.0 --- CHANGELOG.md | 8 ++++++++ README.md | 2 ++ administrate-field-nested_has_many.gemspec | 2 +- gemfiles/administrate_0.19.gemfile.lock | 2 +- gemfiles/administrate_0.20.gemfile.lock | 2 +- gemfiles/administrate_main.gemfile.lock | 2 +- 6 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2f3f95..b1e00d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## 2.1.0 + +* Add support for attribute grouping ([#79][]) +* Add Selectize support for the select boxes ([#64][]) + +[#79]: https://github.com/nickcharlton/administrate-field-nested_has_many/pull/79 +[#64]: https://github.com/nickcharlton/administrate-field-nested_has_many/pull/64 + ## 2.0.0 * Add CONTRIBUTING (#78) diff --git a/README.md b/README.md index 8450e05..1891695 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ Please let us know if you detect other incompatibilities: | `nested_has_many` | Administrate | |-------------------|---------------| +| v2.1.0 | v0.20.0 | +| v2.0.0 | up to v0.19 | | v1.3.0 | up to v0.15 | | `#726d8gc` | from v0.16 | | `master` | up to v0.19.0 | diff --git a/administrate-field-nested_has_many.gemspec b/administrate-field-nested_has_many.gemspec index 9bf195f..c424ea6 100644 --- a/administrate-field-nested_has_many.gemspec +++ b/administrate-field-nested_has_many.gemspec @@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__) Gem::Specification.new do |gem| gem.name = "administrate-field-nested_has_many" - gem.version = "2.0.0" + gem.version = "2.1.0" gem.authors = ["Nick Charlton", "Grayson Wright"] gem.email = ["nick@nickcharlton.net", "wright.grayson@gmail.com"] gem.homepage = "https://github.com/nickcharlton/" \ diff --git a/gemfiles/administrate_0.19.gemfile.lock b/gemfiles/administrate_0.19.gemfile.lock index d0a52f7..3361b80 100644 --- a/gemfiles/administrate_0.19.gemfile.lock +++ b/gemfiles/administrate_0.19.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - administrate-field-nested_has_many (2.0.0) + administrate-field-nested_has_many (2.1.0) administrate (>= 0.19, < 1) cocoon (~> 1.2, >= 1.2.11) diff --git a/gemfiles/administrate_0.20.gemfile.lock b/gemfiles/administrate_0.20.gemfile.lock index f810ef2..274e840 100644 --- a/gemfiles/administrate_0.20.gemfile.lock +++ b/gemfiles/administrate_0.20.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - administrate-field-nested_has_many (2.0.0) + administrate-field-nested_has_many (2.1.0) administrate (>= 0.19, < 1) cocoon (~> 1.2, >= 1.2.11) diff --git a/gemfiles/administrate_main.gemfile.lock b/gemfiles/administrate_main.gemfile.lock index 647438f..3c95c8b 100644 --- a/gemfiles/administrate_main.gemfile.lock +++ b/gemfiles/administrate_main.gemfile.lock @@ -15,7 +15,7 @@ GIT PATH remote: .. specs: - administrate-field-nested_has_many (2.0.0) + administrate-field-nested_has_many (2.1.0) administrate (>= 0.19, < 1) cocoon (~> 1.2, >= 1.2.11)