wallaby-core 0.2.7 → 0.2.8
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 +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
- 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: '008e6c998628f1be960867cc2c6ce3ac2c214c727765b9e6b966b74d5a1c9607'
|
|
4
|
+
data.tar.gz: 1b14cfc38385f18c7e4580baef508be19679e4c2f30ff4550c85e8cd6c37031e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7db4d2d5c4b1c5f9c3cc273f149e62a8147243105e471e97d6c7557d164d52657381a6f03bdb25daaf080cdb0d1fd24fa8d216b1220b831816db7fc0262bd8e5
|
|
7
|
+
data.tar.gz: ed53ad00870271da85989530f0ada4d67628df215f425115ec1ee4fc28f0f85ae1a232b0f4d2e227110bc8495783de7c9fded4735729fbf03a41b14ccae62eca
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://codeclimate.com/github/wallaby-rails/wallaby-core/test_coverage)
|
|
8
8
|
[](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
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.8
|
|
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-09-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|