u-struct 0.11.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +5 -5
- data/.rubocop.yml +129 -0
- data/.rubocop_todo.yml +10 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +558 -13
- data/Gemfile +14 -3
- data/README.md +682 -16
- data/Rakefile +5 -5
- data/bin/console +3 -3
- data/bin/prepare_coverage +7 -9
- data/bin/run_ci +17 -0
- data/bin/tapioca +28 -0
- data/examples/rgb/number.rb +1 -1
- data/examples/rgb_1.rb +7 -6
- data/examples/rgb_2.rb +2 -2
- data/examples/rgb_3.rb +1 -1
- data/lib/micro/struct/factory/create_struct.rb +95 -69
- data/lib/micro/struct/factory/members.rb +1 -0
- data/lib/micro/struct/factory.rb +13 -4
- data/lib/micro/struct/features.rb +35 -16
- data/lib/micro/struct/normalize_names.rb +4 -3
- data/lib/micro/struct/version.rb +2 -1
- data/lib/micro/struct.rb +37 -5
- data/lib/u-struct.rb +2 -0
- data/rbi/micro/struct/factory/create_struct.rbi +60 -0
- data/rbi/micro/struct/factory/members.rbi +67 -0
- data/rbi/micro/struct/factory.rbi +41 -0
- data/rbi/micro/struct/features.rbi +41 -0
- data/rbi/micro/struct/normalize_names.rbi +20 -0
- data/rbi/micro/struct/version.rbi +3 -0
- data/rbi/micro/struct.rbi +68 -0
- data/sorbet/config +8 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +54 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +11 -0
- data/sorbet/rbi/gems/docile@1.4.0.rbi +54 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
- data/sorbet/rbi/gems/minitest@5.15.0.rbi +345 -0
- data/sorbet/rbi/gems/parser@3.1.0.0.rbi +1196 -0
- data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +806 -0
- data/sorbet/rbi/gems/rbi@0.0.9.rbi +1602 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +89 -0
- data/sorbet/rbi/gems/simplecov@0.21.2.rbi +577 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi +8 -0
- data/sorbet/rbi/gems/spoom@1.1.8.rbi +1252 -0
- data/sorbet/rbi/gems/tapioca@0.6.2.rbi +1232 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +844 -0
- data/sorbet/rbi/gems/unparser@0.6.3.rbi +8 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +601 -0
- data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +199 -0
- data/sorbet/rbi/gems/yard@0.9.27.rbi +4112 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- data/u-struct.gemspec +3 -3
- metadata +38 -4
- data/bin/test +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa40551d175dd0f2239b9c8a5c7fda5ea39e29b4293c23d8318744cf2f9df0b9
|
4
|
+
data.tar.gz: 5f5058d00fde571ed7fb972dd976dcae1dbe5e7469c2f069eeb29b6cdd01747a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef1569d45a887c42dd1239a35a98fdb160c6d93ca5e6cd24cbac1f4763295ff4228c5343f64fdf33e91a51503597b66aa0222b0652fd7b723d2e35e3a3c2e4ca
|
7
|
+
data.tar.gz: 7c2747b2b46095461d6402a1a7f58d4a2b4b8396572c4e6bb7d36e986da1aec44a17f82603ec2c01bd62bbbe3a6127114a8023b6e04e0601df8be045daae9699
|
data/.github/workflows/ci.yml
CHANGED
@@ -6,20 +6,20 @@ jobs:
|
|
6
6
|
runs-on: ubuntu-latest
|
7
7
|
strategy:
|
8
8
|
matrix:
|
9
|
-
ruby: [2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1
|
9
|
+
ruby: [2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0.3, 3.1]
|
10
10
|
steps:
|
11
11
|
- uses: actions/checkout@v2
|
12
12
|
- uses: ruby/setup-ruby@v1
|
13
13
|
with:
|
14
14
|
ruby-version: ${{ matrix.ruby }}
|
15
15
|
bundler-cache: true
|
16
|
-
- name:
|
17
|
-
run: bin/
|
16
|
+
- name: Run sorbet, rubocop, tests and generate code coverage
|
17
|
+
run: bin/run_ci
|
18
18
|
- name: Format coverage
|
19
|
-
if: ${{ matrix.ruby >= 3
|
19
|
+
if: ${{ matrix.ruby >= 3.1 }}
|
20
20
|
run: bin/prepare_coverage
|
21
21
|
- uses: paambaati/codeclimate-action@v2.7.5
|
22
|
-
if: ${{ matrix.ruby >= 3
|
22
|
+
if: ${{ matrix.ruby >= 3.1 }}
|
23
23
|
env:
|
24
24
|
CC_TEST_REPORTER_ID: 8ce350edeb0772e94ffd678bbaca30d9c1293b9d9051a1689c79b91c21f5afd5
|
25
25
|
with:
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
# The behavior of RuboCop can be controlled via the .rubocop.yml
|
4
|
+
# configuration file. It makes it possible to enable/disable
|
5
|
+
# certain cops (checks) and to alter their behavior if they accept
|
6
|
+
# any parameters. The file can be placed either in your home
|
7
|
+
# directory or in some project directory.
|
8
|
+
#
|
9
|
+
# RuboCop will start looking for the configuration file in the directory
|
10
|
+
# where the inspected file is and continue its way up to the root directory.
|
11
|
+
#
|
12
|
+
# See https://docs.rubocop.org/rubocop/configuration
|
13
|
+
|
14
|
+
require:
|
15
|
+
- rubocop-rake
|
16
|
+
- rubocop-minitest
|
17
|
+
|
18
|
+
AllCops:
|
19
|
+
NewCops: enable
|
20
|
+
TargetRubyVersion: 2.5
|
21
|
+
|
22
|
+
# == Gemspec ==
|
23
|
+
|
24
|
+
Gemspec/RequiredRubyVersion:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
# == Style ==
|
28
|
+
|
29
|
+
Style/Alias:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Style/CaseEquality:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
Style/ClassAndModuleChildren:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
Style/CombinableLoops:
|
39
|
+
Exclude:
|
40
|
+
- test/**/*.rb
|
41
|
+
|
42
|
+
Style/Documentation:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
Style/FormatStringToken:
|
46
|
+
EnforcedStyle: annotated
|
47
|
+
|
48
|
+
Style/Lambda:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
Style/LambdaCall:
|
52
|
+
Enabled: false
|
53
|
+
|
54
|
+
Style/ModuleFunction:
|
55
|
+
EnforcedStyle: extend_self
|
56
|
+
|
57
|
+
Style/RaiseArgs:
|
58
|
+
EnforcedStyle: compact
|
59
|
+
|
60
|
+
Style/SymbolArray:
|
61
|
+
EnforcedStyle: brackets
|
62
|
+
|
63
|
+
# == Layout ==
|
64
|
+
|
65
|
+
Layout/ArrayAlignment:
|
66
|
+
Enabled: false
|
67
|
+
|
68
|
+
Layout/ExtraSpacing:
|
69
|
+
Enabled: false
|
70
|
+
|
71
|
+
Layout/HashAlignment:
|
72
|
+
Enabled: false
|
73
|
+
|
74
|
+
Layout/SpaceAroundOperators:
|
75
|
+
Enabled: false
|
76
|
+
|
77
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
78
|
+
EnforcedStyle: no_space
|
79
|
+
EnforcedStyleForEmptyBrackets: no_space
|
80
|
+
|
81
|
+
Layout/SpaceInsideHashLiteralBraces:
|
82
|
+
EnforcedStyle: no_space
|
83
|
+
|
84
|
+
# == Lint ==
|
85
|
+
|
86
|
+
Lint/ConstantDefinitionInBlock:
|
87
|
+
Enabled: false
|
88
|
+
|
89
|
+
Lint/NestedMethodDefinition:
|
90
|
+
Exclude:
|
91
|
+
- test/micro/struct/instance_method_test.rb
|
92
|
+
|
93
|
+
# == Naming ==
|
94
|
+
|
95
|
+
Naming/ClassAndModuleCamelCase:
|
96
|
+
Enabled: false
|
97
|
+
|
98
|
+
Naming/FileName:
|
99
|
+
Exclude:
|
100
|
+
- lib/u-struct.rb
|
101
|
+
|
102
|
+
Naming/MethodParameterName:
|
103
|
+
Exclude:
|
104
|
+
- examples/**/*.rb
|
105
|
+
|
106
|
+
Naming/RescuedExceptionsVariableName:
|
107
|
+
PreferredName: exception
|
108
|
+
|
109
|
+
# == Metrics ==
|
110
|
+
|
111
|
+
Metrics/AbcSize:
|
112
|
+
Exclude:
|
113
|
+
- test/**/*.rb
|
114
|
+
|
115
|
+
Metrics/MethodLength:
|
116
|
+
Exclude:
|
117
|
+
- test/**/*.rb
|
118
|
+
|
119
|
+
Metrics/ClassLength:
|
120
|
+
Exclude:
|
121
|
+
- test/**/*.rb
|
122
|
+
|
123
|
+
# == Minitest ==
|
124
|
+
|
125
|
+
Minitest/AssertWithExpectedArgument:
|
126
|
+
Enabled: false
|
127
|
+
|
128
|
+
Minitest/MultipleAssertions:
|
129
|
+
Max: 21
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2022-01-27 11:53:52 UTC using RuboCop version 1.25.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
Gemspec/RequireMFA:
|
10
|
+
Enabled: false
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.1.0
|