fluentd 1.11.3-x86-mingw32 → 1.12.2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd might be problematic. Click here for more details.

Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/.deepsource.toml +13 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
  4. data/.github/ISSUE_TEMPLATE/config.yml +5 -0
  5. data/.github/workflows/linux-test.yaml +36 -0
  6. data/.github/workflows/macos-test.yaml +30 -0
  7. data/.github/workflows/stale-actions.yml +22 -0
  8. data/.github/workflows/windows-test.yaml +30 -0
  9. data/CHANGELOG.md +138 -0
  10. data/MAINTAINERS.md +5 -2
  11. data/README.md +2 -2
  12. data/bin/fluent-cap-ctl +7 -0
  13. data/bin/fluent-ctl +7 -0
  14. data/fluentd.gemspec +4 -3
  15. data/lib/fluent/capability.rb +87 -0
  16. data/lib/fluent/command/bundler_injection.rb +1 -1
  17. data/lib/fluent/command/ca_generate.rb +6 -3
  18. data/lib/fluent/command/cap_ctl.rb +174 -0
  19. data/lib/fluent/command/cat.rb +0 -1
  20. data/lib/fluent/command/ctl.rb +177 -0
  21. data/lib/fluent/command/fluentd.rb +4 -0
  22. data/lib/fluent/command/plugin_config_formatter.rb +18 -2
  23. data/lib/fluent/compat/parser.rb +2 -2
  24. data/lib/fluent/config/section.rb +2 -2
  25. data/lib/fluent/config/types.rb +2 -2
  26. data/lib/fluent/env.rb +4 -0
  27. data/lib/fluent/event.rb +3 -13
  28. data/lib/fluent/load.rb +0 -1
  29. data/lib/fluent/plugin.rb +5 -0
  30. data/lib/fluent/plugin/buffer.rb +2 -21
  31. data/lib/fluent/plugin/formatter.rb +24 -0
  32. data/lib/fluent/plugin/formatter_csv.rb +1 -1
  33. data/lib/fluent/plugin/formatter_hash.rb +3 -1
  34. data/lib/fluent/plugin/formatter_json.rb +3 -1
  35. data/lib/fluent/plugin/formatter_ltsv.rb +7 -5
  36. data/lib/fluent/plugin/formatter_out_file.rb +6 -4
  37. data/lib/fluent/plugin/formatter_single_value.rb +4 -2
  38. data/lib/fluent/plugin/formatter_tsv.rb +4 -2
  39. data/lib/fluent/plugin/in_http.rb +24 -3
  40. data/lib/fluent/plugin/in_monitor_agent.rb +1 -1
  41. data/lib/fluent/plugin/in_tail.rb +128 -41
  42. data/lib/fluent/plugin/in_tail/position_file.rb +39 -14
  43. data/lib/fluent/plugin/in_tcp.rb +1 -0
  44. data/lib/fluent/plugin/out_copy.rb +18 -5
  45. data/lib/fluent/plugin/out_exec_filter.rb +3 -3
  46. data/lib/fluent/plugin/out_forward.rb +61 -28
  47. data/lib/fluent/plugin/out_http.rb +29 -4
  48. data/lib/fluent/plugin/output.rb +14 -6
  49. data/lib/fluent/plugin/storage_local.rb +3 -3
  50. data/lib/fluent/plugin_helper/http_server/compat/server.rb +1 -1
  51. data/lib/fluent/plugin_helper/inject.rb +4 -1
  52. data/lib/fluent/plugin_helper/retry_state.rb +4 -0
  53. data/lib/fluent/supervisor.rb +153 -48
  54. data/lib/fluent/system_config.rb +2 -1
  55. data/lib/fluent/time.rb +58 -1
  56. data/lib/fluent/version.rb +1 -1
  57. data/lib/fluent/winsvc.rb +22 -4
  58. data/templates/plugin_config_formatter/param.md-table.erb +10 -0
  59. data/test/command/test_binlog_reader.rb +22 -6
  60. data/test/command/test_cap_ctl.rb +100 -0
  61. data/test/command/test_ctl.rb +57 -0
  62. data/test/command/test_fluentd.rb +38 -0
  63. data/test/command/test_plugin_config_formatter.rb +124 -2
  64. data/test/config/test_configurable.rb +1 -1
  65. data/test/plugin/in_tail/test_position_file.rb +46 -26
  66. data/test/plugin/out_forward/test_connection_manager.rb +6 -0
  67. data/test/plugin/test_filter_stdout.rb +6 -1
  68. data/test/plugin/test_formatter_hash.rb +6 -3
  69. data/test/plugin/test_formatter_json.rb +14 -4
  70. data/test/plugin/test_formatter_ltsv.rb +13 -5
  71. data/test/plugin/test_formatter_out_file.rb +35 -14
  72. data/test/plugin/test_formatter_single_value.rb +12 -6
  73. data/test/plugin/test_formatter_tsv.rb +12 -4
  74. data/test/plugin/test_in_exec.rb +1 -1
  75. data/test/plugin/test_in_http.rb +25 -0
  76. data/test/plugin/test_in_tail.rb +470 -32
  77. data/test/plugin/test_out_copy.rb +87 -0
  78. data/test/plugin/test_out_file.rb +23 -18
  79. data/test/plugin/test_out_forward.rb +74 -0
  80. data/test/plugin/test_out_http.rb +20 -1
  81. data/test/plugin/test_output.rb +12 -0
  82. data/test/plugin/test_parser_syslog.rb +2 -2
  83. data/test/plugin/test_sd_file.rb +1 -1
  84. data/test/plugin_helper/test_child_process.rb +5 -2
  85. data/test/plugin_helper/test_compat_parameters.rb +7 -2
  86. data/test/plugin_helper/test_http_server_helper.rb +3 -1
  87. data/test/plugin_helper/test_inject.rb +42 -0
  88. data/test/plugin_helper/test_server.rb +18 -5
  89. data/test/test_capability.rb +74 -0
  90. data/test/test_event.rb +16 -0
  91. data/test/test_formatter.rb +64 -10
  92. data/test/test_output.rb +6 -1
  93. data/test/test_supervisor.rb +150 -1
  94. data/test/test_time_parser.rb +109 -0
  95. metadata +61 -29
  96. data/.travis.yml +0 -57
  97. data/appveyor.yml +0 -28
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa31c3908803fa5ede4c5d120bd9f7d7023d902d14a183946b8e1418a54808e0
4
- data.tar.gz: ed4dfe3d8db58c25637919a2b3efe1e4f52cf7bad05ef60f20270253231b0b48
3
+ metadata.gz: 6f624ad420ea9eb7695dd98e758e5b0ded00b1aad244bd57ba93d477bc44e782
4
+ data.tar.gz: 8243cf0366b3d0a26f4f1d8af4ad6cbc9f7d8a3295ec8c8ea44ed2bc9537ea5c
5
5
  SHA512:
