admin_suite 0.2.5 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3679b3f1b7a2f81d3001c2def3f283c0af6af3ab3c8d593c552fd073f72aaff1
4
- data.tar.gz: f4087201617ce4d248c4c7727cc7464344e43fed12a50c5a3eb966e86e0d5c61
3
+ metadata.gz: d5150c2ac986138055644b1e6f52c61ee774efc62e27a951a34d4ca9943fe7d8
4
+ data.tar.gz: 57729f5a0e760f26111c7f73aeec78a7493a1b849ba12bd50c992ebfbaf6c034
5
5
  SHA512:
6
- metadata.gz: c303e1f7222b79e6a0dba629b08657078c104beb661338f721285462aabc3319e2546d6a3549921eb648f079d527c42d05954e4dd22f6455ec3c783ddbb9d92f
7
- data.tar.gz: 21dbc5ae2cd26045afa6f9dfc0a0852fdb82470ee359fbb18236c655e45ca836301d178e8c9e4ad6fab018c3f95286d528152e2426b5cb6d28f6dcb9c07be0bf
6
+ metadata.gz: e99ac448e983647cb570ae875e0681e138895c7783a6538ee6aa0b898e93001c3dd65b8dcf6b882885c83ef35042f55c29ef2e75f00d77025af6de58254be7b4
7
+ data.tar.gz: df3a565311c4a10df7603eaa776bf1a3e4ed3f2cea6dc6445b3702986887c900f13c0af272af4bb006bb9af921b8d0ec545b8f049b12dbb2078cd77d69eddb2d
data/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.6] - 2026-02-21
11
+
12
+ ### Added
13
+
14
+ - Automated GitHub Release creation in the publish workflow, with release notes extracted from `CHANGELOG.md`.
15
+ - When no `CHANGELOG.md` entry exists for the current version, release notes are now primarily auto-generated from commits since the previous tag, with the plain "Release vX.Y.Z" string used only as a final fallback when no commit-generated notes are available.
16
+
10
17
  ## [0.1.0] - 2026-02-04
11
18
 
12
19
  ### Added
@@ -205,8 +205,20 @@ module AdminSuite
205
205
  next unless field.is_a?(Admin::Base::Resource::FieldDefinition)
206
206
 
207
207
  if field.type == :tags || field.type == :multi_select
208
- array_fields << { field.name => [] }
209
- array_fields << { tag_list: [] } if field.type == :tags && field.name != :tag_list
208
+ if field.type == :tags
209
+ name_str = field.name.to_s
210
+ submitted_name =
211
+ if name_str.end_with?("_list")
212
+ field.name
213
+ elsif resource_class.method_defined?("#{name_str}_list")
214
+ :"#{name_str}_list"
215
+ else
216
+ :tag_list
217
+ end
218
+ array_fields << { submitted_name => [] }
219
+ else
220
+ array_fields << { field.name => [] }
221
+ end
210
222
  else
211
223
  permitted_fields << field.name
212
224
  end
@@ -1137,7 +1137,19 @@ module AdminSuite
1137
1137
  []
1138
1138
  end
1139
1139
 
1140
- field_name = field.type == :tags ? "tag_list" : field.name
1140
+ field_name =
1141
+ if field.type == :tags
1142
+ name_str = field.name.to_s
1143
+ if name_str.end_with?("_list")
1144
+ field.name
1145
+ elsif resource.class.method_defined?("#{name_str}_list")
1146
+ :"#{name_str}_list"
1147
+ else
1148
+ :tag_list
1149
+ end
1150
+ else
1151
+ field.name
1152
+ end
1141
1153
  full_field_name = "#{param_key}[#{field_name}][]"
1142
1154
 
1143
1155
  content_tag(:div,
data/docs/releasing.md CHANGED
@@ -20,6 +20,7 @@ The gem is automatically published to RubyGems when changes are merged to `main`
20
20
  - Check if the version already exists on RubyGems
21
21
  - Build and publish the gem (if it's a new version)
22
22
  - Create a Git tag for the release (if it doesn't already exist)
23
+ - Create a GitHub Release with notes extracted from `CHANGELOG.md`, or auto-generated from commits since the previous tag if no CHANGELOG entry exists
23
24
 
24
25
  ### Requirements
25
26
 
@@ -59,7 +60,8 @@ gem push "admin_suite-X.Y.Z.gem"
59
60
  ## Notes
60
61
 
61
62
  - RubyGems commonly requires MFA/OTP for pushes (this gem is configured with `rubygems_mfa_required`)
62
- - The automated workflow uses a GitHub Actions bot to push tags
63
+ - The automated workflow uses a GitHub Actions bot to push tags and create GitHub Releases
63
64
  - The publish workflow only runs after the CI workflow completes successfully
65
+ - GitHub Release notes are sourced from the matching version section in `CHANGELOG.md`; if no entry exists, they are auto-generated from commits since the previous tag; a plain "Release vX.Y.Z" string is used only as a final fallback when no previous tag or commit-generated notes are available
64
66
  - You can manually trigger the publish workflow from the GitHub Actions tab if needed
65
67
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module AdminSuite
4
4
  module Version
5
- VERSION = "0.2.5"
5
+ VERSION = "0.2.7"
6
6
  end
7
7
 
8
8
  # Backward-compatible constant.
@@ -36,7 +36,7 @@ module AdminSuite
36
36
  RUBY
37
37
 
38
38
  AdminSuite.reset_root_dashboard!
39
- AdminSuite.config.dashboard_globs = [File.join(dir, "*.rb")]
39
+ AdminSuite.config.dashboard_globs = [ File.join(dir, "*.rb") ]
40
40
 
41
41
  get "/internal/admin_suite"
42
42
  assert_response :success
@@ -27,7 +27,7 @@ module AdminSuite
27
27
  pushed_dirs << { path: path.to_s, namespace: namespace }
28
28
  end
29
29
 
30
- [loader, ignored_dirs, pushed_dirs]
30
+ [ loader, ignored_dirs, pushed_dirs ]
31
31
  end
32
32
 
33
33
  # Helper method that simulates the Zeitwerk integration logic from engine.rb
@@ -170,7 +170,7 @@ module AdminSuite
170
170
 
171
171
  # Temporarily override File.binread to simulate read errors
172
172
  original_binread = File.singleton_class.instance_method(:binread)
173
-
173
+
174
174
  File.singleton_class.define_method(:binread) do |path|
175
175
  if path == test_file
176
176
  raise StandardError, "Simulated read error"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: admin_suite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - TechWright Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-19 00:00:00.000000000 Z
11
+ date: 2026-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails