activeadmin-menu_tree 0.1.0 → 0.1.1

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: 888200f43639792b0e3399f615e2581daf617b961e08977d766148ea3e177e3f
4
- data.tar.gz: 45520ffd081b84074e51f259ea0c7be3baf4290d7e84e9d4cc333c18a566dafe
3
+ metadata.gz: 915be184b52128a375b2b76397c266148d5a6f27847a704913623b71cec64aaa
4
+ data.tar.gz: dab0db630d9510882682eb5ca72f6cc268c2f531e17e4f094b2b48aec25ccb61
5
5
  SHA512:
6
- metadata.gz: 2f23ca691fb6f429385118558455ded147c6460289e10c749b596acfd1327cca98ab3def345f6be0b7a48b5ddf0419eef7501e796b33daba2849f5b1e136498f
7
- data.tar.gz: 4a2832c6baaf35ab2c394d60588e1c39cebc4590993d66af565964799204618abd148729e0fa7dd3e769eec18d780116becabb85af625b2747719cf3cc1b9c53
6
+ metadata.gz: 9dc782fd55db0218d961c296afe543178d0a618708fe8009ed0b0bfcd408c7ecdc7bdbeab19135c0d6ddfa79d2805d118d85d5b30508f67ee0e9bcbdd8bc5192
7
+ data.tar.gz: 5d8832823ad3112ecf687257e3948e3bc532331ca2dd9ca58e6a7d4c266112c2504f9b6a4054f8a6f720b3815574cadfcfeb7efc4d757885e8efd4d0f13b81da
@@ -1,47 +1,60 @@
1
1
  name: Ruby
2
2
 
3
- on: [push, pull_request]
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ types:
9
+ - opened
10
+ - synchronize
11
+ - reopened
4
12
 
5
13
  jobs:
6
14
  rubocop:
7
15
  runs-on: ubuntu-latest
8
16
  steps:
9
- - uses: actions/checkout@v2
10
- - name: Set up Ruby
11
- uses: ruby/setup-ruby@v1
12
- with:
13
- ruby-version: 3.0.0
14
- - name: Install bundler
15
- run: gem install bundler
16
- - name: Setup
17
- run: bin/setup
18
- - name: Rubocop
19
- run: bundle exec rake rubocop
20
- rspec:
17
+ - uses: actions/checkout@v2
18
+ - name: Set up Ruby
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: 3.0.0
22
+ - name: Install bundler
23
+ run: gem install bundler
24
+ - name: Setup
25
+ run: bin/setup
26
+ - name: Rubocop
27
+ run: bundle exec rake rubocop
28
+ steep:
21
29
  runs-on: ubuntu-latest
22
30
  steps:
23
- - uses: actions/checkout@v2
24
- - name: Set up Ruby
25
- uses: ruby/setup-ruby@v1
26
- with:
27
- ruby-version: 3.0.0
28
- - name: Install bundler
29
- run: gem install bundler
30
- - name: Setup
31
- run: bin/setup
32
- - name: RSpec
33
- run: bundle exec rake spec
34
- steep:
31
+ - uses: actions/checkout@v2
32
+ - name: Set up Ruby
33
+ uses: ruby/setup-ruby@v1
34
+ with:
35
+ ruby-version: 3.0.0
36
+ - name: Install bundler
37
+ run: gem install bundler
38
+ - name: Setup
39
+ run: bin/setup
40
+ - name: Steep
41
+ run: bundle exec steep check
42
+ rspec:
35
43
  runs-on: ubuntu-latest
44
+ strategy:
45
+ matrix:
46
+ ruby:
47
+ - 2.7
48
+ - 3.0
36
49
  steps:
37
- - uses: actions/checkout@v2
38
- - name: Set up Ruby
39
- uses: ruby/setup-ruby@v1
40
- with:
41
- ruby-version: 3.0.0
42
- - name: Install bundler
43
- run: gem install bundler
44
- - name: Setup
45
- run: bin/setup
46
- - name: Steep
47
- run: bundle exec steep check
50
+ - uses: actions/checkout@v2
51
+ - name: Set up Ruby
52
+ uses: ruby/setup-ruby@v1
53
+ with:
54
+ ruby-version: ${{ matrix.ruby }}
55
+ - name: Install bundler
56
+ run: gem install bundler
57
+ - name: Setup
58
+ run: bin/setup
59
+ - name: RSpec
60
+ run: bundle exec rake spec
data/.rubocop.yml CHANGED
@@ -1,3 +1,8 @@
1
+ require:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+ - rubocop-rubycw
5
+
1
6
  AllCops:
2
7
  TargetRubyVersion: 2.7
3
8
  NewCops: enable
@@ -38,3 +43,13 @@ Metrics/BlockLength:
38
43
 
39
44
  Metrics/MethodLength:
40
45
  Max: 15
