clickhouse-activerecord 0.3.3 → 0.3.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
  SHA256:
3
- metadata.gz: 6238ddf9d8b96bc4416c3ae8bb616a6b4f2269727c94d97a9d815b7b5aefc3bc
4
- data.tar.gz: fdaac407735ccd01914e50cb635ae2cad2994dc179f5da0512f9f0d1b9ec59f7
3
+ metadata.gz: 1b9461371fc0031e2d5f70577857979c6ab9f210028c733a5d1296c22157527c
4
+ data.tar.gz: b3fb5414957d5c4b9ae3cfe32de5c3f292ef82ba390ac8dea45466663e081733
5
5
  SHA512:
6
- metadata.gz: 6a063f3d72805ce6a839108c80ca62d9cbc0c99d3eb7c1d1c9e8aef1def1ffe4570ebb1725eee0bc9db2571ef924cfa0f90fb558ceea1b705bb2f9b07c241043
7
- data.tar.gz: 7f8e785327876f94d8e2b1768df3fffa64638574359cbe0c6d93922cfa4fd6f387ec248c2909895beef9217a25ed5bd7555a17a18db33699ffe4f0c207f320a0
6
+ metadata.gz: b72edc5f389e47bc3e6e95bb7ea3e7b239bf35a0d208e721b0fcdc82c6c9e90b68719d0c3e3dc28daf99cea1ee8a053f0ca83173be6dbb9212946f3fc6a30994
7
+ data.tar.gz: 610bd1ee31541e875f78a2339bbaff8f90f77074a31017f06d8971d9bc00cc27a13c2bda7f9ef2cde2643d7fb971c904aea76bf59181f78af93b5d1597b5f4b8
@@ -23,11 +23,11 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ['lib']
25
25
 
26
- spec.add_dependency "bundler", ">= 1.13.4"
27
- spec.add_dependency 'activerecord', '>= 5.2'
26
+ spec.add_runtime_dependency 'bundler', '~> 1.13', '>= 1.13.4'
27
+ spec.add_runtime_dependency 'activerecord', '~> 5.2'
28
28
 
29
29
  spec.add_development_dependency 'bundler', '~> 1.15'
30
30
  spec.add_development_dependency 'rake', '~> 10.0'
31
- spec.add_development_dependency 'rspec'
32
- spec.add_development_dependency 'pry'
31
+ spec.add_development_dependency 'rspec', '~> 3.4'
32
+ spec.add_development_dependency 'pry', '~> 0.12'
33
33
  end
@@ -8,7 +8,7 @@ module ActiveRecord
8
8
 
9
9
  def serialize(value)
10
10
  value = super
11
- return value unless value.acts_like?(:time)
11
+ return value.strftime('%Y-%m-%d %H:%M:%S') unless value.acts_like?(:time)
12
12
 
13
13
  value.to_time.strftime('%Y-%m-%d %H:%M:%S')
14
14
  end
@@ -117,6 +117,19 @@ module ActiveRecord
117
117
  register_class_with_limit m, %r(Int64), Type::Integer
118
118
  end
119
119
 
120
+ # Quoting time without microseconds
121
+ def quoted_date(value)
122
+ if value.acts_like?(:time)
123
+ zone_conversion_method = ActiveRecord::Base.default_timezone == :utc ? :getutc : :getlocal
124
+
125
+ if value.respond_to?(zone_conversion_method)
126
+ value = value.send(zone_conversion_method)
127
+ end
128
+ end
129
+
130
+ value.to_s(:db)
131
+ end
132
+
120
133
  # Executes insert +sql+ statement in the context of this connection using
121
134
  # +binds+ as the bind substitutes. +name+ is logged along with
122
135
  # the executed +sql+ statement.
@@ -1,3 +1,3 @@
1
1
  module ClickhouseActiverecord
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
3
3
  end
metadata CHANGED
@@ -1,19 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clickhouse-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Odintsov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-12 00:00:00.000000000 Z
11
+ date: 2019-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.13'
17
20
  - - ">="
18
21
  - !ruby/object:Gem::Version
19
22
  version: 1.13.4
@@ -21,6 +24,9 @@ dependencies:
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.13'
24
30
  - - ">="
25
31
  - !ruby/object:Gem::Version
26
32
  version: 1.13.4
@@ -28,14 +34,14 @@ dependencies:
28
34
  name: activerecord
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - ">="
37
+ - - "~>"
32
38
  - !ruby/object:Gem::Version
33
39
  version: '5.2'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - ">="
44
+ - - "~>"
39
45
  - !ruby/object:Gem::Version
40
46
  version: '5.2'
41
47
  - !ruby/object:Gem::Dependency
@@ -70,30 +76,30 @@ dependencies:
70
76
  name: rspec
71
77
  requirement: !ruby/object:Gem::Requirement
72
78
  requirements:
73
- - - ">="
79
+ - - "~>"
74
80
  - !ruby/object:Gem::Version
75
- version: '0'
81
+ version: '3.4'
76
82
  type: :development
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
- - - ">="
86
+ - - "~>"
81
87
  - !ruby/object:Gem::Version
82
- version: '0'
88
+ version: '3.4'
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: pry
85
91
  requirement: !ruby/object:Gem::Requirement
86
92
  requirements:
87
- - - ">="
93
+ - - "~>"
88
94
  - !ruby/object:Gem::Version
89
- version: '0'
95
+ version: '0.12'
90
96
  type: :development
91
97
  prerelease: false
92
98
  version_requirements: !ruby/object:Gem::Requirement
93
99
  requirements:
94
- - - ">="
100
+ - - "~>"
95
101
  - !ruby/object:Gem::Version
96
- version: '0'
102
+ version: '0.12'
97
103
  description: ActiveRecord adapter for ClickHouse
98
104
  email:
99
105
  - nixx.dj@gmail.com
@@ -146,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
152
  - !ruby/object:Gem::Version
147
153
  version: '0'
148
154
  requirements: []
149
- rubygems_version: 3.0.2
155
+ rubygems_version: 3.0.1
150
156
  signing_key:
151
157
  specification_version: 4
152
158
  summary: ClickHouse ActiveRecord