6
- metadata.gz: ad4790a87f4f7e911afc29fd28e68e6a49f8dc695b864068168a9ba131fce28f0c3dcf6e072621f3782c86788c60aed68f5b4b9a1525d71406353dc4c0bfbf82
7
- data.tar.gz: d9f82bf5942cb3666a6f0fe8c16d3edf420c5fbb4dfc246f6f08bfbda4205e555de87fedef1c5f5de2b4747bd5f6c060b9c7484ba79c14f844dc7db7f880dd70
6
+ metadata.gz: e9499438cd33f39182969bd00aa7fc5d97b605d16384700091e453af3b11728338329675d411a58f785968e918061dc49194195b5b4dfd14510ac10221d29dd4
7
+ data.tar.gz: 771eb1c06f7920f1a99c8bda2a086bfdc05aebd51b6bf4f4783aff175bd861fe5bae1d832736136c87819a0a31a6304111a8e43a84ea83e79639bfba24cd6c13
data/.deepsource.toml ADDED
@@ -0,0 +1,13 @@
1
+ version = 1
2
+
3
+ test_patterns = ["test/**/test_*.rb"]
4
+
5
+ exclude_patterns = [
6
+ "bin/**",
7
+ "docs/**",
8
+ "example/**"
9
+ ]
10
+
11
+ [[analyzers]]
12
+ name = "ruby"
13
+ enabled = true
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: Bug Report
3
- about: Create a report to help us improve. If you have questions about Fluentd and plugins, please direct these to https://groups.google.com/forum/#!forum/fluentd
3
+ about: Create a report with a procedure for reproducing the bug
4
4
 
