8000 Merge branch 'master' into chore/update-bug-report-template · activeadmin/activeadmin@0f5e05e · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f5e05e

Browse files
authored
Merge branch 'master' into chore/update-bug-report-template
2 parents f088d0c + 858f6b3 commit 0f5e05e

File tree

13 files changed

+51
-26
lines changed

13 files changed

+51
-26
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
activeadmin (4.0.0.beta9)
4+
activeadmin (4.0.0.beta10)
55
arbre (~> 2.0)
66
csv
77
formtastic (>= 3.1)

UPGRADING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ ActiveAdmin v4 uses TailwindCSS. It has **mobile web, dark mode and RTL support*
88

99
These instructions assume the `cssbundling-rails` and `importmap-rails` gems are already installed and you have run their install commands in your app. If you haven't done so, please do before continuing.
1010

11-
Update your `Gemfile` with `gem "activeadmin", "4.0.0.beta3"` and then run `gem install activeadmin --pre`.
11+
Update your `Gemfile` with `gem "activeadmin", "4.0.0.beta10"` and then run `gem install activeadmin --pre`.
1212

1313
Now, run `rails generate active_admin:assets` to replace the old assets with the new files.
1414

1515
Then add the npm package and update the `build:css` script.
1616

1717
```
18-
yarn add @activeadmin/activeadmin@4.0.0-beta3
18+
yarn add @activeadmin/activeadmin@4.0.0-beta10
1919
npm pkg set scripts.build:css="tailwindcss -i ./app/assets/stylesheets/active_admin.css -o ./app/assets/builds/active_admin.css --minify -c tailwind-active_admin.config.js"
2020
```
2121

docs/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,4 +275,4 @@ DEPENDENCIES
275275
github-pages
276276

277277
BUNDLED WITH
278-
2.5.15
278+
2.5.17

