fluent-format 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/fluent-format.gemspec +1 -1
- data/lib/fluent/format/check.rb +10 -18
- data/lib/fluent/format/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a42c489ee8e91e24fb8b3b29be8c9ca70299686a
|
4
|
+
data.tar.gz: 81f2f02994f5b81cc889c8407b455fd84c998d88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 981ceaa4700db2e66380c7ad31cb7f9942d1aa456eff1ae55c2d4a3cca52ebb817eed28b66659d3f958edad5a4dec19d4f12804607cbc917575d13b3f3dde7d2
|
7
|
+
data.tar.gz: e32491a42548be2950038742a41ac89e8ed98eb30ac7777bbc23b3d619ea22201891d6bb16234867c49f802418cdff15f5d2415a48fef7f4abc3f1b04d3bdda4
|
data/CHANGELOG.md
CHANGED
data/fluent-format.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
21
|
s.add_runtime_dependency "thor"
|
22
|
-
s.add_runtime_dependency "fluentd"
|
22
|
+
s.add_runtime_dependency "fluentd"
|
23
23
|
|
24
24
|
s.add_development_dependency "rake"
|
25
25
|
s.add_development_dependency "rspec"
|
data/lib/fluent/format/check.rb
CHANGED
@@ -25,6 +25,9 @@ module Fluent
|
|
25
25
|
@opts[:inline_config] = opts[:inline_config]
|
26
26
|
@opts[:gemfile] = opts[:gemfile]
|
27
27
|
@opts[:gem_install_path] = opts[:gem_install_path]
|
28
|
+
if config_dev.respond_to?(:read) # IO object
|
29
|
+
@opts[:config_path] = Tempfile.open('fluent-format') {|f| f.puts(config_dev.read); f.path }
|
30
|
+
end
|
28
31
|
end
|
29
32
|
|
30
33
|
# Check config file
|
@@ -33,6 +36,11 @@ module Fluent
|
|
33
36
|
# @raise Fluent::ConfigError if plugin raises config error
|
34
37
|
# @return true if success
|
35
38
|
def run
|
39
|
+
if @opts[:config_path].respond_to?(:read) # IO object
|
40
|
+
@opts[:config_path] = Tempfile.open('fluent-format') {|fp|
|
41
|
+
fp.puts(@opts[:config_path].read); fp.path
|
42
|
+
}
|
43
|
+
end
|
36
44
|
Fluent::Format::BundlerInjection.new(@opts).run
|
37
45
|
Fluent::Supervisor.new(@opts).extended_dry_run
|
38
46
|
end
|
@@ -89,34 +97,18 @@ end
|
|
89
97
|
# Open the existing class and define new methods
|
90
98
|
module Fluent
|
91
99
|
class Supervisor
|
92
|
-
# Extended to
|
100
|
+
# Extended not to exit
|
93
101
|
#
|
94
102
|
# @raise Fluent::ConfigParseError if conf has syntax errors
|
95
103
|
# @raise Fluent::ConfigError if plugin raises config error
|
96
104
|
# @return true if success
|
97
105
|
def extended_dry_run
|
98
|
-
|
106
|
+
read_config
|
99
107
|
change_privilege
|
100
108
|
init_engine
|
101
109
|
install_main_process_signal_handlers
|
102
110
|
run_configure
|
103
111
|
true
|
104
112
|
end
|
105
|
-
|
106
|
-
# Extended to accept IO object
|
107
|
-
def extended_read_config
|
108
|
-
if @config_path.respond_to?(:read) # IO object
|
109
|
-
@config_data = @config_path.read
|
110
|
-
else
|
111
|
-
@config_fname = File.basename(@config_path)
|
112
|
-
@config_basedir = File.dirname(@config_path)
|
113
|
-
@config_data = File.read(@config_path)
|
114
|
-
end
|
115
|
-
if @inline_config == '-'
|
116
|
-
@config_data << "\n" << STDIN.read
|
117
|
-
elsif @inline_config
|
118
|
-
@config_data << "\n" << @inline_config.gsub("\\n","\n")
|
119
|
-
end
|
120
|
-
end
|
121
113
|
end
|
122
114
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-format
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: fluentd
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|