activerecord-time 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/.rubocop_todo.yml +59 -12
- data/.travis.yml +1 -1
- data/activerecord-time.gemspec +2 -1
- data/gemfiles/ar61.gemfile +3 -0
- data/gemfiles/common.gemfile +1 -1
- data/lib/activerecord-time/version.rb +1 -1
- data/test/time_of_day_test.rb +3 -4
- metadata +23 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a78f054f0473a1a0adb90af5ae3395b847bdd06cfb9d564a67f595a8e90d0c6f
|
4
|
+
data.tar.gz: feca115e76f76ab8d2b5734ac2c5e89a8d3fca0eb12930b1c12a9a512f24df1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3936ced2f21a9d38cb4578789a952917a90f20365caccbb58e1bfd9a280a6b551a4dd8cc672208a04466311971158a480d20cdf88a60939eb2538f85360f0d97
|
7
|
+
data.tar.gz: 1fc524b519c6a4ca3bec14f8c73976df8ff111856d1834d1da31ad81f9b2ffe967fa0829a81b01c1dbd05b42144ebf33694c76570e4b88529ebf088f1370b02b
|
data/.rubocop.yml
CHANGED
@@ -2,11 +2,13 @@ inherit_from: .rubocop_todo.yml
|
|
2
2
|
require:
|
3
3
|
- rubocop-performance
|
4
4
|
- rubocop-rails
|
5
|
+
- rubocop-rake
|
5
6
|
|
6
7
|
AllCops:
|
7
8
|
TargetRubyVersion: 2.4
|
8
9
|
DisplayCopNames: true
|
9
10
|
DisplayStyleGuide: true
|
11
|
+
NewCops: enable
|
10
12
|
Include:
|
11
13
|
- '**/Gemfile'
|
12
14
|
- '**/Rakefile'
|
data/.rubocop_todo.yml
CHANGED
@@ -1,36 +1,50 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2021-02-02 13:29:03 UTC using RuboCop version 1.9.1.
|
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: 1
|
10
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
11
|
+
Exclude:
|
12
|
+
- 'test/time_of_day_test.rb'
|
13
|
+
|
14
|
+
# Offense count: 1
|
15
|
+
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
|
16
|
+
Lint/DuplicateBranch:
|
17
|
+
Exclude:
|
18
|
+
- 'lib/time_of_day.rb'
|
19
|
+
|
20
|
+
# Offense count: 3
|
21
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
10
22
|
Metrics/AbcSize:
|
11
23
|
Max: 31
|
12
24
|
|
13
25
|
# Offense count: 1
|
14
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
15
|
-
#
|
26
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
27
|
+
# IgnoredMethods: refine
|
16
28
|
Metrics/BlockLength:
|
17
|
-
Max:
|
29
|
+
Max: 26
|
18
30
|
|
19
|
-
# Offense count:
|
20
|
-
# Configuration parameters: CountComments.
|
31
|
+
# Offense count: 2
|
32
|
+
# Configuration parameters: CountComments, CountAsOne.
|
21
33
|
Metrics/ClassLength:
|
22
34
|
Max: 176
|
23
35
|
|
24
36
|
# Offense count: 1
|
37
|
+
# Configuration parameters: IgnoredMethods.
|
25
38
|
Metrics/CyclomaticComplexity:
|
26
39
|
Max: 10
|
27
40
|
|
28
|
-
# Offense count:
|
29
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
41
|
+
# Offense count: 3
|
42
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
30
43
|
Metrics/MethodLength:
|
31
|
-
Max:
|
44
|
+
Max: 15
|
32
45
|
|
33
46
|
# Offense count: 1
|
47
|
+
# Configuration parameters: IgnoredMethods.
|
34
48
|
Metrics/PerceivedComplexity:
|
35
49
|
Max: 11
|
36
50
|
|
@@ -41,6 +55,18 @@ Rails/Date:
|
|
41
55
|
Exclude:
|
42
56
|
- 'lib/time_of_day.rb'
|
43
57
|
|
58
|
+
# Offense count: 1
|
59
|
+
# Cop supports --auto-correct.
|
60
|
+
Rails/WhereEquals:
|
61
|
+
Exclude:
|
62
|
+
- 'test/time_of_day_test.rb'
|
63
|
+
|
64
|
+
# Offense count: 1
|
65
|
+
# Cop supports --auto-correct.
|
66
|
+
Rails/WhereNot:
|
67
|
+
Exclude:
|
68
|
+
- 'test/time_of_day_test.rb'
|
69
|
+
|
44
70
|
# Offense count: 2
|
45
71
|
# Cop supports --auto-correct.
|
46
72
|
Security/YAMLLoad:
|
@@ -49,15 +75,36 @@ Security/YAMLLoad:
|
|
49
75
|
- 'test/time_of_day_test.rb'
|
50
76
|
|
51
77
|
# Offense count: 1
|
52
|
-
# Configuration parameters: .
|
78
|
+
# Configuration parameters: AllowModifiersOnSymbols.
|
53
79
|
# SupportedStyles: inline, group
|
54
80
|
Style/AccessModifierDeclarations:
|
55
81
|
EnforcedStyle: inline
|
56
82
|
|
83
|
+
# Offense count: 3
|
84
|
+
# Cop supports --auto-correct.
|
85
|
+
# Configuration parameters: EnforcedStyle.
|
86
|
+
# SupportedStyles: separated, grouped
|
87
|
+
Style/AccessorGrouping:
|
88
|
+
Exclude:
|
89
|
+
- 'lib/time_of_day.rb'
|
90
|
+
|
57
91
|
# Offense count: 1
|
58
92
|
# Cop supports --auto-correct.
|
59
|
-
# Configuration parameters:
|
93
|
+
# Configuration parameters: EnforcedStyle.
|
60
94
|
# SupportedStyles: nested, compact
|
61
95
|
Style/ClassAndModuleChildren:
|
62
96
|
Exclude:
|
63
97
|
- 'lib/time_of_day/core_ext.rb'
|
98
|
+
|
99
|
+
# Offense count: 1
|
100
|
+
# Configuration parameters: AllowedMethods.
|
101
|
+
# AllowedMethods: respond_to_missing?
|
102
|
+
Style/OptionalBooleanParameter:
|
103
|
+
Exclude:
|
104
|
+
- 'lib/time_of_day.rb'
|
105
|
+
|
106
|
+
# Offense count: 5
|
107
|
+
# Cop supports --auto-correct.
|
108
|
+
Style/StringConcatenation:
|
109
|
+
Exclude:
|
110
|
+
- 'test/test_helper.rb'
|
data/.travis.yml
CHANGED
data/activerecord-time.gemspec
CHANGED
@@ -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', '<
|
26
|
+
gem.add_runtime_dependency 'activerecord', '>=5.1', '<7'
|
27
27
|
|
28
28
|
if defined? JRUBY_VERSION
|
29
29
|
gem.add_development_dependency 'activerecord-jdbcpostgresql-adapter'
|
@@ -37,5 +37,6 @@ Gem::Specification.new do |gem|
|
|
37
37
|
gem.add_development_dependency 'rubocop'
|
38
38
|
gem.add_development_dependency 'rubocop-performance'
|
39
39
|
gem.add_development_dependency 'rubocop-rails'
|
40
|
+
gem.add_development_dependency 'rubocop-rake'
|
40
41
|
gem.add_development_dependency 'simplecov'
|
41
42
|
end
|
data/gemfiles/common.gemfile
CHANGED
data/test/time_of_day_test.rb
CHANGED
@@ -5,6 +5,7 @@ require File.expand_path('test_helper', File.dirname(__FILE__))
|
|
5
5
|
class ApplicationRecord < ActiveRecord::Base
|
6
6
|
self.abstract_class = true
|
7
7
|
end
|
8
|
+
|
8
9
|
class Event < ApplicationRecord
|
9
10
|
end
|
10
11
|
|
@@ -154,7 +155,7 @@ class TimeOfDayTest < Minitest::Test
|
|
154
155
|
tod2 = TimeOfDay.new(13, 0)
|
155
156
|
assert_equal(-1, tod1 <=> tod2)
|
156
157
|
assert_equal 1, tod2 <=> tod1
|
157
|
-
assert_equal 0, tod1 <=> tod1
|
158
|
+
assert_equal 0, tod1 <=> tod1
|
158
159
|
end
|
159
160
|
|
160
161
|
def test_strftime
|
@@ -214,8 +215,6 @@ class TimeOfDayTest < Minitest::Test
|
|
214
215
|
end
|
215
216
|
|
216
217
|
def test_inspect
|
217
|
-
|
218
|
-
p a.inspect
|
219
|
-
assert_equal a.inspect, '#<TimeOfDay hour=10, minute=11, second=12>'
|
218
|
+
assert_equal '#<TimeOfDay hour=10, minute=11, second=12>', TimeOfDay.new(10, 11, 12).inspect
|
220
219
|
end
|
221
220
|
end
|
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.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Uwe Kubosch
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-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: '
|
22
|
+
version: '7'
|
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: '
|
32
|
+
version: '7'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: pg
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,6 +128,20 @@ dependencies:
|
|
128
128
|
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: rubocop-rake
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
131
145
|
- !ruby/object:Gem::Dependency
|
132
146
|
name: simplecov
|
133
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -166,6 +180,7 @@ files:
|
|
166
180
|
- gemfiles/ar52.gemfile.lock
|
167
181
|
- gemfiles/ar60.gemfile
|
168
182
|
- gemfiles/ar60.gemfile.lock
|
183
|
+
- gemfiles/ar61.gemfile
|
169
184
|
- gemfiles/common.gemfile
|
170
185
|
- lib/activerecord-time.rb
|
171
186
|
- lib/activerecord-time/extension.rb
|
@@ -181,7 +196,7 @@ homepage: https://github.com/donv/activerecord-time
|
|
181
196
|
licenses:
|
182
197
|
- MIT
|
183
198
|
metadata: {}
|
184
|
-
post_install_message:
|
199
|
+
post_install_message:
|
185
200
|
rdoc_options: []
|
186
201
|
require_paths:
|
187
202
|
- lib
|
@@ -196,8 +211,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
211
|
- !ruby/object:Gem::Version
|
197
212
|
version: '0'
|
198
213
|
requirements: []
|
199
|
-
rubygems_version: 3.
|
200
|
-
signing_key:
|
214
|
+
rubygems_version: 3.2.3
|
215
|
+
signing_key:
|
201
216
|
specification_version: 4
|
202
217
|
summary: A handler for storing TimeOfDay objects in ActiveRecord objects as sql time
|
203
218
|
values.
|