light-services 0.5.4 → 2.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +5 -5
  2. data/.github/config/rubocop_linter_action.yml +4 -0
  3. data/.github/workflows/ci.yml +63 -0
  4. data/.gitignore +3 -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 +101 -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 +127 -27
  17. data/lib/light/services/base_with_context.rb +32 -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 +47 -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 +77 -34
  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 +62 -0
  29. data/lib/light/services/version.rb +1 -1
  30. data/light-services.gemspec +21 -24
  31. metadata +34 -127
  32. data/.codeclimate.yml +0 -16
  33. data/.ruby-gemset +0 -1
  34. data/.travis.yml +0 -29
  35. data/Appraisals +0 -21
  36. data/gemfiles/rails_4_0.gemfile +0 -7
  37. data/gemfiles/rails_4_0.gemfile.lock +0 -115
  38. data/gemfiles/rails_4_1.gemfile +0 -7
  39. data/gemfiles/rails_4_1.gemfile.lock +0 -119
  40. data/gemfiles/rails_4_2.gemfile +0 -7
  41. data/gemfiles/rails_4_2.gemfile.lock +0 -146
  42. data/gemfiles/rails_5_0.gemfile +0 -7
  43. data/gemfiles/rails_5_0.gemfile.lock +0 -150
  44. data/gemfiles/rails_5_1.gemfile +0 -7
  45. data/gemfiles/rails_5_1.gemfile.lock +0 -150
  46. data/lib/light/services/callbacks.rb +0 -54
  47. data/lib/light/services/outputs.rb +0 -70
  48. data/lib/light/services/parameters.rb +0 -96
metadata CHANGED
@@ -1,158 +1,66 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: light-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 2.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Emelianenko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-22 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: '4.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">"
25
- - !ruby/object:Gem::Version
26
- version: '4.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: '1.12'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.12'
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: 2020-07-22 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"
23
+ - ".idea/.gitignore"
24
+ - ".idea/inspectionProfiles/Project_Default.xml"
25
+ - ".idea/light-services.iml"
26
+ - ".idea/misc.xml"
27
+ - ".idea/modules.xml"
28
+ - ".idea/vcs.xml"
120
29
  - ".rspec"
121
30
  - ".rubocop.yml"
122
- - ".ruby-gemset"
123
- - ".ruby-version"
124
- - ".travis.yml"
125
- - Appraisals
31
+ - CHANGELOG.md
126
32
  - CODE_OF_CONDUCT.md
127
33
  - Gemfile
34
+ - Gemfile.lock
128
35
  - LICENSE.txt
129
36
  - README.md
130
37
  - Rakefile
131
38
  - bin/console
132
39
  - bin/setup
133
- - gemfiles/rails_4_0.gemfile
134
- - gemfiles/rails_4_0.gemfile.lock
135
- - gemfiles/rails_4_1.gemfile
136
- - gemfiles/rails_4_1.gemfile.lock
137
- - gemfiles/rails_4_2.gemfile
138
- - gemfiles/rails_4_2.gemfile.lock
139
- - gemfiles/rails_5_0.gemfile
140
- - gemfiles/rails_5_0.gemfile.lock
141
- - gemfiles/rails_5_1.gemfile
142
- - gemfiles/rails_5_1.gemfile.lock
143
40
  - lib/light/services.rb
144
41
  - lib/light/services/base.rb
145
- - lib/light/services/callbacks.rb
42
+ - lib/light/services/base_with_context.rb
43
+ - lib/light/services/class_based_collection/base.rb
44
+ - lib/light/services/class_based_collection/mount.rb
45
+ - lib/light/services/collection/arguments.rb
46
+ - lib/light/services/collection/base.rb
47
+ - lib/light/services/collection/outputs.rb
48
+ - lib/light/services/config.rb
146
49
  - lib/light/services/exceptions.rb
147
50
  - lib/light/services/messages.rb
148
- - lib/light/services/outputs.rb
149
- - lib/light/services/parameters.rb
51
+ - lib/light/services/settings/argument.rb
52
+ - lib/light/services/settings/output.rb
53
+ - lib/light/services/settings/step.rb
150
54
  - lib/light/services/version.rb