5
5
  ---
6
6
 
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Ask a Question
4
+ url: https://discuss.fluentd.org/
5
+ about: I have questions about Fluentd and plugins. Please ask and answer questions at https://discuss.fluentd.org/.
@@ -0,0 +1,36 @@
1
+ name: Testing on Ubuntu
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ${{ matrix.os }}
12
+ continue-on-error: ${{ matrix.experimental }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ ruby-version: ['3.0', '2.7', '2.6', '2.5']
17
+ os: [ubuntu-latest]
18
+ experimental: [false]
19
+ include:
20
+ - ruby-version: head
21
+ os: ubuntu-latest
22
+ experimental: true
23
+
24
+ name: Unit testing with Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
25
+ steps:
26
+ - uses: actions/checkout@v2
27
+ - name: Set up Ruby
28
+ uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{ matrix.ruby-version }}
31
+ - name: Install addons
32
+ run: sudo apt-get install libgmp3-dev libcap-ng-dev
33
+ - name: Install dependencies
34
+ run: bundle install
35
+ - name: Run tests
36
+ run: bundle exec rake test
@@ -0,0 +1,30 @@
1
+ name: Testing on macOS
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ${{ matrix.os }}
12
+ continue-on-error: ${{ matrix.experimental }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ ruby-version: ['head', '2.7']
17
+ os: [macos-latest]
18
+ experimental: [true]
19
+
20
+ name: Unit testing with Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby-version }}
27
+ - name: Install dependencies
28
+ run: bundle install
29
+ - name: Run tests
30
+ run: bundle exec rake test
@@ -0,0 +1,22 @@
1
+ name: "Mark or close stale issues and PRs"
2
+ on:
3
+ schedule:
4
+ - cron: "00 10 * * *"
5
+
6
+ jobs:
7
+ stale:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/stale@v3
11
+ with:
12
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
13
+ days-before-stale: 90
14
+ days-before-close: 30
15
+ stale-issue-message: "This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days"
16
+ stale-pr-message: "This PR has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this PR will be closed in 30 days"
17
+ close-issue-message: "This issue was automatically closed because of stale in 30 days"
18
+ close-pr-message: "This PR was automatically closed because of stale in 30 days"
19
+ stale-pr-label: "stale"
20
+ stale-issue-label: "stale"
21
+ exempt-issue-labels: "bug,enhancement,feature request,pending,work_in_progress,v1,v2"
22
+ exempt-pr-labels: "bug,enhancement,feature request,pending,work_in_progress,v1,v2"
@@ -0,0 +1,30 @@
1
+ name: Testing on Windows
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ${{ matrix.os }}
12
+
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ ruby-version: ['3.0', '2.7', '2.6', '2.5']
17
+ os:
18
+ - windows-latest
19
+
20
+ name: Unit testing with Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby-version }}
27
+ - name: Install dependencies
28
+ run: ridk exec bundle install
29
+ - name: Run tests
30
+ run: bundle exec rake test TESTOPTS=-v
data/CHANGELOG.md CHANGED
@@ -1,5 +1,143 @@
1
+ # v1.12
2
+
3
+ ## Release v1.12.2 - 2021/03/29
4
+
5
+ ### Enhancement
6
+
7
+ * out_copy: Add ignore_if_prev_successes
8
+ https://github.com/fluent/fluentd/pull/3190
9
+ https://github.com/fluent/fluentd/pull/3287
10
+ * Support multiple kind of timestamp format
11
+ https://github.com/fluent/fluentd/pull/3252
12
+ * formatter_ltsv: suppress delimiters in output
13
+ https://github.com/fluent/fluentd/pull/1666
14
+ https://github.com/fluent/fluentd/pull/3288
15
+ https://github.com/fluent/fluentd/pull/3289
16
+
17
+ ### Bug fix
18
+
19
+ * in_tail: Expect ENOENT during stat
20
+ https://github.com/fluent/fluentd/pull/3275
21
+ * out_forward: Prevent transferring duplicate logs on restart
22
+ https://github.com/fluent/fluentd/pull/3267
23
+ https://github.com/fluent/fluentd/pull/3285
24
+ * in_tail: Handle to send rotated logs when mv is used for rotating
25
+ https://github.com/fluent/fluentd/pull/3294
26
+ * fluent-plugin-config-format: Fill an uninitialized instance variable
27
+ https://github.com/fluent/fluentd/pull/3297
28
+ * Fix MessagePackEventStream issue with Enumerable methods
29
+ https://github.com/fluent/fluentd/pull/2116
30
+
31
+ ### Misc
32
+
33
+ * Add webrick to support Ruby 3.0
34
+ https://github.com/fluent/fluentd/pull/3257
35
+ * Suggest Discource instead of Google Groups
36
+ https://github.com/fluent/fluentd/pull/3261
37
+ * Update MAINTAINERS.md
38
+ https://github.com/fluent/fluentd/pull/3282
39
+ * Introduce DeepSource to check code quality
40
+ https://github.com/fluent/fluentd/pull/3286
41
+ https://github.com/fluent/fluentd/pull/3259
42
+ https://github.com/fluent/fluentd/pull/3291
43
+ * Migrate to GitHub Actions and stabilize tests
44
+ https://github.com/fluent/fluentd/pull/3266
45
+ https://github.com/fluent/fluentd/pull/3268
46
+ https://github.com/fluent/fluentd/pull/3281
47
+ https://github.com/fluent/fluentd/pull/3283
48
+ https://github.com/fluent/fluentd/pull/3290
49
+
50
+ ## Release v1.12.1 - 2021/02/18
51
+
52
+ ### Enhancement
53
+
54
+ * out_http: Add `headers_from_placeholders` parameter
55
+ https://github.com/fluent/fluentd/pull/3241
56
+ * fluent-plugin-config-format: Add `--table` option to use markdown table
57
+ https://github.com/fluent/fluentd/pull/3240
58
+ * Add `--disable-shared-socket`/`disable_shared_socket` to disable ServerEngine's shared socket setup
59
+ https://github.com/fluent/fluentd/pull/3250
60
+
61
+ ### Bug fix
62
+
63
+ * ca_generate: Fix creating TLS certification files which include broken extensions
64
+ https://github.com/fluent/fluentd/pull/3246
65
+ * test: Drop TLS 1.1 tests
66
+ https://github.com/fluent/fluentd/pull/3256
67
+ * Remove old gem constraints to support Ruby 3
68
+
69
+ ### Misc
70
+
71
+ * Use GitHub Actions
72
+ https://github.com/fluent/fluentd/pull/3233
73
+ https://github.com/fluent/fluentd/pull/3255
74
+
75
+ ## Release v1.12.0 - 2021/01/05
76
+
77
+ ### New feature
78
+
79
+ * in_tail: Add `follow_inode` to support log rotation with wild card
80
+ https://github.com/fluent/fluentd/pull/2992
81
+ * in_tail: Handle linux capability
82
+ https://github.com/fluent/fluentd/pull/3155
83
+ https://github.com/fluent/fluentd/pull/3162
84
+ * windows: Add win32 events alternative to unix signals
85
+ https://github.com/fluent/fluentd/pull/3131
86
+
87
+ ### Enhancement
88
+
89
+ * buffer: Enable metadata comparison optimization on all platforms
90
+ https://github.com/fluent/fluentd/pull/3095
91
+ * fluent-plugin-config-formatter: Handle `service_discovery` type
92
+ https://github.com/fluent/fluentd/pull/3178
93
+ * in_http: Add `add_query_params` parameter to add query params to event record
94
+ https://github.com/fluent/fluentd/pull/3197
95
+ * inject: Support `unixtime_micros` and `unixtime_nanos` in `time_type`
96
+ https://github.com/fluent/fluentd/pull/3220
97
+ * Refactoring code
98
+ https://github.com/fluent/fluentd/pull/3167
99
+ https://github.com/fluent/fluentd/pull/3170
100
+ https://github.com/fluent/fluentd/pull/3180
101
+ https://github.com/fluent/fluentd/pull/3196
102
+ https://github.com/fluent/fluentd/pull/3213
103
+ https://github.com/fluent/fluentd/pull/3222
104
+
105
+ ### Bug fix
106
+
107
+ * output: Prevent retry.step from being called too many times in a short time
108
+ https://github.com/fluent/fluentd/pull/3203
109
+
1
110
  # v1.11
