fluent-plugin-storage-mongo 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: 1f92c1ab802709f91b4621de0647a350c57c8083
4
- data.tar.gz: 3eb59a886d0a1f82b8a4f09b6246f6268f565cb7
3
+ metadata.gz: '0820d51e381332916791bb09a0ec68de66c12b7e'
4
+ data.tar.gz: 53bd8cfc573fbdec11d27a324693b2aea144d53e
5
5
  SHA512:
6
- metadata.gz: a3330e09aac3131c289f47ed84997ec13f309e72a263d89a5386ef6307b6be7413f931ecd73afa95b5ae63ccbdf8a89b9de4333c0d1337baec94eaf151ae4dbd
7
- data.tar.gz: 940e09ed5c593d8429ea7f30014f9d36fef29daba6543a48bd11f4e16e7a4c23c5b37e3d8036188cf0e86f717e418224e0086d5f6f4092e7ff0cba5b9cb6780a
6
+ metadata.gz: f57e509e0558c7bcded908dd3b0763c5172b6eb4cd67f1bf079a8a0a47e3eaa36272e79cb734e1012bd1fd79edab93c5951110453917e6e961ac1b63dcc794d2
7
+ data.tar.gz: 4efd90933307203bdbc86696ae6ad15e81fb1ed564957665cdf78edda57f16cac995d5955ee40e8075dc107f89d7b9de6fc0afeec0355d2394b28e79c2287a2b
data/README.md CHANGED
@@ -26,10 +26,10 @@ Or install it yourself as:
26
26
 
27
27
  ## Configuration
28
28
 
29
- Use _mongo_ type in store.
29
+ Use _mongo_ type in storage.
30
30
 
31
31
  ```aconf
32
- <store>
32
+ <storage>
33
33
  @type mongo
34
34
  database fluent
35
35
  collection test
@@ -38,27 +38,26 @@ Use _mongo_ type in store.
38
38
  host fluenter
39
39
  port 10000
40
40
 
41
- # capped option is not implemented yet.
41
+ # Set 'capped true' if you want to use capped collection
42
+ capped true
43
+ capped_size 100m
42
44
 
43
45
  # Set 'user' and 'password' for authentication
44
- user handa
45
- password shinobu
46
-
47
- # Other buffer configurations here
48
- </store>
46
+ user mongo
47
+ password passw0rd
48
+ </storage>
49
49
  ```
50
50
 
51
51
  ## Development
52
52
 
53
53
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
54
54
 
55
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
55
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `fluent-plugin-storage-mongo.gemspec`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
56
56
 
57
57
  ## Contributing
58
58
 
59
59
  Bug reports and pull requests are welcome on GitHub at https://github.com/cosmo0920/fluent-plugin-storage-mongo.
60
60
 
61
-
62
61
  ## License
63
62
 
64
63
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -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-storage-mongo"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.0.2"
8
8
  spec.authors = ["Hiroshi Hatake"]
9
9
  spec.email = ["cosmo0920.oucc@gmail.com"]
10
10
 
@@ -61,6 +61,13 @@ module Fluent
61
61
  end
62
62
  end
63
63
 
64
+ if conf.has_key?('capped') and Fluent::Config.bool_value(conf['capped'])
65
+ raise Fluent::ConfigError, "'capped_size' parameter is required on <storage> of Mongo storage" unless conf.has_key?('capped_size')
66
+ @collection_options[:capped] = true
67
+ @collection_options[:size] = Fluent::Config.size_value(conf['capped_size'])
68
+ @collection_options[:max] = Fluent::Config.size_value(conf['capped_max']) if conf.has_key?('capped_max')
69
+ end
70
+
64
71
  @client_options[:write] = {j: @journaled}
65
72
  @client_options[:write].merge!({w: @write_concern}) unless @write_concern.nil?
66
73
  @client_options[:ssl] = @ssl
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-storage-mongo
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 Hatake
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-16 00:00:00.000000000 Z
11
+ date: 2017-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler