fluent-plugin-backlog 0.0.1 → 0.0.2

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: d2df0559c761dcdcd78fe64628b0b344a47dbdfe
4
- data.tar.gz: 967a0cd5e05dda75fe90acdbf381a5f8fe7530ff
3
+ metadata.gz: 0eec4b792ace394086cca0739e31a8b035a4310f
4
+ data.tar.gz: 37faed767eec207be53892a1018038bf3def4bd4
5
5
  SHA512:
6
- metadata.gz: 808bab079894e44e60a411836f21752add16103608b728b603a19f5183157100b1aa9dfefdfe5f86e90eb294cf4355a98218fc2f7596e9a961039939a9bddbaa
7
- data.tar.gz: 3f555dc12a4ba30e17c4c3c6d1c24eef4d00a7b5f6f24d5eedd5a6107cafd3b019a2240c08f039a8ac098320b11c41adf49801dcf572ff9eddec58400939ff18
6
+ metadata.gz: c26d40900e2a88c3f9756f7e2ab2780a31d50e134dee7ef2ecf22f82d59264fddab884e04b249514dd701685ba085002ecf10de53a6705c83e33b74e21c59a3b
7
+ data.tar.gz: f0f5d225d272122387f134d2b3b774f5acebbdf1c950f5ed2e6e53bdab166e0229d68524af2b387b595bed0929dda9ac4c83a0951f951c21d115086d70c9d8b3
data/README.md CHANGED
@@ -30,7 +30,7 @@ description_template|description(sprintf format)
30
30
  description_keys|description key
31
31
  component|category_id
32
32
 
33
- ## Configuration Example(bulk insert)
33
+ ## Configuration Example
34
34
 
35
35
  ```
36
36
  <match backlog>
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = "fluent-plugin-backlog"
4
- gem.version = "0.0.1"
4
+ gem.version = "0.0.2"
5
5
  gem.authors = ["Hiroshi Toyama"]
6
6
  gem.email = ["toyama0919@gmail.com"]
7
7
  gem.description = %q{output plugin for Backlog.}
@@ -43,13 +43,21 @@ module Fluent
43
43
  chunk.msgpack_each do |tag, time, record|
44
44
  summary = @summary_template % @summary_keys.map { |key| record[key] }
45
45
  args = { projectId: @project_id, summary: summary }
46
- if @description_template
47
- description = @description_template % @description_keys.map { |key| record[key] }
48
- args[:description] = description
49
- end
46
+ args[:description] = create_description(record)
50
47
  args[:component] = @component if @component
51
48
  @server.call('backlog.createIssue', args)
49
+ $log.info "backlog_plugin write [#{args[:summary]}]"
52
50
  end
53
51
  end
52
+
53
+ private
54
+
55
+ def create_description(record)
56
+ descriptions = @description_keys.map { |key|
57
+ val = record[key].class == Array ? record[key].join("\n") : record[key]
58
+ "#{key}:\n#{val}"
59
+ }
60
+ descriptions.join("\n\n")
61
+ end
54
62
  end
55
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-backlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Toyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-08 00:00:00.000000000 Z
11
+ date: 2014-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -108,7 +108,7 @@ files:
108
108
  - README.md
109
109
  - Rakefile
110
110
  - fluent-plugin-backlog.gemspec
111
- - lib/fluent/plugin/out_backlog_create.rb
111
+ - lib/fluent/plugin/out_backlog.rb
112
112
  - sample/fluent.conf
113
113
  - test/helper.rb
114
114
  - test/plugin/test_out_backlog.rb