151
55
  - light-services.gemspec
152
56
  homepage: https://github.com/light-ruby/light-services
153
57
  licenses:
154
58
  - MIT
155
- metadata: {}
59
+ metadata:
60
+ allowed_push_host: https://rubygems.org
61
+ homepage_uri: https://github.com/light-ruby/light-services
62
+ source_code_uri: https://github.com/light-ruby/light-services
63
+ changelog_uri: https://github.com/light-ruby/light-services/blob/master/CHANGELOG.md
156
64
  post_install_message:
157
65
  rdoc_options: []
158
66
  require_paths:
@@ -161,16 +69,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
161
69
  requirements:
162
70
  - - ">="
163
71
  - !ruby/object:Gem::Version
164
- version: '0'
72
+ version: 2.3.0
165
73
  required_rubygems_version: !ruby/object:Gem::Requirement
166
74
  requirements:
167
- - - ">="
75
+ - - ">"
168
76
  - !ruby/object:Gem::Version
169
- version: '0'
77
+ version: 1.3.1
170
78
  requirements: []
171
- rubyforge_project:
172
- rubygems_version: 2.6.12
79
+ rubygems_version: 3.1.2
173
80
  signing_key:
174
81
  specification_version: 4
175
- summary: Light pattern Services Object for Ruby/Rails
82
+ summary: Powerful implementation of Service Object pattern for Ruby and Rails
176
83
  test_files: []
