Skip to content

Commit

Permalink
Merge pull request #72 from awslabs/fix/fluentd-0.14
Browse files Browse the repository at this point in the history
Fix 0.14 requrie issue and test_out_kineis problem
  • Loading branch information
riywo committed Jun 11, 2016
2 parents 31b049c + 5f7cdad commit f4ae2b0
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ rvm:
gemfile:
- Gemfile
- gemfiles/Gemfile.fluentd-0.10.58
- gemfiles/Gemfile.fluentd-0.12

os:
- linux
Expand All @@ -24,3 +25,5 @@ matrix:
exclude:
- rvm: 2.2
os: osx
- rvm: 2.0.0
gemfile: Gemfile
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.

.PHONY: install streams firehose producer dummer hello $(wildcard test/test_*.rb) $(wildcard test/**/test_*.rb)
.PHONY: test install streams firehose producer dummer hello $(wildcard test/test_*.rb) $(wildcard test/**/test_*.rb)

all:
bundle install
bundle exec rake

test:
bundle exec rake test

install:
bundle exec rake install:local

Expand Down
3 changes: 2 additions & 1 deletion fluent-plugin-kinesis.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "pry-byebug", ">= 3.3.0"
spec.add_development_dependency "pry-stack_explorer", ">= 0.4.9.2"
spec.add_development_dependency "net-empty_port", ">= 0.0.2"
spec.add_development_dependency "dummer", ">= 0.4.0"
# Due to the version conflict of msgpack between fluentd-0.14 and fluent-logger-0.5.1
# spec.add_development_dependency "dummer", ">= 0.4.0"
spec.add_development_dependency "rubyzip", ">= 1.0.0"
spec.add_development_dependency "mocha", ">= 1.1.0"
spec.add_development_dependency "webmock", ">= 1.24.2"
Expand Down
20 changes: 20 additions & 0 deletions gemfiles/Gemfile.fluentd-0.12
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/asl/
#
# or in the "license" file accompanying this file. This file 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.

source 'https://rubygems.org'

# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
gemspec path: ".."

gem "fluentd", "~> 0.12.26"
1 change: 1 addition & 0 deletions lib/fluent/plugin/kinesis_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module Fluent
module KinesisHelper
include Fluent::SetTimeKeyMixin
include Fluent::SetTagKeyMixin
require 'fluent/process'
include Fluent::DetachMultiProcessMixin

def self.included(klass)
Expand Down
1 change: 1 addition & 0 deletions lib/fluent/plugin/kinesis_helper/initialize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class << self
include API
when kpl?
require 'fluent/plugin/kinesis_helper/kpl'
require 'fluent/version'
if Gem::Version.new(Fluent::VERSION) < Gem::Version.new('0.12.20')
# Backport from https://github.com/fluent/fluentd/pull/757
require 'fluent/plugin/patched_detach_process_impl'
Expand Down
1 change: 0 additions & 1 deletion test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.

require 'fluent/load'
require 'fluent/test'
require 'test/unit'
require 'mocha/test_unit'
Expand Down
8 changes: 7 additions & 1 deletion test/plugin/test_out_kinesis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ def create_driver(conf = CONFIG, tag='test')

def create_mock_client
client = mock(Object.new)
mock(Aws::Kinesis::Client).new({}) { client }
opts = {
user_agent_suffix: "fluent-plugin-kinesis-output-filter/1.0.1",
region: "us-east-1",
access_key_id: "test_key_id",
secret_access_key: "test_sec_key",
}
mock(Aws::Kinesis::Client).new(opts) { client }
return client
end

Expand Down

0 comments on commit f4ae2b0

Please sign in to comment.