features/edit_page.feature

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@ Feature: Edit Page
66
Given a category named "Music" exists
77
And a user named "John Doe" exists
88
And 67E6 a post with the title "Hello World" written by "John Doe" exists
9+
And a tag named "Bugs" exists
910
And I am logged in
10-
And a configuration of:
11+
12+
Scenario: Default form with no config
13+
Given a configuration of:
1114
"""
1215
ActiveAdmin.register Post do
1316
permit_params :custom_category_id, :author_id, :title,
1417
:body, :position, :published_date, :starred
1518
end
1619
"""
1720
When I am on the index page for posts
18-
19-
Scenario: Default form with no config
20-
Given I follow "Edit"
21+
And I follow "Edit"
2122
Then the "Title" field should contain "Hello World"
2223
And the "Body" field should contain ""
2324
And the "Category" field should contain ""
@@ -47,6 +48,7 @@ Feature: Edit Page
4748
end
4849
end
4950
"""
51+
When I am on the index page for posts
5052
And I follow "Edit"
5153
Then I should see a fieldset titled "Your Post"
5254
And I should see a fieldset titled "Publishing"
@@ -76,6 +78,7 @@ Feature: Edit Page
7678
end
7779
end
7880
"""
81+
When I am on the index page for posts
7982
And I follow "New"
8083
Then I follow "Posts"
8184
And I follow "Edit"
@@ -107,6 +110,7 @@ Feature: Edit Page
107110
form partial: "form"
108111
end
109112
"""
113+
When I am on the index page for posts
110114
And I follow "Edit"
111115
Then the "Title" field should contain "Hello World"
112116
And the "Body" field should contain ""
@@ -115,3 +119,20 @@ Feature: Edit Page
115119
Then I should see "Post was successfully updated."
116120
And I should see the attribute "Title" with "Hello World from update"
117121
And I should see the attribute "Author" with "John Doe"
122+
123+
Scenario: Generating a custom form for Tag resource
124+
Given a configuration of:
125+
"""
126+
ActiveAdmin.register Tag do
127+
form do |f|
128+
f.inputs "Details" do
129+
f.input :name
130+
end
131+
f.actions
132+
end
133+
end
134+
"""
135+
When I am on the index page for tags
136+
And I follow "Edit"
137+
Then I should see a fieldset titled "Details"
138+
And the "Name" field should contain "Bugs"

features/step_definitions/factory_steps.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ def create_user(name, type = "User")
2828
Store.create! name: name
2929
end
3030

31+
Given /^a tag named "([^"]*)" exists$/ do |name|
32+
Tag.create! name: name
33+
end
34+
3135
Given /^I create a new post with the title "([^"]*)"$/ do |title|
3236
first(:link, "Posts").click
3337
click_on "New Post"

gemfiles/rails_61/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ../..
33
specs:
4-
activeadmin (4.0.0.beta9)
4+
activeadmin (4.0.0.beta10)
55
arbre (~> 2.0)
66
csv
77
formtastic (>= 3.1)

gemfiles/rails_70/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ../..
33
specs:
4-
activeadmin (4.0.0.beta9)
4+
activeadmin (4.0.0.beta10)
55
arbre (~> 2.0)
66
csv
77
formtastic (>= 3.1)

gemfiles/rails_71/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ group :test do
3333
gem "launchy"
3434
gem "parallel_tests"
3535
gem "rspec-rails"
36-
gem "sqlite3", "~> 1.7", platform: :mri # FIXME: relax this dependency when rails/rails#51636 will be released
36+
gem "sqlite3", platform: :mri
3737

3838
# Translations
3939
gem "i18n-tasks"

gemfiles/rails_71/Gemfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ../..
33
specs:
4-
activeadmin (4.0.0.beta9)
4+
activeadmin (4.0.0.beta10)
55
arbre (~> 2.0)
66
csv
77
formtastic (>= 3.1)
@@ -374,10 +374,10 @@ GEM
374374
actionpack (>= 6.1)
375375
activesupport (>= 6.1)
376376
sprockets (>= 3.0.0)
377-
sqlite3 (1.7.3)
377+
sqlite3 (2.0.4)
378378
mini_portile2 (~> 2.8.0)
379-
sqlite3 (1.7.3-arm64-darwin)
380-
sqlite3 (1.7.3-x86_64-linux)
379+
sqlite3 (2.0.4-arm64-darwin)
380+
sqlite3 (2.0.4-x86_64-linux-gnu)
381381
stringio (3.1.1)
382382
strscan (3.1.0)
383383
sys-uname (1.3.0)
@@ -430,7 +430,7 @@ DEPENDENCIES
430430
simplecov
431431
simplecov-cobertura
432432
sprockets-rails
433-
sqlite3 (~> 1.7)
433+
sqlite3
434434
webrick
435435

436436
BUNDLED WITH

lib/active_admin/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# frozen_string_literal: true
22
module ActiveAdmin
3-
VERSION = "4.0.0.beta9"
3+
VERSION = "4.0.0.beta10"
44
end

lib/active_admin/views/components/active_admin_form.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def build(form_builder, *args, &block)
131131
html_options[:class] ||= "inputs"
132132
legend = args.shift if args.first.is_a?(::String)
133133
legend = html_options.delete(:name) if html_options.key?(:name)
134-
legend_tag = legend ? tag.legend(legend, class: "fieldset-title") : ""
134+
legend_tag = legend ? helpers.tag.legend(legend, class: "fieldset-title") : ""
135135
fieldset_attrs = tag_attributes html_options
136136
@opening_tag = "<fieldset #{fieldset_attrs}>#{legend_tag}<ol>"
137137
@closing_tag = "</ol></fieldset>"
@@ -144,9 +144,9 @@ def tag_attributes(html_options)
144144
if Rails::VERSION::MAJOR <= 6
145145
# Reimplement tag.attributes to backport support for Rails 6.1.
146146
# TODO: this can be removed when support for Rails 6.x is dropped
147-
tag.tag_options(html_options.to_h).to_s.strip.html_safe
147+
helpers.tag.tag_options(html_options.to_h).to_s.strip.html_safe
148148
else
149-
tag.attributes html_options
149+
helpers.tag.attributes html_options
150150
end
151151
end
152152
end

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@activeadmin/activeadmin",
3-
"version": "4.0.0-beta9",
3+
"version": "4.0.0-beta10",
44
"description": "The administration framework for Ruby on Rails.",
55
"main": "dist/active_admin.js",
66
"type": "module",

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ brace-expansion@^2.0.1:
395395
dependencies:
396396
balanced-match "^1.0.0"
397397

398-
braces@^3.0.2, braces@~3.0.2:
398+
braces@^3.0.3, braces@~3.0.2:
399399
version "3.0.3"
400400
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
401401
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
@@ -979,11 +979,11 @@ merge2@^1.3.0:
979979
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
980980

981981
micromatch@^4.0.4, micromatch@^4.0.5:
982-
version "4.0.5"
983-
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
984-
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
982+
version "4.0.8"
983+
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
984+
integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
985985
dependencies:
986-
braces "^3.0.2"
986+
braces "^3.0.3"
987987
picomatch "^2.3.1"
988988

989989
mini-svg-data-uri@^1.4.3:

0 commit comments

Comments
 (0)
0