lite-command 1.0.8 → 1.0.9
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 +4 -4
- data/.rubocop.yml +2 -2
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +54 -54
- data/README.md +6 -12
- data/lib/generators/rails/USAGE +0 -1
- data/lib/generators/rails/command_generator.rb +0 -6
- data/lib/lite/command.rb +0 -1
- data/lib/lite/command/version.rb +1 -1
- metadata +3 -6
- data/lib/generators/lite/command/install_generator.rb +0 -17
- data/lib/generators/lite/command/templates/install.rb +0 -4
- data/lib/generators/rails/templates/spec.rb.tt +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 59aa483892600a5737272d96178552d5fbf8951342b51fd0eb1d1f225867e09b
|
|
4
|
+
data.tar.gz: 728d34a9dc57f868e8912f118105b7ec91cb79c6da5d8ff754651f817cfb6383
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c9fe0d278b521e64aaa8ddc3bc537c5aef4f95610f9e96d2672ee5aac1e2d3f68d361c7149e7dc03363466ab5a720a193f31761a69db9c50800c7ebb4e6560a
|
|
7
|
+
data.tar.gz: 26bd6d480a5d9f39a9c73fafee13925495e085dcd997b74f65bc39e5933d101baa948f2a7f255adf1c9f18db14f2b08d3ae5ffd70d8d2c3b360c075550d935d7
|
data/.rubocop.yml
CHANGED
|
@@ -5,8 +5,6 @@ AllCops:
|
|
|
5
5
|
TargetRubyVersion: 2.6
|
|
6
6
|
DisplayCopNames: true
|
|
7
7
|
DisplayStyleGuide: true
|
|
8
|
-
LineLength:
|
|
9
|
-
Max: 100
|
|
10
8
|
Layout/EmptyLinesAroundBlockBody:
|
|
11
9
|
Exclude:
|
|
12
10
|
- 'spec/**/**/*'
|
|
@@ -14,6 +12,8 @@ Layout/EmptyLinesAroundClassBody:
|
|
|
14
12
|
EnforcedStyle: empty_lines_except_namespace
|
|
15
13
|
Layout/EmptyLinesAroundModuleBody:
|
|
16
14
|
EnforcedStyle: empty_lines_except_namespace
|
|
15
|
+
Layout/LineLength:
|
|
16
|
+
Max: 100
|
|
17
17
|
Metrics/BlockLength:
|
|
18
18
|
Exclude:
|
|
19
19
|
- 'spec/**/**/*'
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.0.9] - 2019-12-20
|
|
10
|
+
### Removed
|
|
11
|
+
- Removed lite-command generator
|
|
12
|
+
- Removed rspec file from rails generator
|
|
13
|
+
|
|
9
14
|
## [1.0.8] - 2019-09-16
|
|
10
15
|
### Changed
|
|
11
16
|
- Changed create propagation to check errors instead of persistence
|
data/Gemfile.lock
CHANGED
|
@@ -1,118 +1,118 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
lite-command (1.0.
|
|
4
|
+
lite-command (1.0.9)
|
|
5
5
|
lite-errors
|
|
6
6
|
lite-memoize
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
actionpack (6.0.
|
|
12
|
-
actionview (= 6.0.
|
|
13
|
-
activesupport (= 6.0.
|
|
14
|
-
rack (~> 2.0)
|
|
11
|
+
actionpack (6.0.2.1)
|
|
12
|
+
actionview (= 6.0.2.1)
|
|
13
|
+
activesupport (= 6.0.2.1)
|
|
14
|
+
rack (~> 2.0, >= 2.0.8)
|
|
15
15
|
rack-test (>= 0.6.3)
|
|
16
16
|
rails-dom-testing (~> 2.0)
|
|
17
17
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
18
|
-
actionview (6.0.
|
|
19
|
-
activesupport (= 6.0.
|
|
18
|
+
actionview (6.0.2.1)
|
|
19
|
+
activesupport (= 6.0.2.1)
|
|
20
20
|
builder (~> 3.1)
|
|
21
21
|
erubi (~> 1.4)
|
|
22
22
|
rails-dom-testing (~> 2.0)
|
|
23
23
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
24
|
-
activemodel (6.0.
|
|
25
|
-
activesupport (= 6.0.
|
|
26
|
-
activerecord (6.0.
|
|
27
|
-
activemodel (= 6.0.
|
|
28
|
-
activesupport (= 6.0.
|
|
29
|
-
activesupport (6.0.
|
|
24
|
+
activemodel (6.0.2.1)
|
|
25
|
+
activesupport (= 6.0.2.1)
|
|
26
|
+
activerecord (6.0.2.1)
|
|
27
|
+
activemodel (= 6.0.2.1)
|
|
28
|
+
activesupport (= 6.0.2.1)
|
|
29
|
+
activesupport (6.0.2.1)
|
|
30
30
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
31
31
|
i18n (>= 0.7, < 2)
|
|
32
32
|
minitest (~> 5.1)
|
|
33
33
|
tzinfo (~> 1.1)
|
|
34
|
-
zeitwerk (~> 2.
|
|
34
|
+
zeitwerk (~> 2.2)
|
|
35
35
|
ast (2.4.0)
|
|
36
|
-
builder (3.2.
|
|
36
|
+
builder (3.2.4)
|
|
37
37
|
colorize (0.8.1)
|
|
38
38
|
concurrent-ruby (1.1.5)
|
|
39
|
-
crass (1.0.
|
|
39
|
+
crass (1.0.5)
|
|
40
40
|
database_cleaner (1.7.0)
|
|
41
41
|
diff-lcs (1.3)
|
|
42
|
-
erubi (1.
|
|
43
|
-
fasterer (0.
|
|
42
|
+
erubi (1.9.0)
|
|
43
|
+
fasterer (0.8.1)
|
|
44
44
|
colorize (~> 0.7)
|
|
45
|
-
ruby_parser (>= 3.
|
|
45
|
+
ruby_parser (>= 3.14.1)
|
|
46
46
|
generator_spec (0.9.4)
|
|
47
47
|
activesupport (>= 3.0.0)
|
|
48
48
|
railties (>= 3.0.0)
|
|
49
|
-
i18n (1.
|
|
49
|
+
i18n (1.7.0)
|
|
50
50
|
concurrent-ruby (~> 1.0)
|
|
51
|
-
jaro_winkler (1.5.
|
|
51
|
+
jaro_winkler (1.5.4)
|
|
52
52
|
lite-errors (1.0.1)
|
|
53
53
|
lite-memoize (1.0.3)
|
|
54
|
-
loofah (2.
|
|
54
|
+
loofah (2.4.0)
|
|
55
55
|
crass (~> 1.0.2)
|
|
56
56
|
nokogiri (>= 1.5.9)
|
|
57
57
|
method_source (0.9.2)
|
|
58
58
|
mini_portile2 (2.4.0)
|
|
59
|
-
minitest (5.
|
|
60
|
-
nokogiri (1.10.
|
|
59
|
+
minitest (5.13.0)
|
|
60
|
+
nokogiri (1.10.7)
|
|
61
61
|
mini_portile2 (~> 2.4.0)
|
|
62
|
-
parallel (1.
|
|
63
|
-
parser (2.6.
|
|
62
|
+
parallel (1.19.1)
|
|
63
|
+
parser (2.6.5.0)
|
|
64
64
|
ast (~> 2.4.0)
|
|
65
|
-
rack (2.0.
|
|
65
|
+
rack (2.0.8)
|
|
66
66
|
rack-test (1.1.0)
|
|
67
67
|
rack (>= 1.0, < 3)
|
|
68
68
|
rails-dom-testing (2.0.3)
|
|
69
69
|
activesupport (>= 4.2.0)
|
|
70
70
|
nokogiri (>= 1.6)
|
|
71
|
-
rails-html-sanitizer (1.
|
|
72
|
-
loofah (~> 2.
|
|
73
|
-
railties (6.0.
|
|
74
|
-
actionpack (= 6.0.
|
|
75
|
-
activesupport (= 6.0.
|
|
71
|
+
rails-html-sanitizer (1.3.0)
|
|
72
|
+
loofah (~> 2.3)
|
|
73
|
+
railties (6.0.2.1)
|
|
74
|
+
actionpack (= 6.0.2.1)
|
|
75
|
+
activesupport (= 6.0.2.1)
|
|
76
76
|
method_source
|
|
77
77
|
rake (>= 0.8.7)
|
|
78
78
|
thor (>= 0.20.3, < 2.0)
|
|
79
79
|
rainbow (3.0.0)
|
|
80
|
-
rake (
|
|
81
|
-
rspec (3.
|
|
82
|
-
rspec-core (~> 3.
|
|
83
|
-
rspec-expectations (~> 3.
|
|
84
|
-
rspec-mocks (~> 3.
|
|
85
|
-
rspec-core (3.
|
|
86
|
-
rspec-support (~> 3.
|
|
87
|
-
rspec-expectations (3.
|
|
80
|
+
rake (13.0.1)
|
|
81
|
+
rspec (3.9.0)
|
|
82
|
+
rspec-core (~> 3.9.0)
|
|
83
|
+
rspec-expectations (~> 3.9.0)
|
|
84
|
+
rspec-mocks (~> 3.9.0)
|
|
85
|
+
rspec-core (3.9.0)
|
|
86
|
+
rspec-support (~> 3.9.0)
|
|
87
|
+
rspec-expectations (3.9.0)
|
|
88
88
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
89
|
-
rspec-support (~> 3.
|
|
90
|
-
rspec-mocks (3.
|
|
89
|
+
rspec-support (~> 3.9.0)
|
|
90
|
+
rspec-mocks (3.9.0)
|
|
91
91
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
92
|
-
rspec-support (~> 3.
|
|
93
|
-
rspec-support (3.
|
|
94
|
-
rubocop (0.
|
|
92
|
+
rspec-support (~> 3.9.0)
|
|
93
|
+
rspec-support (3.9.0)
|
|
94
|
+
rubocop (0.78.0)
|
|
95
95
|
jaro_winkler (~> 1.5.1)
|
|
96
96
|
parallel (~> 1.10)
|
|
97
97
|
parser (>= 2.6)
|
|
98
98
|
rainbow (>= 2.2.2, < 4.0)
|
|
99
99
|
ruby-progressbar (~> 1.7)
|
|
100
100
|
unicode-display_width (>= 1.4.0, < 1.7)
|
|
101
|
-
rubocop-performance (1.
|
|
101
|
+
rubocop-performance (1.5.1)
|
|
102
102
|
rubocop (>= 0.71.0)
|
|
103
|
-
rubocop-rspec (1.
|
|
104
|
-
rubocop (>= 0.
|
|
103
|
+
rubocop-rspec (1.37.1)
|
|
104
|
+
rubocop (>= 0.68.1)
|
|
105
105
|
ruby-progressbar (1.10.1)
|
|
106
|
-
ruby_parser (3.
|
|
106
|
+
ruby_parser (3.14.1)
|
|
107
107
|
sexp_processor (~> 4.9)
|
|
108
|
-
sexp_processor (4.
|
|
109
|
-
sqlite3 (1.4.
|
|
110
|
-
thor (0.
|
|
108
|
+
sexp_processor (4.13.0)
|
|
109
|
+
sqlite3 (1.4.2)
|
|
110
|
+
thor (1.0.1)
|
|
111
111
|
thread_safe (0.3.6)
|
|
112
112
|
tzinfo (1.2.5)
|
|
113
113
|
thread_safe (~> 0.1)
|
|
114
114
|
unicode-display_width (1.6.0)
|
|
115
|
-
zeitwerk (2.
|
|
115
|
+
zeitwerk (2.2.2)
|
|
116
116
|
|
|
117
117
|
PLATFORMS
|
|
118
118
|
ruby
|
|
@@ -132,4 +132,4 @@ DEPENDENCIES
|
|
|
132
132
|
sqlite3
|
|
133
133
|
|
|
134
134
|
BUNDLED WITH
|
|
135
|
-
2.0.
|
|
135
|
+
2.0.2
|
data/README.md
CHANGED
|
@@ -31,12 +31,10 @@ Or install it yourself as:
|
|
|
31
31
|
|
|
32
32
|
## Setup
|
|
33
33
|
|
|
34
|
-
`rails g
|
|
35
|
-
`../app/commands/application_command.rb`
|
|
34
|
+
`rails g command NAME` will generate the following file:
|
|
36
35
|
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
end
|
|
36
|
+
```erb
|
|
37
|
+
app/commands/[NAME]_command.rb
|
|
40
38
|
```
|
|
41
39
|
|
|
42
40
|
## Simple
|
|
@@ -47,13 +45,9 @@ This is more of a traditional command service call as it only exposes a `call` m
|
|
|
47
45
|
```ruby
|
|
48
46
|
class SearchMovies < Lite::Command::Simple
|
|
49
47
|
|
|
50
|
-
class
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
# NOTE: This class method is required
|
|
54
|
-
def execute(*args)
|
|
55
|
-
{ generate_fingerprint => movies_by_name }
|
|
56
|
-
end
|
|
48
|
+
# NOTE: This class method is required
|
|
49
|
+
def self.execute(*args)
|
|
50
|
+
{ generate_fingerprint => movies_by_name }
|
|
57
51
|
end
|
|
58
52
|
|
|
59
53
|
end
|
data/lib/generators/rails/USAGE
CHANGED
|
@@ -14,12 +14,6 @@ module Rails
|
|
|
14
14
|
template('command.rb.tt', path)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def copy_specs
|
|
18
|
-
path = File.join('spec', 'commands', class_path, "#{file_name}_command_spec.rb")
|
|
19
|
-
empty_directory('spec/commands')
|
|
20
|
-
template('spec.rb.tt', path)
|
|
21
|
-
end
|
|
22
|
-
|
|
23
17
|
private
|
|
24
18
|
|
|
25
19
|
def file_name
|
data/lib/lite/command.rb
CHANGED
data/lib/lite/command/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lite-command
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juan Gomez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lite-errors
|
|
@@ -215,12 +215,9 @@ files:
|
|
|
215
215
|
- _config.yml
|
|
216
216
|
- bin/console
|
|
217
217
|
- bin/setup
|
|
218
|
-
- lib/generators/lite/command/install_generator.rb
|
|
219
|
-
- lib/generators/lite/command/templates/install.rb
|
|
220
218
|
- lib/generators/rails/USAGE
|
|
221
219
|
- lib/generators/rails/command_generator.rb
|
|
222
220
|
- lib/generators/rails/templates/command.rb.tt
|
|
223
|
-
- lib/generators/rails/templates/spec.rb.tt
|
|
224
221
|
- lib/lite/command.rb
|
|
225
222
|
- lib/lite/command/complex.rb
|
|
226
223
|
- lib/lite/command/exceptions.rb
|
|
@@ -250,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
250
247
|
- !ruby/object:Gem::Version
|
|
251
248
|
version: '0'
|
|
252
249
|
requirements: []
|
|
253
|
-
rubygems_version: 3.
|
|
250
|
+
rubygems_version: 3.1.1
|
|
254
251
|
signing_key:
|
|
255
252
|
specification_version: 4
|
|
256
253
|
summary: Ruby Command based framework (aka service objects)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'rails/generators'
|
|
4
|
-
|
|
5
|
-
module Lite
|
|
6
|
-
module Command
|
|
7
|
-
class InstallGenerator < Rails::Generators::Base
|
|
8
|
-
|
|
9
|
-
source_root File.expand_path('../templates', __FILE__)
|
|
10
|
-
|
|
11
|
-
def copy_application_query_file
|
|
12
|
-
copy_file('install.rb', 'app/commands/application_command.rb')
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|