light-services 0.6.3 → 2.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.github/config/rubocop_linter_action.yml +4 -0
  3. data/.github/workflows/ci.yml +63 -0
  4. data/.gitignore +11 -4
  5. data/.rspec +1 -0
  6. data/.rubocop.yml +22 -8
  7. data/CHANGELOG.md +1 -0
  8. data/CODE_OF_CONDUCT.md +55 -30
  9. data/Gemfile +16 -2
  10. data/Gemfile.lock +102 -0
  11. data/LICENSE.txt +1 -1
  12. data/README.md +3 -149
  13. data/Rakefile +2 -2
  14. data/bin/console +4 -4
  15. data/lib/light/services.rb +4 -7
  16. data/lib/light/services/base.rb +151 -30
  17. data/lib/light/services/base_with_context.rb +33 -0
  18. data/lib/light/services/class_based_collection/base.rb +88 -0
  19. data/lib/light/services/class_based_collection/mount.rb +33 -0
  20. data/lib/light/services/collection/arguments.rb +34 -0
  21. data/lib/light/services/collection/base.rb +55 -0
  22. data/lib/light/services/collection/outputs.rb +16 -0
  23. data/lib/light/services/config.rb +63 -0
  24. data/lib/light/services/exceptions.rb +3 -2
  25. data/lib/light/services/messages.rb +67 -45
  26. data/lib/light/services/settings/argument.rb +50 -0
  27. data/lib/light/services/settings/output.rb +34 -0
  28. data/lib/light/services/settings/step.rb +77 -0
  29. data/lib/light/services/version.rb +1 -1
  30. data/light-services.gemspec +21 -25
  31. metadata +28 -122
  32. data/.codeclimate.yml +0 -18
  33. data/.ruby-gemset +0 -1
  34. data/.ruby-version +0 -1
  35. data/.travis.yml +0 -33
  36. data/Appraisals +0 -13
  37. data/gemfiles/rails_5_0.gemfile +0 -7
  38. data/gemfiles/rails_5_0.gemfile.lock +0 -151
  39. data/gemfiles/rails_5_1.gemfile +0 -7
  40. data/gemfiles/rails_5_1.gemfile.lock +0 -151
  41. data/gemfiles/rails_5_2.gemfile +0 -7
  42. data/gemfiles/rails_5_2.gemfile.lock +0 -159
  43. data/lib/light/services/callbacks.rb +0 -54
  44. data/lib/light/services/outputs.rb +0 -70
  45. data/lib/light/services/parameters.rb +0 -96
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Light
4
4
  module Services
5
- VERSION = '0.6.3'
5
+ VERSION = "2.0.0.rc3"
6
6
  end
7
7
  end
@@ -1,36 +1,32 @@
1
- # encoding: utf-8
2
1
  # frozen_string_literal: true
3
2
 
4
- lib = File.expand_path('../lib', __FILE__)
5
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
-
7
- require 'light/services/version'
3
+ require_relative "lib/light/services/version"
8
4
 
9
5
  Gem::Specification.new do |spec|
10
- spec.name = 'light-services'
6
+ spec.name = "light-services"
11
7
  spec.version = Light::Services::VERSION
12
- spec.authors = ['Andrew Emelianenko']
13
- spec.email = ['emelianenko.web@gmail.com']
8
+ spec.authors = ["Andrew Emelianenko"]
9
+ spec.email = ["emelianenko.web@gmail.com"]
14
10
 
15
- spec.summary = 'Light pattern Services Object for Ruby/Rails'
16
- spec.description = 'Light pattern Services Object for Ruby/Rails from Light Ruby'
17
- spec.homepage = 'https://github.com/light-ruby/light-services'
18
- spec.license = 'MIT'
11
+ spec.summary = "Powerful implementation of Service Object pattern for Ruby and Rails"
12
+ spec.description = "Powerful implementation of Service Object pattern for Ruby and Rails"
13
+ spec.homepage = "https://github.com/light-ruby/light-services"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
19
16
 
20
- spec.files = `git ls-files -z`
21
- .split("\x0")
22
- .reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
23
18
 
24
- spec.bindir = 'exe'
25
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
- spec.require_paths = ['lib']
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/light-ruby/light-services"
21
+ spec.metadata["changelog_uri"] = "https://github.com/light-ruby/light-services/blob/master/CHANGELOG.md"
27
22
 
28
- spec.add_dependency 'rails', '> 5.0'
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
27
+ end
29
28
 
30
- spec.add_development_dependency 'bundler', '~> 2.0'
31
- spec.add_development_dependency 'rake', '~> 10.0'
32
- spec.add_development_dependency 'appraisal', '~> 2.1'
33
- spec.add_development_dependency 'rspec', '~> 3.0'
34
- spec.add_development_dependency 'simplecov', '~> 0.11.2'
35
- spec.add_development_dependency 'codeclimate-test-reporter'
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
36
32
  end
metadata CHANGED
@@ -1,154 +1,60 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: light-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 2.0.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Emelianenko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-14 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rails
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">"
18
- - !ruby/object:Gem::Version
19
- version: '5.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">"
25
- - !ruby/object:Gem::Version
26
- version: '5.0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '2.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '2.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '10.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '10.0'
55
- - !ruby/object:Gem::Dependency
56
- name: appraisal
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '2.1'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '2.1'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '3.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '3.0'
83
- - !ruby/object:Gem::Dependency
84
- name: simplecov
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 0.11.2
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 0.11.2
97
- - !ruby/object:Gem::Dependency
98
- name: codeclimate-test-reporter
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- description: Light pattern Services Object for Ruby/Rails from Light Ruby
11
+ date: 2021-07-25 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Powerful implementation of Service Object pattern for Ruby and Rails
112
14
  email:
113
15
  - emelianenko.web@gmail.com
114
16
  executables: []
115
17
  extensions: []
116
18
  extra_rdoc_files: []
117
19
  files:
118
- - ".codeclimate.yml"
20
+ - ".github/config/rubocop_linter_action.yml"
21
+ - ".github/workflows/ci.yml"
119
22
  - ".gitignore"
120
23
  - ".rspec"
121
24
  - ".rubocop.yml"
122
- - ".ruby-gemset"
123
- - ".ruby-version"
124
- - ".travis.yml"
125
- - Appraisals
25
+ - CHANGELOG.md
126
26
  - CODE_OF_CONDUCT.md
127
27
  - Gemfile
28
+ - Gemfile.lock
128
29
  - LICENSE.txt
129
30
  - README.md
130
31
  - Rakefile
131
32
  - bin/console
132
33
  - bin/setup
133
- - gemfiles/rails_5_0.gemfile
134
- - gemfiles/rails_5_0.gemfile.lock
135
- - gemfiles/rails_5_1.gemfile
136
- - gemfiles/rails_5_1.gemfile.lock
137
- - gemfiles/rails_5_2.gemfile
138
- - gemfiles/rails_5_2.gemfile.lock
139
34
  - lib/light/services.rb
140
35
  - lib/light/services/base.rb
141
- - lib/light/services/callbacks.rb
36
+ - lib/light/services/base_with_context.rb
37
+ - lib/light/services/class_based_collection/base.rb
38
+ - lib/light/services/class_based_collection/mount.rb
39
+ - lib/light/services/collection/arguments.rb
40
+ - lib/light/services/collection/base.rb
41
+ - lib/light/services/collection/outputs.rb
42
+ - lib/light/services/config.rb
142
43
  - lib/light/services/exceptions.rb
143
44
  - lib/light/services/messages.rb
144
- - lib/light/services/outputs.rb
145
- - lib/light/services/parameters.rb
45
+ - lib/light/services/settings/argument.rb
46
+ - lib/light/services/settings/output.rb
47
+ - lib/light/services/settings/step.rb
146
48
  - lib/light/services/version.rb
147
49
  - light-services.gemspec
148
50
  homepage: https://github.com/light-ruby/light-services
149
51
  licenses:
150
52
  - MIT
151
- metadata: {}
53
+ metadata:
54
+ allowed_push_host: https://rubygems.org
55
+ homepage_uri: https://github.com/light-ruby/light-services
56
+ source_code_uri: https://github.com/light-ruby/light-services
57
+ changelog_uri: https://github.com/light-ruby/light-services/blob/master/CHANGELOG.md
152
58
  post_install_message:
153
59
  rdoc_options: []
154
60
  require_paths:
@@ -157,15 +63,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
157
63
  requirements:
158
64
  - - ">="
