mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-06-05 21:15:20 +00:00
Make skeleton path configurable
This commit is contained in:
@@ -12,6 +12,7 @@ class CMockConfig
|
||||
:mock_path => 'mocks',
|
||||
:mock_prefix => 'Mock',
|
||||
:mock_suffix => '',
|
||||
:skeleton_path => '',
|
||||
:weak => '',
|
||||
:subdir => nil,
|
||||
:plugins => [],
|
||||
|
||||
@@ -35,7 +35,7 @@ class CMockFileWriter
|
||||
|
||||
def append_file(filename, subdir)
|
||||
raise "Where's the block of data to create?" unless block_given?
|
||||
full_file_name = "#{@config.mock_path}/#{subdir+'/' if subdir}#{filename}"
|
||||
full_file_name = "#{@config.skeleton_path}/#{subdir+'/' if subdir}#{filename}"
|
||||
File.open(full_file_name, 'a') do |file|
|
||||
yield(file, filename)
|
||||
end
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
:cmock:
|
||||
:plugins:
|
||||
- # none
|
||||
:skeleton_path: system/generated
|
||||
|
||||
:systest:
|
||||
:types: |
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
:cmock:
|
||||
:plugins:
|
||||
- # none
|
||||
:skeleton_path: system/generated
|
||||
|
||||
:systest:
|
||||
:types: |
|
||||
|
||||
Reference in New Issue
Block a user