smart_operation 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1453c74d289398cb24928e6f6d79fdc6f0188f8c95cf2622ef31d63841bdf796
4
- data.tar.gz: 521ae1a830b8ad8674e6012d7190f79382eb7501bd181431e49e7177f00c4b72
3
+ metadata.gz: 14f28c8a76b3112f93daec6c2579d400ec4936c207a2487bd3260c2803bd42f2
4
+ data.tar.gz: ad249347e3a7975d44d05aa571fe3b84c662867708fac92b07a1d49ea2d0f4a2
5
5
  SHA512:
6
- metadata.gz: 351fb2c08fc514cf2461e7f90d51a4a8fa2cd2731ab20be006461b8edeebb0ffe4f6d2c725f40a9f56ff7b8296710f0ee3b767d6b6ecf08561cd95122b561a3a
7
- data.tar.gz: 89246f9e0c6d0a919c269f00449c82bc06b35ac00c7c549f9dda002fb13276f2563a389f49924cb17b3edc5b97210222a53154482c8c4932fb08771c67bc8e6b
6
+ metadata.gz: aeee0a512073021134779a2385e8d27b7278d63ef4ff580e049ce601425e69f61926d513f4b1c6d59fbf3238a29d671236ba006e6232aaa2df0e17382ab13ebf
7
+ data.tar.gz: 9b1eea2ffc54fa15e442fb8ad96217f6f616903f9d30ccf02beb591fe919a02bc2e9b4223f4e2b87e610e0112b2c1f77322041fbdf178013bfd00fa03c99bcd5
@@ -5,7 +5,8 @@ inherit_gem:
5
5
  - lib/rubocop.rspec.yml
6
6
 
7
7
  AllCops:
8
- TargetRubyVersion: 2.7.1
8
+ TargetRubyVersion: 3.0.0
9
+ NewCops: enable
9
10
  Include:
10
11
  - lib/**/*.rb
11
12
  - spec/**/*.rb
@@ -17,3 +18,8 @@ AllCops:
17
18
  # NOTE: It is not suitable for infrastracture-level frameworks
18
19
  Metrics/ParameterLists:
19
20
  Enabled: false
21
+
22
+ # NOTE: It is ok to use empty blocks in simple test examples (in specs)
23
+ Lint/EmptyBlock:
24
+ Exclude:
25
+ - spec/**/*.rb
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ # [0.2.0] - 2021-01-18
5
+ ## Added
6
+ - Support for **Ruby@3**;
7
+
8
+ ## Changed
9
+ - No more `TravisCI` (TODO: migrate to `GitHub Actions`);
10
+ - Updated development dependencies;
11
+ - Updated core dependencies to guarantee Ruby3 compatability;
12
+
4
13
  # [0.1.0] - 2020-07-10
5
14
  - Realease :)
@@ -2,108 +2,117 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  smart_operation (0.1.0)
5
- smart_engine (~> 0.7)
6
- smart_initializer (~> 0.2)
7
- smart_injection (~> 0.1)
5
+ smart_engine (~> 0.11)
6
+ smart_initializer (~> 0.4)
7
+ smart_injection (~> 0.2)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (6.0.3.2)
12
+ activesupport (6.1.1)
13
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
- i18n (>= 0.7, < 2)
15
- minitest (~> 5.1)
16
- tzinfo (~> 1.1)
17
- zeitwerk (~> 2.2, >= 2.2.2)
18
- armitage-rubocop (0.87.1.1)
19
- rubocop (= 0.87.1)
20
- rubocop-performance (= 1.7.0)
21
- rubocop-rails (= 2.6.0)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ zeitwerk (~> 2.3)
18
+ armitage-rubocop (1.7.0.1)
19
+ rubocop (= 1.7.0)
20
+ rubocop-performance (= 1.9.1)
21
+ rubocop-rails (= 2.9.1)
22
22
  rubocop-rake (= 0.5.1)
23
- rubocop-rspec (= 1.41.0)
23
+ rubocop-rspec (= 2.1.0)
24
24
  ast (2.4.1)
25
- concurrent-ruby (1.1.6)
25
+ coderay (1.1.3)
26
+ concurrent-ruby (1.1.7)
26
27
  diff-lcs (1.4.4)
27
- docile (1.3.2)
28
- i18n (1.8.3)
28
+ docile (1.3.5)
29
+ i18n (1.8.7)
29
30
  concurrent-ruby (~> 1.0)
30
- minitest (5.14.1)
31
- parallel (1.19.2)
32
- parser (2.7.1.4)
31
+ method_source (1.0.0)
32
+ minitest (5.14.3)
33
+ parallel (1.20.1)
34
+ parser (3.0.0.0)
33
35
  ast (~> 2.4.1)