159
65
  - !ruby/object:Gem::Version
160
- version: '0'
66
+ version: 2.3.0
161
67
  required_rubygems_version: !ruby/object:Gem::Requirement
162
68
  requirements:
163
- - - ">="
69
+ - - ">"
164
70
  - !ruby/object:Gem::Version
165
- version: '0'
71
+ version: 1.3.1
166
72
  requirements: []
167
- rubygems_version: 3.0.1
73
+ rubygems_version: 3.1.2
168
74
  signing_key:
169
75
  specification_version: 4
170
- summary: Light pattern Services Object for Ruby/Rails
76
+ summary: Powerful implementation of Service Object pattern for Ruby and Rails
171
77
  test_files: []
data/.codeclimate.yml DELETED
@@ -1,18 +0,0 @@
1
- ---
2
- engines:
3
- duplication:
4
- enabled: true
5
- config:
6
- languages:
7
- - ruby
8
- fixme:
9
- enabled: true
10
- rubocop:
11
- enabled: true
12
-
13
- ratings:
14
- paths:
15
- - "**.rb"
16
-
17
- exclude_paths:
18
- - spec/
data/.ruby-gemset DELETED
@@ -1 +0,0 @@
1
- light-services
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.6.1
data/.travis.yml DELETED
@@ -1,33 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.5.1
5
-
6
- env:
7
- global:
8
- - CC_TEST_REPORTER_ID=dedf6049120e32b166263dd9e07b2abea3991a18b2d0c8dc86792776ca7578ce
9
- - GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
10
-
11
- before_script:
12
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
13
- - chmod +x ./cc-test-reporter
14
- - ./cc-test-reporter before-build
15
-
16
- before_install: gem install bundler
17
-
18
- gemfile:
19
- - gemfiles/rails_5_0.gemfile
20
- - gemfiles/rails_5_1.gemfile
21
- - gemfiles/rails_5_2.gemfile
22
-
23
- script:
24
- - bundle exec rake
25
-
26
- after_script:
27
- # Preferably you will run test-reporter on branch update events. But
28
- # if you setup travis to build PR updates only, you don't need to run
29
- # the line below
30
- - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
31
- # In the case where travis is setup to build PR updates only,
32
- # uncomment the line below
33
- # - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/Appraisals DELETED
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- appraise 'rails-5-0' do
4
- gem 'rails', '5.0.7.2'
5
- end
6
-
7
- appraise 'rails-5-1' do
8
- gem 'rails', '5.1.7'
9
- end
10
-
11
- appraise 'rails-5-2' do
12
- gem 'rails', '5.2.3'
13
- end
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "5.0.7.2"
6
-
7
- gemspec path: "../"
@@ -1,151 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- light-services (0.6.3)
5
- rails (> 5.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actioncable (5.0.7.2)
11
- actionpack (= 5.0.7.2)
12
- nio4r (>= 1.2, < 3.0)
13
- websocket-driver (~> 0.6.1)
14
- actionmailer (5.0.7.2)
15
- actionpack (= 5.0.7.2)
16
- actionview (= 5.0.7.2)
17
- activejob (= 5.0.7.2)
18
- mail (~> 2.5, >= 2.5.4)
19
- rails-dom-testing (~> 2.0)
20
- actionpack (5.0.7.2)
21
- actionview (= 5.0.7.2)
22
- activesupport (= 5.0.7.2)
23
- rack (~> 2.0)
24
- rack-test (~> 0.6.3)
25
- rails-dom-testing (~> 2.0)
26
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
- actionview (5.0.7.2)
28
- activesupport (= 5.0.7.2)
29
- builder (~> 3.1)
30
- erubis (~> 2.7.0)
31
- rails-dom-testing (~> 2.0)
32
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
33
- activejob (5.0.7.2)
34
- activesupport (= 5.0.7.2)
35
- globalid (>= 0.3.6)
36
- activemodel (5.0.7.2)
37
- activesupport (= 5.0.7.2)
38
- activerecord (5.0.7.2)
39
- activemodel (= 5.0.7.2)
40
- activesupport (= 5.0.7.2)
41
- arel (~> 7.0)
42
- activesupport (5.0.7.2)
43
- concurrent-ruby (~> 1.0, >= 1.0.2)
44
- i18n (>= 0.7, < 2)
45
- minitest (~> 5.1)
46
- tzinfo (~> 1.1)
47
- appraisal (2.2.0)
48
- bundler
49
- rake
50
- thor (>= 0.14.0)
51
- arel (7.1.4)
52
- builder (3.2.3)
53
- codeclimate-test-reporter (1.0.8)
54
- simplecov (<= 0.13)
55
- concurrent-ruby (1.1.5)
56
- crass (1.0.4)
57
- diff-lcs (1.3)
58
- docile (1.1.5)
59
- erubis (2.7.0)
60
- globalid (0.4.2)
61
- activesupport (>= 4.2.0)
62
- i18n (1.6.0)
63
- concurrent-ruby (~> 1.0)
64
- json (1.8.6)
65
- loofah (2.2.3)
66
- crass (~> 1.0.2)
67
- nokogiri (>= 1.5.9)
68
- mail (2.7.1)
69
- mini_mime (>= 0.1.1)
70
- method_source (0.9.2)
71
- mini_mime (1.0.2)
72
- mini_portile2 (2.4.0)
73
- minitest (5.11.3)
74
- nio4r (2.4.0)
75
- nokogiri (1.10.4)
76
- mini_portile2 (~> 2.4.0)
77
- rack (2.0.7)
78
- rack-test (0.6.3)
79
- rack (>= 1.0)
80
- rails (5.0.7.2)
81
- actioncable (= 5.0.7.2)
82
- actionmailer (= 5.0.7.2)
83
- actionpack (= 5.0.7.2)
84
- actionview (= 5.0.7.2)
85
- activejob (= 5.0.7.2)
86
- activemodel (= 5.0.7.2)
87
- activerecord (= 5.0.7.2)
88
- activesupport (= 5.0.7.2)
89
- bundler (>= 1.3.0)
90
- railties (= 5.0.7.2)
91
- sprockets-rails (>= 2.0.0)
92
- rails-dom-testing (2.0.3)
93
- activesupport (>= 4.2.0)
94
- nokogiri (>= 1.6)
95
- rails-html-sanitizer (1.2.0)
96
- loofah (~> 2.2, >= 2.2.2)
97
- railties (5.0.7.2)
98
- actionpack (= 5.0.7.2)
99
- activesupport (= 5.0.7.2)
100
- method_source
101
- rake (>= 0.8.7)
102
- thor (>= 0.18.1, < 2.0)
103
- rake (10.5.0)
104
- rspec (3.6.0)
105
- rspec-core (~> 3.6.0)
106
- rspec-expectations (~> 3.6.0)
107
- rspec-mocks (~> 3.6.0)
108
- rspec-core (3.6.0)
109
- rspec-support (~> 3.6.0)
110
- rspec-expectations (3.6.0)
111
- diff-lcs (>= 1.2.0, < 2.0)
112
- rspec-support (~> 3.6.0)
113
- rspec-mocks (3.6.0)
114
- diff-lcs (>= 1.2.0, < 2.0)
115
- rspec-support (~> 3.6.0)
116
- rspec-support (3.6.0)
117
- simplecov (0.11.2)
118
- docile (~> 1.1.0)
119
- json (~> 1.8)
120
- simplecov-html (~> 0.10.0)
121
- simplecov-html (0.10.2)
122
- sprockets (3.7.2)
123
- concurrent-ruby (~> 1.0)
124
- rack (> 1, < 3)
125
- sprockets-rails (3.2.1)
126
- actionpack (>= 4.0)
127
- activesupport (>= 4.0)
128
- sprockets (>= 3.0.0)
129
- thor (0.20.0)
130
- thread_safe (0.3.6)
131
- tzinfo (1.2.5)
132
- thread_safe (~> 0.1)
133
- websocket-driver (0.6.5)
134
- websocket-extensions (>= 0.1.0)
135
- websocket-extensions (0.1.4)
136
-
137
- PLATFORMS
138
- ruby
139
-
140
- DEPENDENCIES
141
- appraisal (~> 2.1)
142
- bundler (~> 2.0)
143
- codeclimate-test-reporter
144
- light-services!
145
- rails (= 5.0.7.2)
146
- rake (~> 10.0)
147
- rspec (~> 3.0)
148
- simplecov (~> 0.11.2)
149
-
150
- BUNDLED WITH
151
- 2.0.2