light-services 0.6.2 → 2.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) 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 +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 +142 -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 +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 +68 -44
  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 +71 -0
  29. data/lib/light/services/version.rb +1 -1
  30. data/light-services.gemspec +21 -24
  31. metadata +28 -129
  32. data/.codeclimate.yml +0 -18
  33. data/.ruby-gemset +0 -1
  34. data/.ruby-version +0 -1
  35. data/.travis.yml +0 -36
  36. data/Appraisals +0 -25
  37. data/gemfiles/rails_4_0.gemfile +0 -7
  38. data/gemfiles/rails_4_0.gemfile.lock +0 -115
  39. data/gemfiles/rails_4_1.gemfile +0 -7
  40. data/gemfiles/rails_4_1.gemfile.lock +0 -118
  41. data/gemfiles/rails_4_2.gemfile +0 -7
  42. data/gemfiles/rails_4_2.gemfile.lock +0 -144
  43. data/gemfiles/rails_5_0.gemfile +0 -7
  44. data/gemfiles/rails_5_0.gemfile.lock +0 -151
  45. data/gemfiles/rails_5_1.gemfile +0 -7
  46. data/gemfiles/rails_5_1.gemfile.lock +0 -151
  47. data/gemfiles/rails_5_2.gemfile +0 -7
  48. data/gemfiles/rails_5_2.gemfile.lock +0 -159
  49. data/lib/light/services/callbacks.rb +0 -54
  50. data/lib/light/services/outputs.rb +0 -70
  51. 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.2'
5
+ VERSION = "2.0.0.rc2"
6
6
  end
7
7
  end
@@ -1,35 +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
- require 'light/services/version'
3
+ require_relative "lib/light/services/version"
7
4
 
8
5
  Gem::Specification.new do |spec|
9
- spec.name = 'light-services'
6
+ spec.name = "light-services"
10
7
  spec.version = Light::Services::VERSION
11
- spec.authors = ['Andrew Emelianenko']
12
- spec.email = ['emelianenko.web@gmail.com']
8
+ spec.authors = ["Andrew Emelianenko"]
9
+ spec.email = ["emelianenko.web@gmail.com"]
13
10
 
14
- spec.summary = 'Light pattern Services Object for Ruby/Rails'
15
- spec.description = 'Light pattern Services Object for Ruby/Rails from Light Ruby'
16
- spec.homepage = 'https://github.com/light-ruby/light-services'
17
- 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")
18
16
 
19
- spec.files = `git ls-files -z`
20
- .split("\x0")
21
- .reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
22
18
 
23
- spec.bindir = 'exe'
24
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
- 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"
26
22
 
27
- spec.add_dependency 'rails', '> 4.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
28
28
 
29
- spec.add_development_dependency 'bundler', '~> 1.12'
30
- spec.add_development_dependency 'rake', '~> 10.0'
31
- spec.add_development_dependency 'appraisal', '~> 2.1'
32
- spec.add_development_dependency 'rspec', '~> 3.0'
33
- spec.add_development_dependency 'simplecov', '~> 0.11.2'
34
- 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"]
35
32
  end
metadata CHANGED
@@ -1,160 +1,60 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: light-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 2.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Emelianenko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-13 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: 2021-07-15 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_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
- - gemfiles/rails_5_2.gemfile
144
- - gemfiles/rails_5_2.gemfile.lock
145
34
  - lib/light/services.rb
146
35
  - lib/light/services/base.rb
147
- - 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
148
43
  - lib/light/services/exceptions.rb
149
44
  - lib/light/services/messages.rb
150
- - lib/light/services/outputs.rb
151
- - 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
152
48
  - lib/light/services/version.rb
153
49
  - light-services.gemspec
154
50
  homepage: https://github.com/light-ruby/light-services
155
51
  licenses:
156
52
  - MIT
157
- 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
158
58
  post_install_message:
159
59
  rdoc_options: []
160
60
  require_paths:
@@ -163,16 +63,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
163
63
  requirements:
164
64
  - - ">="
165
65
  - !ruby/object:Gem::Version
166
- version: '0'
66
+ version: 2.3.0
167
67
  required_rubygems_version: !ruby/object:Gem::Requirement
168
68
  requirements:
169
- - - ">="
69
+ - - ">"
170
70
  - !ruby/object:Gem::Version
171
- version: '0'
71
+ version: 1.3.1
172
72
  requirements: []
173
- rubyforge_project:
174
- rubygems_version: 2.7.6
73
+ rubygems_version: 3.1.2
175
74
  signing_key:
176
75
  specification_version: 4
177
- summary: Light pattern Services Object for Ruby/Rails
76
+ summary: Powerful implementation of Service Object pattern for Ruby and Rails
178
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.5.1
data/.travis.yml DELETED
@@ -1,36 +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_4_0.gemfile
20
- - gemfiles/rails_4_1.gemfile
21
- - gemfiles/rails_4_2.gemfile
22
- - gemfiles/rails_5_0.gemfile
23
- - gemfiles/rails_5_1.gemfile
24
- - gemfiles/rails_5_2.gemfile
25
-
26
- script:
27
- - bundle exec rake
28
-
29
- after_script:
30
- # Preferably you will run test-reporter on branch update events. But
31
- # if you setup travis to build PR updates only, you don't need to run
32
- # the line below
33
- - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
34
- # In the case where travis is setup to build PR updates only,
35
- # uncomment the line below
36
- # - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/Appraisals DELETED
@@ -1,25 +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.16'
9
- end
10
-
11
- appraise 'rails-4-2' do
12
- gem 'rails', '4.2.10'
13
- end
14
-
15
- appraise 'rails-5-0' do
16
- gem 'rails', '5.0.7'
17
- end
18
-
19
- appraise 'rails-5-1' do
20
- gem 'rails', '5.1.6'
21
- end
22
-
23
- appraise 'rails-5-2' do
24
- gem 'rails', '5.2.1'
25
- 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.6.2)
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.16.2