46
+
47
+ RSpec:
48
+ # DisabledByDefault
49
+ Enabled: false
50
+
51
+ RSpec/ContextWording:
52
+ Enabled: true
53
+
54
+ RSpec/VerifiedDoubles:
55
+ Enabled: true
data/Gemfile CHANGED
@@ -8,5 +8,8 @@ gemspec
8
8
  gem "rake", "~> 13.0"
9
9
  gem "rbs"
10
10
  gem "rspec", "~> 3.0"
11
- gem "rubocop", "~> 0.80"
11
+ gem "rubocop", "~> 1.0", require: false
12
+ gem "rubocop-rake", require: false
13
+ gem "rubocop-rspec", require: false
14
+ gem "rubocop-rubycw", require: false
12
15
  gem "steep"
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # ActiveAdmin::MenuTree
2
2
 
3
- <!-- TODO: badge -->
3
+ [![Gem Version](https://badge.fury.io/rb/activeadmin-menu_tree.svg)](https://badge.fury.io/rb/activeadmin-menu_tree)
4
+ [![Ruby](https://github.com/shuuuuun/activeadmin-menu_tree/actions/workflows/main.yml/badge.svg)](https://github.com/shuuuuun/activeadmin-menu_tree/actions/workflows/main.yml)
4
5
 
5
6
  Allows [ActiveAdmin](https://github.com/activeadmin/activeadmin) menus to be managed in tree format.
6
7
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveAdmin
4
4
  module MenuTree
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
@@ -11,7 +11,7 @@ gems:
11
11
  source:
12
12
  type: git
13
13
  name: ruby/gem_rbs_collection
14
- revision: 2f3c0db60f184a09b3b195ad729a9aa1e2945d1b
14
+ revision: 81ace2c598ec871572beee5792e2a2781b35e762
15
15
  remote: https://github.com/ruby/gem_rbs_collection.git
16
16
  repo_dir: gems
17
17
  - name: actionview
@@ -19,7 +19,7 @@ gems:
19
19
  source:
20
20
  type: git
21
21
  name: ruby/gem_rbs_collection
22
- revision: 2f3c0db60f184a09b3b195ad729a9aa1e2945d1b
22
+ revision: 81ace2c598ec871572beee5792e2a2781b35e762
23
23
  remote: https://github.com/ruby/gem_rbs_collection.git
24
24
  repo_dir: gems
25
25
  - name: activemodel
@@ -27,7 +27,7 @@ gems:
27
27
  source:
28
28
  type: git
29
29
  name: ruby/gem_rbs_collection
30
- revision: 2f3c0db60f184a09b3b195ad729a9aa1e2945d1b
30
+ revision: 81ace2c598ec871572beee5792e2a2781b35e762
31
31
  remote: https://github.com/ruby/gem_rbs_collection.git
32
32
  repo_dir: gems
33
33
  - name: activerecord
@@ -35,7 +35,7 @@ gems:
35
35
  source:
36
36
  type: git
37
37
  name: ruby/gem_rbs_collection
38
- revision: 2f3c0db60f184a09b3b195ad729a9aa1e2945d1b
38
+ revision: 81ace2c598ec871572beee5792e2a2781b35e762
39
39
  remote: https://github.com/ruby/gem_rbs_collection.git
40
40
  repo_dir: gems
41
41
  - name: activesupport
@@ -43,7 +43,7 @@ gems:
43
43
  source:
44
44
  type: git
45
45
  name: ruby/gem_rbs_collection
46
- revision: 2f3c0db60f184a09b3b195ad729a9aa1e2945d1b
46
+ revision: 81ace2c598ec871572beee5792e2a2781b35e762
47
47
  remote: https://github.com/ruby/gem_rbs_collection.git
48
48
  repo_dir: gems
49
49
  - name: ast
@@ -51,7 +51,15 @@ gems:
51
51
  source:
52
52
  type: git
53
53
  name: ruby/gem_rbs_collection
54
- revision: 2f3c0db60f184a09b3b195ad729a9aa1e2945d1b
54
+ revision: 81ace2c598ec871572beee5792e2a2781b35e762
55
+ remote: https://github.com/ruby/gem_rbs_collection.git
56
+ repo_dir: gems
57
+ - name: listen
58
+ version: '3.2'
59
+ source:
60
+ type: git
61
+ name: ruby/gem_rbs_collection
62
+ revision: 81ace2c598ec871572beee5792e2a2781b35e762
55
63
  remote: https://github.com/ruby/gem_rbs_collection.git
56
64
  repo_dir: gems
57
65
  - name: nokogiri
@@ -59,7 +67,7 @@ gems:
59
67
  source:
60
68
  type: git
61
69
  name: ruby/gem_rbs_collection
62
- revision: 2f3c0db60f184a09b3b195ad729a9aa1e2945d1b
70
+ revision: 81ace2c598ec871572beee5792e2a2781b35e762
63
71
  remote: https://github.com/ruby/gem_rbs_collection.git
64
72
  repo_dir: gems
65
73
  - name: parallel
@@ -67,7 +75,7 @@ gems:
67
75
  source:
68
76
  type: git
69
77
  name: ruby/gem_rbs_collection
70
- revision: 2f3c0db60f184a09b3b195ad729a9aa1e2945d1b
78
+ revision: 81ace2c598ec871572beee5792e2a2781b35e762
71
79
  remote: https://github.com/ruby/gem_rbs_collection.git
72
80
  repo_dir: gems
73
81
  - name: rack
@@ -75,7 +83,7 @@ gems:
75
83
  source:
76
84
  type: git
77
85
  name: ruby/gem_rbs_collection
78
- revision: 2f3c0db60f184a09b3b195ad729a9aa1e2945d1b
86
+ revision: 81ace2c598ec871572beee5792e2a2781b35e762
79
87
  remote: https://github.com/ruby/gem_rbs_collection.git
80
88
  repo_dir: gems
81
89
  - name: railties
@@ -83,7 +91,7 @@ gems:
83
91
  source:
84
92
  type: git
85
93
  name: ruby/gem_rbs_collection
86
- revision: 2f3c0db60f184a09b3b195ad729a9aa1e2945d1b
94
+ revision: 81ace2c598ec871572beee5792e2a2781b35e762
87
95
  remote: https://github.com/ruby/gem_rbs_collection.git
88
96
  repo_dir: gems
89
97
  - name: rainbow
@@ -91,6 +99,6 @@ gems:
91
99
  source:
92
100
  type: git
93
101
  name: ruby/gem_rbs_collection
94
- revision: 2f3c0db60f184a09b3b195ad729a9aa1e2945d1b
102
+ revision: 81ace2c598ec871572beee5792e2a2781b35e762
95
103
  remote: https://github.com/ruby/gem_rbs_collection.git
96
104
  repo_dir: gems
@@ -1,18 +1,22 @@
1
1
  module ActiveAdmin::MenuTree
2
2
  class Config
3
- attr_reader menu_tree: Array[untyped]
4
- attr_reader menu_options: Array[untyped]
3
+ type menu_tree_item = Hash[Symbol, untyped]
4
+ type menu_option = Hash[Symbol, untyped]
5
+
6
+ attr_reader menu_tree: Array[menu_tree_item]
7
+ attr_reader menu_options: Array[menu_option]
5
8
 
6
9
  def initialize: () -> void
7
10
 
8
- def menu_tree=: (untyped new_value) -> untyped
11
+ # def menu_tree=: (Array[Hash[untyped, untyped]] new_value) -> void
12
+ def menu_tree=: (Array[untyped] new_value) -> void
9
13
 
10
- def find_menu_option: (name: String) -> untyped
14
+ def find_menu_option: (name: String) -> (menu_option | nil)
11
15
 
12
16
  private
13
17
 
14
- def flatten_menu_tree: () -> untyped
18
+ def flatten_menu_tree: () -> Array[menu_option]
15
19
 
16
- def format_options: (untyped item, index: untyped index, ?parent: untyped? parent) -> untyped
20
+ def format_options: (Hash[Symbol, untyped] item, index: Integer index, ?parent: String? parent) -> menu_option
17
21
  end
18
22
  end
@@ -3,12 +3,12 @@ module ActiveAdmin
3
3
  class Error < StandardError
4
4
  end
5
5
 
6
- def self.setup: () { (untyped) -> untyped } -> untyped
6
+ def self.setup: () { (Config) -> void } -> void
7
7
 
8
8
  def self.config: () -> Config
9
9
 
10
10
  private
11
11
 
12
- def self.setup_menu_options: (untyped aa_config) -> untyped
12
+ def self.setup_menu_options: (ActiveAdmin::Application) -> void
13
13
  end
14
14
  end
@@ -1,3 +1,8 @@
1
1
  module ActiveAdmin
2
- def self.before_load: () { (untyped) -> void } -> void
2
+ def self.before_load: () { (ActiveAdmin::Application) -> void } -> void
3
+
4
+ class Application
5
+ def comments_menu=: (Hash[Symbol, untyped] | nil) -> void
6
+ def namespace: (Symbol) { (untyped) -> void } -> void
7
+ end
3
8
  end
@@ -0,0 +1,4 @@
1
+ # Tentative deal, it doesn't seem to be loaded from gem_rbs_collection for some reason.
2
+ class Object
3
+ def present?: () -> bool
4
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-menu_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - shuuuuuny
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-28 00:00:00.000000000 Z
11
+ date: 2021-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -70,6 +70,7 @@ files:
70
70
  - sig/lib/activeadmin/menu_tree/config.rbs
71
71
  - sig/lib/activeadmin/menu_tree/dsl.rbs
72
72
  - sig/lib/activeadmin/menu_tree/version.rbs
73
+ - sig/lib/activesupport.rbs
73
74
  homepage: https://github.com/shuuuuun/activeadmin-menu_tree
74
75
  licenses:
75
76
  - MIT