34
- qonfig (0.24.1)
36
+ pry (0.13.1)
37
+ coderay (~> 1.1)
38
+ method_source (~> 1.0)
39
+ qonfig (0.25.0)
35
40
  rack (2.2.3)
36
41
  rainbow (3.0.0)
37
- rake (13.0.1)
38
- regexp_parser (1.7.1)
42
+ rake (13.0.3)
43
+ regexp_parser (2.0.3)
39
44
  rexml (3.2.4)
40
- rspec (3.9.0)
41
- rspec-core (~> 3.9.0)
42
- rspec-expectations (~> 3.9.0)
43
- rspec-mocks (~> 3.9.0)
44
- rspec-core (3.9.2)
45
- rspec-support (~> 3.9.3)
46
- rspec-expectations (3.9.2)
45
+ rspec (3.10.0)
46
+ rspec-core (~> 3.10.0)
47
+ rspec-expectations (~> 3.10.0)
48
+ rspec-mocks (~> 3.10.0)
49
+ rspec-core (3.10.1)
50
+ rspec-support (~> 3.10.0)
51
+ rspec-expectations (3.10.1)
47
52
  diff-lcs (>= 1.2.0, < 2.0)
48
- rspec-support (~> 3.9.0)
49
- rspec-mocks (3.9.1)
53
+ rspec-support (~> 3.10.0)
54
+ rspec-mocks (3.10.1)
50
55
  diff-lcs (>= 1.2.0, < 2.0)
51
- rspec-support (~> 3.9.0)
52
- rspec-support (3.9.3)
53
- rubocop (0.87.1)
56
+ rspec-support (~> 3.10.0)
57
+ rspec-support (3.10.1)
58
+ rubocop (1.7.0)
54
59
  parallel (~> 1.10)
55
- parser (>= 2.7.1.1)
60
+ parser (>= 2.7.1.5)
56
61
  rainbow (>= 2.2.2, < 4.0)
57
- regexp_parser (>= 1.7)
62
+ regexp_parser (>= 1.8, < 3.0)
58
63
  rexml
59
- rubocop-ast (>= 0.1.0, < 1.0)
64
+ rubocop-ast (>= 1.2.0, < 2.0)
60
65
  ruby-progressbar (~> 1.7)
61
66
  unicode-display_width (>= 1.4.0, < 2.0)
62
- rubocop-ast (0.1.0)
63
- parser (>= 2.7.0.1)
64
- rubocop-performance (1.7.0)
65
- rubocop (>= 0.82.0)
66
- rubocop-rails (2.6.0)
67
+ rubocop-ast (1.4.0)
68
+ parser (>= 2.7.1.5)
69
+ rubocop-performance (1.9.1)
70
+ rubocop (>= 0.90.0, < 2.0)
71
+ rubocop-ast (>= 0.4.0)
72
+ rubocop-rails (2.9.1)
67
73
  activesupport (>= 4.2.0)
68
74
  rack (>= 1.1)
69
- rubocop (>= 0.82.0)
75
+ rubocop (>= 0.90.0, < 2.0)
70
76
  rubocop-rake (0.5.1)
71
77
  rubocop
72
- rubocop-rspec (1.41.0)
73
- rubocop (>= 0.68.1)
74
- ruby-progressbar (1.10.1)
75
- simplecov (0.18.5)
78
+ rubocop-rspec (2.1.0)
79
+ rubocop (~> 1.0)
80
+ rubocop-ast (>= 1.1.0)
81
+ ruby-progressbar (1.11.0)
82
+ simplecov (0.21.2)
76
83
  docile (~> 1.1)
77
84
  simplecov-html (~> 0.11)
78
- simplecov-html (0.12.2)
79
- smart_container (0.8.1)
80
- smart_engine (~> 0.5)
81
- smart_engine (0.7.0)
82
- smart_initializer (0.2.0)
85
+ simplecov_json_formatter (~> 0.1)
86
+ simplecov-html (0.12.3)
87
+ simplecov_json_formatter (0.1.2)
88
+ smart_container (0.9.0)
89
+ smart_engine (~> 0.11)
90
+ smart_engine (0.11.0)
91
+ smart_initializer (0.5.0)
83
92
  qonfig (~> 0.24)
84
- smart_engine (~> 0.6)
85
- smart_types (~> 0.1.0)
86
- smart_injection (0.1.0)
87
- smart_container (~> 0.8, >= 0.8.1)
88
- smart_engine (~> 0.7)
89
- smart_types (0.1.0)
90
- smart_engine (~> 0.6)
91
- thread_safe (0.3.6)
92
- tzinfo (1.2.7)
93
- thread_safe (~> 0.1)
93
+ smart_engine (~> 0.11)
94
+ smart_types (~> 0.4)
95
+ smart_injection (0.2.0)
96
+ smart_container (~> 0.9)
97
+ smart_engine (~> 0.11)
98
+ smart_types (0.4.0)
99
+ smart_engine (~> 0.11)
100
+ tzinfo (2.0.4)
101
+ concurrent-ruby (~> 1.0)
94
102
  unicode-display_width (1.7.0)
