command_builder 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,7 @@ module CommandBuilder
10
10
 
11
11
  def initialize(options={})
12
12
  @definitions_dir = 'command_definitions'
13
+ @module_name = options[:module_name] || 'CommandBuilder'
13
14
  @command_builders_dir = options[:command_builders_dir] || 'lib/command_builder'
14
15
  end
15
16
 
@@ -49,10 +50,9 @@ module CommandBuilder
49
50
  code_names = CommandCodeNames.new command, version
50
51
 
51
52
  model = {
53
+ module_name: @module_name,
52
54
  command_factory_method_signature: code_names.command_factory_method_signature,
53
55
  version_factory_method_signature: code_names.version_factory_method_signature,
54
- create_method_signature: code_names.create_method_signature,
55
- create_method_call: code_names.create_method_call,
56
56
  command_initializer_call: code_names.command_initializer_call,
57
57
  command_module_name: code_names.command_module_name,
58
58
  version_module_name: code_names.version_module_name,
@@ -34,14 +34,6 @@ module CommandBuilder
34
34
  format_method version_factory_method_name, factory_method_args
35
35
  end
36
36
 
37
- def create_method_signature
38
- format_method 'self.create', factory_method_args
39
- end
40
-
41
- def create_method_call
42
- format_method "FluentCommandBuilder::#{command_module_name}::#{version_module_name}.create", initializer_values
43
- end
44
-
45
37
  def command_factory_method_call
46
38
  format_method command_factory_method_name, initializer_values
47
39
  end
@@ -3,7 +3,7 @@
3
3
  require 'getversion'
4
4
  require_relative '../internal/underlying_builder'
5
5
 
6
- module FluentCommandBuilder
6
+ module <%= model[:module_name] %>
7
7
  module <%= model[:module_name] %>
8
8
  COMMAND_NAME = '<%= model[:command_name] %>'
9
9
  def self.version(path=nil)
@@ -4,11 +4,11 @@ require_relative '../internal/command_base'
4
4
  require_relative '../internal/command_builder_config'
5
5
  require_relative '../internal/underlying_builder'
6
6
 
7
- module FluentCommandBuilder
7
+ module <%= model[:module_name] %>
8
8
  module <%= model[:command_module_name] %>
9
9
  module <%= model[:version_module_name] %>
10
10
  VERSION = '<%= model[:version] %>'
11
- @@config = CommandBuilderConfig.new FluentCommandBuilder::<%= model[:command_module_name] %>::COMMAND_NAME, VERSION
11
+ @@config = CommandBuilderConfig.new <%= model[:module_name] %>::<%= model[:command_module_name] %>::COMMAND_NAME, VERSION
12
12
  def configure_<%= model[:factory_method_name] %>
13
13
  yield @@config
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: command_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: