mushin 0.31.0 → 0.32.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: 67f6d5ca7b7743915f7837048ac95dd94059075b
4
- data.tar.gz: 9b58836195c3c215ae76f232cbed607b6c3bb66a
3
+ metadata.gz: 593e8d3ee443223ad5a9632c9a42a04d9f9aeff5
4
+ data.tar.gz: 22caec9d5f7cf20e0c33811ae4ae4c96eddb6617
5
5
  SHA512:
6
- metadata.gz: 0c1cb416afdc4a6f5880a38dbaaae16f192a820efefdbdf6aa62a8a561c2b715ad9009545abf363e720b70a89dff5e6195ff9ac410d90fcf4e85efb5de766d2c
7
- data.tar.gz: 5f41c089c7fecf43d505688e7f90497b6edcd40c7c028a26db1eafdcf6761c12ff09d673749f925c29c06ab145ee3b499838ff2232c2e60a359dab2080a3ab3f
6
+ metadata.gz: 563418f8f6b291394e820242fc7e267f91bf1f2808c604c27b48c8bec8e8abca242733cfa076e2b95404b8f5985f6a757ac30cf4c26f34ea9d934a4569713af3
7
+ data.tar.gz: df5ce4d3b9fdcfbc13d00228d749b7bdf1ec499761124759764b032faec0f814c954a24b2a3968fbfe434baf3a108479f3de7720267666a29267245ddadb4edb
data/exe/generator.rb CHANGED
@@ -34,34 +34,32 @@ module Mushin
34
34
 
35
35
  file = "#{name.to_s}/lib/#{name.to_s}.rb"
36
36
  @require_gem = <<-FOO
37
- require 'mushin'
38
- require_relative '#{name}/version'
37
+ require 'mushin'
38
+ require_relative '#{name}/version'
39
39
  FOO
40
40
  gsub_file file, /^.*\b(version)\b.*$/ do |match|
41
41
  match = @require_gem
42
42
  end
43
43
 
44
44
  @content = <<-FOO
45
- class Ext < Mushin::Ext
46
- def initialize app=nil, opts={}, params={}
47
- @app = app
48
- @opts = opts
49
- @params = params
50
- end
51
-
52
- def call env
53
- env ||= Hash.new
54
- # write inbound code
55
- if @opts[:cqrs] == :cqrs_query then
56
- # write your code here if it is a cqrs query
57
- else
58
- # write your code here if it is a cqrs command
45
+ class Ext < Mushin::Ext
46
+ def initialize app=nil, opts={}, params={}
47
+ @app = app
48
+ @opts = opts
49
+ @params = params
50
+ end
51
+ def call env
52
+ env ||= Hash.new
53
+ # write inbound code
54
+ if @opts[:cqrs] == :cqrs_query then
55
+ # write your code here if it is a cqrs query
56
+ else
57
+ # write your code here if it is a cqrs command
58
+ end
59
+ @app.call(env)
60
+ # write outbound code
61
+ end
59
62
  end
60
-
61
- @app.call(env)
62
- # write outbound code
63
- end
64
- end
65
63
  FOO
66
64
  gsub_file file, '# Your code goes here...' do |match|
67
65
  match = @content
@@ -77,6 +75,11 @@ end
77
75
  match = @gemspec
78
76
  end
79
77
 
78
+ gsub_file gemspec_file, /"#{name}"/ do |match|
79
+ match = "'#{name.sub(/::/, "_")}'"
80
+ end
81
+
82
+
80
83
  gsub_file gemspec_file, /%q{TODO: Write a short summary, because Rubygems requires one.}/ do |match|
81
84
  match = "%q{#{summary}}"
82
85
  end
@@ -152,6 +155,11 @@ end
152
155
  match = @gemspec
153
156
  end
154
157
 
158
+ gsub_file gemspec_file, /"#{name}"/ do |match|
159
+ match = "'#{name.sub(/::/, "_")}'"
160
+ end
161
+
162
+
155
163
  gsub_file gemspec_file, /%q{TODO: Write a short summary, because Rubygems requires one.}/ do |match|
156
164
  match = "%q{#{summary}}"
157
165
  end
@@ -1,3 +1,3 @@
1
1
  module Mushin
2
- VERSION = "0.31.0"
2
+ VERSION = "0.32.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.31.0
4
+ version: 0.32.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - zotherstupidguy