jubatus 0.5.0 → 0.5.1
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 +15 -0
- data/VERSION +1 -1
- data/lib/jubatus/common/datum.rb +6 -6
- data/test/jubatus_test/common/datum_test.rb +18 -0
- metadata +20 -25
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YzY1NjAwMWUxZGM2NTNlMDI5ZGM5OGZjYzYwMjJhMDk0MGUyN2YyNw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZjQ4N2IxYzRmMDQ2MTIwZmIxMjU3ZTQ5MTA1ODNiODc1OTJkOTBhNg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
OGNiN2VlYTg4ZWI3MzZlOTgzNTVkZmI1MDQyYWIxZGQxNTQwNDg2MTk4OTdm
|
10
|
+
MGNiZDY4MGI1ZjQzNjE4NWRhMGE2NGE2M2IzNjc1M2RkMTA1ZWU4ZWVhOTA1
|
11
|
+
MWUwZDg5YTIwNDgyNGZjNGE3OGJjZjVmYmY4YTg0NjYzYjhkZTQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YzAxYzg3ODhmMjE2ZjgyN2M3NTRmYTEzZjczNmIyODY2MmE3MzIzODVkYjRm
|
14
|
+
ZWU3YjA3OTM3NjYwOTIyOTFlMWZkMmUwODA2ZWRkZWI0ZDgyYjE0OGI2MDYw
|
15
|
+
NWRlYzU3ZDRlYzRhZGQyZmFhNWEwOTA2NTdjNTlhYmRhODljYjE=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/lib/jubatus/common/datum.rb
CHANGED
@@ -29,7 +29,7 @@ class Datum
|
|
29
29
|
def add_string(key, value)
|
30
30
|
raise TypeError unless String === key
|
31
31
|
if String === value
|
32
|
-
@string_values << [
|
32
|
+
@string_values << [key, value]
|
33
33
|
else
|
34
34
|
raise TypeError
|
35
35
|
end
|
@@ -37,10 +37,10 @@ class Datum
|
|
37
37
|
|
38
38
|
def add_number(key, value)
|
39
39
|
raise TypeError unless String === key
|
40
|
-
if Integer ===
|
41
|
-
@num_values << [
|
42
|
-
elsif Float ===
|
43
|
-
@num_values << [
|
40
|
+
if Integer === value
|
41
|
+
@num_values << [key, value.to_f]
|
42
|
+
elsif Float === value
|
43
|
+
@num_values << [key, value]
|
44
44
|
else
|
45
45
|
raise TypeError
|
46
46
|
end
|
@@ -49,7 +49,7 @@ class Datum
|
|
49
49
|
def add_binary(key, value)
|
50
50
|
raise TypeError unless String === key
|
51
51
|
if String === value
|
52
|
-
@binary_values << [
|
52
|
+
@binary_values << [key, value]
|
53
53
|
else
|
54
54
|
raise TypeError
|
55
55
|
end
|
@@ -21,6 +21,24 @@ class DatumTest < Test::Unit::TestCase
|
|
21
21
|
d.binary_values)
|
22
22
|
end
|
23
23
|
|
24
|
+
def test_add_string
|
25
|
+
d = Datum.new
|
26
|
+
d.add_string("key", "value")
|
27
|
+
assert_equal([["key", "value"]], d.string_values)
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_add_number
|
31
|
+
d = Datum.new
|
32
|
+
d.add_number("key", 20.0)
|
33
|
+
assert_equal([["key", 20.0]], d.num_values)
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_add_binary
|
37
|
+
d = Datum.new
|
38
|
+
d.add_binary("key", "0101")
|
39
|
+
assert_equal([["key", "0101"]], d.binary_values)
|
40
|
+
end
|
41
|
+
|
24
42
|
def test_empty
|
25
43
|
assert_equal([[], [], []].to_msgpack,
|
26
44
|
Datum.new.to_msgpack.to_msgpack)
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jubatus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
5
|
-
prerelease:
|
4
|
+
version: 0.5.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- PFI & NTT
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-12-20 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: msgpack-rpc
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -66,58 +61,58 @@ files:
|
|
66
61
|
- integration_test/jubatus_test/stat/test.rb
|
67
62
|
- integration_test/jubatus_test/test_util.rb
|
68
63
|
- jubatus.gemspec
|
69
|
-
- lib/jubatus/anomaly/client.rb
|
70
|
-
- lib/jubatus/anomaly/types.rb
|
71
|
-
- lib/jubatus/classifier/client.rb
|
72
|
-
- lib/jubatus/classifier/types.rb
|
73
|
-
- lib/jubatus/clustering/client.rb
|
74
|
-
- lib/jubatus/clustering/types.rb
|
75
64
|
- lib/jubatus/common.rb
|
76
65
|
- lib/jubatus/common/client.rb
|
77
66
|
- lib/jubatus/common/datum.rb
|
78
67
|
- lib/jubatus/common/message_string_generator.rb
|
79
68
|
- lib/jubatus/common/types.rb
|
80
|
-
-
|
81
|
-
-
|
82
|
-
-
|
83
|
-
-
|
69
|
+
- test/jubatus_test/common/client_test.rb
|
70
|
+
- test/jubatus_test/common/datum_test.rb
|
71
|
+
- test/jubatus_test/common/message_string_generator_test.rb
|
72
|
+
- test/jubatus_test/common/types_test.rb
|
73
|
+
- lib/jubatus/classifier/client.rb
|
74
|
+
- lib/jubatus/classifier/types.rb
|
75
|
+
- lib/jubatus/clustering/client.rb
|
76
|
+
- lib/jubatus/clustering/types.rb
|
84
77
|
- lib/jubatus/recommender/client.rb
|
85
78
|
- lib/jubatus/recommender/types.rb
|
79
|
+
- lib/jubatus/nearest_neighbor/client.rb
|
80
|
+
- lib/jubatus/nearest_neighbor/types.rb
|
86
81
|
- lib/jubatus/regression/client.rb
|
87
82
|
- lib/jubatus/regression/types.rb
|
83
|
+
- lib/jubatus/graph/client.rb
|
84
|
+
- lib/jubatus/graph/types.rb
|
85
|
+
- lib/jubatus/anomaly/client.rb
|
86
|
+
- lib/jubatus/anomaly/types.rb
|
88
87
|
- lib/jubatus/stat/client.rb
|
89
88
|
- lib/jubatus/stat/types.rb
|
90
|
-
- test/jubatus_test/common/client_test.rb
|
91
|
-
- test/jubatus_test/common/datum_test.rb
|
92
|
-
- test/jubatus_test/common/message_string_generator_test.rb
|
93
|
-
- test/jubatus_test/common/types_test.rb
|
94
89
|
homepage: http://jubat.us
|
95
90
|
licenses:
|
96
91
|
- MIT
|
92
|
+
metadata: {}
|
97
93
|
post_install_message:
|
98
94
|
rdoc_options: []
|
99
95
|
require_paths:
|
100
96
|
- lib
|
101
97
|
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
-
none: false
|
103
98
|
requirements:
|
104
99
|
- - ! '>='
|
105
100
|
- !ruby/object:Gem::Version
|
106
101
|
version: '0'
|
107
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
-
none: false
|
109
103
|
requirements:
|
110
104
|
- - ! '>='
|
111
105
|
- !ruby/object:Gem::Version
|
112
106
|
version: '0'
|
113
107
|
requirements: []
|
114
108
|
rubyforge_project:
|
115
|
-
rubygems_version:
|
109
|
+
rubygems_version: 2.0.3
|
116
110
|
signing_key:
|
117
|
-
specification_version:
|
111
|
+
specification_version: 4
|
118
112
|
summary: Jubatus Ruby client
|
119
113
|
test_files:
|
120
114
|
- test/jubatus_test/common/client_test.rb
|
121
115
|
- test/jubatus_test/common/datum_test.rb
|
122
116
|
- test/jubatus_test/common/message_string_generator_test.rb
|
123
117
|
- test/jubatus_test/common/types_test.rb
|
118
|
+
has_rdoc: false
|