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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4c16b5f354db79d26599238e1b80d2bfb978c029a9209ea61ee37aaa5627f9e
4
- data.tar.gz: 37937d45abb4268ec1a4ce475ab5b1c0cd4e0e5218ab7aeff5f43966945b209b
3
+ metadata.gz: ca0a6be0dbd395707f39aa93a89254317871594fb5482449b7f2cf93c5468902
4
+ data.tar.gz: d1ff1ffadfb6c817322e1ccde9ee7ab02e52a43013a619879c9bf696d76710f2
5
5
  SHA512:
6
- metadata.gz: 6ea399628b6146c8232f6af9162960bf83afa0cdd97a49809ee114c32467d3a476fd111c24019aab5325af184d78fae58467b41bcb7c41d82602af342a2bd5d5
7
- data.tar.gz: 1d5382a9f0b3957688cf218ead03e55e04fe1f9d4846969dde586ba18ae832a8a00bddd47bec1c8b57834372c0fc08b07723783cc47222c96a8b357b2e5aabb9
6
+ metadata.gz: 3530b2947441695a2e9163c8884984585b3cfb65581f9029d86b99376aa8aa5cf7ab1c8254ea2416c96e77ac3a95927509476a6a446e00e2bff8ef675d5d6c61
7
+ data.tar.gz: 367af1fd182b8b6de5fb354854d0fa6d3f1a71e2dfea1f82c90593e17ae60c43076873bf4129c030e05a1765b85d7a4151da36b26979838117e6fb5d450d3919
@@ -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.1
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 rake rubocop
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
- - 2.7
48
- - 3.0
49
- - 3.1
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
@@ -4,7 +4,7 @@ require:
4
4
  - rubocop-rubycw
5
5
 
6
6
  AllCops:
7
- TargetRubyVersion: 2.7
7
+ TargetRubyVersion: 3.0
8
8
  NewCops: enable
9
9
  DisplayCopNames: true
10
10
  DisplayStyleGuide: true
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(">= 2.7.0")
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", "~> 2.8"
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveAdmin
4
4
  module MenuTree
5
- VERSION = "0.2.2"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  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 |options|
48
- menu.add(**options)
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.2.2
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: 2022-02-18 00:00:00.000000000 Z
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: 2.7.0
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.3.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.