mutations_generator 0.2.0 → 0.3.2
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/Gemfile.lock +1 -1
- data/README.md +4 -1
- data/lib/generators/mutation/USAGE +1 -0
- data/lib/generators/mutation/mutation_generator.rb +7 -0
- data/lib/generators/mutation/templates/mutation_spec.erb +15 -0
- data/lib/mutations_generator/version.rb +1 -1
- data/mutations_generator.gemspec +5 -4
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7bf6616ecdd031ff8bbc80c0f072463510f3c47707e1519ebedfaeeb2bbcbb0
|
4
|
+
data.tar.gz: 58559af355921952666a4c3ff0755405156974a76f73576c85ad04987d5e22d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a690f7fa0c0321f687ece01b3791d362a9b92e41486aac81bc8e6283f504e60d307a4806d0d080b18d63927dc5190954ade0c460858b5943c3300c3205495f4
|
7
|
+
data.tar.gz: d04183c75c667461807a0d883ba93373d8fee6ef923ab5697f515dfb0d9ec3c576b7569524ba1414a14cac1d18b61ccb41c76f9183b40bd9e7ef8dcb49519517
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -20,8 +20,11 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
|
23
|
+
```
|
24
|
+
rails g mutation PumpTheJam technotronic:string:required space_jam:string:optional
|
24
25
|
|
26
|
+
# created app/mutations/pump_the_jam.rb
|
27
|
+
```
|
25
28
|
## Development
|
26
29
|
|
27
30
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -16,6 +16,13 @@ class MutationGenerator < Rails::Generators::NamedBase
|
|
16
16
|
set_local_assigns!
|
17
17
|
|
18
18
|
template 'mutation.erb', generator_path
|
19
|
+
|
20
|
+
# Create spec if application uses specs
|
21
|
+
spec_mutation_dir_path = 'spec/mutations/'
|
22
|
+
spec_generator_path = spec_mutation_dir_path + "/#{file_name}_spec.rb"
|
23
|
+
|
24
|
+
Dir.mkdir(spec_mutation_dir_path) if Dir.exist?('spec') && !File.exist?(spec_mutation_dir_path)
|
25
|
+
template 'mutation_spec.erb', spec_generator_path if Dir.exist?('spec')
|
19
26
|
end
|
20
27
|
|
21
28
|
def set_local_assigns!
|
data/mutations_generator.gemspec
CHANGED
@@ -5,17 +5,17 @@ require_relative 'lib/mutations_generator/version'
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'mutations_generator'
|
7
7
|
spec.version = MutationsGenerator::VERSION
|
8
|
-
spec.authors = ['
|
9
|
-
spec.email = ['
|
8
|
+
spec.authors = ['aquaflamingo']
|
9
|
+
spec.email = ['16901597+aquaflamingo@users.noreply.github.com']
|
10
10
|
|
11
11
|
spec.summary = 'Extension for Ruby on Rails to add Mutation generators'
|
12
12
|
spec.description = 'Mutations are an elegant implementation of the Command and ServiceObject pattern in Ruby on Rails projects. This gem extends Rails generators to include a mutation generator.'
|
13
|
-
spec.homepage = 'https://github.com/
|
13
|
+
spec.homepage = 'https://github.com/aquaflaming/mutations_generator'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
16
16
|
|
17
17
|
spec.metadata['homepage_uri'] = spec.homepage
|
18
|
-
spec.metadata['source_code_uri'] = 'https://github.com/
|
18
|
+
spec.metadata['source_code_uri'] = 'https://github.com/aquaflamingo/mutations_generator'
|
19
19
|
spec.metadata['changelog_uri'] = spec.metadata['source_code_uri'] + '/releases'
|
20
20
|
|
21
21
|
# Specify which files should be added to the gem when it is released.
|
@@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.bindir = 'exe'
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ['lib']
|
29
|
+
|
29
30
|
spec.add_development_dependency 'mutations', '~> 0.9.1'
|
30
31
|
spec.add_development_dependency 'rails', '~>6.0.3.1'
|
31
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mutations_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- aquaflamingo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mutations
|
@@ -42,7 +42,7 @@ description: Mutations are an elegant implementation of the Command and ServiceO
|
|
42
42
|
pattern in Ruby on Rails projects. This gem extends Rails generators to include
|
43
43
|
a mutation generator.
|
44
44
|
email:
|
45
|
-
-
|
45
|
+
- 16901597+aquaflamingo@users.noreply.github.com
|
46
46
|
executables: []
|
47
47
|
extensions: []
|
48
48
|
extra_rdoc_files: []
|
@@ -58,16 +58,17 @@ files:
|
|
58
58
|
- lib/generators/mutation/USAGE
|
59
59
|
- lib/generators/mutation/mutation_generator.rb
|
60
60
|
- lib/generators/mutation/templates/mutation.erb
|
61
|
+
- lib/generators/mutation/templates/mutation_spec.erb
|
61
62
|
- lib/mutations_generator.rb
|
62
63
|
- lib/mutations_generator/version.rb
|
63
64
|
- mutations_generator.gemspec
|
64
|
-
homepage: https://github.com/
|
65
|
+
homepage: https://github.com/aquaflaming/mutations_generator
|
65
66
|
licenses:
|
66
67
|
- MIT
|
67
68
|
metadata:
|
68
|
-
homepage_uri: https://github.com/
|
69
|
-
source_code_uri: https://github.com/
|
70
|
-
changelog_uri: https://github.com/
|
69
|
+
homepage_uri: https://github.com/aquaflaming/mutations_generator
|
70
|
+
source_code_uri: https://github.com/aquaflamingo/mutations_generator
|
71
|
+
changelog_uri: https://github.com/aquaflamingo/mutations_generator/releases
|
71
72
|
post_install_message:
|
72
73
|
rdoc_options: []
|
73
74
|
require_paths:
|
@@ -83,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
84
|
- !ruby/object:Gem::Version
|
84
85
|
version: '0'
|
85
86
|
requirements: []
|
86
|
-
rubygems_version: 3.
|
87
|
+
rubygems_version: 3.3.7
|
87
88
|
signing_key:
|
88
89
|
specification_version: 4
|
89
90
|
summary: Extension for Ruby on Rails to add Mutation generators
|