95
- zeitwerk (2.3.1)
103
+ zeitwerk (2.4.2)
96
104
 
97
105
  PLATFORMS
98
- ruby
106
+ x86_64-darwin-20
99
107
 
100
108
  DEPENDENCIES
101
- armitage-rubocop (~> 0.87)
102
- bundler (~> 2.1)
109
+ armitage-rubocop (~> 1.7)
110
+ bundler (~> 2.2)
111
+ pry (~> 0.13)
103
112
  rake (~> 13.0)
104
- rspec (~> 3.9)
105
- simplecov (~> 0.18)
113
+ rspec (~> 3.10)
114
+ simplecov (~> 0.21)
106
115
  smart_operation!
107
116
 
108
117
  BUNDLED WITH
109
- 2.1.4
118
+ 2.2.3
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # SmartCore::Operation &middot; [![Gem Version](https://badge.fury.io/rb/smart_operation.svg)](https://badge.fury.io/rb/smart_operation) [![Build Status](https://travis-ci.org/smart-rb/smart_operation.svg?branch=master)](https://travis-ci.org/smart-rb/smart_operation)
1
+ # SmartCore::Operation &middot; [![Gem Version](https://badge.fury.io/rb/smart_operation.svg)](https://badge.fury.io/rb/smart_operation)
2
2
 
3
- Smart implementation of the most-used programming pattern - Service Object.
3
+ Smart implementation of the most-used programming pattern - Service Object. Powered by smart_injection, smart_container, smart_types and smart_initializer.
4
4
 
5
5
  > previous generation: https://github.com/0exp/smart_core
6
6
 
@@ -80,6 +80,29 @@ end
80
80
  ## Roadmap
81
81
 
82
82
  - pattern matching for result objects (`Success`, `Failure`, `Fatal`, `Callback`);
83
+ - migrate to `Github Actions`;
84
+
85
+ ---
86
+
87
+ ## Build
88
+
89
+ - run tests:
90
+
91
+ ```shell
92
+ bundle exec rspec
93
+ ```
94
+
95
+ - run code style checks:
96
+
97
+ ```shell
98
+ bundle exec rubocop
99
+ ```
100
+
101
+ - run code style checks with auto-correction:
102
+
103
+ ```shell
104
+ bundle exec rubocop -A
105
+ ```
83
106
 
84
107
  ---
85
108
 
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'bundler/setup'
5
- require 'smart_core/operation'
5
+ require 'smart_core'
6
6
 
7
- require 'irb'
8
- IRB.start(__FILE__)
7
+ require 'pry'
8
+ Pry.start
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # rubocop:disable Style/StaticClass
3
4
  class SmartCore::Operation
4
5
  # @api public
5
6
  # @since 0.1.0
@@ -13,3 +14,4 @@ class SmartCore::Operation
13
14
  # @since 0.1.0
14
15
  ResultCoreMethodOverlapError = Class.new(Error)
15
16
  end
17
+ # rubocop:enable Style/StaticClass
@@ -2,6 +2,7 @@
2
2
 
3
3
  # @api public
4
4
  # @since 0.1.0
5
+ # rubocop:disable Naming/MethodName
5
6
  module SmartCore::Operation::Interface::Result
6
7
  # @param result_attributes [Hash<Symbol,Any>]
7
8
  # @return [SmartCore::Operation::Result::Success]
@@ -39,3 +40,4 @@ module SmartCore::Operation::Interface::Result
39
40
  SmartCore::Operation::Result::Callback.new(&callback)
40
41
  end
41
42
  end
43
+ # rubocop:enable Naming/MethodName
@@ -1,11 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SmartCore
4
+ # rubocop:disable Style/StaticClass
4
5
  class Operation
5
6
  # @return [String]
6
7
  #
7
8
  # @api public
8
9
  # @since 0.1.0
9
- VERSION = '0.1.0'
10
+ # @version 0.2.0
11
+ VERSION = '0.2.0'
10
12
  end
13
+ # rubocop:enable Style/StaticClass
11
14
  end
@@ -15,9 +15,12 @@ Gem::Specification.new do |spec|
15
15
  spec.homepage = 'https://github.com/smart-rb/smart_operation'
16
16
  spec.license = 'MIT'
17
17
 
