resol 0.1.0 → 0.2.0
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/.github/workflows/test.yml +60 -0
- data/.rubocop.yml +12 -16
- data/Gemfile.lock +66 -28
- data/README.md +11 -1
- data/bin/rubocop +1 -1
- data/lib/resol.rb +1 -0
- data/lib/resol/version.rb +1 -1
- metadata +39 -11
- data/.github/workflows/main.yml +0 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 243b5c0d3e3a14a705dd6c8237603d161e55e10120df472d84287f6096e35b0c
|
|
4
|
+
data.tar.gz: 45f4d69cb14396375d667d1ec9842fefe546c0c518c8beb233fb5feeeacd4376
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f5901ddb1f9f04dce2129944e1a83fac1477dd883b1ffa56aa1c083afba425e73976439ac5da81e9dc3f323cc3180283b449d94381ea9595cb5e33ab2460bf9c
|
|
7
|
+
data.tar.gz: 423785b253f1d54678aa45cff5b99eb2c627f080f74b437c75468c5914dbe87529af4bd564caeab90b9beea240fb9678c596c8c0716ad6c6bbee969ef54c6f2b
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
env:
|
|
6
|
+
COVER: true
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
full-check:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
# We want to run on external PRs, but not on our own internal PRs as they'll be run on push event
|
|
13
|
+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'umbrellio/resol'
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v2
|
|
17
|
+
- uses: ruby/setup-ruby@v1
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: 3
|
|
20
|
+
bundler-cache: true
|
|
21
|
+
- name: Run Linter
|
|
22
|
+
run: bundle exec ci-helper RubocopLint
|
|
23
|
+
- name: Check missed spec suffixes
|
|
24
|
+
run: bundle exec ci-helper CheckSpecSuffixes --extra-paths spec/*.rb --ignored-paths spec/*_helper.rb
|
|
25
|
+
- name: Run specs
|
|
26
|
+
run: bundle exec ci-helper RunSpecs
|
|
27
|
+
- name: Audit
|
|
28
|
+
run: bundle exec ci-helper BundlerAudit
|
|
29
|
+
- name: Coveralls
|
|
30
|
+
uses: coverallsapp/github-action@master
|
|
31
|
+
with:
|
|
32
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
+
specs:
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
continue-on-error: ${{ matrix.experimental }}
|
|
36
|
+
|
|
37
|
+
env:
|
|
38
|
+
COVER: false
|
|
39
|
+
|
|
40
|
+
# We want to run on external PRs, but not on our own internal PRs as they'll be run on push event
|
|
41
|
+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'umbrellio/resol'
|
|
42
|
+
|
|
43
|
+
strategy:
|
|
44
|
+
fail-fast: false
|
|
45
|
+
matrix:
|
|
46
|
+
ruby: [2.7]
|
|
47
|
+
experimental: [false]
|
|
48
|
+
include:
|
|
49
|
+
- ruby: head
|
|
50
|
+
experimental: true
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v2
|
|
55
|
+
- uses: ruby/setup-ruby@v1
|
|
56
|
+
with:
|
|
57
|
+
ruby-version: ${{ matrix.ruby }}
|
|
58
|
+
bundler-cache: true
|
|
59
|
+
- name: Run specs
|
|
60
|
+
run: bundle exec ci-helper RunSpecs
|
data/.rubocop.yml
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
NewCops: enable
|
|
1
|
+
inherit_gem:
|
|
2
|
+
rubocop-config-umbrellio: lib/rubocop.yml
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
AllCops:
|
|
5
|
+
DisplayCopNames: true
|
|
6
|
+
TargetRubyVersion: 2.7
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
EnforcedStyle: double_quotes
|
|
8
|
+
Naming/MethodParameterName:
|
|
9
|
+
AllowedNames: ["x", "y", "z"]
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
RSpec/EmptyLineAfterHook:
|
|
14
12
|
Enabled: false
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
Naming/RescuedExceptionsVariableName:
|
|
17
15
|
Enabled: false
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Layout/FirstArrayElementIndentation:
|
|
23
|
-
EnforcedStyle: consistent
|
|
17
|
+
Style/HashConversion:
|
|
18
|
+
Exclude:
|
|
19
|
+
- spec/**/*_spec.rb
|
data/Gemfile.lock
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
resol (0.
|
|
5
|
-
smart_initializer
|
|
6
|
-
uber
|
|
4
|
+
resol (0.2.0)
|
|
5
|
+
smart_initializer (~> 0.5)
|
|
6
|
+
uber (~> 0.1)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
+
activesupport (6.1.3.1)
|
|
12
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
13
|
+
i18n (>= 1.6, < 2)
|
|
14
|
+
minitest (>= 5.1)
|
|
15
|
+
tzinfo (~> 2.0)
|
|
16
|
+
zeitwerk (~> 2.3)
|
|
11
17
|
ast (2.4.2)
|
|
18
|
+
bundler-audit (0.8.0)
|
|
19
|
+
bundler (>= 1.2.0, < 3)
|
|
20
|
+
thor (~> 1.0)
|
|
21
|
+
ci-helper (0.4.2)
|
|
22
|
+
colorize (~> 0.8)
|
|
23
|
+
dry-inflector (~> 0.2)
|
|
24
|
+
umbrellio-sequel-plugins (~> 0.4)
|
|
12
25
|
coderay (1.1.3)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
rest-client (= 1.6.7)
|
|
16
|
-
simplecov (>= 0.7)
|
|
17
|
-
term-ansicolor (= 1.2.2)
|
|
18
|
-
thor (= 0.18.1)
|
|
26
|
+
colorize (0.8.1)
|
|
27
|
+
concurrent-ruby (1.1.8)
|
|
19
28
|
diff-lcs (1.4.4)
|
|
20
29
|
docile (1.3.5)
|
|
30
|
+
dry-inflector (0.2.0)
|
|
31
|
+
i18n (1.8.10)
|
|
32
|
+
concurrent-ruby (~> 1.0)
|
|
21
33
|
method_source (1.0.0)
|
|
22
|
-
|
|
23
|
-
mime-types-data (~> 3.2015)
|
|
24
|
-
mime-types-data (3.2021.0225)
|
|
25
|
-
multi_json (1.15.0)
|
|
34
|
+
minitest (5.14.4)
|
|
26
35
|
parallel (1.20.1)
|
|
27
36
|
parser (3.0.1.0)
|
|
28
37
|
ast (~> 2.4.1)
|
|
@@ -30,11 +39,10 @@ GEM
|
|
|
30
39
|
coderay (~> 1.1)
|
|
31
40
|
method_source (~> 1.0)
|
|
32
41
|
qonfig (0.25.0)
|
|
42
|
+
rack (2.2.3)
|
|
33
43
|
rainbow (3.0.0)
|
|
34
44
|
rake (13.0.3)
|
|
35
45
|
regexp_parser (2.1.1)
|
|
36
|
-
rest-client (1.6.7)
|
|
37
|
-
mime-types (>= 1.16)
|
|
38
46
|
rexml (3.2.5)
|
|
39
47
|
rspec (3.10.0)
|
|
40
48
|
rspec-core (~> 3.10.0)
|
|
@@ -49,23 +57,46 @@ GEM
|
|
|
49
57
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
50
58
|
rspec-support (~> 3.10.0)
|
|
51
59
|
rspec-support (3.10.2)
|
|
52
|
-
rubocop (
|
|
60
|
+
rubocop (1.11.0)
|
|
53
61
|
parallel (~> 1.10)
|
|
54
|
-
parser (>=
|
|
62
|
+
parser (>= 3.0.0.0)
|
|
55
63
|
rainbow (>= 2.2.2, < 4.0)
|
|
56
|
-
regexp_parser (>= 1.8)
|
|
64
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
57
65
|
rexml
|
|
58
|
-
rubocop-ast (>=
|
|
66
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
|
59
67
|
ruby-progressbar (~> 1.7)
|
|
60
|
-
unicode-display_width (>= 1.4.0, <
|
|
68
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
|
61
69
|
rubocop-ast (1.4.1)
|
|
62
70
|
parser (>= 2.7.1.5)
|
|
71
|
+
rubocop-config-umbrellio (1.11.0.40)
|
|
72
|
+
rubocop (= 1.11.0)
|
|
73
|
+
rubocop-performance (= 1.10.0)
|
|
74
|
+
rubocop-rails (= 2.9.1)
|
|
75
|
+
rubocop-rake (= 0.5.1)
|
|
76
|
+
rubocop-rspec (= 2.2.0)
|
|
77
|
+
rubocop-sequel (= 0.2.0)
|
|
78
|
+
rubocop-performance (1.10.0)
|
|
79
|
+
rubocop (>= 0.90.0, < 2.0)
|
|
80
|
+
rubocop-ast (>= 0.4.0)
|
|
81
|
+
rubocop-rails (2.9.1)
|
|
82
|
+
activesupport (>= 4.2.0)
|
|
83
|
+
rack (>= 1.1)
|
|
84
|
+
rubocop (>= 0.90.0, < 2.0)
|
|
85
|
+
rubocop-rake (0.5.1)
|
|
86
|
+
rubocop
|
|
87
|
+
rubocop-rspec (2.2.0)
|
|
88
|
+
rubocop (~> 1.0)
|
|
89
|
+
rubocop-ast (>= 1.1.0)
|
|
90
|
+
rubocop-sequel (0.2.0)
|
|
91
|
+
rubocop (~> 1.0)
|
|
63
92
|
ruby-progressbar (1.11.0)
|
|
93
|
+
sequel (5.43.0)
|
|
64
94
|
simplecov (0.21.2)
|
|
65
95
|
docile (~> 1.1)
|
|
66
96
|
simplecov-html (~> 0.11)
|
|
67
97
|
simplecov_json_formatter (~> 0.1)
|
|
68
98
|
simplecov-html (0.12.3)
|
|
99
|
+
simplecov-lcov (0.8.0)
|
|
69
100
|
simplecov_json_formatter (0.1.2)
|
|
70
101
|
smart_engine (0.11.0)
|
|
71
102
|
smart_initializer (0.5.0)
|
|
@@ -74,24 +105,31 @@ GEM
|
|
|
74
105
|
smart_types (~> 0.4)
|
|
75
106
|
smart_types (0.4.0)
|
|
76
107
|
smart_engine (~> 0.11)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
108
|
+
symbiont-ruby (0.6.0)
|
|
109
|
+
thor (1.1.0)
|
|
110
|
+
tzinfo (2.0.4)
|
|
111
|
+
concurrent-ruby (~> 1.0)
|
|
81
112
|
uber (0.1.0)
|
|
82
|
-
|
|
113
|
+
umbrellio-sequel-plugins (0.4.0.164)
|
|
114
|
+
sequel
|
|
115
|
+
symbiont-ruby (>= 0.6)
|
|
116
|
+
unicode-display_width (2.0.0)
|
|
117
|
+
zeitwerk (2.4.2)
|
|
83
118
|
|
|
84
119
|
PLATFORMS
|
|
85
120
|
x86_64-darwin-19
|
|
121
|
+
x86_64-linux
|
|
86
122
|
|
|
87
123
|
DEPENDENCIES
|
|
88
|
-
|
|
124
|
+
bundler-audit
|
|
125
|
+
ci-helper
|
|
89
126
|
pry
|
|
90
127
|
rake
|
|
91
128
|
resol!
|
|
92
129
|
rspec
|
|
93
|
-
rubocop
|
|
130
|
+
rubocop-config-umbrellio
|
|
94
131
|
simplecov
|
|
132
|
+
simplecov-lcov
|
|
95
133
|
|
|
96
134
|
BUNDLED WITH
|
|
97
|
-
2.2.
|
|
135
|
+
2.2.15
|
data/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Resol
|
|
2
2
|
|
|
3
|
-

|
|
4
|
+
[](https://coveralls.io/github/umbrellio/resol?branch=master)
|
|
5
|
+
[](https://badge.fury.io/rb/resol)
|
|
4
6
|
|
|
5
7
|
Ruby Gem for creating simple service objects and other any object ruby patterns.
|
|
6
8
|
|
|
@@ -70,9 +72,17 @@ Methods:
|
|
|
70
72
|
- `value!` – unwraps a result object, returns the value for success result, and throws an error for failure result
|
|
71
73
|
- `value_or(other_value, &block)` – returns a value for success result or `other_value` for failure result (either calls `block` in case it given)
|
|
72
74
|
|
|
75
|
+
|
|
76
|
+
### Configuration
|
|
77
|
+
|
|
78
|
+
Configuration constant references to `SmartCore::Initializer::Configuration`. You can read
|
|
79
|
+
about available configuration options [here](https://github.com/smart-rb/smart_initializer#configuration).
|
|
80
|
+
|
|
73
81
|
## Development
|
|
74
82
|
|
|
75
83
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/rspec` to run the tests.
|
|
84
|
+
If you want to check coverage, then set env variable `COVER` to `true` before running `bin/rspec`:
|
|
85
|
+
`COVER=true bin/rspec`.
|
|
76
86
|
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
77
87
|
|
|
78
88
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
data/bin/rubocop
CHANGED
data/lib/resol.rb
CHANGED
data/lib/resol/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,37 +1,51 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: resol
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aleksei Bespalov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-04-
|
|
11
|
+
date: 2021-04-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: smart_initializer
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0'
|
|
19
|
+
version: '0.5'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - "
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0'
|
|
26
|
+
version: '0.5'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: uber
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0.1'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0.1'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: bundler-audit
|
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
|
30
44
|
requirements:
|
|
31
45
|
- - ">="
|
|
32
46
|
- !ruby/object:Gem::Version
|
|
33
47
|
version: '0'
|
|
34
|
-
type: :
|
|
48
|
+
type: :development
|
|
35
49
|
prerelease: false
|
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
51
|
requirements:
|
|
@@ -39,7 +53,7 @@ dependencies:
|
|
|
39
53
|
- !ruby/object:Gem::Version
|
|
40
54
|
version: '0'
|
|
41
55
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
56
|
+
name: ci-helper
|
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
|
44
58
|
requirements:
|
|
45
59
|
- - ">="
|
|
@@ -95,7 +109,7 @@ dependencies:
|
|
|
95
109
|
- !ruby/object:Gem::Version
|
|
96
110
|
version: '0'
|
|
97
111
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name: rubocop
|
|
112
|
+
name: rubocop-config-umbrellio
|
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
|
100
114
|
requirements:
|
|
101
115
|
- - ">="
|
|
@@ -122,6 +136,20 @@ dependencies:
|
|
|
122
136
|
- - ">="
|
|
123
137
|
- !ruby/object:Gem::Version
|
|
124
138
|
version: '0'
|
|
139
|
+
- !ruby/object:Gem::Dependency
|
|
140
|
+
name: simplecov-lcov
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - ">="
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: '0'
|
|
146
|
+
type: :development
|
|
147
|
+
prerelease: false
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - ">="
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: '0'
|
|
125
153
|
description: Gem for creating (any) object patterns
|
|
126
154
|
email:
|
|
127
155
|
- nulldefiner@gmail.com
|
|
@@ -130,7 +158,7 @@ executables: []
|
|
|
130
158
|
extensions: []
|
|
131
159
|
extra_rdoc_files: []
|
|
132
160
|
files:
|
|
133
|
-
- ".github/workflows/
|
|
161
|
+
- ".github/workflows/test.yml"
|
|
134
162
|
- ".gitignore"
|
|
135
163
|
- ".rubocop.yml"
|
|
136
164
|
- Gemfile
|
|
@@ -158,7 +186,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
158
186
|
requirements:
|
|
159
187
|
- - ">="
|
|
160
188
|
- !ruby/object:Gem::Version
|
|
161
|
-
version: 2.
|
|
189
|
+
version: 2.7.0
|
|
162
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
191
|
requirements:
|
|
164
192
|
- - ">="
|
data/.github/workflows/main.yml
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
name: Ruby
|
|
2
|
-
|
|
3
|
-
on: [push,pull_request]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
build:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
steps:
|
|
9
|
-
- uses: actions/checkout@v2
|
|
10
|
-
|
|
11
|
-
- name: Set up Ruby
|
|
12
|
-
uses: ruby/setup-ruby@v1
|
|
13
|
-
with:
|
|
14
|
-
ruby-version: 2.7.0
|
|
15
|
-
|
|
16
|
-
- name: Bundling
|
|
17
|
-
run: |
|
|
18
|
-
gem install bundler -v 2.2.3
|
|
19
|
-
bundle install
|
|
20
|
-
|
|
21
|
-
- name: Linting
|
|
22
|
-
run: bin/rubocop
|
|
23
|
-
|
|
24
|
-
- name: Testing
|
|
25
|
-
run: COVER=1 bin/rspec
|