dry-operation_generators-base 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -3
- data/.rubocop_todo.yml +16 -4
- data/CHANGELOG.md +4 -0
- data/README.md +6 -3
- data/lib/operations/base/generators/base_generator.rb +15 -3
- data/lib/operations/base/version.rb +1 -1
- data/operation_generators-base.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ddf32112c1749b86e0b78870db86d27606228febe92b21ddd0b0d4d5bf9be5a
|
4
|
+
data.tar.gz: 5390df1f6abaa225abdefb0f0d0c3fda8c16eb43a224b05961d081eb63aefa98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 908ba6760382a76fa86f3543862f083493107010d2e5716809ddf0b6cccee09cfef0a206875b0b99e00075d675624c81373bd6bcae35198c79eb7d145f978955
|
7
|
+
data.tar.gz: 538946a0878eb986da0f2288ff3dde4590ece6cdd7000ede4d8c6ae00b32cb0df1c528403c5b3b1f0aaff5faf84723d43adbe5c20806d00ab52cc859d2149556
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2024-
|
3
|
+
# on 2024-08-09 13:49:50 UTC using RuboCop version 1.65.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 2
|
10
10
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
11
11
|
Metrics/AbcSize:
|
12
|
-
Max:
|
12
|
+
Max: 21
|
13
13
|
|
14
|
-
# Offense count:
|
14
|
+
# Offense count: 3
|
15
15
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
16
16
|
Metrics/MethodLength:
|
17
17
|
Max: 21
|
@@ -34,6 +34,18 @@ Naming/FileName:
|
|
34
34
|
RSpec/ExampleLength:
|
35
35
|
Max: 15
|
36
36
|
|
37
|
+
# Offense count: 1
|
38
|
+
RSpec/MessageChain:
|
39
|
+
Exclude:
|
40
|
+
- 'spec/support/pre/rails.rb'
|
41
|
+
|
37
42
|
# Offense count: 1
|
38
43
|
RSpec/MultipleExpectations:
|
39
44
|
Max: 2
|
45
|
+
|
46
|
+
# Offense count: 1
|
47
|
+
# This cop supports safe autocorrection (--autocorrect).
|
48
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
49
|
+
# URISchemes: http, https
|
50
|
+
Layout/LineLength:
|
51
|
+
Max: 169
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,15 +2,18 @@
|
|
2
2
|
|
3
3
|
Shared code of operation generators
|
4
4
|
|
5
|
-
See
|
5
|
+
See
|
6
|
+
- [operation_generators](https://github.com/joel/dry-operation_generators)
|
7
|
+
- [operation_generators-test_unit](https://github.com/joel/dry-operation_generators-test_unit)
|
8
|
+
- [operation_generators-rspec](https://github.com/joel/dry-operation_generators-rspec)
|
6
9
|
|
7
10
|
## Installation
|
8
11
|
|
9
|
-
This gems is a dependency of [operation_generators](https://github.com/joel/dry-operation_generators)
|
12
|
+
This gems is a dependency of [operation_generators](https://github.com/joel/dry-operation_generators), [operation_generators-test_unit](https://github.com/joel/dry-operation_generators-test_unit) and [operation_generators-rspec](https://github.com/joel/dry-operation_generators-rspec). It is not meant to be install in standalone.
|
10
13
|
|
11
14
|
NOTE: The gem needs to be required as `operations/base`
|
12
15
|
|
13
|
-
$ gem "operation_generators-base", require: "operations/base"
|
16
|
+
$ gem "dry-operation_generators-base", require: "operations/base"
|
14
17
|
|
15
18
|
Otherwise, you can require "operations/base" on your code.
|
16
19
|
|
@@ -23,7 +23,7 @@ module Operations
|
|
23
23
|
class_option :component, type: :string, desc: "Component type"
|
24
24
|
|
25
25
|
attr_accessor :regular_parsed_fields, :reference_parsed_fields, :parsed_fields, :root_file_path,
|
26
|
-
:root_test_file_path
|
26
|
+
:root_test_file_path, :base_test_dir
|
27
27
|
end
|
28
28
|
|
29
29
|
def validate_verb_argument
|
@@ -36,8 +36,20 @@ module Operations
|
|
36
36
|
@root_file_path = "app"
|
37
37
|
@root_file_path = "components/#{options[:component]}" if options[:component]
|
38
38
|
|
39
|
-
@
|
40
|
-
|
39
|
+
@base_test_dir = "test"
|
40
|
+
|
41
|
+
case Rails.application.config.generators.test_framework
|
42
|
+
when :rspec
|
43
|
+
@base_test_dir = "spec"
|
44
|
+
when :test_unit
|
45
|
+
@base_test_dir = "test"
|
46
|
+
else
|
47
|
+
raise Thor::Error,
|
48
|
+
"Unknown test framework: '#{Rails.application.config.generators.test_framework}', please specify --test_framework=test_unit or --test_framework=rspec."
|
49
|
+
end
|
50
|
+
|
51
|
+
@root_test_file_path = base_test_dir
|
52
|
+
@root_test_file_path = "#{base_test_dir}/components/#{options[:component]}" if options[:component]
|
41
53
|
end
|
42
54
|
|
43
55
|
private
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ["joel.azemar@gmail.com"]
|
10
10
|
|
11
11
|
spec.summary = "Shared code of operation generators"
|
12
|
-
spec.homepage = "
|
12
|
+
spec.homepage = "https://github.com/joel/dry-operation_generators-base"
|
13
13
|
spec.license = "MIT"
|
14
14
|
spec.required_ruby_version = ">= 3.3.0"
|
15
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-operation_generators-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Azemar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -48,7 +48,7 @@ files:
|
|
48
48
|
- lib/operations/configure.rb
|
49
49
|
- operation_generators-base.gemspec
|
50
50
|
- sig/operations/base.rbs
|
51
|
-
homepage:
|
51
|
+
homepage: https://github.com/joel/dry-operation_generators-base
|
52
52
|
licenses:
|
53
53
|
- MIT
|
54
54
|
metadata:
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
|
-
rubygems_version: 3.5.
|
71
|
+
rubygems_version: 3.5.11
|
72
72
|
signing_key:
|
73
73
|
specification_version: 4
|
74
74
|
summary: Shared code of operation generators
|