2
111
 
112
+ ## Release v1.11.5 - 2020/11/06
113
+
114
+ ### Enhancement
115
+
116
+ * formatter: Provide `newline` parameter to support `CRLF`
117
+ https://github.com/fluent/fluentd/pull/3152
118
+ * out_http: adding support for intermediate certificates
119
+ https://github.com/fluent/fluentd/pull/3146
120
+ * Update serverengine dependency to 2.2.2 or later
121
+
122
+ ### Bug fix
123
+
124
+ * Fix a bug that windows service isn't stopped gracefuly
125
+ https://github.com/fluent/fluentd/pull/3156
126
+
127
+ ## Release v1.11.4 - 2020/10/13
128
+
129
+ ### Enhancement
130
+
131
+ * inject: Support `unixtime_millis` in `time_type` parameter
132
+ https://github.com/fluent/fluentd/pull/3145
133
+
134
+ ### Bug fix
135
+
136
+ * out_http: Fix broken data with `json_array true`
137
+ https://github.com/fluent/fluentd/pull/3144
138
+ * output: Fix wrong logging issue for `${chunk_id}`
139
+ https://github.com/fluent/fluentd/pull/3134
140
+
3
141
  ## Release v1.11.3 - 2020/09/30
4
142
 
5
143
  ### Enhancement
