cequel 0.5.6 → 1.0.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +7 -0
  2. data/lib/cequel.rb +5 -8
  3. data/lib/cequel/errors.rb +1 -0
  4. data/lib/cequel/metal.rb +17 -0
  5. data/lib/cequel/metal/batch.rb +62 -0
  6. data/lib/cequel/metal/cql_row_specification.rb +26 -0
  7. data/lib/cequel/metal/data_set.rb +461 -0
  8. data/lib/cequel/metal/deleter.rb +47 -0
  9. data/lib/cequel/metal/incrementer.rb +35 -0
  10. data/lib/cequel/metal/inserter.rb +53 -0
  11. data/lib/cequel/metal/keyspace.rb +213 -0
  12. data/lib/cequel/metal/row.rb +48 -0
  13. data/lib/cequel/metal/row_specification.rb +37 -0
  14. data/lib/cequel/metal/statement.rb +30 -0
  15. data/lib/cequel/metal/updater.rb +65 -0
  16. data/lib/cequel/metal/writer.rb +73 -0
  17. data/lib/cequel/model.rb +12 -84
  18. data/lib/cequel/model/association_collection.rb +23 -0
  19. data/lib/cequel/model/associations.rb +84 -80
  20. data/lib/cequel/model/base.rb +74 -0
  21. data/lib/cequel/model/belongs_to_association.rb +31 -0
  22. data/lib/cequel/model/callbacks.rb +14 -10
  23. data/lib/cequel/model/collection.rb +255 -0
  24. data/lib/cequel/model/errors.rb +6 -6
  25. data/lib/cequel/model/has_many_association.rb +26 -0
  26. data/lib/cequel/model/mass_assignment.rb +31 -0
  27. data/lib/cequel/model/persistence.rb +119 -115
  28. data/lib/cequel/model/properties.rb +89 -87
  29. data/lib/cequel/model/railtie.rb +21 -14
  30. data/lib/cequel/model/record_set.rb +285 -0
  31. data/lib/cequel/model/schema.rb +33 -0
  32. data/lib/cequel/model/scoped.rb +5 -48
  33. data/lib/cequel/model/validations.rb +18 -18
  34. data/lib/cequel/schema.rb +15 -0
  35. data/lib/cequel/schema/column.rb +135 -0
  36. data/lib/cequel/schema/create_table_dsl.rb +56 -0
  37. data/lib/cequel/schema/keyspace.rb +50 -0
  38. data/lib/cequel/schema/table.rb +120 -0
  39. data/lib/cequel/schema/table_property.rb +67 -0
  40. data/lib/cequel/schema/table_reader.rb +139 -0
  41. data/lib/cequel/schema/table_synchronizer.rb +114 -0
  42. data/lib/cequel/schema/table_updater.rb +83 -0
  43. data/lib/cequel/schema/table_writer.rb +80 -0
  44. data/lib/cequel/schema/update_table_dsl.rb +60 -0
  45. data/lib/cequel/type.rb +232 -0
  46. data/lib/cequel/version.rb +1 -1
  47. data/spec/environment.rb +5 -1
  48. data/spec/examples/metal/data_set_spec.rb +608 -0
  49. data/spec/examples/model/associations_spec.rb +84 -74
  50. data/spec/examples/model/callbacks_spec.rb +66 -59
  51. data/spec/examples/model/list_spec.rb +393 -0
  52. data/spec/examples/model/map_spec.rb +229 -0
  53. data/spec/examples/model/mass_assignment_spec.rb +55 -0
  54. data/spec/examples/model/naming_spec.rb +11 -4
  55. data/spec/examples/model/persistence_spec.rb +140 -150
  56. data/spec/examples/model/properties_spec.rb +122 -75
  57. data/spec/examples/model/record_set_spec.rb +285 -0
  58. data/spec/examples/model/schema_spec.rb +44 -0
  59. data/spec/examples/model/serialization_spec.rb +20 -14
  60. data/spec/examples/model/set_spec.rb +133 -0
  61. data/spec/examples/model/spec_helper.rb +0 -10
  62. data/spec/examples/model/validations_spec.rb +51 -38
  63. data/spec/examples/schema/table_reader_spec.rb +328 -0
  64. data/spec/examples/schema/table_synchronizer_spec.rb +172 -0
  65. data/spec/examples/schema/table_updater_spec.rb +157 -0
  66. data/spec/examples/schema/table_writer_spec.rb +225 -0
  67. data/spec/examples/spec_helper.rb +29 -0
  68. data/spec/examples/type_spec.rb +204 -0
  69. data/spec/support/helpers.rb +67 -8
  70. metadata +121 -152
  71. data/lib/cequel/batch.rb +0 -58
  72. data/lib/cequel/cql_row_specification.rb +0 -22
  73. data/lib/cequel/data_set.rb +0 -371
  74. data/lib/cequel/keyspace.rb +0 -205
  75. data/lib/cequel/model/class_internals.rb +0 -49
  76. data/lib/cequel/model/column.rb +0 -20
  77. data/lib/cequel/model/counter.rb +0 -35
  78. data/lib/cequel/model/dictionary.rb +0 -126
  79. data/lib/cequel/model/dirty.rb +0 -53
  80. data/lib/cequel/model/dynamic.rb +0 -31
  81. data/lib/cequel/model/inheritable.rb +0 -48
  82. data/lib/cequel/model/instance_internals.rb +0 -23
  83. data/lib/cequel/model/local_association.rb +0 -42
  84. data/lib/cequel/model/magic.rb +0 -79
  85. data/lib/cequel/model/mass_assignment_security.rb +0 -21
  86. data/lib/cequel/model/naming.rb +0 -17
  87. data/lib/cequel/model/observer.rb +0 -42
  88. data/lib/cequel/model/readable_dictionary.rb +0 -182
  89. data/lib/cequel/model/remote_association.rb +0 -40
  90. data/lib/cequel/model/scope.rb +0 -362
  91. data/lib/cequel/model/subclass_internals.rb +0 -45
  92. data/lib/cequel/model/timestamps.rb +0 -52
  93. data/lib/cequel/model/translation.rb +0 -17
  94. data/lib/cequel/row_specification.rb +0 -63
  95. data/lib/cequel/statement.rb +0 -23
  96. data/spec/examples/data_set_spec.rb +0 -444
  97. data/spec/examples/keyspace_spec.rb +0 -84
  98. data/spec/examples/model/counter_spec.rb +0 -94
  99. data/spec/examples/model/dictionary_spec.rb +0 -301
  100. data/spec/examples/model/dirty_spec.rb +0 -39
  101. data/spec/examples/model/dynamic_spec.rb +0 -41
  102. data/spec/examples/model/inheritable_spec.rb +0 -45
  103. data/spec/examples/model/magic_spec.rb +0 -199
  104. data/spec/examples/model/mass_assignment_security_spec.rb +0 -13
  105. data/spec/examples/model/observer_spec.rb +0 -86
  106. data/spec/examples/model/scope_spec.rb +0 -677
  107. data/spec/examples/model/timestamps_spec.rb +0 -52
  108. data/spec/examples/model/translation_spec.rb +0 -23
@@ -1,4 +1,5 @@
1
1
  require File.expand_path('../../environment', __FILE__)
2
+ require 'cequel/model'
2
3
 
3
4
  Dir.glob(File.expand_path('../../support/**/*.rb', __FILE__)).each do |file|
4
5
  require file
@@ -9,4 +10,32 @@ end
9
10
 
10
11
  RSpec.configure do |config|
11
12
  config.include(Cequel::SpecSupport::Helpers)
13
+ config.extend(Cequel::SpecSupport::Macros)
14
+
15
+ config.filter_run_excluding rails: ->(requirement) {
16
+ !Gem::Requirement.new(requirement).
17
+ satisfied_by?(Gem::Version.new(ActiveSupport::VERSION::STRING))
18
+ }
19
+
20
+ config.before(:all) do
21
+ connection = CassandraCQL::Database.new(
22
+ Cequel::SpecSupport::Helpers.host,
23
+ :cql_version => '3.0.0'
24
+ )
25
+ keyspace = Cequel::SpecSupport::Helpers.keyspace_name
26
+ connection.execute <<-CQL
27
+ CREATE KEYSPACE #{keyspace}
28
+ WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1}
29
+ CQL
30
+ Cequel::Model::Base.connection = cequel
31
+ end
32
+
33
+ config.after(:all) do
34
+ keyspace = Cequel::SpecSupport::Helpers.keyspace_name
35
+ cequel.execute("DROP KEYSPACE #{keyspace}")
36
+ end
37
+ end
38
+
39
+ if defined? byebug
40
+ Kernel.module_eval { alias_method :debugger, :byebug }
12
41
  end
@@ -0,0 +1,204 @@
1
+ require File.expand_path('../spec_helper', __FILE__)
2
+
3
+ describe Cequel::Type do
4
+
5
+ describe 'ascii' do
6
+ subject { Cequel::Type[:ascii] }
7
+ its(:cql_name) { should == :ascii }
8
+ its(:internal_name) {
9
+ should == 'org.apache.cassandra.db.marshal.AsciiType' }
10
+
11
+ describe '#cast' do
12
+ specify { subject.cast('hey'.encode('UTF-8')).encoding.name.
13
+ should == 'US-ASCII' }
14
+ end
15
+ end
16
+
17
+ describe 'blob' do
18
+ subject { Cequel::Type[:blob] }
19
+ its(:cql_name) { should == :blob }
20
+ its(:internal_name) {
21
+ should == 'org.apache.cassandra.db.marshal.BytesType' }
22
+
23
+ describe '#cast' do
24
+ specify { subject.cast(123).should == 123.to_s(16) }
25
+ specify { subject.cast(123).encoding.name.should == 'ASCII-8BIT' }
26
+ specify { subject.cast('2345').encoding.name.should == 'ASCII-8BIT' }
27
+ end
28
+ end
29
+
30
+ describe 'boolean' do
31
+ subject { Cequel::Type[:boolean] }
32
+ its(:cql_name) { should == :boolean }
33
+ its(:internal_name) {
34
+ should == 'org.apache.cassandra.db.marshal.BooleanType' }
35
+
36
+ describe '#cast' do
37
+ specify { subject.cast(true).should == true }
38
+ specify { subject.cast(false).should == false }
39
+ specify { subject.cast(1).should == true }
40
+ end
41
+ end
42
+
43
+ describe 'counter' do
44
+ subject { Cequel::Type[:counter] }
45
+ its(:cql_name) { should == :counter }
46
+ its(:internal_name) {
47
+ should == 'org.apache.cassandra.db.marshal.CounterColumnType' }
48
+
49
+ describe '#cast' do
50
+ specify { subject.cast(1).should == 1 }
51
+ specify { subject.cast('1').should == 1 }
52
+ end
53
+ end
54
+
55
+ describe 'decimal' do
56
+ subject { Cequel::Type[:decimal] }
57
+ its(:cql_name) { should == :decimal }
58
+ its(:internal_name) {
59
+ should == 'org.apache.cassandra.db.marshal.DecimalType' }
60
+
61
+ describe '#cast' do
62
+ specify { subject.cast(1).should eql(BigDecimal.new('1.0')) }
63
+ specify { subject.cast(1.0).should eql(BigDecimal.new('1.0')) }
64
+ specify { subject.cast(1.0.to_r).should eql(BigDecimal.new('1.0')) }
65
+ specify { subject.cast('1').should eql(BigDecimal.new('1.0')) }
66
+ end
67
+ end
68
+
69
+ describe 'double' do
70
+ subject { Cequel::Type[:double] }
71
+ its(:cql_name) { should == :double }
72
+ its(:internal_name) {
73
+ should == 'org.apache.cassandra.db.marshal.DoubleType' }
74
+
75
+ describe '#cast' do
76
+ specify { subject.cast(1.0).should eql(1.0) }
77
+ specify { subject.cast(1).should eql(1.0) }
78
+ specify { subject.cast(1.0.to_r).should eql(1.0) }
79
+ specify { subject.cast('1.0').should eql(1.0) }
80
+ specify { subject.cast(BigDecimal.new('1.0')).should eql(1.0) }
81
+ end
82
+ end
83
+
84
+ describe 'float' do
85
+ subject { Cequel::Type[:float] }
86
+ its(:cql_name) { should == :float }
87
+ its(:internal_name) {
88
+ should == 'org.apache.cassandra.db.marshal.FloatType' }
89
+
90
+ describe '#cast' do
91
+ specify { subject.cast(1.0).should eql(1.0) }
92
+ specify { subject.cast(1).should eql(1.0) }
93
+ specify { subject.cast(1.0.to_r).should eql(1.0) }
94
+ specify { subject.cast('1.0').should eql(1.0) }
95
+ specify { subject.cast(BigDecimal.new('1.0')).should eql(1.0) }
96
+ end
97
+ end
98
+
99
+ describe 'inet' do
100
+ subject { Cequel::Type[:inet] }
101
+ its(:cql_name) { should == :inet }
102
+ its(:internal_name) {
103
+ should == 'org.apache.cassandra.db.marshal.InetAddressType' }
104
+ end
105
+
106
+ describe 'int' do
107
+ subject { Cequel::Type[:int] }
108
+ its(:cql_name) { should == :int }
109
+ its(:internal_name) {
110
+ should == 'org.apache.cassandra.db.marshal.Int32Type' }
111
+
112
+ describe '#cast' do
113
+ specify { subject.cast(1).should eql(1) }
114
+ specify { subject.cast('1').should eql(1) }
115
+ specify { subject.cast(1.0).should eql(1) }
116
+ specify { subject.cast(1.0.to_r).should eql(1) }
117
+ specify { subject.cast(BigDecimal.new('1.0')).should eql(1) }
118
+ end
119
+ end
120
+
121
+ describe 'long' do
122
+ subject { Cequel::Type[:long] }
123
+ its(:cql_name) { should == :long }
124
+ its(:internal_name) {
125
+ should == 'org.apache.cassandra.db.marshal.LongType' }
126
+
127
+ describe '#cast' do
128
+ specify { subject.cast(1).should eql(1) }
129
+ specify { subject.cast('1').should eql(1) }
130
+ specify { subject.cast(1.0).should eql(1) }
131
+ specify { subject.cast(1.0.to_r).should eql(1) }
132
+ specify { subject.cast(BigDecimal.new('1.0')).should eql(1) }
133
+ end
134
+ end
135
+
136
+ describe 'text' do
137
+ subject { Cequel::Type[:text] }
138
+ its(:cql_name) { should == :text }
139
+ its(:internal_name) { should == 'org.apache.cassandra.db.marshal.UTF8Type' }
140
+ it { should == Cequel::Type[:varchar] }
141
+
142
+ describe '#cast' do
143
+ specify { subject.cast('cql').should == 'cql' }
144
+ specify { subject.cast(1).should == '1' }
145
+ specify { subject.cast('cql').encoding.name.should == 'UTF-8' }
146
+ specify { subject.cast('cql'.force_encoding('US-ASCII')).
147
+ encoding.name.should == 'UTF-8' }
148
+ end
149
+ end
150
+
151
+ describe 'timestamp' do
152
+ subject { Cequel::Type[:timestamp] }
153
+ its(:cql_name) { should == :timestamp }
154
+ its(:internal_name) { should == 'org.apache.cassandra.db.marshal.DateType' }
155
+
156
+ describe '#cast' do
157
+ let(:now) { Time.at(Time.now.to_i) }
158
+ specify { subject.cast(now).should == now }
159
+ specify { subject.cast(now.to_i).should == now }
160
+ specify { subject.cast(now.to_s).should == now }
161
+ specify { subject.cast(now.to_datetime).should == now }
162
+ specify { subject.cast(now.to_date).should == now.to_date.to_time }
163
+ end
164
+ end
165
+
166
+ describe 'timeuuid' do
167
+ subject { Cequel::Type[:timeuuid] }
168
+ its(:cql_name) { should == :timeuuid }
169
+ its(:internal_name) {
170
+ should == 'org.apache.cassandra.db.marshal.TimeUUIDType' }
171
+ end
172
+
173
+ describe 'uuid' do
174
+ subject { Cequel::Type[:uuid] }
175
+ its(:cql_name) { should == :uuid }
176
+ its(:internal_name) {
177
+ should == 'org.apache.cassandra.db.marshal.UUIDType' }
178
+
179
+ describe '#cast' do
180
+ let(:uuid) { CassandraCQL::UUID.new }
181
+ specify { subject.cast(uuid).should == uuid }
182
+ specify { subject.cast(SimpleUUID::UUID.new(uuid)).
183
+ should be_a(CassandraCQL::UUID) }
184
+ specify { subject.cast(uuid.to_guid).should == uuid }
185
+ specify { subject.cast(uuid.to_i).should == uuid }
186
+ end
187
+ end
188
+
189
+ describe 'varint' do
190
+ subject { Cequel::Type[:varint] }
191
+ its(:cql_name) { should == :varint }
192
+ its(:internal_name) {
193
+ should == 'org.apache.cassandra.db.marshal.IntegerType' }
194
+
195
+ describe '#cast' do
196
+ specify { subject.cast(1).should eql(1) }
197
+ specify { subject.cast('1').should eql(1) }
198
+ specify { subject.cast(1.0).should eql(1) }
199
+ specify { subject.cast(1.0.to_r).should eql(1) }
200
+ specify { subject.cast(BigDecimal.new('1.0')).should eql(1) }
201
+ end
202
+ end
203
+
204
+ end
@@ -1,24 +1,83 @@
1
1
  module Cequel
2
2
 
3
3
  module SpecSupport
4
+ module Macros
5
+ def model(class_name, options = {}, &block)
6
+ return if RSpec.configuration.filter_manager.exclude?(self)
7
+ setup_models = !self.metadata.key?(:models)
8
+ self.metadata[:models] ||= {}
4
9
 
5
- Connection = Object.new
10
+ metadata[:models][class_name] = [options, block]
11
+
12
+ if setup_models
13
+ before :all do
14
+ metadata = self.class.metadata
15
+ metadata[:models].each do |name, (options, block)|
16
+ clazz = Class.new(Cequel::Base) do
17
+ self.table_name = name.to_s.tableize
18
+ class_eval(&block)
19
+ end
20
+ Object.module_eval { const_set(name, clazz) }
21
+ end
22
+ metadata[:models].each_key do |name|
23
+ if options.fetch(:synchronize_schema, true)
24
+ Object.const_get(name).synchronize_schema
25
+ end
26
+ end
27
+ end
28
+
29
+ before :each do
30
+ metadata = self.class.metadata
31
+ metadata[:models].each_key do |name|
32
+ name.to_s.constantize.find_each(&:destroy)
33
+ end
34
+ end
35
+
36
+ after :all do
37
+ self.class.metadata[:models].each_key do |name|
38
+ cequel.schema.drop_table(Object.const_get(name).table_name)
39
+ Object.module_eval { remove_const(name) }
40
+ end
41
+ end
42
+ end
43
+ end
44
+
45
+ def uuid(name)
46
+ let(name) { CassandraCQL::UUID.new }
47
+ end
48
+ end
6
49
 
