resol 0.1.0 → 0.4.1

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: f71f97e92852c4b25525cf1388c8cc671bc5587d7535fa844e3a681c686c14d1
4
- data.tar.gz: 996140397a4d0c0bd04a426c30f0da88a423495e9e80715e2722a1089fd3656e
3
+ metadata.gz: 33dbd02433c7393f8d8f266c695d200183c89353a8b7a8c88ead39fe440e6adf
4
+ data.tar.gz: aba889493d6a145d47f34a9aebd85a86802b6e132383fbaf59a1e53e6c814609
5
5
  SHA512:
6
- metadata.gz: 638959dfb203d736a85c79c3c271b716d08be263e88b8509210ff712715f12fddcfd27d2600dfbee1e0cf39fd84b89def3a0ee1323bb27451d90cbb407cc8edb
7
- data.tar.gz: 1b89eb69a71e3d43da7520e4f90789b7e6b2a33716dabc9b163a8d6fc1ce70a424c40430b5e982ee3adec3e7fd0fed1c17921adf1f1e1706199febaa7f8fbcfd
6
+ metadata.gz: 34cc31c049d23bceb945518162b725fc919bd3aae6746d58a90038fe6d678d9ab5c8b4060d6e39a3ae248974973768c97f4ffe5abdcde49bad922081dc6dbf2f
7
+ data.tar.gz: aa8c2b3c450dc5b23314a53ed3c65fd662ce3e880b15ca6ab271b5f99a0e05229659c43fd6793ae47b0c7a99f53bcec2541ea025897075cc60ddedda970c1857
@@ -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/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ *.gem
data/.rubocop.yml CHANGED
@@ -1,23 +1,19 @@
1
- AllCops:
2
- TargetRubyVersion: 2.6
3
- NewCops: enable
1
+ inherit_gem:
2
+ rubocop-config-umbrellio: lib/rubocop.yml
4
3
 
5
- Style/StringLiterals:
6
- Enabled: true
7
- EnforcedStyle: double_quotes
4
+ AllCops:
5
+ DisplayCopNames: true
6
+ TargetRubyVersion: 2.7
8
7
 
9
- Style/StringLiteralsInInterpolation:
10
- Enabled: true
11
- EnforcedStyle: double_quotes
8
+ Naming/MethodParameterName:
9
+ AllowedNames: ["x", "y", "z"]
12
10
 
13
- Style/RaiseArgs:
11
+ RSpec/EmptyLineAfterHook:
14
12
  Enabled: false
15
13
 
16
- Style/Documentation:
14
+ Naming/RescuedExceptionsVariableName:
17
15
  Enabled: false
18
16
 
19
- Layout/LineLength:
20
- Max: 100
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.1.0)
5
- smart_initializer
6
- uber
4
+ resol (0.4.1)
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
- coveralls (0.7.2)
14
- multi_json (~> 1.3)
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
- mime-types (3.3.1)
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 (0.93.1)
60
+ rubocop (1.11.0)
53
61
  parallel (~> 1.10)
54
- parser (>= 2.7.1.5)
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 (>= 0.6.0)
66
+ rubocop-ast (>= 1.2.0, < 2.0)
59
67
  ruby-progressbar (~> 1.7)
60
- unicode-display_width (>= 1.4.0, < 2.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,32 @@ GEM
74
105
  smart_types (~> 0.4)
75
106
  smart_types (0.4.0)
76
107
  smart_engine (~> 0.11)
77
- term-ansicolor (1.2.2)
78
- tins (~> 0.8)
79
- thor (0.18.1)
80
- tins (0.13.2)
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
- unicode-display_width (1.7.0)
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-darwin-20
122
+ x86_64-linux
86
123
 
87
124
  DEPENDENCIES
88
- coveralls
125
+ bundler-audit
126
+ ci-helper
89
127
  pry
90
128
  rake
91
129
  resol!
92
130
  rspec
93
- rubocop
131
+ rubocop-config-umbrellio
94
132
  simplecov
133
+ simplecov-lcov
95
134
 
96
135
  BUNDLED WITH
97
- 2.2.3
136
+ 2.2.19
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Resol
2
2
 
3
- ![https://github.com/umbrellio/resol](https://github.com/umbrellio/resol/actions/workflows/main.yml/badge.svg)
3
+ ![https://github.com/umbrellio/resol](https://github.com/umbrellio/resol/actions/workflows/test.yml/badge.svg)
4
+ [![Coverage Status](https://coveralls.io/repos/github/umbrellio/resol/badge.svg?branch=master)](https://coveralls.io/github/umbrellio/resol?branch=master)
5
+ [![Gem Version](https://badge.fury.io/rb/resol.svg)](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
 
@@ -61,6 +63,34 @@ All incoming params and options can be defined using a [smart_initializer](https
61
63
  - `success!(value)` – finish with a success value
62
64
  - `fail!(code, data = nil)` – fail with any error code and optional data
63
65
 
66
+ #### Define callbacks
67
+
68
+ You can define callbacks to be executed before calling the `#call` method.
69
+
70
+ ```ruby
71
+ class FindUser < Resol::Service
72
+ param :id
73
+
74
+ before_call :set_user
75
+
76
+ def call
77
+ if user
78
+ success!(user)
79
+ else
80
+ fail!(:not_found)
81
+ end
82
+ end
83
+
84
+ private
85
+
86
+ attr_accessor :user
87
+
88
+ def set_user
89
+ self.user = User.find(id)
90
+ end
91
+ end
92
+ ```
93
+
64
94
  ### Result objects
65
95
 
66
96
  Methods:
@@ -69,10 +99,20 @@ Methods:
69
99
  - `failure?` – returns `true` for failure result and `false` for success result
70
100
  - `value!` – unwraps a result object, returns the value for success result, and throws an error for failure result
71
101
  - `value_or(other_value, &block)` – returns a value for success result or `other_value` for failure result (either calls `block` in case it given)
102
+ - `or(&block)` - calls block for failure result, for success result does nothing
103
+ - `either(success_proc, failure_proc)` - for success result calls success_proc with result value in args, for failure result calls failure_proc with error in args.
104
+
105
+
106
+ ### Configuration
107
+
108
+ Configuration constant references to `SmartCore::Initializer::Configuration`. You can read
109
+ about available configuration options [here](https://github.com/smart-rb/smart_initializer#configuration).
72
110
 
73
111
  ## Development
74
112
 
75
113
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/rspec` to run the tests.
114
+ If you want to check coverage, then set env variable `COVER` to `true` before running `bin/rspec`:
115
+ `COVER=true bin/rspec`.
76
116
  You can also run `bin/console` for an interactive prompt that will allow you to experiment.
77
117
 
78
118
  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
@@ -3,4 +3,4 @@ set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
- bundle exec rubocop
6
+ bundle exec rubocop $@
data/lib/resol.rb CHANGED
@@ -7,4 +7,5 @@ require_relative "resol/version"
7
7
  require_relative "resol/service"
8
8
 
9
9
  module Resol
10
+ Configuration = SmartCore::Initializer::Configuration
10
11
  end
data/lib/resol/builder.rb CHANGED
@@ -8,11 +8,11 @@ module Resol
8
8
  end
9
9
 
10
10
  module ClassMethods
11
- def build_klass(*args, **kwargs)
11
+ def build_klass(...)
12
12
  klass = self
13
13
 
14
14
  loop do
15
- new_klass = klass.build!(klass, *args, **kwargs)
15
+ new_klass = klass.build!(klass, ...)
16
16
  break if new_klass == klass
17
17
 
18
18
  klass = new_klass
@@ -21,8 +21,8 @@ module Resol
21
21
  klass
22
22
  end
23
23
 
24
- def build(*args)
25
- build_klass(*args).new(*args)
24
+ def build(...)
25
+ build_klass(...).new(...)
26
26
  end
27
27
  end
28
28
  end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Resol
4
+ module Callbacks
5
+ def self.included(base)
6
+ base.extend(ClassMethods)
7
+ base.instance_variable_set(:@__callback_methods__, [])
8
+ end
9
+
10
+ module ClassMethods
11
+ def inherited(subclass)
12
+ super
13
+ subclass.instance_variable_set(:@__callback_methods__, @__callback_methods__.dup)
14
+ end
15
+
16
+ def before_call(method_name)
17
+ @__callback_methods__ << method_name
18
+ end
19
+
20
+ private
21
+
22
+ def __run_callbacks__(instance)
23
+ @__callback_methods__.each { |method_name| instance.__send__(method_name) }
24
+ end
25
+ end
26
+ end
27
+ end
data/lib/resol/result.rb CHANGED
@@ -10,6 +10,14 @@ module Resol
10
10
  # @!method value!
11
11
 
12
12
  def initialize(*); end
13
+
14
+ def or
15
+ yield(@value) if failure?
16
+ end
17
+
18
+ def either(success_proc, failure_proc)
19
+ success? ? success_proc.call(@value) : failure_proc.call(@value)
20
+ end
13
21
  end
14
22
 
15
23
  class Success < Result
@@ -62,11 +70,11 @@ module Resol
62
70
  end
63
71
  end
64
72
 
65
- def self.Success(*args)
66
- Success.new(*args)
73
+ def self.Success(...)
74
+ Success.new(...)
67
75
  end
68
76
 
69
- def self.Failure(*args)
70
- Failure.new(*args)
77
+ def self.Failure(...)
78
+ Failure.new(...)
71
79
  end
72
80
  end
data/lib/resol/service.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "builder"
4
+ require_relative "callbacks"
4
5
  require_relative "result"
5
6
 
6
7
  module Resol
@@ -41,6 +42,7 @@ module Resol
41
42
 
42
43
  include SmartCore::Initializer
43
44
  include Resol::Builder
45
+ include Resol::Callbacks
44
46
 
45
47
  class << self
46
48
  def inherited(klass)
@@ -49,8 +51,9 @@ module Resol
49
51
  super
50
52
  end
51
53
 
52
- def call(*args, **options, &block)
53
- command = build(*args, **options)
54
+ def call(*args, **kwargs, &block)
55
+ command = build(*args, **kwargs)
56
+ __run_callbacks__(command)
54
57
  command.call(&block)
55
58
 
56
59
  error_message = "No success! or fail! called in the #call method in #{command.class}"
@@ -61,8 +64,8 @@ module Resol
61
64
  Resol::Failure(e)
62
65
  end
63
66
 
64
- def call!(*args)
65
- call(*args).value_or { |error| raise error }
67
+ def call!(...)
68
+ call(...).value_or { |error| raise error }
66
69
  end
67
70
  end
68
71
 
data/lib/resol/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Resol
4
- VERSION = "0.1.0"
4
+ VERSION = "0.4.1"
5
5
  end
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.1.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksei Bespalov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-08 00:00:00.000000000 Z
11
+ date: 2021-06-18 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: :runtime
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: coveralls
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/main.yml"
161
+ - ".github/workflows/test.yml"
134
162
  - ".gitignore"
135
163
  - ".rubocop.yml"
136
164
  - Gemfile
@@ -143,6 +171,7 @@ files:
143
171
  - bin/setup
144
172
  - lib/resol.rb
145
173
  - lib/resol/builder.rb
174
+ - lib/resol/callbacks.rb
146
175
  - lib/resol/result.rb
147
176
  - lib/resol/service.rb
148
177
  - lib/resol/version.rb
@@ -150,7 +179,7 @@ homepage: https://github.com/umbrellio/resol
150
179
  licenses:
151
180
  - MIT
152
181
  metadata: {}
153
- post_install_message:
182
+ post_install_message:
154
183
  rdoc_options: []
155
184
  require_paths:
156
185
  - lib
@@ -158,15 +187,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
187
  requirements:
159
188
  - - ">="
160
189
  - !ruby/object:Gem::Version
161
- version: 2.6.0
190
+ version: 2.7.0
162
191
  required_rubygems_version: !ruby/object:Gem::Requirement
163
192
  requirements:
164
193
  - - ">="
165
194
  - !ruby/object:Gem::Version
166
195
  version: '0'
167
196
  requirements: []
168
- rubygems_version: 3.1.2
169
- signing_key:
197
+ rubygems_version: 3.2.15
198
+ signing_key:
170
199
  specification_version: 4
171
200
  summary: Gem for creating (any) object patterns
172
201
  test_files: []
@@ -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