data/MAINTAINERS.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # Fluentd Maintainers
2
2
 
3
3
  - [Naotoshi Seo](https://github.com/sonots), [ZOZO Technologies](https://tech.zozo.com/en/)
4
- - [Okkez](https://github.com/okkez), [Clearcode](https://www.clear-code.com/)
5
- - [Hiroshi Hatake](https://github.com/cosmo0920), [Clearcode](https://www.clear-code.com/)
4
+ - [Okkez](https://github.com/okkez)
5
+ - [Hiroshi Hatake](https://github.com/cosmo0920), [ClearCode](https://www.clear-code.com/)
6
6
  - [Masahiro Nakagawa](https://github.com/repeatedly), [Treasure Data](https://www.treasuredata.com/)
7
7
  - [Satoshi Tagomori](https://github.com/tagomoris), [Treasure Data](https://www.treasuredata.com/)
8
8
  - [Eduardo Silva](https://github.com/edsiper), [Arm Treasure Data](https://www.treasuredata.com/)
9
+ - [Fujimoto Seiji](https://github.com/fujimots), [ClearCode](https://www.clear-code.com/)
10
+ - [Takuro Ashie](https://github.com/ashie), [ClearCode](https://www.clear-code.com/)
11
+ - [Kentaro Hayashi](https://github.com/kenhys), [ClearCode](https://www.clear-code.com/)
data/README.md CHANGED
@@ -13,7 +13,7 @@ Drone CI for Arm64:
13
13
  [Fluentd](https://www.fluentd.org/) collects events from various data sources and writes them to files, RDBMS, NoSQL, IaaS, SaaS, Hadoop and so on. Fluentd helps you unify your logging infrastructure (Learn more about the [Unified Logging Layer](https://www.fluentd.org/blog/unified-logging-layer)).
14
14
 
15
15
  <p align="center">
16
- <img src="https://raw.githubusercontent.com/fluent/fluentd-docs-gitbook/1.0/images/fluentd-architecture.png" width="500px"/>
16
+ <img src="https://www.fluentd.org/images/fluentd-architecture.png" width="500px"/>
17
17
  </p>
18
18
 
19
19
  An event consists of *tag*, *time* and *record*. Tag is a string separated with '.' (e.g. myapp.access). It is used to categorize events. Time is a UNIX time recorded at occurrence of an event. Record is a JSON object.
@@ -78,7 +78,7 @@ You can run specified test via `TEST` environment variable:
78
78
  - Slack / Community: https://slack.fluentd.org
79
79
  - Newsletters: https://www.fluentd.org/newsletter
80
80
  - Author: [Sadayuki Furuhashi](https://github.com/frsyuki)
81
- - Copyright: 2011-2019 Fluentd Authors
81
+ - Copyright: 2011-2021 Fluentd Authors
82
82
  - License: Apache License, Version 2.0
83
83
 
84
84
  ## Security
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- coding: utf-8 -*-
3
+ here = File.dirname(__FILE__)
4
+ $LOAD_PATH << File.expand_path(File.join(here, '..', 'lib'))
5
+ require 'fluent/command/cap_ctl'
6
+
7
+ Fluent::CapCtl.new.call
data/bin/fluent-ctl ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ here = File.dirname(__FILE__)
4
+ $LOAD_PATH << File.expand_path(File.join(here, '..', 'lib'))
5
+ require 'fluent/command/ctl'
6
+
7
+ Fluent::Ctl.new.call
data/fluentd.gemspec CHANGED
@@ -18,15 +18,17 @@ Gem::Specification.new do |gem|
18
18
 
19
19
  gem.required_ruby_version = '>= 2.4'
20
20
 
21
+ gem.add_runtime_dependency("bundler")
21
22
  gem.add_runtime_dependency("msgpack", [">= 1.3.1", "< 2.0.0"])
22
23
  gem.add_runtime_dependency("yajl-ruby", ["~> 1.0"])
23
24
  gem.add_runtime_dependency("cool.io", [">= 1.4.5", "< 2.0.0"])
24
- gem.add_runtime_dependency("serverengine", [">= 2.0.4", "< 3.0.0"])
25
+ gem.add_runtime_dependency("serverengine", [">= 2.2.2", "< 3.0.0"])
25
26
  gem.add_runtime_dependency("http_parser.rb", [">= 0.5.1", "< 0.7.0"])
26
27
  gem.add_runtime_dependency("sigdump", ["~> 0.2.2"])
27
28
  gem.add_runtime_dependency("tzinfo", [">= 1.0", "< 3.0"])
28
29
  gem.add_runtime_dependency("tzinfo-data", ["~> 1.0"])
29
30
  gem.add_runtime_dependency("strptime", [">= 0.2.2", "< 1.0.0"])
31
+ gem.add_runtime_dependency("webrick", [">= 1.4.2", "< 1.8.0"])
30
32
 
31
33
  # build gem for a certain platform. see also Rakefile
32
34
  fake_platform = ENV['GEM_BUILD_FAKE_PLATFORM'].to_s
@@ -48,6 +50,5 @@ Gem::Specification.new do |gem|
48
50
  gem.add_development_dependency("test-unit", ["~> 3.3"])
49
51
  gem.add_development_dependency("test-unit-rr", ["~> 1.0"])
50
52
  gem.add_development_dependency("oj", [">= 2.14", "< 4"])
51
- gem.add_development_dependency("ext_monitor", [">= 0.1.2", "< 0.2"])
52
- gem.add_development_dependency("async-http")
53
+ gem.add_development_dependency("async-http", ">= 0.50.0")
53
54
  end
@@ -0,0 +1,87 @@
1
+ #
2
+ # Fluent
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ require "fluent/env"
18
+
19
+ if Fluent.linux?
20
+ begin
21
+ require 'capng'
22
+ rescue LoadError
23
+ end
24
+ end
25
+
26
+ module Fluent
27
+ if defined?(CapNG)
28
+ class Capability
29
+ def initialize(target = nil, pid = nil)
30
+ @capng = CapNG.new(target, pid)
31
+ end
32
+
33
+ def usable?
34
+ true
35
+ end
36
+
37
+ def apply(select_set)
38
+ @capng.apply(select_set)
39
+ end
40
+
41
+ def clear(select_set)
42
+ @capng.clear(select_set)
43
+ end
44
+
45
+ def have_capability?(type, capability)
46
+ @capng.have_capability?(type, capability)
47
+ end
48
+
49
+ def update(action, type, capability_or_capability_array)
50
+ @capng.update(action, type, capability_or_capability_array)
51
+ end
52
+
53
+ def have_capabilities?(select_set)
54
+ @capng.have_capabilities?(select_set)
55
+ end
56
+ end
57
+ else
58
+ class Capability
59
+ def initialize(target = nil, pid = nil)
60
+ end
61
+
62
+ def usable?
63
+ false
64
+ end
65
+
66
+ def apply(select_set)
67
+ false
68
+ end
69
+
70
+ def clear(select_set)
71
+ false
72
+ end
73
+
74
+ def have_capability?(type, capability)
75
+ false
76
+ end
77
+
78
+ def update(action, type, capability_or_capability_array)
79
+ false
80
+ end
81
+
82
+ def have_capabilities?(select_set)
83
+ false
84
+ end
85
+ end
86
+ end
87
+ end