7
50
  module Helpers
8
51
 
9
- def result_stub(*results)
10
- ResultStub.new(results)
52
+ def self.cequel
53
+ @cequel ||= Cequel.connect(
54
+ :host => host,
55
+ :keyspace => keyspace_name
56
+ ).tap do |cequel|
57
+ cequel.logger = Logger.new(STDOUT) if ENV['CEQUEL_LOG_QUERIES']
58
+ end
11
59
  end
12
60
 
13
- def connection
14
- Connection
61
+ def self.host
62
+ ENV['CEQUEL_TEST_HOST'] || '127.0.0.1:9160'
63
+ end
64
+
65
+ def self.keyspace_name
66
+ ENV['CEQUEL_TEST_KEYSPACE'] || 'cequel_test'
15
67
  end
16
68
 
17
69
  def cequel
18
- @cequel ||= Cequel::Keyspace.new({}).tap do |keyspace|
19
- keyspace.connection = connection
20
- end
70
+ Helpers.cequel
71
+ end
72
+
73
+ def max_statements!(number)
74
+ cequel.should_receive(:execute).at_most(number).times.and_call_original
75
+ end
76
+
77
+ def disallow_queries!
78
+ cequel.should_not_receive(:execute)
21
79
  end
80
+
22
81
  end
23
82
 
24
83
  end
metadata CHANGED
@@ -1,70 +1,63 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
5
- prerelease:
4
+ version: 1.0.0.pre.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Mat Brown
9
8
  - Aubrey Holland
10
9
  - Keenan Brock
10
+ - Insoo Buzz Jung
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-04-29 00:00:00.000000000 Z
14
+ date: 2013-09-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
18
18
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
19
  requirements:
21
- - - ~>
20
+ - - '>='
22
21
  - !ruby/object:Gem::Version
23
22
  version: '3.1'
24
23
  type: :runtime
25
24
  prerelease: false
26
25
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
26
  requirements:
29
- - - ~>
27
+ - - '>='
30
28
  - !ruby/object:Gem::Version
31
29
  version: '3.1'
32
30
  - !ruby/object:Gem::Dependency
33
31
  name: activemodel
34
32
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
33
  requirements:
37
- - - ~>
34
+ - - '>='
38
35
  - !ruby/object:Gem::Version
39
- version: '3.1'
36
+ version: '0'
40
37
  type: :runtime
41
38
  prerelease: false
42
39
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
40
  requirements:
45
- - - ~>
41
+ - - '>='
46
42
  - !ruby/object:Gem::Version
47
- version: '3.1'
43
+ version: '0'
48
44
  - !ruby/object:Gem::Dependency
49
45
  name: cassandra-cql
50
46
  requirement: !ruby/object:Gem::Requirement
51
- none: false
52
47
  requirements:
53
48
  - - ~>
54
49
  - !ruby/object:Gem::Version
55
- version: '1.0'
50
+ version: '1.2'
56
51
  type: :runtime
57
52
  prerelease: false
58
53
  version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
54
  requirements:
61
55
  - - ~>
62
56
  - !ruby/object:Gem::Version
63
- version: '1.0'
57
+ version: '1.2'
64
58
  - !ruby/object:Gem::Dependency
65
59
  name: connection_pool
66
60
  requirement: !ruby/object:Gem::Requirement
67
- none: false
68
61
  requirements:
69
62
  - - ~>
70
63
  - !ruby/object:Gem::Version
@@ -72,7 +65,6 @@ dependencies:
72
65
  type: :runtime
73
66
  prerelease: false
74
67
  version_requirements: !ruby/object:Gem::Requirement
75
- none: false
76
68
  requirements:
77
69
  - - ~>
78
70
  - !ruby/object:Gem::Version
@@ -80,218 +72,195 @@ dependencies:
80
72
  - !ruby/object:Gem::Dependency
81
73
  name: i18n
82
74
  requirement: !ruby/object:Gem::Requirement
83
- none: false
84
75
  requirements:
85
- - - ! '>='
76
+ - - '>='
86
77
  - !ruby/object:Gem::Version
87
78
  version: '0'
88
79
  type: :runtime
