fluent-format 0.2.5 → 0.2.6

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: 7c9b4d49318935b89c482356b9b14679175ba59f
4
- data.tar.gz: 3c8e282eee678d7e0194110ba09d4a4d0cafc296
3
+ metadata.gz: a42c489ee8e91e24fb8b3b29be8c9ca70299686a
4
+ data.tar.gz: 81f2f02994f5b81cc889c8407b455fd84c998d88
5
5
  SHA512:
6
- metadata.gz: 1f4f7adf04117be4d7d2c1df0b3d0d855efcd1723719f67ee6d76257aaf57146c8edb1f4a1e33d346c2fdd31360cdd8182b96636d48019c2c53b20291725d6a0
7
- data.tar.gz: a670c16cd65563af5a88d294cb65c0517dfc4c9d0a173e4df2514aab63853d8369b9bde28c91c14dbf4372ea2cb62f54298891886be103dd107f30ebe4f41d19
6
+ metadata.gz: 981ceaa4700db2e66380c7ad31cb7f9942d1aa456eff1ae55c2d4a3cca52ebb817eed28b66659d3f958edad5a4dec19d4f12804607cbc917575d13b3f3dde7d2
7
+ data.tar.gz: e32491a42548be2950038742a41ac89e8ed98eb30ac7777bbc23b3d619ea22201891d6bb16234867c49f802418cdff15f5d2415a48fef7f4abc3f1b04d3bdda4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.2.6 (2014/09/22)
2
+
3
+ Fixes:
4
+
5
+ * Support gem 'fluentd', '>= 0.10.51'
6
+
1
7
  ## 0.2.5 (2014/09/22)
2
8
 
3
9
  Fixes:
@@ -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", "= 0.10.50"
22
+ s.add_runtime_dependency "fluentd"
23
23
 
24
24
  s.add_development_dependency "rake"
25
25
  s.add_development_dependency "rspec"
@@ -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 accept IO object
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
- extended_read_config
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
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
  class Format
3
- VERSION = "0.2.5"
3
+ VERSION = "0.2.6"
4
4
  end
5
5
  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.5
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.10.50
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.10.50
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement