mushin 0.48.0 → 0.49.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
  SHA1:
3
- metadata.gz: 1268969c9fe2a9ba9822e9a8af8fa2f81a0af17c
4
- data.tar.gz: f1071ef414ff382df2297edd49e241790b10d9f8
3
+ metadata.gz: 3bf52b8fab3fde11ceeac3756d9548a9113b3641
4
+ data.tar.gz: 0acf2558df07d80f205f0b08e0549512e260abe3
5
5
  SHA512:
6
- metadata.gz: 1826d2eee53d50c452f19bd1fb7f30bb0ec6d90a724bb41029497815081d57bbfc9817875d173c86b0a859c1c467a3ef5ac14a1199a12c2413a5ede3db8e6385
7
- data.tar.gz: d2263335ca2bd651a931b74d5ede834973eb50103a0bb03651f4d7ea96d36ba394859b8bc5153d385c5c4301cd064c27e57f6710bae01a40cfae10bac90cef7e
6
+ metadata.gz: c8f46d08dff716d2796217cac664d5da6cb81756f11b34e74aa1928524830cd283205c99d7c325117866dc26fa7b253094d153d10a4fd4fc57c4547a4d8c0c9f
7
+ data.tar.gz: 7084c52500763c52717667b14cc2088d25b78eb538f08836de06c7620d739fc256f904b25b71c732ecb6f1d6e0211287d1209b8d87ec41dbe0954bdf197207c3
data/exe/generator.rb CHANGED
@@ -43,7 +43,7 @@ module Mushin
43
43
 
44
44
  @content = <<-FOO
45
45
  class Ext
46
- using Mushin::Ext
46
+ using Mushin::Ext
47
47
 
48
48
  def initialize app=nil, opts={}, params={}
49
49
  @app = app
@@ -52,17 +52,24 @@ module Mushin
52
52
  end
53
53
  def call env
54
54
  env ||= Hash.new
55
- # write inbound code
56
- if @opts[:cqrs] == :cqrs_query then
57
- # write your code here if it is a cqrs query
58
- else
59
- # write your code here if it is a cqrs command
55
+
56
+ case @opts[:cqrs]
57
+ when :cqrs_query
58
+ #inbound code
59
+ @app.call(env)
60
+ #outbound code
61
+ when :cqrs_command
62
+ #inbound code
63
+ @app.call(env)
64
+ #outbound code
65
+ else
66
+ raise "#{name} requires you to specify if your cqrs call is command or query?"
60
67
  end
61
- @app.call(env)
62
- # write outbound code
68
+
63
69
  end
64
70
  end
65
71
  FOO
72
+
66
73
  gsub_file file, '# Your code goes here...' do |match|
67
74
  match = @content
68
75
  end
@@ -1,3 +1,3 @@
1
1
  module Mushin
2
- VERSION = "0.48.0"
2
+ VERSION = "0.49.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mushin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.48.0
4
+ version: 0.49.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - zotherstupidguy