89
80
  prerelease: false
90
81
  version_requirements: !ruby/object:Gem::Requirement
91
- none: false
92
82
  requirements:
93
- - - ! '>='
83
+ - - '>='
94
84
  - !ruby/object:Gem::Version
95
85
  version: '0'
96
86
  - !ruby/object:Gem::Dependency
97
- name: rspec
87
+ name: appraisal
98
88
  requirement: !ruby/object:Gem::Requirement
99
- none: false
100
89
  requirements:
101
- - - ~>
90
+ - - '>='
102
91
  - !ruby/object:Gem::Version
103
- version: '2.0'
92
+ version: '0'
104
93
  type: :development
105
94
  prerelease: false
106
95
  version_requirements: !ruby/object:Gem::Requirement
107
- none: false
108
96
  requirements:
109
- - - ~>
97
+ - - '>='
110
98
  - !ruby/object:Gem::Version
111
- version: '2.0'
99
+ version: '0'
112
100
  - !ruby/object:Gem::Dependency
113
- name: yard
101
+ name: rspec
114
102
  requirement: !ruby/object:Gem::Requirement
115
- none: false
116
103
  requirements:
117
104
  - - ~>
118
105
  - !ruby/object:Gem::Version
119
- version: '0.6'
106
+ version: '2.0'
120
107
  type: :development
121
108
  prerelease: false
122
109
  version_requirements: !ruby/object:Gem::Requirement
123
- none: false
124
110
  requirements:
125
111
  - - ~>
126
112
  - !ruby/object:Gem::Version
127
- version: '0.6'
128
- - !ruby/object:Gem::Dependency
129
- name: geminabox
130
- requirement: !ruby/object:Gem::Requirement
131
- none: false
132
- requirements:
133
- - - ! '>='
134
- - !ruby/object:Gem::Version
135
- version: '0'
136
- type: :development
137
- prerelease: false
138
- version_requirements: !ruby/object:Gem::Requirement
139
- none: false
140
- requirements:
141
- - - ! '>='
142
- - !ruby/object:Gem::Version
143
- version: '0'
113
+ version: '2.0'
144
114
  - !ruby/object:Gem::Dependency
145
- name: debugger
115
+ name: yard
146
116
  requirement: !ruby/object:Gem::Requirement
147
- none: false
148
117
  requirements:
149
- - - ! '>='
118
+ - - ~>
150
119
  - !ruby/object:Gem::Version
151
- version: '0'
120
+ version: '0.6'
152
121
  type: :development
153
122
  prerelease: false
154
123
  version_requirements: !ruby/object:Gem::Requirement
155
- none: false
156
124
  requirements:
157
- - - ! '>='
125
+ - - ~>
158
126
  - !ruby/object:Gem::Version
159
- version: '0'
160
- description: ! 'Cequel is a lightweight query abstraction layer for Cassandra''s CQL
161
- language. It
162
-
127
+ version: '0.6'
128
+ description: |
129
+ Cequel is a lightweight query abstraction layer for Cassandra's CQL language. It
163
130
  also provides Cequel::Model, which is an ActiveModel-compliant object-row mapper
164
-
165
131
  for Cassandra. Cequel is heavily inspired by the Sequel library.
166
-
167
- '
168
132
  email: mat.a.brown@gmail.com
169
133
  executables: []
170
134
  extensions: []
171
135
  extra_rdoc_files: []
172
136
  files:
173
- - lib/cequel.rb
174
- - lib/cequel/keyspace.rb
175
- - lib/cequel/cql_row_specification.rb
176
- - lib/cequel/model/inheritable.rb
177
- - lib/cequel/model/counter.rb
178
- - lib/cequel/model/callbacks.rb
179
- - lib/cequel/model/naming.rb
180
- - lib/cequel/model/instance_internals.rb
181
- - lib/cequel/model/dynamic.rb
182
- - lib/cequel/model/properties.rb
183
- - lib/cequel/model/column.rb
184
- - lib/cequel/model/observer.rb
185
- - lib/cequel/model/mass_assignment_security.rb
137
+ - lib/cequel/errors.rb
138
+ - lib/cequel/metal/batch.rb
139
+ - lib/cequel/metal/cql_row_specification.rb
140
+ - lib/cequel/metal/data_set.rb
141
+ - lib/cequel/metal/deleter.rb
142
+ - lib/cequel/metal/incrementer.rb
143
+ - lib/cequel/metal/inserter.rb
144
+ - lib/cequel/metal/keyspace.rb
145
+ - lib/cequel/metal/row.rb
146
+ - lib/cequel/metal/row_specification.rb
147
+ - lib/cequel/metal/statement.rb
148
+ - lib/cequel/metal/updater.rb
149
+ - lib/cequel/metal/writer.rb
150
+ - lib/cequel/metal.rb
151
+ - lib/cequel/model/association_collection.rb
186
152
  - lib/cequel/model/associations.rb
