activeadmin-menu_tree 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +7 -6
- data/.rubocop.yml +1 -1
- data/Makefile +12 -0
- data/activeadmin-menu_tree.gemspec +2 -2
- data/lib/activeadmin/menu_tree/config.rb +1 -0
- data/lib/activeadmin/menu_tree/version.rb +1 -1
- data/lib/activeadmin/menu_tree.rb +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca0a6be0dbd395707f39aa93a89254317871594fb5482449b7f2cf93c5468902
|
4
|
+
data.tar.gz: d1ff1ffadfb6c817322e1ccde9ee7ab02e52a43013a619879c9bf696d76710f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3530b2947441695a2e9163c8884984585b3cfb65581f9029d86b99376aa8aa5cf7ab1c8254ea2416c96e77ac3a95927509476a6a446e00e2bff8ef675d5d6c61
|
7
|
+
data.tar.gz: 367af1fd182b8b6de5fb354854d0fa6d3f1a71e2dfea1f82c90593e17ae60c43076873bf4129c030e05a1765b85d7a4151da36b26979838117e6fb5d450d3919
|
data/.github/workflows/main.yml
CHANGED
@@ -18,13 +18,13 @@ jobs:
|
|
18
18
|
- name: Set up Ruby
|
19
19
|
uses: ruby/setup-ruby@v1
|
20
20
|
with:
|
21
|
-
ruby-version: 3.
|
21
|
+
ruby-version: "3.3"
|
22
22
|
- name: Install bundler
|
23
23
|
run: gem install bundler
|
24
24
|
- name: Setup
|
25
25
|
run: bin/setup
|
26
26
|
- name: Rubocop
|
27
|
-
run: bundle exec
|
27
|
+
run: bundle exec rubocop --fail-level W
|
28
28
|
# steep:
|
29
29
|
# runs-on: ubuntu-latest
|
30
30
|
# steps:
|
@@ -32,7 +32,7 @@ jobs:
|
|
32
32
|
# - name: Set up Ruby
|
33
33
|
# uses: ruby/setup-ruby@v1
|
34
34
|
# with:
|
35
|
-
# ruby-version: 3.1
|
35
|
+
# ruby-version: "3.1"
|
36
36
|
# - name: Install bundler
|
37
37
|
# run: gem install bundler
|
38
38
|
# - name: Setup
|
@@ -44,9 +44,10 @@ jobs:
|
|
44
44
|
strategy:
|
45
45
|
matrix:
|
46
46
|
ruby:
|
47
|
-
-
|
48
|
-
- 3.
|
49
|
-
- 3.
|
47
|
+
- "3.0"
|
48
|
+
- "3.1"
|
49
|
+
- "3.2"
|
50
|
+
- "3.3"
|
50
51
|
steps:
|
51
52
|
- uses: actions/checkout@v2
|
52
53
|
- name: Set up Ruby
|
data/.rubocop.yml
CHANGED
data/Makefile
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
.PHONY: rake/* rbs/* typeprof/* steep/*
|
2
2
|
|
3
|
+
setup:
|
4
|
+
bin/setup
|
5
|
+
|
6
|
+
concole:
|
7
|
+
bin/concole
|
8
|
+
|
3
9
|
rake/tasks:
|
4
10
|
bundle exec rake --tasks
|
5
11
|
|
12
|
+
rake/%:
|
13
|
+
bundle exec rake $*
|
14
|
+
|
6
15
|
rbs/prototype: rbs/prototype/lib
|
7
16
|
|
8
17
|
rbs/prototype/lib:
|
@@ -15,6 +24,9 @@ rbs/prototype/lib:
|
|
15
24
|
# rbs/prototype/runtime:
|
16
25
|
# rbs prototype runtime -R spec/spec_helper.rb
|
17
26
|
|
27
|
+
rbs/validate:
|
28
|
+
rbs validate
|
29
|
+
|
18
30
|
typeprof/lib:
|
19
31
|
typeprof lib/**/*.rb
|
20
32
|
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = "This is a wrapper library for managing ActiveAdmin's menu structure in a simple yaml format, and automatically setting the priority and parent."
|
13
13
|
spec.homepage = "https://github.com/shuuuuun/activeadmin-menu_tree"
|
14
14
|
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new(">=
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.0")
|
16
16
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
18
|
spec.metadata["source_code_uri"] = "https://github.com/shuuuuun/activeadmin-menu_tree"
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
|
-
spec.add_dependency "activeadmin", "
|
31
|
+
spec.add_dependency "activeadmin", ">= 2.8"
|
32
32
|
spec.add_dependency "activesupport"
|
33
33
|
|
34
34
|
# For more information and examples about making a new gem, checkout our
|
@@ -13,6 +13,7 @@ module ActiveAdmin::MenuTree
|
|
13
13
|
def menu_tree=(new_value)
|
14
14
|
raise ActiveAdmin::MenuTree::Error, "Invalid config" unless new_value.is_a? Array
|
15
15
|
|
16
|
+
ActiveAdmin::MenuTree.log_debug("menu_tree=: #{new_value.inspect}")
|
16
17
|
@menu_tree = new_value.map(&:deep_symbolize_keys)
|
17
18
|
@menu_options = flatten_options(@menu_tree)
|
18
19
|
end
|
@@ -44,8 +44,8 @@ module ActiveAdmin
|
|
44
44
|
ActiveAdmin::MenuTree.log_debug("menu_options: #{menu_options.inspect}")
|
45
45
|
aa_config.namespace :admin do |admin|
|
46
46
|
admin.build_menu do |menu|
|
47
|
-
menu_options.each do |
|
48
|
-
menu.add(**
|
47
|
+
menu_options.each do |option|
|
48
|
+
menu.add(**option.dup)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin-menu_tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shuuuuuny
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeadmin
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -87,14 +87,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
87
|
requirements:
|
88
88
|
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
90
|
+
version: '3.0'
|
91
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
|
-
rubygems_version: 3.
|
97
|
+
rubygems_version: 3.4.20
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: Allows ActiveAdmin menus to be managed in tree format.
|