wallaby-core 0.2.7 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -42
- data/lib/authorizers/wallaby/model_authorizer.rb +1 -1
- data/lib/helpers/wallaby/base_helper.rb +1 -1
- data/lib/utils/wallaby/locale.rb +2 -2
- data/lib/wallaby/core/version.rb +1 -1
- data/lib/wallaby/preloader.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a4c5c82124d25468728fff204eb9676d05100615edd67d86839d7008f258b42
|
4
|
+
data.tar.gz: fe635d3585a5ec4d5205d90147d5377cc4a3e52459790b75a91e842fa41cce62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fbf645d202fea16af664376a78177b9bf4bf6e6a1243e31be82f833d3cbb4dc5c5504208f583c596029bd1f7cb4a826417d8fe044725fa31df999868e3636b3
|
7
|
+
data.tar.gz: f0e750484101ed6bad77a22b531a4dcf4c5a89a6379bc92078e4a63a20bd381c664c0b6a66f97f4f312eebd858ada6e49fe95739012fd2092bfa7cefc9cc2ac8
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/f16f8d87553424c1aacc/test_coverage)](https://codeclimate.com/github/wallaby-rails/wallaby-core/test_coverage)
|
8
8
|
[![Inch CI](https://inch-ci.org/github/wallaby-rails/wallaby-core.svg?branch=master)](https://inch-ci.org/github/wallaby-rails/wallaby-core)
|
9
9
|
|
10
|
-
|
10
|
+
Wallaby::Core holds all the core interfaces that [Wallaby](https://github.com/wallaby-rails/wallaby) gem is built upon.
|
11
11
|
|
12
12
|
## Install
|
13
13
|
|
@@ -28,47 +28,6 @@ bundle install
|
|
28
28
|
- [API Reference](https://www.rubydoc.info/gems/wallaby-core)
|
29
29
|
- [Change Logs](https://github.com/wallaby-rails/wallaby-core/blob/master/CHANGELOG.md)
|
30
30
|
|
31
|
-
## Build, test and update document
|
32
|
-
|
33
|
-
To set up local development environment:
|
34
|
-
|
35
|
-
- git clone this repo
|
36
|
-
- install Ruby (2.4 ~ 3.0)
|
37
|
-
- install gems
|
38
|
-
|
39
|
-
```shell
|
40
|
-
bundle install
|
41
|
-
```
|
42
|
-
|
43
|
-
- install both MySQL and PostgreSQL
|
44
|
-
- create databases
|
45
|
-
|
46
|
-
```shell
|
47
|
-
bundle exec rake db:create
|
48
|
-
```
|
49
|
-
|
50
|
-
- start developing
|
51
|
-
|
52
|
-
Make sure to pass the following checks and tests before putting up a PR:
|
53
|
-
|
54
|
-
- rubocop analysis and format check
|
55
|
-
|
56
|
-
```shell
|
57
|
-
bundle exec rubocop -a
|
58
|
-
```
|
59
|
-
|
60
|
-
- rspec test suites and 100% test coverage
|
61
|
-
|
62
|
-
```shell
|
63
|
-
RAILS_ENV=test bundle exec rake --trace spec
|
64
|
-
```
|
65
|
-
|
66
|
-
- update the comments and build the yardoc
|
67
|
-
|
68
|
-
```shell
|
69
|
-
yardoc
|
70
|
-
```
|
71
|
-
|
72
31
|
## Want to contribute?
|
73
32
|
|
74
33
|
Raise an [issue](https://github.com/wallaby-rails/wallaby-core/issues/new), discuss and resolve!
|
@@ -56,7 +56,7 @@ module Wallaby
|
|
56
56
|
options = { html_options: { class: 'dropdown-item' } }
|
57
57
|
content_tag :ul, class: 'dropdown-menu', 'aria-labelledby': base_class do
|
58
58
|
array.sort_by(&:name).each do |node|
|
59
|
-
content = index_link(node.klass, options).try :<<, model_tree(node.children)
|
59
|
+
content = index_link(node.klass, **options).try :<<, model_tree(node.children)
|
60
60
|
concat content_tag(:li, content)
|
61
61
|
end
|
62
62
|
end
|
data/lib/utils/wallaby/locale.rb
CHANGED
@@ -11,11 +11,11 @@ module Wallaby
|
|
11
11
|
# @return [String] translation
|
12
12
|
def t(key, options = {})
|
13
13
|
translator = options.delete(:translator) || I18n.method(:t)
|
14
|
-
return translator.call(key, options) unless key.is_a?(String) || key.is_a?(Symbol)
|
14
|
+
return translator.call(key, **options) unless key.is_a?(String) || key.is_a?(Symbol)
|
15
15
|
|
16
16
|
new_key, new_defaults = normalize key, options.delete(:default)
|
17
17
|
|
18
|
-
translator.call(new_key, { default: new_defaults }.merge(options))
|
18
|
+
translator.call(new_key, **{ default: new_defaults }.merge(options))
|
19
19
|
end
|
20
20
|
|
21
21
|
private
|
data/lib/wallaby/core/version.rb
CHANGED
data/lib/wallaby/preloader.rb
CHANGED
@@ -39,7 +39,10 @@ module Wallaby
|
|
39
39
|
# @!attribute [r] eager_load_paths
|
40
40
|
# @return [Array<String, Pathname>]
|
41
41
|
def eager_load_paths # :nodoc:
|
42
|
-
@eager_load_paths ||=
|
42
|
+
@eager_load_paths ||=
|
43
|
+
Rails.configuration.paths['app'].expanded
|
44
|
+
.concat(Rails.configuration.eager_load_paths)
|
45
|
+
.uniq
|
43
46
|
end
|
44
47
|
|
45
48
|
# @!attribute [w] model_paths
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wallaby-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tian Chen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|