153
+ - lib/cequel/model/base.rb
154
+ - lib/cequel/model/belongs_to_association.rb
155
+ - lib/cequel/model/callbacks.rb
156
+ - lib/cequel/model/collection.rb
157
+ - lib/cequel/model/errors.rb
158
+ - lib/cequel/model/has_many_association.rb
159
+ - lib/cequel/model/mass_assignment.rb
187
160
  - lib/cequel/model/persistence.rb
188
- - lib/cequel/model/scope.rb
189
- - lib/cequel/model/magic.rb
190
- - lib/cequel/model/readable_dictionary.rb
191
- - lib/cequel/model/remote_association.rb
192
- - lib/cequel/model/class_internals.rb
193
- - lib/cequel/model/validations.rb
161
+ - lib/cequel/model/properties.rb
194
162
  - lib/cequel/model/railtie.rb
195
- - lib/cequel/model/translation.rb
163
+ - lib/cequel/model/record_set.rb
164
+ - lib/cequel/model/schema.rb
196
165
  - lib/cequel/model/scoped.rb
197
- - lib/cequel/model/dirty.rb
198
- - lib/cequel/model/errors.rb
199
- - lib/cequel/model/local_association.rb
200
- - lib/cequel/model/dictionary.rb
201
- - lib/cequel/model/subclass_internals.rb
202
- - lib/cequel/model/timestamps.rb
166
+ - lib/cequel/model/validations.rb
203
167
  - lib/cequel/model.rb
204
- - lib/cequel/version.rb
205
- - lib/cequel/data_set.rb
206
- - lib/cequel/batch.rb
207
168
  - lib/cequel/new_relic_instrumentation.rb
208
- - lib/cequel/statement.rb
209
- - lib/cequel/errors.rb
210
- - lib/cequel/row_specification.rb
211
- - spec/models/post_observer.rb
212
- - spec/models/comment_counts.rb
213
- - spec/models/asset_observer.rb
214
- - spec/models/photo.rb
215
- - spec/models/post_comments.rb
216
- - spec/models/comment.rb
217
- - spec/models/blog_posts.rb
218
- - spec/models/blog.rb
219
- - spec/models/asset.rb
220
- - spec/models/post.rb
221
- - spec/models/category.rb
222
- - spec/support/helpers.rb
223
- - spec/support/result_stub.rb
224
- - spec/shared/readable_dictionary.rb
169
+ - lib/cequel/schema/column.rb
170
+ - lib/cequel/schema/create_table_dsl.rb
171
+ - lib/cequel/schema/keyspace.rb
172
+ - lib/cequel/schema/table.rb
173
+ - lib/cequel/schema/table_property.rb
174
+ - lib/cequel/schema/table_reader.rb
175
+ - lib/cequel/schema/table_synchronizer.rb
176
+ - lib/cequel/schema/table_updater.rb
177
+ - lib/cequel/schema/table_writer.rb
178
+ - lib/cequel/schema/update_table_dsl.rb
179
+ - lib/cequel/schema.rb
180
+ - lib/cequel/type.rb
181
+ - lib/cequel/version.rb
182
+ - lib/cequel.rb
225
183
  - spec/environment.rb
226
- - spec/examples/model/dictionary_spec.rb
227
- - spec/examples/model/observer_spec.rb
228
- - spec/examples/model/dirty_spec.rb
184
+ - spec/examples/metal/data_set_spec.rb
185
+ - spec/examples/model/associations_spec.rb
229
186
  - spec/examples/model/callbacks_spec.rb
187
+ - spec/examples/model/list_spec.rb
188
+ - spec/examples/model/map_spec.rb
189
+ - spec/examples/model/mass_assignment_spec.rb
190
+ - spec/examples/model/naming_spec.rb
230
191
  - spec/examples/model/persistence_spec.rb
231
- - spec/examples/model/serialization_spec.rb
232
- - spec/examples/model/dynamic_spec.rb
233
- - spec/examples/model/validations_spec.rb
234
- - spec/examples/model/scope_spec.rb
235
- - spec/examples/model/mass_assignment_security_spec.rb
236
- - spec/examples/model/timestamps_spec.rb
237
192
  - spec/examples/model/properties_spec.rb
238
- - spec/examples/model/counter_spec.rb
239
- - spec/examples/model/inheritable_spec.rb
240
- - spec/examples/model/translation_spec.rb
241
- - spec/examples/model/associations_spec.rb
242
- - spec/examples/model/naming_spec.rb
193
+ - spec/examples/model/record_set_spec.rb
194
+ - spec/examples/model/schema_spec.rb
195
+ - spec/examples/model/serialization_spec.rb
196
+ - spec/examples/model/set_spec.rb
243
197
  - spec/examples/model/spec_helper.rb
