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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a9177068a2a6b70f86a7bbc67983e1ead0ddb3501723195c96e13c26d445003
4
- data.tar.gz: 6ba46d9198c4b95037cca712fbe442e9b51d7c6ae52438e8c57714e6a3754b1a
3
+ metadata.gz: d7bf6616ecdd031ff8bbc80c0f072463510f3c47707e1519ebedfaeeb2bbcbb0
4
+ data.tar.gz: 58559af355921952666a4c3ff0755405156974a76f73576c85ad04987d5e22d3
5
5
  SHA512:
6
- metadata.gz: 3ca1cdf1f75c2c0c522de9e65a1c3b165eec44bdb63a7535c35ff3604cc9fa7fe435f909095f3a11724a906f9ae84585fd5e6ed3a4efeb63699710e4a81eadbc
7
- data.tar.gz: 062b2547fe4f673c9a5d3626cd97edd07b6917eff00e7eda691d4b59664081ba666bf21712c638fe2efaf291a5e157ce5de7a4a035f17c9987b6488fef36abc1
6
+ metadata.gz: 8a690f7fa0c0321f687ece01b3791d362a9b92e41486aac81bc8e6283f504e60d307a4806d0d080b18d63927dc5190954ade0c460858b5943c3300c3205495f4
7
+ data.tar.gz: d04183c75c667461807a0d883ba93373d8fee6ef923ab5697f515dfb0d9ec3c576b7569524ba1414a14cac1d18b61ccb41c76f9183b40bd9e7ef8dcb49519517
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mutations_generator (0.2.0)
4
+ mutations_generator (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -20,8 +20,11 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- TODO: Write usage instructions here
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.
@@ -8,3 +8,4 @@ Example:
8
8
 
9
9
  This will create:
10
10
  app/mutations/pump_the_jam.rb
11
+ spec/mutations/pump_the_jam_spec.rb
@@ -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!
@@ -0,0 +1,15 @@
1
+ describe <%= @klass_name %> do
2
+ subject(:outcome) do
3
+ <%= @klass_name %>.run
4
+ end
5
+
6
+ describe '.validate' do
7
+ context 'when invalid' do
8
+ # TODO your code here
9
+ end
10
+ end
11
+
12
+ describe '.execute' do
13
+ # TODO your code here
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module MutationsGenerator
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -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 = ['robertsimoes']
9
- spec.email = ['robertsimoes@users.noreply.github.com']
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/robertsimoes'
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/robertsimoes'
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.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
- - robertsimoes
7
+ - aquaflamingo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-19 00:00:00.000000000 Z
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
- - robertsimoes@users.noreply.github.com
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/robertsimoes
65
+ homepage: https://github.com/aquaflaming/mutations_generator
65
66
  licenses:
66
67
  - MIT
67
68
  metadata:
68
- homepage_uri: https://github.com/robertsimoes
69
- source_code_uri: https://github.com/robertsimoes
70
- changelog_uri: https://github.com/robertsimoes/releases
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.1.2
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