command_builder 0.0.3 → 0.0.4

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.
@@ -0,0 +1,14 @@
1
+ # Generated code. Do not modify.
2
+
3
+ require 'getversion'
4
+ require_relative '../internal/underlying_builder'
5
+
6
+ module FluentCommandBuilder
7
+ module <%= model[:module_name] %>
8
+ COMMAND_NAME = '<%= model[:command_name] %>'
9
+ def self.version(path=nil)
10
+ executable = path ? File.join(path, COMMAND_NAME) : COMMAND_NAME
11
+ GetVersion[executable]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,24 @@
1
+ # Generated code. Do not modify.
2
+
3
+ require_relative '../internal/command_base'
4
+ require_relative '../internal/command_builder_config'
5
+ require_relative '../internal/underlying_builder'
6
+
7
+ module FluentCommandBuilder
8
+ module <%= model[:command_module_name] %>
9
+ module <%= model[:version_module_name] %>
10
+ VERSION = '<%= model[:version] %>'
11
+ @@config = CommandBuilderConfig.new FluentCommandBuilder::<%= model[:command_module_name] %>::COMMAND_NAME, VERSION
12
+ def configure_<%= model[:factory_method_name] %>
13
+ yield @@config
14
+ end
15
+ def <%= model[:command_factory_method_signature] %>
16
+ b = UnderlyingBuilder.new @@config
17
+ c = <%= model[:command_initializer_call] %>
18
+ yield b if block_given?
19
+ c
20
+ end
21
+ <%= model[:command_class] %>
22
+ end
23
+ end
24
+ 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.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -28,6 +28,8 @@ files:
28
28
  - lib/command_builder/code_generator/node_code_names.rb
29
29
  - lib/command_builder/code_generator/ruby_code_writer.rb
30
30
  - lib/command_builder/code_generator/string_extensions.rb
31
+ - lib/command_builder/code_generator/templates/command_module.erb
32
+ - lib/command_builder/code_generator/templates/version_module.erb
31
33
  - lib/command_builder/code_generator/version.rb
32
34
  - lib/command_builder/code_generator.rb
33
35
  homepage: