wallaby-core 0.2.6 → 0.2.8
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:
|
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
|
[![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!
|
@@ -158,5 +158,11 @@ module Wallaby
|
|
158
158
|
def respond_to_missing?(method_id, _include_private)
|
159
159
|
resource.respond_to?(method_id) || super
|
160
160
|
end
|
161
|
+
|
162
|
+
# @see https://github.com/rails/rails/compare/v7.0.2.4..7-0-stable#diff-44b94eca66c7497711821a8e6bcdfde4684bb7b8efa15e64da6532449f03ef0bR441
|
163
|
+
# @note This overwritten method is a response to the above change
|
164
|
+
def to_model
|
165
|
+
self
|
166
|
+
end
|
161
167
|
end
|
162
168
|
end
|
@@ -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
|
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
241
|
- !ruby/object:Gem::Version
|
242
242
|
version: '0'
|
243
243
|
requirements: []
|
244
|
-
rubygems_version: 3.
|
244
|
+
rubygems_version: 3.1.6
|
245
245
|
signing_key:
|
246
246
|
specification_version: 4
|
247
247
|
summary: The core of Wallaby
|