244
- - spec/examples/model/magic_spec.rb
245
- - spec/examples/data_set_spec.rb
246
- - spec/examples/keyspace_spec.rb
198
+ - spec/examples/model/validations_spec.rb
199
+ - spec/examples/schema/table_reader_spec.rb
200
+ - spec/examples/schema/table_synchronizer_spec.rb
201
+ - spec/examples/schema/table_updater_spec.rb
202
+ - spec/examples/schema/table_writer_spec.rb
247
203
  - spec/examples/spec_helper.rb
248
- homepage: https://github.com/brewster/cequel
204
+ - spec/examples/type_spec.rb
205
+ - spec/models/asset.rb
206
+ - spec/models/asset_observer.rb
207
+ - spec/models/blog.rb
208
+ - spec/models/blog_posts.rb
209
+ - spec/models/category.rb
210
+ - spec/models/comment.rb
211
+ - spec/models/comment_counts.rb
212
+ - spec/models/photo.rb
213
+ - spec/models/post.rb
214
+ - spec/models/post_comments.rb
215
+ - spec/models/post_observer.rb
216
+ - spec/shared/readable_dictionary.rb
217
+ - spec/support/helpers.rb
218
+ - spec/support/result_stub.rb
219
+ homepage: https://github.com/cequel/cequel
249
220
  licenses:
250
221
  - MIT
222
+ metadata: {}
251
223
  post_install_message:
252
224
  rdoc_options: []
253
225
  require_paths:
254
226
  - lib
255
227
  required_ruby_version: !ruby/object:Gem::Requirement
256
- none: false
257
228
  requirements:
258
- - - ! '>='
229
+ - - '>='
259
230
  - !ruby/object:Gem::Version
260
231
  version: '1.9'
261
232
  required_rubygems_version: !ruby/object:Gem::Requirement
262
- none: false
263
233
  requirements:
264
- - - ! '>='
234
+ - - '>'
265
235
  - !ruby/object:Gem::Version
266
- version: '0'
236
+ version: 1.3.1
267
237
  requirements:
268
238
  - Cassandra 1.0+
269
239
  rubyforge_project:
270
- rubygems_version: 1.8.25
240
+ rubygems_version: 2.0.3
271
241
  signing_key:
272
- specification_version: 3
242
+ specification_version: 4
273
243
  summary: Query abstraction layer and object-row mapper for Cassandra and CQL
274
244
  test_files:
275
- - spec/examples/model/dictionary_spec.rb
276
- - spec/examples/model/observer_spec.rb
277
- - spec/examples/model/dirty_spec.rb
245
+ - spec/examples/metal/data_set_spec.rb
246
+ - spec/examples/model/associations_spec.rb
278
247
  - spec/examples/model/callbacks_spec.rb
248
+ - spec/examples/model/list_spec.rb
249
+ - spec/examples/model/map_spec.rb
250
+ - spec/examples/model/mass_assignment_spec.rb
251
+ - spec/examples/model/naming_spec.rb
279
252
  - spec/examples/model/persistence_spec.rb
280
- - spec/examples/model/serialization_spec.rb
281
- - spec/examples/model/dynamic_spec.rb
282
- - spec/examples/model/validations_spec.rb
283
- - spec/examples/model/scope_spec.rb
284
- - spec/examples/model/mass_assignment_security_spec.rb
285
- - spec/examples/model/timestamps_spec.rb
286
253
  - spec/examples/model/properties_spec.rb
287
- - spec/examples/model/counter_spec.rb
288
- - spec/examples/model/inheritable_spec.rb
289
- - spec/examples/model/translation_spec.rb
290
- - spec/examples/model/associations_spec.rb
291
- - spec/examples/model/naming_spec.rb
254
+ - spec/examples/model/record_set_spec.rb
255
+ - spec/examples/model/schema_spec.rb
256
+ - spec/examples/model/serialization_spec.rb
257
+ - spec/examples/model/set_spec.rb
292
258
  - spec/examples/model/spec_helper.rb
293
- - spec/examples/model/magic_spec.rb
294
- - spec/examples/data_set_spec.rb
295
- - spec/examples/keyspace_spec.rb
259
+ - spec/examples/model/validations_spec.rb
260
+ - spec/examples/schema/table_reader_spec.rb
261
+ - spec/examples/schema/table_synchronizer_spec.rb
262
+ - spec/examples/schema/table_updater_spec.rb
263
+ - spec/examples/schema/table_writer_spec.rb
296
264
  - spec/examples/spec_helper.rb
265
+ - spec/examples/type_spec.rb
297
266
  has_rdoc: false