activerecord-time 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +16 -13
- data/.rubocop_todo.yml +10 -26
- data/.travis.yml +2 -1
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/activerecord-time.gemspec +2 -2
- data/gemfiles/ar60.gemfile +3 -0
- data/gemfiles/ar60.gemfile.lock +58 -0
- data/lib/activerecord-time/version.rb +1 -1
- data/lib/time_of_day.rb +3 -1
- data/matrix_test.rb +7 -1
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74b38dd8f2d4999899987300708ad5021513b9d40c86384ac5861fb1a4546c27
|
4
|
+
data.tar.gz: acbf8503d6ebd62b25847a0e79e5869d9e1d500283d1e12bf8270f3c16b77258
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3edf4d01502a7d0122742b93a1bbe2d9f02dee49ea9faa17c4ef4734d3c3cd4d88b6db459eac9c3719fc1533f08a034a578a68dc3187d7b7e1f3d06fd890c2b
|
7
|
+
data.tar.gz: 5e558c393d397014d8ca13b48e10c0981bbfcb6d8b6f3ec0183eda38495476b1bdc146c836e4bfd37f97f767e5f5eab99236f08bd886f3e5ec8438ac659d009b
|
data/.rubocop.yml
CHANGED
@@ -12,22 +12,24 @@ AllCops:
|
|
12
12
|
- '**/Rakefile'
|
13
13
|
- '**/*.rb'
|
14
14
|
|
15
|
-
Layout/
|
16
|
-
EnforcedStyle: with_fixed_indentation
|
15
|
+
Layout/AssignmentIndentation:
|
17
16
|
IndentationWidth: 4
|
18
17
|
|
19
|
-
Layout/
|
18
|
+
Layout/FirstArgumentIndentation:
|
20
19
|
EnforcedStyle: consistent
|
21
20
|
IndentationWidth: 4
|
22
21
|
|
23
|
-
Layout/
|
22
|
+
Layout/FirstArrayElementIndentation:
|
24
23
|
EnforcedStyle: consistent
|
25
24
|
|
26
|
-
Layout/
|
25
|
+
Layout/FirstHashElementIndentation:
|
27
26
|
EnforcedStyle: consistent
|
28
27
|
|
29
|
-
Layout/
|
30
|
-
|
28
|
+
Layout/LineLength:
|
29
|
+
Max: 107
|
30
|
+
AllowHeredoc: true
|
31
|
+
AllowURI: true
|
32
|
+
IgnoreCopDirectives: true
|
31
33
|
|
32
34
|
Layout/MultilineMethodCallIndentation:
|
33
35
|
EnforcedStyle: indented
|
@@ -37,16 +39,14 @@ Layout/MultilineOperationIndentation:
|
|
37
39
|
EnforcedStyle: indented
|
38
40
|
IndentationWidth: 4
|
39
41
|
|
42
|
+
Layout/ParameterAlignment:
|
43
|
+
EnforcedStyle: with_fixed_indentation
|
44
|
+
IndentationWidth: 4
|
45
|
+
|
40
46
|
Metrics/BlockLength:
|
41
47
|
Exclude:
|
42
48
|
- '*.gemspec'
|
43
49
|
|
44
|
-
Metrics/LineLength:
|
45
|
-
Max: 107
|
46
|
-
AllowHeredoc: true
|
47
|
-
AllowURI: true
|
48
|
-
IgnoreCopDirectives: true
|
49
|
-
|
50
50
|
Naming/FileName:
|
51
51
|
Exclude:
|
52
52
|
- 'activerecord-time.gemspec'
|
@@ -68,6 +68,9 @@ Style/Encoding:
|
|
68
68
|
Style/FormatString:
|
69
69
|
EnforcedStyle: percent
|
70
70
|
|
71
|
+
Style/FormatStringToken:
|
72
|
+
EnforcedStyle: unannotated
|
73
|
+
|
71
74
|
Style/NumericPredicate:
|
72
75
|
Enabled: false
|
73
76
|
|
data/.rubocop_todo.yml
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2020-01-02 10:44:56 +0100 using RuboCop version 0.78.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 4
|
10
10
|
Metrics/AbcSize:
|
11
|
-
Max:
|
11
|
+
Max: 31
|
12
12
|
|
13
13
|
# Offense count: 1
|
14
14
|
# Configuration parameters: CountComments, ExcludedMethods.
|
@@ -19,18 +19,22 @@ Metrics/BlockLength:
|
|
19
19
|
# Offense count: 1
|
20
20
|
# Configuration parameters: CountComments.
|
21
21
|
Metrics/ClassLength:
|
22
|
-
Max:
|
22
|
+
Max: 161
|
23
23
|
|
24
24
|
# Offense count: 1
|
25
25
|
Metrics/CyclomaticComplexity:
|
26
|
-
Max:
|
26
|
+
Max: 10
|
27
27
|
|
28
28
|
# Offense count: 2
|
29
29
|
# Configuration parameters: CountComments, ExcludedMethods.
|
30
30
|
Metrics/MethodLength:
|
31
|
-
Max:
|
31
|
+
Max: 13
|
32
32
|
|
33
33
|
# Offense count: 1
|
34
|
+
Metrics/PerceivedComplexity:
|
35
|
+
Max: 11
|
36
|
+
|
37
|
+
# Offense count: 2
|
34
38
|
# Configuration parameters: EnforcedStyle.
|
35
39
|
# SupportedStyles: strict, flexible
|
36
40
|
Rails/Date:
|
@@ -57,23 +61,3 @@ Style/AccessModifierDeclarations:
|
|
57
61
|
Style/ClassAndModuleChildren:
|
58
62
|
Exclude:
|
59
63
|
- 'lib/time_of_day/core_ext.rb'
|
60
|
-
|
61
|
-
# Offense count: 5
|
62
|
-
# Configuration parameters: .
|
63
|
-
# SupportedStyles: annotated, template, unannotated
|
64
|
-
Style/FormatStringToken:
|
65
|
-
EnforcedStyle: unannotated
|
66
|
-
|
67
|
-
# Offense count: 2
|
68
|
-
# Cop supports --auto-correct.
|
69
|
-
# Configuration parameters: EnforcedStyle.
|
70
|
-
# SupportedStyles: always, never
|
71
|
-
Style/FrozenStringLiteralComment:
|
72
|
-
Exclude:
|
73
|
-
- 'Gemfile'
|
74
|
-
- 'Rakefile'
|
75
|
-
|
76
|
-
# Offense count: 4
|
77
|
-
Style/IdenticalConditionalBranches:
|
78
|
-
Exclude:
|
79
|
-
- 'test/time_of_day_test.rb'
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/activerecord-time.gemspec
CHANGED
@@ -16,14 +16,14 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.summary = 'A handler for storing TimeOfDay objects in ActiveRecord objects as sql time values.'
|
17
17
|
gem.homepage = 'https://github.com/donv/activerecord-time'
|
18
18
|
gem.license = 'MIT'
|
19
|
-
gem.required_ruby_version = '>= 2.
|
19
|
+
gem.required_ruby_version = '>= 2.5'
|
20
20
|
|
21
21
|
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
22
22
|
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
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', '<6'
|
26
|
+
gem.add_runtime_dependency 'activerecord', '>=5.1', '<6.1'
|
27
27
|
|
28
28
|
if defined? JRUBY_VERSION
|
29
29
|
gem.add_development_dependency 'activerecord-jdbcpostgresql-adapter'
|
@@ -0,0 +1,58 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activemodel (6.0.2.1)
|
5
|
+
activesupport (= 6.0.2.1)
|
6
|
+
activerecord (6.0.2.1)
|
7
|
+
activemodel (= 6.0.2.1)
|
8
|
+
activesupport (= 6.0.2.1)
|
9
|
+
activesupport (6.0.2.1)
|
10
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
11
|
+
i18n (>= 0.7, < 2)
|
12
|
+
minitest (~> 5.1)
|
13
|
+
tzinfo (~> 1.1)
|
14
|
+
zeitwerk (~> 2.2)
|
15
|
+
ansi (1.5.0)
|
16
|
+
builder (3.2.4)
|
17
|
+
concurrent-ruby (1.1.5)
|
18
|
+
docile (1.3.2)
|
19
|
+
i18n (1.7.0)
|
20
|
+
concurrent-ruby (~> 1.0)
|
21
|
+
json (2.3.0)
|
22
|
+
minitest (5.13.0)
|
23
|
+
minitest-reporters (1.4.2)
|
24
|
+
ansi
|
25
|
+
builder
|
26
|
+
minitest (>= 5.0)
|
27
|
+
ruby-progressbar
|
28
|
+
pg (0.21.0)
|
29
|
+
rake (13.0.1)
|
30
|
+
ruby-progressbar (1.10.1)
|
31
|
+
simplecov (0.17.1)
|
32
|
+
docile (~> 1.1)
|
33
|
+
json (>= 1.8, < 3)
|
34
|
+
simplecov-html (~> 0.10.0)
|
35
|
+
simplecov-html (0.10.2)
|
36
|
+
sqlite3 (1.4.2)
|
37
|
+
thread_safe (0.3.6)
|
38
|
+
tzinfo (1.2.6)
|
39
|
+
thread_safe (~> 0.1)
|
40
|
+
zeitwerk (2.2.2)
|
41
|
+
|
42
|
+
PLATFORMS
|
43
|
+
ruby
|
44
|
+
|
45
|
+
DEPENDENCIES
|
46
|
+
activerecord (~> 6.0.0)
|
47
|
+
activerecord-jdbc-adapter
|
48
|
+
activerecord-jdbcderby-adapter
|
49
|
+
activerecord-jdbcpostgresql-adapter
|
50
|
+
activerecord-jdbcsqlite3-adapter
|
51
|
+
minitest-reporters
|
52
|
+
pg (< 1)
|
53
|
+
rake
|
54
|
+
simplecov
|
55
|
+
sqlite3
|
56
|
+
|
57
|
+
BUNDLED WITH
|
58
|
+
1.17.2
|
data/lib/time_of_day.rb
CHANGED
@@ -11,7 +11,9 @@ class TimeOfDay
|
|
11
11
|
|
12
12
|
def initialize(hour, minute = 0, second = 0)
|
13
13
|
if hour == 24
|
14
|
-
|
14
|
+
unless minute == 0 && second == 0
|
15
|
+
raise "Invalid TimeOfDay. #{hour}:#{minute}:#{second} given, but highest allowed value is 24:00:00"
|
16
|
+
end
|
15
17
|
else
|
16
18
|
raise "Invalid hour: #{hour}" unless hour >= 0 && hour <= 23
|
17
19
|
end
|
data/matrix_test.rb
CHANGED
@@ -38,6 +38,12 @@ end
|
|
38
38
|
|
39
39
|
bad_variants = (travis.dig('matrix', 'exclude').to_a + travis.dig('matrix', 'allow_failures').to_a)
|
40
40
|
|
41
|
+
travis['env']['global'].each do |env|
|
42
|
+
env.scan(/\b(?<key>[A-Z_]+)="(?<value>.+?)"/) do |key, value|
|
43
|
+
ENV[key] = value
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
41
47
|
travis['rvm'].each do |ruby|
|
42
48
|
next if /head/.match?(ruby) # ruby-install does not support HEAD installation
|
43
49
|
|
@@ -53,7 +59,7 @@ travis['rvm'].each do |ruby|
|
|
53
59
|
system "#{bundler_gem_check_cmd} || #{bundler_install_cmd}" || exit(1)
|
54
60
|
travis['gemfile'].each do |gemfile|
|
55
61
|
use_gemfile(ruby, gemfile, update_gemfiles) do
|
56
|
-
travis['env'].each do |env|
|
62
|
+
travis['env']['matrix'].each do |env|
|
57
63
|
bad_variant = bad_variants.any? do |f|
|
58
64
|
(f['rvm'].nil? || f['rvm'] == ruby) &&
|
59
65
|
(f['gemfile'].nil? || f['gemfile'] == gemfile) && (f['env'].nil? || f['env'] == env)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-time
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.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:
|
11
|
+
date: 2020-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '5.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '6'
|
22
|
+
version: '6.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '5.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '6'
|
32
|
+
version: '6.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: pg
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +164,8 @@ files:
|
|
164
164
|
- gemfiles/ar51.gemfile.lock
|
165
165
|
- gemfiles/ar52.gemfile
|
166
166
|
- gemfiles/ar52.gemfile.lock
|
167
|
+
- gemfiles/ar60.gemfile
|
168
|
+
- gemfiles/ar60.gemfile.lock
|
167
169
|
- gemfiles/common.gemfile
|
168
170
|
- lib/activerecord-time.rb
|
169
171
|
- lib/activerecord-time/extension.rb
|
@@ -187,7 +189,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
189
|
requirements:
|
188
190
|
- - ">="
|
189
191
|
- !ruby/object:Gem::Version
|
190
|
-
version: '2.
|
192
|
+
version: '2.5'
|
191
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
192
194
|
requirements:
|
193
195
|
- - ">="
|