fluent-plugin-redmine 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f193b8f6fea649e602c652324c244eb11d521eea
4
- data.tar.gz: 4633aeb58a38806c7f3221a692184dfbcd2eb512
3
+ metadata.gz: 1717557dfbb5ad9bba62595e3bf2d8dc092fd9fb
4
+ data.tar.gz: 2a32bff9984acb4aac564396269453f8555b16d5
5
5
  SHA512:
6
- metadata.gz: d0a01fcc9fb1e13e446432cef4edd0c601d5fa22a4feb625057bc868f95237ac5a7f09291815faaa3b56215748e817eab1872edf2cb4d955c408bc0546f47712
7
- data.tar.gz: b8d76888ac8d943176ceb84b61147135869451983e06b54cfff84da9c9ba8b245b61bf6290d5bf3f0001d66bccfe2d437c3546b7eb6f239fb41b4c012e464da0
6
+ metadata.gz: d0d3d6d2e72d252ef8386bc7ce2e485e8a8a4607de562b3cd188a7cf986f45c81f0ed550cab940dd6e0e7aa4380544e63052f77a6bc5cb474a4fc004b20cc339
7
+ data.tar.gz: bf1429ce7cdbc9fa766e323088716198e09f853223152436554a6ebcdf6eada8ff8151fd5cf47a3fd129acea0196a1f5e28d6d70bdb797222e5e0a5292c31a03
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-redmine"
7
- spec.version = "0.6.0"
7
+ spec.version = "0.6.1"
8
8
  spec.authors = ["Takuma kanari"]
9
9
  spec.email = ["chemtrails.t@gmail.com"]
10
10
  spec.summary = %q{Fluentd output plugin to create ticket in redmine}
@@ -3,16 +3,11 @@ module Fluent
3
3
  class RedmineOutput < BufferedOutput
4
4
  Fluent::Plugin.register_output('redmine', self)
5
5
 
6
- # Define `log` method for v0.10.42 or earlier
7
- unless method_defined?(:log)
8
- define_method("log") { $log }
9
- end
10
-
11
6
  desc "Redmine url"
12
- config_param :url, :string, default: nil
7
+ config_param :url, :string
13
8
 
14
9
  desc "Redmine api key"
15
- config_param :api_key, :string, default: nil, secret: true
10
+ config_param :api_key, :string, secret: true
16
11
 
17
12
  desc "Key name in the record for tag"
18
13
  config_param :tag_key, :string, default: "tag"
@@ -58,14 +53,6 @@ module Fluent
58
53
  def configure(conf)
59
54
  super
60
55
 
61
- if @url.nil?
62
- raise Fluent::ConfigError, "'url' must be specified."
63
- end
64
-
65
- if @api_key.nil?
66
- raise Fluent::ConfigError, "'api_key' must be specified."
67
- end
68
-
69
56
  @use_ssl = (@url =~ /^https:/) ? true : false
70
57
 
71
58
  if @use_ssl
@@ -145,7 +132,7 @@ module Fluent
145
132
  private
146
133
 
147
134
  def make_record(tag, record)
148
- dest = Hash.new
135
+ dest = {}
149
136
  dest[:"#{@tag_key}"] = tag
150
137
  record.map do |key, value|
151
138
  dest[:"#{key}"] = value
@@ -156,11 +143,11 @@ module Fluent
156
143
  class TemplateExpander
157
144
  attr_reader :template, :placeholders
158
145
 
159
- Empty = ''
146
+ EMPTY = ''
160
147
 
161
148
  def initialize(template)
162
149
  @template = template
163
- @placeholders = Array.new
150
+ @placeholders = []
164
151
  @template.gsub(/%{([^}]+)}/) do
165
152
  @placeholders << $1 unless @placeholders.include?($1)
166
153
  end
@@ -169,7 +156,7 @@ module Fluent
169
156
  def bind(values)
170
157
  @placeholders.each do |key|
171
158
  key_ = :"#{key}"
172
- values[key_] = Empty unless values.key?(key_)
159
+ values[key_] = EMPTY unless values.key?(key_)
173
160
  end
174
161
  @template % values
175
162
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-redmine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takuma kanari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-28 00:00:00.000000000 Z
11
+ date: 2017-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project: fluent-plugin-redmine
110
- rubygems_version: 2.4.5.1
110
+ rubygems_version: 2.5.2
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Fluentd output plugin to create ticket in redmine