mutations_generator 0.2.0 → 0.3.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6eeb9b546dfdd0fb2e8c7ca4583f6ab356c09a48377279f213877963bdf1424
|
4
|
+
data.tar.gz: ebf5c32af1ffaf230905489eb460f6469ee97090b7e876048f5283aefdca5a0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c5984438772c3a5a8262ba68601965b5fbf954c053e74c03bb608937c29638d74d10516c9405925a0fd7d7dd1963a3cea8ccda5ad8a148908d14b6573605aa7
|
7
|
+
data.tar.gz: 344aba532ca87a77ef088f439e3ba75b7a6fb646c02c6ea0753cee9e0522998be48843debe14d8c1a5d264a2c63337617528fe3ca9a0921e57036aa06d029b2f
|
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/mutation/'
|
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!
|
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.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- robertsimoes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mutations
|
@@ -58,6 +58,7 @@ 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
|