Skip to content

Commit

Permalink
Merge pull request #1443 from fluent/fix-regression-of-require-process
Browse files Browse the repository at this point in the history
Fix regression of require process
  • Loading branch information
repeatedly authored Feb 1, 2017
2 parents cbf9333 + 7769f32 commit 4dab161
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 0 deletions.
25 changes: 25 additions & 0 deletions lib/fluent/compat/detach_process_mixin.rb
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions lib/fluent/compat/input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

require 'fluent/plugin'
require 'fluent/plugin/input'
require 'fluent/process'
require 'fluent/compat/call_super_mixin'

module Fluent
Expand Down
1 change: 1 addition & 0 deletions lib/fluent/compat/output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
22 changes: 22 additions & 0 deletions lib/fluent/process.rb
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions test/test_process.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4dab161

Please sign in to comment.