activerecord-time 0.19.0 → 0.20.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
  SHA256:
3
- metadata.gz: 38e31e5791113c1c15833344fc7a243a87bacc1f35cc6fdbeb15cbe7edf7daf4
4
- data.tar.gz: 58990d314938ba0786cf4733c1616c50757d5e21cb6e37153b207fff4d5d5b42
3
+ metadata.gz: b4fd61f3d4336ca6066bf7c370cc9b6ef79197a8a223c90c5988df700f4766f7
4
+ data.tar.gz: 0c718820286900bcb68d4ca0a7fbcf138d9f2333335ef8a136e81421fb67f894
5
5
  SHA512:
6
- metadata.gz: 0bfd12648f4877017b8296a35dfebca5ae1ac9157bc6d63f35354450b3953a950d6a99fa38d477ffe01bf363b459b3010fe6d0f17589ee744e0b8b4b542c1210
7
- data.tar.gz: fa6e24e7993c666265de8e82dee024f66e18878141d31c5862c0602ba4096854601f81af6253875cf7f81505ceac2de1e932d36dde97423db825ba6943517a29
6
+ metadata.gz: 0b6cdf1f3d47679076e9e20ff5504ddd1b0322508e76431d7e27050f0d6b9e0cdddaef424cc3eb70cebbd4dda78fde8240864737ae011b1b402f42446a377bf4
7
+ data.tar.gz: 0a3a67c6781ca27f19ca9814835f44389756625d13c69be4ca291c09e69fb602b33a05927af0b860a5c21814a1856473b3a7f5cc79e26b915c2fcbc89d3ca151
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
23
23
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
24
24
  gem.require_paths = %w[lib]
25
25
 
26
- gem.add_runtime_dependency 'activerecord', '>=5.1', '<7'
26
+ gem.add_runtime_dependency 'activerecord', '~>7.0'
27
27
 
28
28
  if defined? JRUBY_VERSION
29
29
  gem.add_development_dependency 'activerecord-jdbcpostgresql-adapter'
@@ -5,13 +5,13 @@ require 'active_record/connection_adapters/abstract/quoting'
5
5
  module Activerecord
6
6
  module Time
7
7
  module Quoting
8
- def _quote(value)
8
+ def quote(value)
9
9
  return "'#{value}'" if value.is_a?(TimeOfDay)
10
10
 
11
11
  super(value)
12
12
  end
13
13
 
14
- def _type_cast(value)
14
+ def type_cast(value)
15
15
  return value.to_s if value.is_a?(TimeOfDay)
16
16
 
17
17
  super(value)
@@ -20,8 +20,7 @@ module Activerecord
20
20
  end
21
21
  end
22
22
 
23
- # ActiveRecord::ConnectionAdapters::Quoting.prepend Activerecord::Time::Quoting
24
- ActiveRecord::ConnectionAdapters::AbstractAdapter.prepend Activerecord::Time::Quoting
23
+ ActiveRecord::ConnectionAdapters::Quoting.prepend Activerecord::Time::Quoting
25
24
 
26
25
  module ActiveRecord
27
26
  module Type
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Activerecord
4
4
  module Time
5
- VERSION = '0.19.0'
5
+ VERSION = '0.20.0'
6
6
  end
7
7
  end
data/lib/time_of_day.rb CHANGED
@@ -149,4 +149,8 @@ class TimeOfDay
149
149
  def to_json(*)
150
150
  %("#{self}")
151
151
  end
152
+
153
+ def utc?
154
+ true
155
+ end
152
156
  end
metadata CHANGED
@@ -1,35 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-time
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uwe Kubosch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-16 00:00:00.000000000 Z
11
+ date: 2022-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '5.1'
20
- - - "<"
17
+ - - "~>"
21
18
  - !ruby/object:Gem::Version
22
- version: '7'
19
+ version: '7.0'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '5.1'
30
- - - "<"
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: '7'
26
+ version: '7.0'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: pg
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -195,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
189
  - !ruby/object:Gem::Version
196
190
  version: '0'
197
191
  requirements: []
198
- rubygems_version: 3.2.32
192
+ rubygems_version: 3.3.7
199
193
  signing_key:
200
194
  specification_version: 4
201
195
  summary: A handler for storing TimeOfDay objects in ActiveRecord objects as sql time