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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf7976fe7965349b4caeeb182906f8779e9644b8512d74290fd8c405e5655326
4
- data.tar.gz: 7591baed02bf325a82dd2afa9b77a4ed911035167e2c4bd05a0e53646c5e7b25
3
+ metadata.gz: a78f054f0473a1a0adb90af5ae3395b847bdd06cfb9d564a67f595a8e90d0c6f
4
+ data.tar.gz: feca115e76f76ab8d2b5734ac2c5e89a8d3fca0eb12930b1c12a9a512f24df1c
5
5
  SHA512:
6
- metadata.gz: 1187f665dcfb31db2508e836b4995b3047dec8e400fac53dec0a6de2841f73a30dc391d6b8f69a646771d5408acfa0ddb5a58a12bf309b2067716a8481937719
7
- data.tar.gz: 78259bc4b3fb7279a14137857129060e3074f344c227742890e2f0a68b83b486cb72d8701518aafc1262f9ee840d725503fe351bb4bb5ab9433ceeb659eab0c0
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 2020-01-02 10:44:56 +0100 using RuboCop version 0.78.0.
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: 4
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
- # ExcludedMethods: refine
26
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
27
+ # IgnoredMethods: refine
16
28
  Metrics/BlockLength:
17
- Max: 28
29
+ Max: 26
18
30
 
19
- # Offense count: 1
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: 2
29
- # Configuration parameters: CountComments, ExcludedMethods.
41
+ # Offense count: 3
42
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
30
43
  Metrics/MethodLength:
31
- Max: 13
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: AutoCorrect, EnforcedStyle.
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
@@ -4,7 +4,7 @@ cache: bundler
4
4
  services:
5
5
  - postgresql
6
6
  jdk:
7
- - openjdk8
7
+ - openjdk
8
8
  rvm:
9
9
  - ruby-2.7
10
10
  - ruby-2.6
@@ -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', '<6.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
@@ -0,0 +1,3 @@
1
+ eval File.read("#{File.dirname __FILE__}/common.gemfile")
2
+
3
+ gem 'activerecord', '~>6.1.0'
@@ -25,7 +25,7 @@ unless defined?(SKIP_JRUBY)
25
25
  end
26
26
 
27
27
  platform :ruby do
28
- gem 'pg', '<1'
28
+ gem 'pg'
29
29
  gem 'sqlite3'
30
30
  end
31
31
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Activerecord
4
4
  module Time
5
- VERSION = '0.16.0'
5
+ VERSION = '0.17.0'
6
6
  end
7
7
  end
@@ -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 # rubocop: disable Lint/UselessComparison
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
- a = TimeOfDay.new(10, 11, 12)
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.16.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: 2020-01-22 00:00:00.000000000 Z
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: '6.1'
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: '6.1'
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.0.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.