diff --git a/lib/fluent/compat/detach_process_mixin.rb b/lib/fluent/compat/detach_process_mixin.rb new file mode 100644 index 0000000000..d527350442 --- /dev/null +++ b/lib/fluent/compat/detach_process_mixin.rb @@ -0,0 +1,25 @@ +# +# Fluentd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +module Fluent + module Compat + module DetachProcessMixin + end + + module DetachMultiProcessMixin + end + end +end diff --git a/lib/fluent/compat/input.rb b/lib/fluent/compat/input.rb index 5e5d2d474a..abbcb45c8f 100644 --- a/lib/fluent/compat/input.rb +++ b/lib/fluent/compat/input.rb @@ -16,6 +16,7 @@ require 'fluent/plugin' require 'fluent/plugin/input' +require 'fluent/process' require 'fluent/compat/call_super_mixin' module Fluent diff --git a/lib/fluent/compat/output.rb b/lib/fluent/compat/output.rb index 9dd973853a..3bb0931c3c 100644 --- a/lib/fluent/compat/output.rb +++ b/lib/fluent/compat/output.rb @@ -26,6 +26,7 @@ require 'fluent/compat/output_chain' require 'fluent/timezone' require 'fluent/mixin' +require 'fluent/process' require 'fluent/event' require 'fluent/plugin_helper/compat_parameters' diff --git a/lib/fluent/process.rb b/lib/fluent/process.rb new file mode 100644 index 0000000000..f9d40fb41a --- /dev/null +++ b/lib/fluent/process.rb @@ -0,0 +1,22 @@ +# +# Fluentd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'fluent/compat/detach_process_mixin' + +module Fluent + DetachProcessMixin = Fluent::Compat::DetachProcessMixin + DetachMultiProcessMixin = Fluent::Compat::DetachMultiProcessMixin +end diff --git a/test/test_process.rb b/test/test_process.rb new file mode 100644 index 0000000000..6c557f39ea --- /dev/null +++ b/test/test_process.rb @@ -0,0 +1,14 @@ +require_relative 'helper' +require 'fluent/process' + +class ProcessCompatibilityTest < ::Test::Unit::TestCase + test 'DetachProcessMixin is defined' do + assert defined?(::Fluent::DetachProcessMixin) + assert_equal ::Fluent::DetachProcessMixin, ::Fluent::Compat::DetachProcessMixin + end + + test 'DetachMultiProcessMixin is defined' do + assert defined?(::Fluent::DetachMultiProcessMixin) + assert_equal ::Fluent::DetachMultiProcessMixin, ::Fluent::Compat::DetachMultiProcessMixin + end +end