cequel 1.4.3 → 1.4.4

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: 972c48841d081a702bd2bb4dd97cc94a7da02f42
4
- data.tar.gz: 0d75dca1e13d7bb1856e4f0ea6d7af3795a95959
3
+ metadata.gz: a43ac7eabfd0c08bc6351877501405dc45a0f0ee
4
+ data.tar.gz: 9e926cb705192f68bfe3fb47cdb406de9c6829ac
5
5
  SHA512:
6
- metadata.gz: c58f9ec3bb7cf8c308d38eb091d18535b5051c8301d7b84e33beb8e03abfc01f8ca8ea4711b894980fe6df760055e10b8fba78a9639fa0bdb7dba018cb31624a
7
- data.tar.gz: e4b13cb2ee0ed6b1971fefbaa5609107289722bd788c0ae4088e663fe37b56d40d094673941ce49b82afdb2b3e40990a48749dba93640cdc3da81a3b71d4082e
6
+ metadata.gz: ef9d853eab6fa701d06560fb903d410b7539434b0823fca9077db8e74c13301c86dded17fafd148c43c0825e74c89ff0578a833c17f5ab7ff29a9ee7b40b2f3e
7
+ data.tar.gz: 1d979817ae7d022a2ea0fa96a7f64c232cf602a62f4561a66edd5aa17829b664f758bc5414da66abc0586a3228c440c9a58348bf1bc14501ac1b73a3a185f67a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.4.4
2
+
3
+ * Round time to nearest millisecond when serializing for CQL
4
+
1
5
  ## 1.4.3
2
6
 
3
7
  * Make Rake tasks work without Rails
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cequel (1.4.3)
4
+ cequel (1.4.4)
5
5
  activemodel (>= 3.1, < 5.0)
6
6
  cql-rb (>= 1.2, < 3.0)
7
7
 
data/README.md CHANGED
@@ -564,6 +564,11 @@ Cequel was written by:
564
564
  * Kei Kusakari
565
565
  * Oleh Novosad
566
566
  * John Smart
567
+ * Angelo Lakra
568
+ * Olivier Lance
569
+ * Tomohiro Nishimura
570
+ * Masaki Takahashi
571
+ * G Gordon Worley III
567
572
 
568
573
  Special thanks to [Brewster](https://www.brewster.com), which supported the 0.x
569
574
  releases of Cequel.
data/Rakefile CHANGED
@@ -69,7 +69,7 @@ namespace :test do
69
69
  end
70
70
 
71
71
  task :all do
72
- system('bundle', 'exec', 'wwtd', '--parallel')
72
+ abort unless system('bundle', 'exec', 'wwtd', '--parallel')
73
73
  end
74
74
  end
75
75
 
data/Vagrantfile CHANGED
@@ -1,5 +1,6 @@
1
1
  # -*- mode: ruby -*-
2
2
  # vi: set ft=ruby :
3
+ require 'net/http'
3
4
 
4
5
  # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5
6
  VAGRANTFILE_API_VERSION = "2"
@@ -136,9 +137,8 @@ exec /opt/apache-cassandra-$1/bin/cassandra" > /etc/init/cassandra.conf
136
137
  service cassandra start
137
138
  SH
138
139
 
139
- versions = (0..0).map { |p| "2.1.#{p}" } +
140
- (0..10).map { |p| "2.0.#{p}" } +
141
- (0..19).map { |p| "1.2.#{p}" }
140
+ listing = Net::HTTP.get(URI.parse("http://archive.apache.org/dist/cassandra/"))
141
+ versions = listing.scan(%r(href="(\d+\.\d+\.\d+)/")).map(&:first).grep(/^(1\.2\.|2\.)/)
142
142
  versions.each do |version|
143
143
  java_version = version =~ /^1/ ? '6' : '7'
144
144
  config.vm.define version do |machine|
data/lib/cequel/type.rb CHANGED
@@ -84,10 +84,10 @@ module Cequel
84
84
  return value.map { |element| quote(element) }.join(',')
85
85
  end
86
86
  case value
87
- when ::String
88
- quote_string(value)
89
- when Time, ActiveSupport::TimeWithZone, DateTime
90
- value.strftime('%s%L')
87
+ when Time, ActiveSupport::TimeWithZone
88
+ (value.to_r * 1000).round.to_s
89
+ when DateTime
90
+ quote(value.utc.to_time)
91
91
  when Date
92
92
  quote(Time.gm(value.year, value.month, value.day))
93
93
  when Numeric, true, false, Cql::Uuid
@@ -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.3'
4
+ VERSION = '1.4.4'
5
5
  end
@@ -216,6 +216,7 @@ describe Cequel::Type do
216
216
  [true, 'true'],
217
217
  [false, 'false'],
218
218
  [Time.at(1401323181, 381000), '1401323181381'],
219
+ [Time.at(1401323181, 381999), '1401323181382'],
219
220
  [Time.at(1401323181, 381000).in_time_zone, '1401323181381'],
220
221
  [Date.parse('2014-05-28'), "1401235200000"],
221
222
  [Time.at(1401323181, 381000).to_datetime, '1401323181381'],
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.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mat Brown
@@ -17,10 +17,15 @@ authors:
17
17
  - Kei Kusakari
18
18
  - Oleh Novosad
19
19
  - John Smart
20
+ - Angelo Lakra
21
+ - Olivier Lance
22
+ - Tomohiro Nishimura
23
+ - Masaki Takahashi
24
+ - G Gordon Worley III
20
25
  autorequire:
21
26
  bindir: bin
22
27
  cert_chain: []
23
- date: 2014-10-05 00:00:00.000000000 Z
28
+ date: 2014-10-08 00:00:00.000000000 Z
24
29
  dependencies:
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: activemodel