fluent-plugin-groonga 1.0.4 → 1.0.5

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: 91510d22d9e94a522c9ee54b3a4d0caf4c6f4cc9
4
- data.tar.gz: 0e77c6fc21121575977a288c131272c780ae0ecb
3
+ metadata.gz: 2bddd43990cc83433776467a275c7c3ac0e16407
4
+ data.tar.gz: 0259005297bc33bd6476eb34d5bdae3cbbcfd978
5
5
  SHA512:
6
- metadata.gz: 6d00c8ff58928fc8c94b1a6ab98f803cac53517a022bb968ecf1b7e4862442e89f6583c89cedcd2b3b6022e3ff6acb82bb9ad270ec17a98b14b998c00727425a
7
- data.tar.gz: 1fb6b8d3faeae3bf096b1df0845f590620ecf08cc41c2e4234ade39297e42efecd2a908c61f64ad316096ddba98c9833c2a8b6439e83ed178133374617b06fc6
6
+ metadata.gz: 1eddbfd3cdcc690f38e5544d31c9ff29a9df51b3758c3bcdc3de096636b0bb2aac8a24312d476be0b7a6780fca415d219e0547b3f57b1e46a533dbaaa79903a6
7
+ data.tar.gz: 15a9fcfe04e8d18bc1c6190abbe718c8939bd6cdf6dcc027302277e504f05b71bb8db0ab39d092d00c4da3404dde014dd2ae9982f471e19699368193369ccfe0
data/doc/text/news.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  # News
4
4
 
5
+ ## 1.0.5: 2014-10-21
6
+
7
+ ### Improvements
8
+
9
+ * Supported time value in string.
10
+
5
11
  ## 1.0.4: 2014-10-20
6
12
 
7
13
  ### Improvements
@@ -17,7 +17,7 @@
17
17
 
18
18
  Gem::Specification.new do |spec|
19
19
  spec.name = "fluent-plugin-groonga"
20
- spec.version = "1.0.4"
20
+ spec.version = "1.0.5"
21
21
  spec.authors = ["Kouhei Sutou"]
22
22
  spec.email = ["kou@clear-code.com"]
23
23
  spec.summary = "Fluentd plugin to store data into Groonga and implement Groonga replication system."
@@ -40,7 +40,7 @@ Gem::Specification.new do |spec|
40
40
 
41
41
  spec.add_development_dependency("rake")
42
42
  spec.add_development_dependency("bundler")
43
- spec.add_development_dependency("packnga", ">= 0.9.6")
43
+ spec.add_development_dependency("packnga", ">= 1.0.1")
44
44
  spec.add_development_dependency("test-unit")
45
45
  spec.add_development_dependency("test-unit-notify")
46
46
  spec.add_development_dependency("redcarpet")
@@ -181,19 +181,6 @@ module Fluent
181
181
  end
182
182
 
183
183
  private
184
- def time_values?
185
- now = Time.now.to_i
186
- year_in_seconds = 365 * 24 * 60 * 60
187
- window = 10 * year_in_seconds
188
- new = now + window
189
- old = now - window
190
- recent_range = old..new
191
- @sample_values.all? do |sample_value|
192
- sample_value.is_a?(Integer) and
193
- recent_range.cover?(sample_value)
194
- end
195
- end
196
-
197
184
  def integer_value?(value)
198
185
  case value
199
186
  when String
@@ -210,6 +197,19 @@ module Fluent
210
197
  end
211
198
  end
212
199
 
200
+ def time_values?
201
+ now = Time.now.to_i
202
+ year_in_seconds = 365 * 24 * 60 * 60
203
+ window = 10 * year_in_seconds
204
+ new = now + window
205
+ old = now - window
206
+ recent_range = old..new
207
+ @sample_values.all? do |sample_value|
208
+ integer_value?(sample_value) and
209
+ recent_range.cover?(Integer(sample_value))
210
+ end
211
+ end
212
+
213
213
  def int32_values?
214
214
  int32_min = -(2 ** 31)
215
215
  int32_max = 2 ** 31 - 1
@@ -49,6 +49,11 @@ class OutputTypeGuesserTest < Test::Unit::TestCase
49
49
  future = now + (9 * year_in_seconds)
50
50
  assert_equal("Time", guess([now, past, future]))
51
51
  end
52
+
53
+ test "string" do
54
+ now = Time.now.to_i
55
+ assert_equal("Time", guess([now.to_s]))
56
+ end
52
57
  end
53
58
 
54
59
  sub_test_case "Int32" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-groonga
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-20 00:00:00.000000000 Z
11
+ date: 2014-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 0.9.6
89
+ version: 1.0.1
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 0.9.6
96
+ version: 1.0.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: test-unit
99
99
  requirement: !ruby/object:Gem::Requirement