cequel 1.4.5 → 1.5.0

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: 4fba208e19ab7eabd8a3f2db192e68a4cc70bd48
4
- data.tar.gz: 701fad60ff7b547719c39817abffd3b080a469a5
3
+ metadata.gz: b668ffc98274e61d21a3aef2e10ea369ee23bd16
4
+ data.tar.gz: a5bddb78739ecdd00f0bc663e40535460b92410e
5
5
  SHA512:
6
- metadata.gz: e94e957983915b7cb434dfdfb4cf913e47d25c687c17f2106d53730bd0624acacf74454c2ca64b29bfae5d31a8ff8bece1e1ef6dd7e19252c41e8de5dee305de
7
- data.tar.gz: d9b7ae7438d6b188e5709357bf6c7ba21de7b0af3f26de5311290824381b4c66be2355318ac8cfe974e196f44e3b7b5ea866593adaa27d2797138db1039fa39b
6
+ metadata.gz: acd56facacd1b9c6000fb73bd68719bb7e2c8e64f89069e06cf37480e6b1ac2924754b5a34367a87cac48bd233b62e1bc418da54933af52204b5eefa2494cc1f
7
+ data.tar.gz: f9b63848ae3bd83d070bc1251142e40f186f6d4ff924f4f2dd6ab717d148ff85efe56db1b7a6823ca3b64d72cd52ccbd5528254064fc69fb502fea8a7c09bde5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## 1.5.0
2
+
3
+ * Support ActiveSupport instrumentation of Record create, update, destroy
4
+ * Allow config/cequel.yml to specify `:replication` and `:durable_writes`
5
+ settings
6
+ * `Key#to_s` correctly returns String, not Symbol
7
+ * Don't assume all constants are classes in migrations
8
+ * Explicitly require yaml and erb in Railtie
9
+ * NewRelic integration can be explicitly disabled
10
+ * Demodulize model class name before transforming it to table name
11
+
1
12
  ## 1.4.5
2
13
 
3
14
  * Fix recovery from connection error
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cequel (1.4.5)
4
+ cequel (1.5.0)
5
5
  activemodel (>= 3.1, < 5.0)
6
6
  cql-rb (>= 1.2, < 3.0)
7
7
 
@@ -291,6 +291,7 @@ GEM
291
291
  ffi
292
292
  thor (0.19.1)
293
293
  thread_safe (0.3.4)
294
+ thread_safe (0.3.4-java)
294
295
  timecop (0.7.1)
295
296
  tzinfo (1.2.2)
296
297
  thread_safe (~> 0.1)
data/README.md CHANGED
@@ -570,6 +570,9 @@ Cequel was written by:
570
570
  * Masaki Takahashi
571
571
  * G Gordon Worley III
572
572
  * Clark Bremer
573
+ * Tamara Temple
574
+ * Long On
575
+ * Lucas Mundim
573
576
 
