cassandra 0.2.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/CHANGELOG +12 -0
- data/LICENSE +202 -0
- data/Manifest +24 -17
- data/README +65 -0
- data/Rakefile +13 -0
- data/cassandra.gemspec +22 -117
- data/conf/cassandra.in.sh +55 -0
- data/conf/log4j.properties +38 -0
- data/conf/storage-conf.xml +197 -0
- data/lib/cassandra.rb +21 -159
- data/lib/cassandra/array.rb +8 -0
- data/lib/cassandra/cassandra.rb +315 -0
- data/lib/cassandra/comparable.rb +28 -0
- data/lib/cassandra/constants.rb +8 -0
- data/lib/cassandra/helper.rb +85 -0
- data/lib/cassandra/long.rb +39 -0
- data/lib/cassandra/ordered_hash.rb +135 -0
- data/lib/cassandra/safe_client.rb +21 -0
- data/lib/cassandra/serialization.rb +57 -0
- data/lib/cassandra/time.rb +9 -0
- data/lib/cassandra/uuid.rb +44 -0
- data/quickstart.sh +12 -0
- data/test/cassandra_client_test.rb +302 -0
- data/test/comparable_types_test.rb +44 -0
- data/vendor/gen-rb/cassandra.rb +1138 -0
- data/vendor/gen-rb/cassandra_constants.rb +10 -0
- data/vendor/gen-rb/cassandra_types.rb +239 -0
- metadata +90 -37
- metadata.gz.sig +1 -0
- data/README.rdoc +0 -29
- data/lib/properties.rb +0 -119
- data/lib/tags.rb +0 -89
- data/misc/dan.rb +0 -64
- data/misc/meyer_reset.css +0 -53
- data/site/basic.cssy +0 -12
- data/site/basic.rb +0 -19
- data/site/cssy_title.jpg +0 -0
- data/site/flower.png +0 -0
- data/site/index.mab +0 -22
- data/site/ruby.cssy +0 -15
- data/test/basics.rb +0 -107
- data/test/dan.cssy +0 -160
- data/test/fiddle.css +0 -22
- data/test/fiddle.cssy +0 -34
- data/test/helper.rb +0 -8
@@ -0,0 +1,239 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
|
8
|
+
module CassandraThrift
|
9
|
+
module ConsistencyLevel
|
10
|
+
ZERO = 0
|
11
|
+
ONE = 1
|
12
|
+
QUORUM = 2
|
13
|
+
ALL = 3
|
14
|
+
VALUE_MAP = {0 => "ZERO", 1 => "ONE", 2 => "QUORUM", 3 => "ALL"}
|
15
|
+
VALID_VALUES = Set.new([ZERO, ONE, QUORUM, ALL]).freeze
|
16
|
+
end
|
17
|
+
|
18
|
+
class Column
|
19
|
+
include ::Thrift::Struct
|
20
|
+
NAME = 1
|
21
|
+
VALUE = 2
|
22
|
+
TIMESTAMP = 3
|
23
|
+
|
24
|
+
::Thrift::Struct.field_accessor self, :name, :value, :timestamp
|
25
|
+
FIELDS = {
|
26
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
27
|
+
VALUE => {:type => ::Thrift::Types::STRING, :name => 'value'},
|
28
|
+
TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'}
|
29
|
+
}
|
30
|
+
|
31
|
+
def struct_fields; FIELDS; end
|
32
|
+
|
33
|
+
def validate
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
class BatchMutation
|
39
|
+
include ::Thrift::Struct
|
40
|
+
KEY = 1
|
41
|
+
CFMAP = 2
|
42
|
+
|
43
|
+
::Thrift::Struct.field_accessor self, :key, :cfmap
|
44
|
+
FIELDS = {
|
45
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
46
|
+
CFMAP => {:type => ::Thrift::Types::MAP, :name => 'cfmap', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::Column}}}
|
47
|
+
}
|
48
|
+
|
49
|
+
def struct_fields; FIELDS; end
|
50
|
+
|
51
|
+
def validate
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
class SuperColumn
|
57
|
+
include ::Thrift::Struct
|
58
|
+
NAME = 1
|
59
|
+
COLUMNS = 2
|
60
|
+
|
61
|
+
::Thrift::Struct.field_accessor self, :name, :columns
|
62
|
+
FIELDS = {
|
63
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
64
|
+
COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::Column}}
|
65
|
+
}
|
66
|
+
|
67
|
+
def struct_fields; FIELDS; end
|
68
|
+
|
69
|
+
def validate
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
class BatchMutationSuper
|
75
|
+
include ::Thrift::Struct
|
76
|
+
KEY = 1
|
77
|
+
CFMAP = 2
|
78
|
+
|
79
|
+
::Thrift::Struct.field_accessor self, :key, :cfmap
|
80
|
+
FIELDS = {
|
81
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
82
|
+
CFMAP => {:type => ::Thrift::Types::MAP, :name => 'cfmap', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::SuperColumn}}}
|
83
|
+
}
|
84
|
+
|
85
|
+
def struct_fields; FIELDS; end
|
86
|
+
|
87
|
+
def validate
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
class CqlResult
|
93
|
+
include ::Thrift::Struct
|
94
|
+
ERROR_CODE = 1
|
95
|
+
ERROR_TXT = 2
|
96
|
+
RESULT_SET = 3
|
97
|
+
|
98
|
+
::Thrift::Struct.field_accessor self, :error_code, :error_txt, :result_set
|
99
|
+
FIELDS = {
|
100
|
+
ERROR_CODE => {:type => ::Thrift::Types::I32, :name => 'error_code'},
|
101
|
+
ERROR_TXT => {:type => ::Thrift::Types::STRING, :name => 'error_txt'},
|
102
|
+
RESULT_SET => {:type => ::Thrift::Types::LIST, :name => 'result_set', :element => {:type => ::Thrift::Types::MAP, :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}}
|
103
|
+
}
|
104
|
+
|
105
|
+
def struct_fields; FIELDS; end
|
106
|
+
|
107
|
+
def validate
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
class NotFoundException < ::Thrift::Exception
|
113
|
+
include ::Thrift::Struct
|
114
|
+
|
115
|
+
FIELDS = {
|
116
|
+
|
117
|
+
}
|
118
|
+
|
119
|
+
def struct_fields; FIELDS; end
|
120
|
+
|
121
|
+
def validate
|
122
|
+
end
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
class InvalidRequestException < ::Thrift::Exception
|
127
|
+
include ::Thrift::Struct
|
128
|
+
def initialize(message=nil)
|
129
|
+
super()
|
130
|
+
self.why = message
|
131
|
+
end
|
132
|
+
|
133
|
+
def message; why end
|
134
|
+
|
135
|
+
WHY = 1
|
136
|
+
|
137
|
+
::Thrift::Struct.field_accessor self, :why
|
138
|
+
FIELDS = {
|
139
|
+
WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
|
140
|
+
}
|
141
|
+
|
142
|
+
def struct_fields; FIELDS; end
|
143
|
+
|
144
|
+
def validate
|
145
|
+
end
|
146
|
+
|
147
|
+
end
|
148
|
+
|
149
|
+
class UnavailableException < ::Thrift::Exception
|
150
|
+
include ::Thrift::Struct
|
151
|
+
|
152
|
+
FIELDS = {
|
153
|
+
|
154
|
+
}
|
155
|
+
|
156
|
+
def struct_fields; FIELDS; end
|
157
|
+
|
158
|
+
def validate
|
159
|
+
end
|
160
|
+
|
161
|
+
end
|
162
|
+
|
163
|
+
class ColumnParent
|
164
|
+
include ::Thrift::Struct
|
165
|
+
COLUMN_FAMILY = 3
|
166
|
+
SUPER_COLUMN = 4
|
167
|
+
|
168
|
+
::Thrift::Struct.field_accessor self, :column_family, :super_column
|
169
|
+
FIELDS = {
|
170
|
+
COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
|
171
|
+
SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true}
|
172
|
+
}
|
173
|
+
|
174
|
+
def struct_fields; FIELDS; end
|
175
|
+
|
176
|
+
def validate
|
177
|
+
end
|
178
|
+
|
179
|
+
end
|
180
|
+
|
181
|
+
class ColumnPath
|
182
|
+
include ::Thrift::Struct
|
183
|
+
COLUMN_FAMILY = 3
|
184
|
+
SUPER_COLUMN = 4
|
185
|
+
COLUMN = 5
|
186
|
+
|
187
|
+
::Thrift::Struct.field_accessor self, :column_family, :super_column, :column
|
188
|
+
FIELDS = {
|
189
|
+
COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
|
190
|
+
SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true},
|
191
|
+
COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column'}
|
192
|
+
}
|
193
|
+
|
194
|
+
def struct_fields; FIELDS; end
|
195
|
+
|
196
|
+
def validate
|
197
|
+
end
|
198
|
+
|
199
|
+
end
|
200
|
+
|
201
|
+
class SuperColumnPath
|
202
|
+
include ::Thrift::Struct
|
203
|
+
COLUMN_FAMILY = 3
|
204
|
+
SUPER_COLUMN = 4
|
205
|
+
|
206
|
+
::Thrift::Struct.field_accessor self, :column_family, :super_column
|
207
|
+
FIELDS = {
|
208
|
+
COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
|
209
|
+
SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column'}
|
210
|
+
}
|
211
|
+
|
212
|
+
def struct_fields; FIELDS; end
|
213
|
+
|
214
|
+
def validate
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
class ColumnPathOrParent
|
220
|
+
include ::Thrift::Struct
|
221
|
+
COLUMN_FAMILY = 3
|
222
|
+
SUPER_COLUMN = 4
|
223
|
+
COLUMN = 5
|
224
|
+
|
225
|
+
::Thrift::Struct.field_accessor self, :column_family, :super_column, :column
|
226
|
+
FIELDS = {
|
227
|
+
COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
|
228
|
+
SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true},
|
229
|
+
COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :optional => true}
|
230
|
+
}
|
231
|
+
|
232
|
+
def struct_fields; FIELDS; end
|
233
|
+
|
234
|
+
def validate
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|
metadata
CHANGED
@@ -1,51 +1,104 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cassandra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: "0.4"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Evan Weaver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDLjCCAhagAwIBAgIBADANBgkqhkiG9w0BAQUFADA9MQ0wCwYDVQQDDARldmFu
|
14
|
+
MRgwFgYKCZImiZPyLGQBGRYIY2xvdWRidXIxEjAQBgoJkiaJk/IsZAEZFgJzdDAe
|
15
|
+
Fw0wNzA5MTYxMDMzMDBaFw0wODA5MTUxMDMzMDBaMD0xDTALBgNVBAMMBGV2YW4x
|
16
|
+
GDAWBgoJkiaJk/IsZAEZFghjbG91ZGJ1cjESMBAGCgmSJomT8ixkARkWAnN0MIIB
|
17
|
+
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5C0Io89nyApnr+PvbNFge9Vs
|
18
|
+
yRWAlGBUEMahpXp28VrrfXZT0rAW7JBo4PlCE3jl4nE4dzE6gAdItSycjTosrw7A
|
19
|
+
Ir5+xoyl4Vb35adv56TIQQXvNz+BzlqnkAY5JN0CSBRTQb6mxS3hFyD/h4qgDosj
|
20
|
+
R2RFVzHqSxCS8xq4Ny8uzOwOi+Xyu4w67fI5JvnPvMxqrlR1eaIQHmxnf76RzC46
|
21
|
+
QO5QhufjAYGGXd960XzbQsQyTDUYJzrvT7AdOfiyZzKQykKt8dEpDn+QPjFTnGnT
|
22
|
+
QmgJBX5WJN0lHF2l1sbv3gh4Kn1tZu+kTUqeXY6ShAoDTyvZRiFqQdwh8w2lTQID
|
23
|
+
AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU+WqJz3xQ
|
24
|
+
XSea1hRvvHWcIMgeeC4wDQYJKoZIhvcNAQEFBQADggEBAGLZ75jfOEW8Nsl26CTt
|
25
|
+
JFrWxQTcQT/UljeefVE3xYr7lc9oQjbqO3FOyued3qW7TaNEtZfSHoYeUSMYbpw1
|
26
|
+
XAwocIPuSRFDGM4B+hgQGVDx8PMGiJKom4qLXjO40UZsR7QyN/u869Vj45LURm6h
|
27
|
+
MBcPeqCASI+WNprj9+uZa2kmHiitrFqqfMBNlm5IFbn9XeYSta9AHVvs5QQqV2m5
|
28
|
+
hIPfLqCyxsn/YgOGvo6iwyQTWyTswamaAC3HRWZxIS1sfn/Ssqa7E7oQMkv5FAXr
|
29
|
+
x5rKePfXINf8XTJczkl9OBEYdE9aNdJsJpXD0asLgGVwBICS5Bjohp6mizJcDC1+
|
30
|
+
yZ0=
|
31
|
+
-----END CERTIFICATE-----
|
11
32
|
|
12
|
-
date:
|
33
|
+
date: 2009-07-30 00:00:00 -07:00
|
13
34
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
16
|
-
|
17
|
-
|
35
|
+
dependencies:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: json
|
38
|
+
type: :runtime
|
39
|
+
version_requirement:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: "0"
|
45
|
+
version:
|
46
|
+
description: A Ruby client for CassandraDB.
|
47
|
+
email: ""
|
18
48
|
executables: []
|
19
49
|
|
20
50
|
extensions: []
|
21
51
|
|
22
52
|
extra_rdoc_files:
|
53
|
+
- CHANGELOG
|
54
|
+
- lib/cassandra/array.rb
|
55
|
+
- lib/cassandra/cassandra.rb
|
56
|
+
- lib/cassandra/comparable.rb
|
57
|
+
- lib/cassandra/constants.rb
|
58
|
+
- lib/cassandra/helper.rb
|
59
|
+
- lib/cassandra/long.rb
|
60
|
+
- lib/cassandra/ordered_hash.rb
|
61
|
+
- lib/cassandra/safe_client.rb
|
62
|
+
- lib/cassandra/serialization.rb
|
63
|
+
- lib/cassandra/time.rb
|
64
|
+
- lib/cassandra/uuid.rb
|
23
65
|
- lib/cassandra.rb
|
24
|
-
-
|
25
|
-
-
|
26
|
-
-
|
66
|
+
- LICENSE
|
67
|
+
- README
|
68
|
+
- vendor/gen-rb/cassandra_constants.rb
|
69
|
+
- vendor/gen-rb/cassandra_types.rb
|
27
70
|
files:
|
28
|
-
-
|
71
|
+
- CHANGELOG
|
72
|
+
- conf/cassandra.in.sh
|
73
|
+
- conf/log4j.properties
|
74
|
+
- conf/storage-conf.xml
|
75
|
+
- lib/cassandra/array.rb
|
76
|
+
- lib/cassandra/cassandra.rb
|
77
|
+
- lib/cassandra/comparable.rb
|
78
|
+
- lib/cassandra/constants.rb
|
79
|
+
- lib/cassandra/helper.rb
|
80
|
+
- lib/cassandra/long.rb
|
81
|
+
- lib/cassandra/ordered_hash.rb
|
82
|
+
- lib/cassandra/safe_client.rb
|
83
|
+
- lib/cassandra/serialization.rb
|
84
|
+
- lib/cassandra/time.rb
|
85
|
+
- lib/cassandra/uuid.rb
|
29
86
|
- lib/cassandra.rb
|
30
|
-
-
|
31
|
-
- lib/tags.rb
|
87
|
+
- LICENSE
|
32
88
|
- Manifest
|
33
|
-
-
|
34
|
-
-
|
35
|
-
- README
|
36
|
-
-
|
37
|
-
-
|
38
|
-
-
|
39
|
-
-
|
40
|
-
-
|
41
|
-
-
|
42
|
-
- test/basics.rb
|
43
|
-
- test/dan.cssy
|
44
|
-
- test/fiddle.css
|
45
|
-
- test/fiddle.cssy
|
46
|
-
- test/helper.rb
|
89
|
+
- quickstart.sh
|
90
|
+
- Rakefile
|
91
|
+
- README
|
92
|
+
- test/cassandra_client_test.rb
|
93
|
+
- test/comparable_types_test.rb
|
94
|
+
- vendor/gen-rb/cassandra.rb
|
95
|
+
- vendor/gen-rb/cassandra_constants.rb
|
96
|
+
- vendor/gen-rb/cassandra_types.rb
|
97
|
+
- cassandra.gemspec
|
47
98
|
has_rdoc: true
|
48
|
-
homepage:
|
99
|
+
homepage: http://blog.evanweaver.com/files/doc/fauna/cassandra/
|
100
|
+
licenses: []
|
101
|
+
|
49
102
|
post_install_message:
|
50
103
|
rdoc_options:
|
51
104
|
- --line-numbers
|
@@ -53,7 +106,7 @@ rdoc_options:
|
|
53
106
|
- --title
|
54
107
|
- Cassandra
|
55
108
|
- --main
|
56
|
-
- README
|
109
|
+
- README
|
57
110
|
require_paths:
|
58
111
|
- lib
|
59
112
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -66,15 +119,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
119
|
requirements:
|
67
120
|
- - ">="
|
68
121
|
- !ruby/object:Gem::Version
|
69
|
-
version: "0"
|
122
|
+
version: "0.8"
|
70
123
|
version:
|
71
124
|
requirements: []
|
72
125
|
|
73
|
-
rubyforge_project:
|
74
|
-
rubygems_version: 1.
|
126
|
+
rubyforge_project: fauna
|
127
|
+
rubygems_version: 1.3.4
|
75
128
|
signing_key:
|
76
|
-
specification_version:
|
77
|
-
summary:
|
129
|
+
specification_version: 3
|
130
|
+
summary: A Ruby client for CassandraDB.
|
78
131
|
test_files:
|
79
|
-
- test/
|
80
|
-
- test/
|
132
|
+
- test/cassandra_client_test.rb
|
133
|
+
- test/comparable_types_test.rb
|
metadata.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
FbQ� �M0�Pa/�M�IS6Ԃ�ښ$��J-�H�3�m�UE�J�uݑ| ��ۂ�D�< cY���0n�fC�[U�B�o�e�n{�*r��9��/|��*��(r�"D����H�fs/RG����ƩsĔ�I���+i����ީ�%O�ntR�:������!/t5� �����C�����S)ӆ�@k*�j�%��fF�ܔu�w�M?��?����D�7�[y�Fr}-��
|
data/README.rdoc
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
= Cassandra, a.k.a Cssy
|
2
|
-
|
3
|
-
Cassandra is a CSS companion to Markaby. You declare selectors using methods named after the type selectors (i.e. tags) or after the class and id selectors of your choice, which are handled by method_missing. As in Markaby, id selectors are distinguished from class selectors by the "!" at the end of the method name. You can chain class/id selectors onto type selectors and each other.
|
4
|
-
|
5
|
-
Because in CSS you don't have to begin with a type selector, starting a selector chain with a class/id selector is currently allowed in Cassandra. This may go away in the future.
|
6
|
-
|
7
|
-
== Usage
|
8
|
-
|
9
|
-
|
10
|
-
@css = Cssy.new
|
11
|
-
@css.process do
|
12
|
-
|
13
|
-
body { background_color "#F8F7F1"}
|
14
|
-
div.content! {
|
15
|
-
width "700px"; margin "25px auto"
|
16
|
-
|
17
|
-
a {
|
18
|
-
color "#212F54";
|
19
|
-
text_decoration :none
|
20
|
-
font_weight :bold
|
21
|
-
}
|
22
|
-
|
23
|
-
ul.links! { list_style "url(flower.png)" }
|
24
|
-
}
|
25
|
-
|
26
|
-
end
|
27
|
-
|
28
|
-
@css.data #=> array of arrays
|
29
|
-
@css.to_s
|