18
- spec.metadata['homepage_uri'] = spec.homepage
19
- spec.metadata['source_code_uri'] = 'https://github.com/smart-rb/smart_operation'
20
- spec.metadata['changelog_uri'] = 'https://github.com/smart-rb/smart_operation/blob/master/CHANGELOG.md'
18
+ spec.metadata['homepage_uri'] =
19
+ spec.homepage
20
+ spec.metadata['source_code_uri'] =
21
+ 'https://github.com/smart-rb/smart_operation'
22
+ spec.metadata['changelog_uri'] =
23
+ 'https://github.com/smart-rb/smart_operation/blob/master/CHANGELOG.md'
21
24
 
22
25
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
26
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -27,13 +30,14 @@ Gem::Specification.new do |spec|
27
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
31
  spec.require_paths = ['lib']
29
32
 
30
- spec.add_dependency 'smart_injection', '~> 0.1'
31
- spec.add_dependency 'smart_engine', '~> 0.7'
32
- spec.add_dependency 'smart_initializer', '~> 0.2'
33
+ spec.add_dependency 'smart_injection', '~> 0.2'
34
+ spec.add_dependency 'smart_engine', '~> 0.11'
35
+ spec.add_dependency 'smart_initializer', '~> 0.4'
33
36
 
34
- spec.add_development_dependency 'bundler', '~> 2.1'
37
+ spec.add_development_dependency 'bundler', '~> 2.2'
35
38
  spec.add_development_dependency 'rake', '~> 13.0'
36
- spec.add_development_dependency 'rspec', '~> 3.9'
37
- spec.add_development_dependency 'armitage-rubocop', '~> 0.87'
38
- spec.add_development_dependency 'simplecov', '~> 0.18'
39
+ spec.add_development_dependency 'rspec', '~> 3.10'
40
+ spec.add_development_dependency 'armitage-rubocop', '~> 1.7'
41
+ spec.add_development_dependency 'simplecov', '~> 0.21'
42
+ spec.add_development_dependency 'pry', '~> 0.13'
39
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_operation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rustam Ibragimov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-10 00:00:00.000000000 Z
11
+ date: 2021-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: smart_injection
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.1'
19
+ version: '0.2'
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.1'
26
+ version: '0.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: smart_engine
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.7'
33
+ version: '0.11'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.7'
40
+ version: '0.11'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: smart_initializer
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.2'
47
+ version: '0.4'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.2'
54
+ version: '0.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.1'
61
+ version: '2.2'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '2.1'
68
+ version: '2.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,42 +86,56 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.9'
89
+ version: '3.10'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.9'
96
+ version: '3.10'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: armitage-rubocop
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.87'
103
+ version: '1.7'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.87'
110
+ version: '1.7'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0.18'
117
+ version: '0.21'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.21'
125
+ - !ruby/object:Gem::Dependency
126
+ name: pry
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.13'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: '0.18'
138
+ version: '0.13'
125
139
  description: Smart implementation of the most-used programming pattern - Service Object
126
140
  email:
127
141
  - iamdaiver@gmail.com
@@ -132,7 +146,6 @@ files:
132
146
  - ".gitignore"
133
147
  - ".rspec"
134
148
  - ".rubocop.yml"
135
- - ".travis.yml"
136
149
  - CHANGELOG.md
137
150
  - CODE_OF_CONDUCT.md
138
151
  - Gemfile
@@ -171,7 +184,7 @@ metadata:
171
184
  homepage_uri: https://github.com/smart-rb/smart_operation
172
185
  source_code_uri: https://github.com/smart-rb/smart_operation
173
186
  changelog_uri: https://github.com/smart-rb/smart_operation/blob/master/CHANGELOG.md
174
- post_install_message:
187
+ post_install_message:
175
188
  rdoc_options: []
176
189
  require_paths:
177
190
  - lib
@@ -186,8 +199,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
199
  - !ruby/object:Gem::Version
187
200
  version: '0'
188
201
  requirements: []
189
- rubygems_version: 3.1.2
190
- signing_key:
202
+ rubygems_version: 3.2.3
203
+ signing_key:
191
204
  specification_version: 4
192
205
  summary: Service Object (Operation, Functional Object, Domain Service)
193
206
  test_files: []
@@ -1,21 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- os: linux
5
- dist: xenial
6
- before_install: gem install bundler
7
- script:
8
- - bundle exec rake rubocop
9
- - bundle exec rake rspec
10
- jobs:
11
- fast_finish: true
12
- include:
13
- - rvm: 2.4.10
14
- - rvm: 2.5.8
15
- - rvm: 2.6.6
16
- - rvm: 2.7.1
17
- - rvm: ruby-head
18
- - rvm: jruby-head
19
- allow_failures:
20
- - rvm: ruby-head
21
- - rvm: jruby-head