574
577
  Special thanks to [Brewster](https://www.brewster.com), which supported the 0.x
575
578
  releases of Cequel.
data/lib/cequel.rb CHANGED
@@ -12,6 +12,7 @@ require 'cequel/schema'
12
12
  require 'cequel/type'
13
13
  require 'cequel/util'
14
14
  require 'cequel/uuids'
15
+ require 'cequel/instrumentation'
15
16
  require 'cequel/record'
16
17
 
17
18
  #
@@ -0,0 +1,65 @@
1
+ module Cequel
2
+ #
3
+ # Generic module which enables injection of ActiveSupport notification
4
+ # functionality into including classes
5
+ #
6
+ module Instrumentation
7
+ #
8
+ # Metaprogramming method to wrap an existing method with instrumentation
9
+ #
10
+ module ModuleMethods
11
+ # Instruments `method_name` to publish the value returned by the
12
+ # `data_builder` proc onto `topic`
13
+ #
14
+ # Example:
15
+ #
16
+ # extend Instrumentation
17
+ # instrument :create, "create.cequel", data: {table_name: table_name}
18
+ #
19
+ # @param method_name [Symbol,String] The method to instrument
20
+ #
21
+ # @param opts [String] :topic ("#{method_name}.cequel") The name
22
+ # with which to publish this instrumentation
23
+ #
24
+ # @option opts [Object] :data_method (nil) the data to publish along
25
+ # with the notification. If it responds to `#call` it will be
26
+ # called with the record object and the return value used for
27
+ # each notification.
28
+ def instrument(method_name, opts)
29
+ data = opts[:data]
30
+ topic = opts.fetch(:topic, "#{method_name}.cequel")
31
+
32
+ data_proc = if data.respond_to? :call
33
+ data
34
+ else
35
+ ->(_) { data }
36
+ end
37
+
38
+ define_method(:"__data_for_#{method_name}_instrumentation", &data_proc)
39
+
40
+ module_eval <<-METH
41
+ def #{method_name}_with_instrumentation(*args)
42
+ instrument("#{topic}",
43
+ __data_for_#{method_name}_instrumentation(self)) do
44
+ #{method_name}_without_instrumentation(*args)
45
+ end
46
+ end
47
+ METH
48
+
49
+ alias_method_chain method_name, "instrumentation"
50
+ end
51
+ end
52
+
53
+ protected
54
+
55
+ def instrument(name, data, &blk)
56
+ ActiveSupport::Notifications.instrument(name, data, &blk)
57
+ end
58
+
59
+ # Module Methods
60
+
61
+ def self.included(a_module)
62
+ a_module.extend ModuleMethods
63
+ end
64
+ end
65
+ end
@@ -16,7 +16,7 @@ module Cequel
16
16
  included do
17
17
  include NewRelic::Agent::MethodTracer
18
18
 
19
- add_method_tracer :execute,
19
+ add_method_tracer :execute_with_consistency,
20
20
  'Database/Cassandra/#{args[0][/^[A-Z ]*[A-Z]/]' \
21
21
  '.sub(/ FROM$/, \'\')}'
22
22
  end
@@ -12,6 +12,7 @@ module Cequel
12
12
  module Persistence
13
13
  extend ActiveSupport::Concern
14
14
  extend Forwardable
15
+ include Instrumentation
15
16
 
16
17
  #
17
18
  # Class-level functionality for loading and saving records
@@ -223,6 +224,7 @@ module Cequel
223
224
  transient!
224
225
  self
225
226
  end
227
+ instrument :destroy, data: ->(rec) { {table_name: rec.table_name} }
226
228
 
227
229
  #
228
230
  # @return true if this is a new, unsaved record
@@ -277,6 +279,7 @@ module Cequel
277
279
  loaded!
278
280
  persisted!
279
281
  end
282
+ instrument :create, data: ->(rec) { {table_name: rec.table_name} }
280
283
 
281
284
  def update(options = {})
282
285
  assert_keys_present!
@@ -286,6 +289,7 @@ module Cequel
286
289
  deleter.execute(options.except(:ttl))
287
290
  end
288
291
  end
292
+ instrument :update, data: ->(rec) { {table_name: rec.table_name} }
289
293
 
290
294
  def updater
291
295
  @updater ||= Metal::Updater.new(metal_scope)
@@ -1,5 +1,7 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  require 'i18n/core_ext/hash'
3
+ require 'yaml'
4
+ require 'erb'
3
5
 
4
6
  module Cequel
5
7
  module Record
@@ -13,29 +15,22 @@ module Cequel
13
15
  end
14
16
 
15
17
  initializer "cequel.configure_rails" do
16
- config_path = Rails.root.join('config/cequel.yml').to_s
17
-
18
- if File.exist?(config_path)
19
- config = YAML.load(ERB.new(IO.read(config_path)).result)[Rails.env]
20
- .deep_symbolize_keys
21
- else
22
- config = {host: '127.0.0.1:9042'}
23
- end
24
- config.reverse_merge!(keyspace: "#{Railtie.app_name}_#{Rails.env}")
25
- connection = Cequel.connect(config)
18
+ connection = Cequel.connect(configuration)
26
19
 
27
20
  connection.logger = Rails.logger
28
21
  Record.connection = connection
29
22
  end
30
23
 
31
24
  initializer "cequel.add_new_relic" do
32
- begin
33
- require 'new_relic/agent/method_tracer'
34
- rescue LoadError => e
35
- Rails.logger.debug(
36
- "New Relic not installed; skipping New Relic integration")
37
- else
38
- require 'cequel/metal/new_relic_instrumentation'
25
+ if configuration.fetch(:newrelic_enabled, true)
26
+ begin
27
+ require 'new_relic/agent/method_tracer'
28
+ rescue LoadError => e
29
+ Rails.logger.debug(
30
+ "New Relic not installed; skipping New Relic integration")
31
+ else
32
+ require 'cequel/metal/new_relic_instrumentation'
33
+ end
39
34
  end
40
35
  end
41
36
 
@@ -47,6 +42,26 @@ module Cequel
47
42
  require 'cequel/record/configuration_generator'
48
43
  require 'cequel/record/record_generator'
49
44
  end
45
+
46
+ private
47
+
48
+ def configuration
49
+ return @configuration if defined? @configuration
50
+
51
+ config_path = Rails.root.join('config/cequel.yml').to_s
52
+
53
+ if File.exist?(config_path)
54
+ config_yaml = ERB.new(File.read(config_path)).result
55
+ @configuration = YAML.load(config_yaml)[Rails.env]
56
+ .deep_symbolize_keys
57
+ else
58
+ @configuration = {host: '127.0.0.1:9042'}
59
+ end
60
+ @configuration
61
+ .reverse_merge!(keyspace: "#{Railtie.app_name}_#{Rails.env}")
62
+
63
+ @configuration
64
+ end
50
65
  end
51
66
  end
52
67
  end
@@ -20,7 +20,7 @@ module Cequel
20
20
 
21
21
  included do
22
22
  class_attribute :table_name, instance_writer: false
23
- self.table_name = name.tableize.to_sym unless name.nil?
23
+ self.table_name = name.demodulize.tableize.to_sym unless name.nil?
24
24
  end
25
25
 
26
26
  #
@@ -44,11 +44,13 @@ namespace :cequel do
44
44
  clazz = class_name.constantize
45
45
  rescue NameError, RuntimeError # rubocop:disable HandleExceptions
46
46
  else
47
- if clazz.ancestors.include?(Cequel::Record) &&
48
- !migration_table_names.include?(clazz.table_name.to_sym)
49
- clazz.synchronize_schema
50
- migration_table_names << clazz.table_name.to_sym
51
- puts "Synchronized schema for #{class_name}"
47
+ if clazz.is_a?(Class)
48
+ if clazz.ancestors.include?(Cequel::Record) &&
49
+ !migration_table_names.include?(clazz.table_name.to_sym)
50
+ clazz.synchronize_schema
51
+ migration_table_names << clazz.table_name.to_sym
52
+ puts "Synchronized schema for #{class_name}"
53
+ end
52
54
  end
53
55
  end
54
56
  end
@@ -112,7 +112,7 @@ module Cequel
112
112
  # @return [String] the column's name
113
113
  #
114
114
  def to_s
115
- name
115
+ name.to_s
116
116
  end
117
117
 
118
118
  #
@@ -29,6 +29,10 @@ module Cequel
29
29
  # strategy to use for this keyspace
30
30
  # @option options [Integer] :replication_factor (1) the number of
31
31
  # replicas that should exist for each piece of data
32
+ # @option options [Hash] :replication ({ class: "SimpleStrategy",
33
+ # replication_factor: 1 }) replication options for this keyspace
34
+ # @option options [Boolean] :durable_writes (true) durable_writes
35
+ # option for the keyspace
32
36
  # @return [void]
33
37
  #
34
38
  # @see
@@ -39,18 +43,39 @@ module Cequel
39
43
  bare_connection =
40
44
  Metal::Keyspace.new(keyspace.configuration.except(:keyspace))
41
45
 
46
+ default_options = {
47
+ replication: {
48
+ class: "SimpleStrategy",
49
+ replication_factor: 1
50
+ },
51
+ durable_writes: true
52
+ }
53
+
42
54
  options = options.symbolize_keys
43
- options[:class] ||= 'SimpleStrategy'
44
- if options[:class] == 'SimpleStrategy'
45
- options[:replication_factor] ||= 1
55
+ options.reverse_merge!(keyspace.configuration)
56
+ options.reverse_merge!(default_options)
57
+
58
+ if options.key?(:class)
59
+ options[:replication][:class] = options[:class]
60
+ if options[:class] != 'SimpleStrategy'
61
+ raise 'For strategy other than SimpleStrategy, please ' \
62
+ 'use the :replication option.'
63
+ end
46
64
  end
47
- options_strs = options.map do |name, value|
65
+
66
+ if options.key?(:replication_factor)
67
+ options[:replication][:replication_factor] =
68
+ options[:replication_factor]
69
+ end
70
+
71
+ replication_options_strs = options[:replication].map do |name, value|
48
72
  "'#{name}': #{Cequel::Type.quote(value)}"
49
73
  end
50
74
 
51
- bare_connection.execute(<<-CQL)
75
+ bare_connection.execute(<<-CQL.strip_heredoc)
52
76
  CREATE KEYSPACE #{keyspace.name}
53
- WITH REPLICATION = {#{options_strs.join(', ')}}
77
+ WITH REPLICATION = {#{replication_options_strs.join(', ')}}
78
+ AND durable_writes = #{options[:durable_writes]}
54
79
  CQL
55
80
  end
56
81
 
@@ -1,5 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Cequel
3
3
  # The current version of the library
4
- VERSION = '1.4.5'
4
+ VERSION = '1.5.0'
5
5
  end
@@ -72,6 +72,14 @@ describe Cequel::Record::Persistence do
72
72
  .to eq((timestamp.to_f * 1_000_000).to_i)
73
73
  Blog.connection.schema.truncate_table(Blog.table_name)
74
74
  end
75
+
76
+ it 'should notify of create' do
77
+ expect { Blog.new do |blog|
78
+ blog.subdomain = 'cequel'
79
+ blog.name = 'Cequel'
80
+ end.save
81
+ }.to notify_name("create.cequel")
82
+ end
75
83
  end
76
84
 
77
85
  context 'on update' do
@@ -327,6 +335,14 @@ describe Cequel::Record::Persistence do
327
335
  post.save
328
336
  }.to raise_error(ArgumentError)
329
337
  end
338
+
339
+ it 'should notify subscribers' do
340
+ expect {
341
+ post.title = 'Cequel 1.0'
342
+ post.save
343
+ }.to notify_name('update.cequel')
344
+ end
345
+
330
346
  end
331
347
  end
332
348
 
@@ -341,5 +357,27 @@ describe Cequel::Record::Persistence do
341
357
  expect(post).to be_transient
342
358
  end
343
359
  end
360
+
361
+ describe '#destroy' do
362
+ it 'should notify subscribers' do
363
+ expect { post.destroy }.to notify_name('destroy.cequel')
364
+ end
365
+ end
366
+ end
367
+
368
+ # Custom matcher for active support notification
369
+ matcher :notify_name do |expected_name|
370
+ match { |blk|
371
+ notification_recieved = false
372
+ ActiveSupport::Notifications.subscribe expected_name do |*args|
373
+ notification_recieved = true
374
+ end
375
+
376
+ blk.call
377
+
378
+ notification_recieved
379
+ }
380
+
381
+ supports_block_expectations
344
382
  end
345
383
  end
@@ -0,0 +1,132 @@
1
+ # -*- encoding : utf-8 -*-
2
+ require File.expand_path('../../spec_helper', __FILE__)
3
+
4
+ describe Cequel::Schema::Keyspace do
5
+ let(:connection) do
6
+ Cequel.connect(config)
7
+ end
8
+ let(:keyspace) { connection.schema }
9
+
10
+ describe 'creating keyspace' do
11
+ before do
12
+ connection.configure(config)
13
+ connection.schema.drop! if connection.schema.exists?
14
+ end
15
+
16
+ let(:keyspace_name) do
17
+ test_env_number = ENV['TEST_ENV_NUMBER']
18
+ test_env_number ?
19
+ "cequel_schema_test_#{test_env_number}" :
20
+ "cequel_schema_test"
21
+ end
22
+
23
+ let(:basic_config) do
24
+ {
25
+ host: Cequel::SpecSupport::Helpers.host,
26
+ port: Cequel::SpecSupport::Helpers.port,
27
+ keyspace: keyspace_name
28
+ }
29
+ end
30
+
31
+ let(:schema_config) do
32
+ connection.client.use('system')
33
+ connection.client.execute("SELECT * FROM schema_keyspaces WHERE keyspace_name = '#{keyspace_name}'").first
34
+ end
35
+
36
+ context 'with default options' do
37
+ let(:config) { basic_config }
38
+
39
+ it 'uses default keyspace configuration' do
40
+ keyspace.create!
41
+ expect(schema_config).to eq({
42
+ "keyspace_name"=>keyspace_name,
43
+ "durable_writes"=>true,
44
+ "strategy_class"=>"org.apache.cassandra.locator.SimpleStrategy",
45
+ "strategy_options"=>"{\"replication_factor\":\"1\"}"
46
+ })
47
+ end
48
+ end
49
+
50
+ context 'with explicit options' do
51
+ let(:config) { basic_config }
52
+
53
+ it 'uses specified options' do
54
+ keyspace.create! replication: { class: "SimpleStrategy", replication_factor: 2 }
55
+ expect(schema_config).to eq({
56
+ "keyspace_name"=>keyspace_name,
57
+ "durable_writes"=>true,
58
+ "strategy_class"=>"org.apache.cassandra.locator.SimpleStrategy",
59
+ "strategy_options"=>"{\"replication_factor\":\"2\"}"
60
+ })
61
+ end
62
+ end
63
+
64
+ context 'keeping compatibility' do
65
+ let(:config) { basic_config }
66
+
67
+ it 'accepts class and replication_factor options' do
68
+ keyspace.create! class: "SimpleStrategy", replication_factor: 2
69
+ expect(schema_config).to eq({
70
+ "keyspace_name"=>keyspace_name,
71
+ "durable_writes"=>true,
72
+ "strategy_class"=>"org.apache.cassandra.locator.SimpleStrategy",
73
+ "strategy_options"=>"{\"replication_factor\":\"2\"}"
74
+ })
75
+ end
76
+
77
+ it "raises an error if a class other than SimpleStrategy is given" do
78
+ expect {
79
+ keyspace.create! class: "NetworkTopologyStrategy", replication_factor: 2
80
+ }.to raise_error
81
+ end
82
+ end
83
+
84
+ context 'with custom replication options' do
85
+ let(:config) {
86
+ basic_config.merge(replication: { class: "SimpleStrategy", replication_factor: 3 })
87
+ }
88
+
89
+ it 'uses default keyspace configuration' do
90
+ keyspace.create!
91
+ expect(schema_config).to eq({
92
+ "keyspace_name"=>keyspace_name,
93
+ "durable_writes"=>true,
94
+ "strategy_class"=>"org.apache.cassandra.locator.SimpleStrategy",
95
+ "strategy_options"=>"{\"replication_factor\":\"3\"}"
96
+ })
97
+ end
98
+ end
99
+
100
+ context 'with another custom replication options' do
101
+ let(:config) {
102
+ basic_config.merge(replication: { class: "NetworkTopologyStrategy", datacenter1: 3, datacenter2: 2 })
103
+ }
104
+
105
+ it 'uses default keyspace configuration' do
106
+ keyspace.create!
107
+ expect(schema_config).to eq({
108
+ "keyspace_name"=>keyspace_name,
109
+ "durable_writes"=>true,
110
+ "strategy_class"=>"org.apache.cassandra.locator.NetworkTopologyStrategy",
111
+ "strategy_options"=>"{\"datacenter1\":\"3\",\"datacenter2\":\"2\"}"
112
+ })
113
+ end
114
+ end
115
+
116
+ context 'with custom durable_write option' do
117
+ let(:config) {
118
+ basic_config.merge(durable_writes: false)
119
+ }
120
+
121
+ it 'uses default keyspace configuration' do
122
+ keyspace.create!
123
+ expect(schema_config).to eq({
124
+ "keyspace_name"=>keyspace_name,
125
+ "durable_writes"=>false,
126
+ "strategy_class"=>"org.apache.cassandra.locator.SimpleStrategy",
127
+ "strategy_options"=>"{\"replication_factor\":\"1\"}"
128
+ })
129
+ end
130
+ end
131
+ end # describe 'creating keyspace'
132
+ end
@@ -5,6 +5,7 @@ development:
5
5
  keyspace: <%= app_name %>_development
6
6
  max_retries: 3
7
7
  retry_delay: 0.5
8
+ newrelic: false
8
9
 
9
10
  test:
10
11
  host: '127.0.0.1'
@@ -12,6 +13,7 @@ test:
12
13
  keyspace: <%= app_name %>_test
13
14
  max_retries: 3
14
15
  retry_delay: 0.5
16
+ newrelic: false
15
17
 
16
18
  production:
17
19
  hosts:
@@ -24,3 +26,12 @@ production:
24
26
  password: 'password1'
25
27
  max_retries: 3
26
28
  retry_delay: 0.5
29
+ newrelic: true
30
+ replication:
31
+ class: SimpleStrategy
32
+ replication_factor: 1
33
+ # replication:
34
+ # class: NetworkTopologyStrategy
35
+ # datacenter1: 3
36
+ # datacenter2: 2
37
+ # durable_writes: false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mat Brown
@@ -23,161 +23,164 @@ authors:
23
23
  - Masaki Takahashi
24
24
  - G Gordon Worley III
25
25
  - Clark Bremer
26
+ - Tamara Temple
27
+ - Long On
28
+ - Lucas Mundim
26
29
  autorequire:
27
30
  bindir: bin
28
31
  cert_chain: []
29
- date: 2014-10-16 00:00:00.000000000 Z
32
+ date: 2014-11-09 00:00:00.000000000 Z
30
33
  dependencies:
31
34
  - !ruby/object:Gem::Dependency
32
35
  name: activemodel
33
36
  requirement: !ruby/object:Gem::Requirement
34
37
  requirements:
35
- - - ">="
38
+ - - '>='
36
39
  - !ruby/object:Gem::Version
37
40
  version: '3.1'
38
- - - "<"
41
+ - - <
39
42
  - !ruby/object:Gem::Version
40
43
  version: '5.0'
41
44
  type: :runtime
42
45
  prerelease: false
43
46
  version_requirements: !ruby/object:Gem::Requirement
44
47
  requirements:
45
- - - ">="
48
+ - - '>='
46
49
  - !ruby/object:Gem::Version
47
50
  version: '3.1'
48
- - - "<"
51
+ - - <
49
52
  - !ruby/object:Gem::Version
50
53
  version: '5.0'
51
54
  - !ruby/object:Gem::Dependency
52
55
  name: cql-rb
53
56
  requirement: !ruby/object:Gem::Requirement
54
57
  requirements:
55
- - - ">="
58
+ - - '>='
56
59
  - !ruby/object:Gem::Version
57
60
  version: '1.2'
58
- - - "<"
61
+ - - <
59
62
  - !ruby/object:Gem::Version
60
63
  version: '3.0'
61
64
  type: :runtime
62
65
  prerelease: false
63
66
  version_requirements: !ruby/object:Gem::Requirement
64
67
  requirements:
65
- - - ">="
68
+ - - '>='
66
69
  - !ruby/object:Gem::Version
67
70
  version: '1.2'
68
- - - "<"
71
+ - - <
69
72
  - !ruby/object:Gem::Version
70
73
  version: '3.0'
71
74
  - !ruby/object:Gem::Dependency
72
75
  name: appraisal
73
76
  requirement: !ruby/object:Gem::Requirement
74
77
  requirements:
75
- - - "~>"
78
+ - - ~>
76
79
  - !ruby/object:Gem::Version
77
80
  version: '1.0'
78
81
  type: :development
79
82
  prerelease: false
80
83
  version_requirements: !ruby/object:Gem::Requirement
81
84
  requirements:
82
- - - "~>"
85
+ - - ~>
83
86
  - !ruby/object:Gem::Version
84
87
  version: '1.0'
85
88
  - !ruby/object:Gem::Dependency
86
89
  name: wwtd
87
90
  requirement: !ruby/object:Gem::Requirement
88
91
  requirements:
89
- - - "~>"
92
+ - - ~>
90
93
  - !ruby/object:Gem::Version
91
94
  version: '0.5'
92
95
  type: :development
93
96
  prerelease: false
94
97
  version_requirements: !ruby/object:Gem::Requirement
95
98
  requirements:
96
- - - "~>"
99
+ - - ~>
97
100
  - !ruby/object:Gem::Version
98
101
  version: '0.5'
99
102
  - !ruby/object:Gem::Dependency
100
103
  name: rake
101
104
  requirement: !ruby/object:Gem::Requirement
102
105
  requirements:
103
- - - "~>"
106
+ - - ~>
104
107
  - !ruby/object:Gem::Version
105
108
  version: '10.1'
106
109
  type: :development
107
110
  prerelease: false
108
111
  version_requirements: !ruby/object:Gem::Requirement
109
112
  requirements:
110
- - - "~>"
113
+ - - ~>
111
114
  - !ruby/object:Gem::Version
112
115
  version: '10.1'
113
116
  - !ruby/object:Gem::Dependency
114
117
  name: rspec
115
118
  requirement: !ruby/object:Gem::Requirement
116
119
  requirements:
117
- - - "~>"
120
+ - - ~>
118
121
  - !ruby/object:Gem::Version
119
122
  version: '3.1'
120
123
  type: :development
121
124
  prerelease: false
122
125
  version_requirements: !ruby/object:Gem::Requirement
123
126
  requirements:
124
- - - "~>"
127
+ - - ~>
125
128
  - !ruby/object:Gem::Version
126
129
  version: '3.1'
127
130
  - !ruby/object:Gem::Dependency
128
131
  name: rspec-its
129
132
  requirement: !ruby/object:Gem::Requirement
130
133
  requirements:
131
- - - "~>"
134
+ - - ~>
132
135
  - !ruby/object:Gem::Version
133
136
  version: '1.0'
134
137
  type: :development
135
138
  prerelease: false
136
139
  version_requirements: !ruby/object:Gem::Requirement
137
140
  requirements:
138
- - - "~>"
141
+ - - ~>
139
142
  - !ruby/object:Gem::Version
140
143
  version: '1.0'
141
144
  - !ruby/object:Gem::Dependency
142
145
  name: rubocop
143
146
  requirement: !ruby/object:Gem::Requirement
144
147
  requirements:
145
- - - "~>"
148
+ - - ~>
146
149
  - !ruby/object:Gem::Version
147
150
  version: 0.19.0
148
151
  type: :development
149
152
  prerelease: false
150
153
  version_requirements: !ruby/object:Gem::Requirement
151
154
  requirements:
152
- - - "~>"
155
+ - - ~>
153
156
  - !ruby/object:Gem::Version
154
157
  version: 0.19.0
155
158
  - !ruby/object:Gem::Dependency
156
159
  name: timecop
157
160
  requirement: !ruby/object:Gem::Requirement
158
161
  requirements:
159
- - - "~>"
162
+ - - ~>
160
163
  - !ruby/object:Gem::Version
161
164
  version: '0.7'
162
165
  type: :development
163
166
  prerelease: false
164
167
  version_requirements: !ruby/object:Gem::Requirement
165
168
  requirements:
166
- - - "~>"
169
+ - - ~>
167
170
  - !ruby/object:Gem::Version
168
171
  version: '0.7'
169
172
  - !ruby/object:Gem::Dependency
170
173
  name: yard
171
174
  requirement: !ruby/object:Gem::Requirement
172
175
  requirements:
173
- - - "~>"
176
+ - - ~>
174
177
  - !ruby/object:Gem::Version
175
178
  version: '0.6'
176
179
  type: :development
177
180
  prerelease: false
178
181
  version_requirements: !ruby/object:Gem::Requirement
179
182
  requirements:
180
- - - "~>"
183
+ - - ~>
181
184
  - !ruby/object:Gem::Version
182
185
  version: '0.6'
183
186
  description: |
@@ -202,6 +205,7 @@ files:
202
205
  - Vagrantfile
203
206
  - lib/cequel.rb
204
207
  - lib/cequel/errors.rb
208
+ - lib/cequel/instrumentation.rb
205
209
  - lib/cequel/metal.rb
206
210
  - lib/cequel/metal/batch.rb
207
211
  - lib/cequel/metal/batch_manager.rb
@@ -285,6 +289,7 @@ files:
285
289
  - spec/examples/record/spec_helper.rb
286
290
  - spec/examples/record/timestamps_spec.rb
287
291
  - spec/examples/record/validations_spec.rb
292
+ - spec/examples/schema/keyspace_spec.rb
288
293
  - spec/examples/schema/table_reader_spec.rb
289
294
  - spec/examples/schema/table_synchronizer_spec.rb
290
295
  - spec/examples/schema/table_updater_spec.rb
@@ -307,18 +312,18 @@ require_paths:
307
312
  - lib
308
313
  required_ruby_version: !ruby/object:Gem::Requirement
309
314
  requirements:
310
- - - ">="
315
+ - - '>='
311
316
  - !ruby/object:Gem::Version
312
317
  version: '1.9'
313
318
  required_rubygems_version: !ruby/object:Gem::Requirement
314
319
  requirements:
315
- - - ">="
320
+ - - '>='
316
321
  - !ruby/object:Gem::Version
317
322
  version: '0'
318
323
  requirements:
319
324
  - Cassandra >= 1.2.0
320
325
  rubyforge_project:
321
- rubygems_version: 2.2.2
326
+ rubygems_version: 2.4.2
322
327
  signing_key:
323
328
  specification_version: 4
324
329
  summary: Full-featured, ActiveModel-compliant ORM for Cassandra using CQL3
@@ -343,6 +348,7 @@ test_files:
343
348
  - spec/examples/record/spec_helper.rb
344
349
  - spec/examples/record/timestamps_spec.rb
345
350
  - spec/examples/record/validations_spec.rb
351
+ - spec/examples/schema/keyspace_spec.rb
346
352
  - spec/examples/schema/table_reader_spec.rb
347
353
  - spec/examples/schema/table_synchronizer_spec.rb
348
354
  - spec/examples/schema/table_updater_spec.rb