fluent-plugin-redis-store-wejick 0.0.6 → 0.0.7

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: ec25f3a1cbfa2865ad4277ceefb9c6f6e01163ec
4
- data.tar.gz: 30369b5f88c0805b76d5733bb765897f334fc7a3
3
+ metadata.gz: 6e2066d6534ed05cf989174037f8d29e1b645e55
4
+ data.tar.gz: 1cb7c6c67297f5df88cf40a0077d4d683b8bff5d
5
5
  SHA512:
6
- metadata.gz: a47e83f3330b510cf8d9bfdfffdd4d55a0c0ec3d6761dae7de127a5dd549d774beac75d5cbbbdbf3a9f63fe9f5ebf82b9dc113b68a814a75ea2f189c33c294be
7
- data.tar.gz: d3d98655798883b5da42a36b474a1cc185e6b4473e6807351c5a204984325a1b8bab602376654030a1f5326854e2ee4ec32ec9753166ddc1aff3ff3b485ffcbb
6
+ metadata.gz: 3764f4ee272235c8be7958fbd4f5abb4fec06e4e0d12ab19abb863de71c23ee6a6988a2205d56cb15b1869b99107d87bd3f51828bae8c3b7a0081a0425d2fc10
7
+ data.tar.gz: 5d7005008a97dadc79dfdc5dcb8b18ae4809daaaab78152746d5c28bf3f9572d6db5004a48562381383ef28e51841834912f70299622155080a8bf83ea697a34
data/README.md CHANGED
@@ -125,7 +125,11 @@ No more options than common options.
125
125
  | :---- | :----- | :----------------------- | :------------ |
126
126
  | `order` | string | asc | `asc`: **rpush**, `desc`: **lpush** |
127
127
  | `prevent_duplicate` | (0,1) | 0 | Prevent duplicated value in one key (list) |
128
- | `tidy_string` | (0,1) | 0 | Unescape value |
128
+ | `string_tolow` | (0,1) | 0 | value to lowercase |
129
+ | `string_unescape` | (0,1) | 0 | unescape value |
130
+ | `string_unescape_twice` | (0,1) | 0 | if you need another unescape |
131
+ | `value_length` | (0,1) | list trimming doesn't honor ordering |
132
+
129
133
  ### `set` storage specific options
130
134
 
131
135
  No more options than common options.
@@ -2,11 +2,11 @@
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = "fluent-plugin-redis-store-wejick"
4
4
  gem.email = "wejick@gmail.com"
5
- gem.version = "0.0.6"
5
+ gem.version = "0.0.7"
6
6
  gem.authors = ["wejick", "Gian Giovani"]
7
- gem.licenses = ["Apache License Version 2.0"]
8
- gem.summary = %q{Redis(zset/set/list/string/publish) output plugin for Fluentd}
9
- gem.description = %q{Redis(zset/set/list/string/publish) output plugin for Fluentd...}
7
+ gem.licenses = ["Apache-2.0"]
8
+ gem.summary = %q{Redis(zset/set/list/string/publish) output plugin for Fluentd (in heavy dev, contains config breaking change)}
9
+ gem.description = %q{Redis(zset/set/list/string/publish) output plugin for Fluentd, in the process to adding more functionality (not stable)...}
10
10
  gem.homepage = "https://github.com/wejick/fluent-plugin-redis-store"
11
11
 
12
12
  gem.files = `git ls-files`.split($\)
@@ -24,9 +24,10 @@ module Fluent
24
24
  config_param :value_length, :integer, :default => -1
25
25
  config_param :order, :string, :default => 'asc'
26
26
  config_param :prevent_duplicate, :integer, :default => 0
27
- config_param :only_alphabet,:integer, :default => 0
28
- config_param :tidy_string, :integer, :default => 0
29
- config_param :tidy_string_twice, :integer, :default => 0
27
+ config_param :only_alphanumeric, :integer, :default => 0
28
+ config_param :string_tolow, :integer, :default => 0
29
+ config_param :string_unescape, :integer, :default => 0
30
+ config_param :string_unescape_twice, :integer, :default => 0
30
31
 
31
32
  def initialize
32
33
  super
@@ -119,14 +120,17 @@ module Fluent
119
120
  def operation_for_list(record)
120
121
  key = get_key_from(record)
121
122
  value = get_value_from(record)
122
-
123
- if 0 < @tidy_string
124
- value = tidy_up_string(value)
123
+
124
+ if 0 < @string_tolow
125
+ value = lower_string(value)
125
126
  end
126
- if 0 < @tidy_string_twice
127
- value = tidy_up_string_twice(value)
127
+ if 0 < @string_unescape
128
+ value = unescape_string(value)
129
+ if 0 <@string_unescape_twice
130
+ value = unescape_string(value)
131
+ end
128
132
  end
129
- if 0 < @only_alphabet
133
+ if 0 < @only_alphanumeric
130
134
  if ( /^[a-zA-Z0-9 ]*$/.match(value) ) != nil
131
135
  else
132
136
  return
@@ -160,14 +164,11 @@ module Fluent
160
164
  @redis.publish key, value
161
165
  end
162
166
 
163
- # unescape and make it to downcase
164
- def tidy_up_string(string)
165
- string = string.downcase
166
- string = CGI.unescape(string)
167
- return string
167
+ def lower_string(string)
168
+ return string.downcase
168
169
  end
169
-
170
- def tidy_up_string_twice(string)
170
+
171
+ def unescape_string(string)
171
172
  string = CGI.unescape(string)
172
173
  return string
173
174
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-redis-store-wejick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - wejick
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-10 00:00:00.000000000 Z
12
+ date: 2016-08-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -67,7 +67,8 @@ dependencies:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
- description: Redis(zset/set/list/string/publish) output plugin for Fluentd...
70
+ description: Redis(zset/set/list/string/publish) output plugin for Fluentd, in the
71
+ process to adding more functionality (not stable)...
71
72
  email: wejick@gmail.com
72
73
  executables: []
73
74
  extensions: []
@@ -83,7 +84,7 @@ files:
83
84
  - test/plugin/test_out_redis_publish.rb
84
85
  homepage: https://github.com/wejick/fluent-plugin-redis-store
85
86
  licenses:
86
- - Apache License Version 2.0
87
+ - Apache-2.0
87
88
  metadata: {}
88
89
  post_install_message:
89
90
  rdoc_options: []
@@ -104,7 +105,8 @@ rubyforge_project:
104
105
  rubygems_version: 2.5.1
105
106
  signing_key:
106
107
  specification_version: 4
107
- summary: Redis(zset/set/list/string/publish) output plugin for Fluentd
108
+ summary: Redis(zset/set/list/string/publish) output plugin for Fluentd (in heavy dev,
109
+ contains config breaking change)
108
110
  test_files:
109
111
  - test/helpers.rb
110
112
  - test/plugin/test_out_redis_publish.rb