@@ -1,16 +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
- ratings:
13
- paths:
14
- - "**.rb"
15
- exclude_paths:
16
- - spec/
@@ -1 +0,0 @@
1
- light-services
@@ -1,29 +0,0 @@
1
- env:
2
- global:
3
- - CC_TEST_REPORTER_ID=dedf6049120e32b166263dd9e07b2abea3991a18b2d0c8dc86792776ca7578ce
4
- - 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)
5
- sudo: false
6
- language: ruby
7
- rvm:
8
- - 2.4.1
9
- before_script:
10
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
11
- - chmod +x ./cc-test-reporter
12
- - ./cc-test-reporter before-build
13
- before_install: gem install bundler
14
- gemfile:
15
- - gemfiles/rails_4_0.gemfile
16
- - gemfiles/rails_4_1.gemfile
17
- - gemfiles/rails_4_2.gemfile
18
- - gemfiles/rails_5_0.gemfile
19
- - gemfiles/rails_5_1.gemfile
20
- script:
21
- - bundle exec rake
22
- after_script:
23
- # Preferably you will run test-reporter on branch update events. But
24
- # if you setup travis to build PR updates only, you don't need to run
25
- # the line below
26
- - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
27
- # In the case where travis is setup to build PR updates only,
28
- # uncomment the line below
29
- # - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/Appraisals DELETED
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- appraise 'rails-4-0' do
4
- gem 'rails', '4.0.13'
5
- end
6
-
7
- appraise 'rails-4-1' do
8
- gem 'rails', '4.1.15'
9
- end
10
-
11
- appraise 'rails-4-2' do
12
- gem 'rails', '4.2.6'
13
- end
14
-
15
- appraise 'rails-5-0' do
16
- gem 'rails', '5.0.5'
17
- end
18
-
19
- appraise 'rails-5-1' do
20
- gem 'rails', '5.1.3'
21
- end
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "4.0.13"
6
-
7
- gemspec path: "../"
@@ -1,115 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- light-services (0.5.4)
5
- rails (> 4.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actionmailer (4.0.13)
11
- actionpack (= 4.0.13)
12
- mail (~> 2.5, >= 2.5.4)
13
- actionpack (4.0.13)
14
- activesupport (= 4.0.13)
15
- builder (~> 3.1.0)
16
- erubis (~> 2.7.0)
17
- rack (~> 1.5.2)
18
- rack-test (~> 0.6.2)
19
- activemodel (4.0.13)
20
- activesupport (= 4.0.13)
21
- builder (~> 3.1.0)
22
- activerecord (4.0.13)
23
- activemodel (= 4.0.13)
24
- activerecord-deprecated_finders (~> 1.0.2)
25
- activesupport (= 4.0.13)
26
- arel (~> 4.0.0)
27
- activerecord-deprecated_finders (1.0.4)
28
- activesupport (4.0.13)
29
- i18n (~> 0.6, >= 0.6.9)
30
- minitest (~> 4.2)
31
- multi_json (~> 1.3)
32
- thread_safe (~> 0.1)
33
- tzinfo (~> 0.3.37)
34
- appraisal (2.1.0)
35
- bundler
36
- rake
37
- thor (>= 0.14.0)
38
- arel (4.0.2)
39
- builder (3.1.4)
40
- codeclimate-test-reporter (0.5.1)
41
- simplecov (>= 0.7.1, < 1.0.0)
42
- concurrent-ruby (1.0.2)
43
- diff-lcs (1.2.5)
44
- docile (1.1.5)
45
- erubis (2.7.0)
46
- i18n (0.7.0)
47
- json (1.8.6)
48
- mail (2.6.4)
49
- mime-types (>= 1.16, < 4)
50
- mime-types (3.1)
51
- mime-types-data (~> 3.2015)
52
- mime-types-data (3.2016.0521)
53
- minitest (4.7.5)
54
- multi_json (1.12.1)
55
- rack (1.5.5)
56
- rack-test (0.6.3)
57
- rack (>= 1.0)
58
- rails (4.0.13)
59
- actionmailer (= 4.0.13)
60
- actionpack (= 4.0.13)
61
- activerecord (= 4.0.13)
62
- activesupport (= 4.0.13)
63
- bundler (>= 1.3.0, < 2.0)
64
- railties (= 4.0.13)
65
- sprockets-rails (~> 2.0)
66
- railties (4.0.13)
67
- actionpack (= 4.0.13)
68
- activesupport (= 4.0.13)
69
- rake (>= 0.8.7)
70
- thor (>= 0.18.1, < 2.0)
71
- rake (10.5.0)
72
- rspec (3.4.0)
73
- rspec-core (~> 3.4.0)
74
- rspec-expectations (~> 3.4.0)
75
- rspec-mocks (~> 3.4.0)
76
- rspec-core (3.4.4)
77
- rspec-support (~> 3.4.0)
78
- rspec-expectations (3.4.0)
79
- diff-lcs (>= 1.2.0, < 2.0)
80
- rspec-support (~> 3.4.0)
81
- rspec-mocks (3.4.1)
82
- diff-lcs (>= 1.2.0, < 2.0)
83
- rspec-support (~> 3.4.0)
84
- rspec-support (3.4.1)
85
- simplecov (0.11.2)
86
- docile (~> 1.1.0)
87
- json (~> 1.8)
88
- simplecov-html (~> 0.10.0)
89
- simplecov-html (0.10.0)
90
- sprockets (3.6.1)
91
- concurrent-ruby (~> 1.0)
92
- rack (> 1, < 3)
93
- sprockets-rails (2.3.3)
94
- actionpack (>= 3.0)
95
- activesupport (>= 3.0)
96
- sprockets (>= 2.8, < 4.0)
97
- thor (0.19.1)
98
- thread_safe (0.3.5)
99
- tzinfo (0.3.49)
100
-
101
- PLATFORMS
102
- ruby
103
-
104
- DEPENDENCIES
105
- appraisal (~> 2.1)
106
- bundler (~> 1.12)
107
- codeclimate-test-reporter
108
- light-services!
109
- rails (= 4.0.13)
110
- rake (~> 10.0)
111
- rspec (~> 3.0)
112
- simplecov (~> 0.11.2)
113
-
114
- BUNDLED WITH
115
- 1.15.4
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "4.1.15"
6
-
7
- gemspec path: "../"
@@ -1,119 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- light-services (0.5.4)
5
- rails (> 4.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actionmailer (4.1.15)
11
- actionpack (= 4.1.15)
12
- actionview (= 4.1.15)
13
- mail (~> 2.5, >= 2.5.4)
14
- actionpack (4.1.15)
15
- actionview (= 4.1.15)
16
- activesupport (= 4.1.15)
17
- rack (~> 1.5.2)
18
- rack-test (~> 0.6.2)
19
- actionview (4.1.15)
20
- activesupport (= 4.1.15)
21
- builder (~> 3.1)
22
- erubis (~> 2.7.0)
23
- activemodel (4.1.15)
24
- activesupport (= 4.1.15)
25
- builder (~> 3.1)
26
- activerecord (4.1.15)
27
- activemodel (= 4.1.15)
28
- activesupport (= 4.1.15)
29
- arel (~> 5.0.0)
30
- activesupport (4.1.15)
31
- i18n (~> 0.6, >= 0.6.9)
32
- json (~> 1.7, >= 1.7.7)
33
- minitest (~> 5.1)
34
- thread_safe (~> 0.1)
35
- tzinfo (~> 1.1)
36
- appraisal (2.1.0)
37
- bundler
38
- rake
39
- thor (>= 0.14.0)
40
- arel (5.0.1.20140414130214)
41
- builder (3.2.2)
42
- codeclimate-test-reporter (0.5.1)
43
- simplecov (>= 0.7.1, < 1.0.0)
44
- concurrent-ruby (1.0.2)
45
- diff-lcs (1.2.5)
46
- docile (1.1.5)
47
- erubis (2.7.0)
48
- i18n (0.7.0)
49
- json (1.8.6)
50
- mail (2.6.4)
51
- mime-types (>= 1.16, < 4)
52
- mime-types (3.1)
53
- mime-types-data (~> 3.2015)
54
- mime-types-data (3.2016.0521)
55
- minitest (5.9.0)
56
- rack (1.5.5)
57
- rack-test (0.6.3)
58
- rack (>= 1.0)
59
- rails (4.1.15)
60
- actionmailer (= 4.1.15)
61
- actionpack (= 4.1.15)
62
- actionview (= 4.1.15)
63
- activemodel (= 4.1.15)
64
- activerecord (= 4.1.15)
65
- activesupport (= 4.1.15)
66
- bundler (>= 1.3.0, < 2.0)
67
- railties (= 4.1.15)
68
- sprockets-rails (~> 2.0)
69
- railties (4.1.15)
70
- actionpack (= 4.1.15)
71
- activesupport (= 4.1.15)
72
- rake (>= 0.8.7)
73
- thor (>= 0.18.1, < 2.0)
74
- rake (10.5.0)
75
- rspec (3.4.0)
76
- rspec-core (~> 3.4.0)
77
- rspec-expectations (~> 3.4.0)
78
- rspec-mocks (~> 3.4.0)
79
- rspec-core (3.4.4)
80
- rspec-support (~> 3.4.0)
81
- rspec-expectations (3.4.0)
82
- diff-lcs (>= 1.2.0, < 2.0)
83
- rspec-support (~> 3.4.0)
84
- rspec-mocks (3.4.1)
85
- diff-lcs (>= 1.2.0, < 2.0)
86
- rspec-support (~> 3.4.0)
87
- rspec-support (3.4.1)
88
- simplecov (0.11.2)
89
- docile (~> 1.1.0)
90
- json (~> 1.8)
91
- simplecov-html (~> 0.10.0)
92
- simplecov-html (0.10.0)
93
- sprockets (3.6.1)
94
- concurrent-ruby (~> 1.0)
95
- rack (> 1, < 3)
96
- sprockets-rails (2.3.3)
97
- actionpack (>= 3.0)
98
- activesupport (>= 3.0)
99
- sprockets (>= 2.8, < 4.0)
100
- thor (0.19.1)
101
- thread_safe (0.3.5)
102
- tzinfo (1.2.2)
103
- thread_safe (~> 0.1)
104
-
105
- PLATFORMS
106
- ruby
107
-
108
- DEPENDENCIES
109
- appraisal (~> 2.1)
110
- bundler (~> 1.12)
111
- codeclimate-test-reporter
112
- light-services!
113
- rails (= 4.1.15)
114
- rake (~> 10.0)
115
- rspec (~> 3.0)
116
- simplecov (~> 0.11.2)
117
-
118
- BUNDLED WITH
119
- 1.15.4