activerecord-time 0.10.1 → 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
- SHA1:
3
- metadata.gz: b109ca8028703d50b73bfd9a66608c2669e9f913
4
- data.tar.gz: fceb1381dd5c0012c3412225f0ea666a5040b692
2
+ SHA256:
3
+ metadata.gz: a78f054f0473a1a0adb90af5ae3395b847bdd06cfb9d564a67f595a8e90d0c6f
4
+ data.tar.gz: feca115e76f76ab8d2b5734ac2c5e89a8d3fca0eb12930b1c12a9a512f24df1c
5
5
  SHA512:
6
- metadata.gz: 2e037eefad7123564ec01170a4af564a5bcb0b8576109088ecaeb76758dc3d499ae15a23d16bf5ba18ff73c9a3b2b8db4f4894a6fcb16d537539ae225b01c12a
7
- data.tar.gz: 10802ff538c716a5bf7aa31668570cddc0c7cbbe91254ea5b9166633bf84d54e9e44f663b34b63dcc8e8b4500c3dea0c2052428cc03794d82d2636827ea7e0c2
6
+ metadata.gz: 3936ced2f21a9d38cb4578789a952917a90f20365caccbb58e1bfd9a280a6b551a4dd8cc672208a04466311971158a480d20cdf88a60939eb2538f85360f0d97
7
+ data.tar.gz: 1fc524b519c6a4ca3bec14f8c73976df8ff111856d1834d1da31ad81f9b2ffe967fa0829a81b01c1dbd05b42144ebf33694c76570e4b88529ebf088f1370b02b
data/.rubocop.yml CHANGED
@@ -1,29 +1,37 @@
1
1
  inherit_from: .rubocop_todo.yml
2
+ require:
3
+ - rubocop-performance
4
+ - rubocop-rails
5
+ - rubocop-rake
2
6
 
3
7
  AllCops:
4
- TargetRubyVersion: 2.2
8
+ TargetRubyVersion: 2.4
5
9
  DisplayCopNames: true
6
10
  DisplayStyleGuide: true
11
+ NewCops: enable
7
12
  Include:
8
13
  - '**/Gemfile'
9
14
  - '**/Rakefile'
15
+ - '**/*.rb'
10
16
 
11
- Layout/AlignParameters:
12
- EnforcedStyle: with_fixed_indentation
17
+ Layout/AssignmentIndentation:
13
18
  IndentationWidth: 4
14
19
 
15
- Layout/FirstParameterIndentation:
20
+ Layout/FirstArgumentIndentation:
16
21
  EnforcedStyle: consistent
17
22
  IndentationWidth: 4
18
23
 
19
- Layout/IndentArray:
24
+ Layout/FirstArrayElementIndentation:
20
25
  EnforcedStyle: consistent
21
26
 
22
- Layout/IndentHash:
27
+ Layout/FirstHashElementIndentation:
23
28
  EnforcedStyle: consistent
24
29
 
25
- Layout/IndentAssignment:
26
- IndentationWidth: 4
30
+ Layout/LineLength:
31
+ Max: 107
32
+ AllowHeredoc: true
33
+ AllowURI: true
34
+ IgnoreCopDirectives: true
27
35
 
28
36
  Layout/MultilineMethodCallIndentation:
29
37
  EnforcedStyle: indented
@@ -33,16 +41,14 @@ Layout/MultilineOperationIndentation:
33
41
  EnforcedStyle: indented
34
42
  IndentationWidth: 4
35
43
 
44
+ Layout/ParameterAlignment:
45
+ EnforcedStyle: with_fixed_indentation
46
+ IndentationWidth: 4
47
+
36
48
  Metrics/BlockLength:
37
49
  Exclude:
38
50
  - '*.gemspec'
39
51
 
40
- Metrics/LineLength:
41
- Max: 107
42
- AllowHeredoc: true
43
- AllowURI: true
44
- IgnoreCopDirectives: true
45
-
46
52
  Naming/FileName:
47
53
  Exclude:
48
54
  - 'activerecord-time.gemspec'
@@ -64,6 +70,9 @@ Style/Encoding:
64
70
  Style/FormatString:
65
71
  EnforcedStyle: percent
66
72
 
73
+ Style/FormatStringToken:
74
+ EnforcedStyle: unannotated
75
+
67
76
  Style/NumericPredicate:
68
77
  Enabled: false
69
78
 
data/.rubocop_todo.yml CHANGED
@@ -1,43 +1,110 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-05-03 15:54:21 +0200 using RuboCop version 0.55.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
- Max: 34
23
+ Max: 31
12
24
 
13
- # Offense count: 4
25
+ # Offense count: 1
26
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
27
+ # IgnoredMethods: refine
14
28
  Metrics/BlockLength:
15
29
  Max: 26
16
30
 
17
- # Offense count: 1
18
- # Configuration parameters: CountComments.
31
+ # Offense count: 2
32
+ # Configuration parameters: CountComments, CountAsOne.
19
33
  Metrics/ClassLength:
20
- Max: 169
34
+ Max: 176
21
35
 
22
36
  # Offense count: 1
37
+ # Configuration parameters: IgnoredMethods.
23
38
  Metrics/CyclomaticComplexity:
24
- Max: 7
39
+ Max: 10
25
40
 
26
- # Offense count: 2
27
- # Configuration parameters: CountComments.
41
+ # Offense count: 3
42
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
28
43
  Metrics/MethodLength:
29
- Max: 16
44
+ Max: 15
45
+
46
+ # Offense count: 1
47
+ # Configuration parameters: IgnoredMethods.
48
+ Metrics/PerceivedComplexity:
49
+ Max: 11
30
50
 
31
51
  # Offense count: 2
52
+ # Configuration parameters: EnforcedStyle.
53
+ # SupportedStyles: strict, flexible
54
+ Rails/Date:
55
+ Exclude:
56
+ - 'lib/time_of_day.rb'
57
+
58
+ # Offense count: 1
32
59
  # Cop supports --auto-correct.
33
- Rails/ActiveRecordAliases:
60
+ Rails/WhereEquals:
34
61
  Exclude:
35
62
  - 'test/time_of_day_test.rb'
36
63
 
37
- # Offense count: 3
64
+ # Offense count: 1
65
+ # Cop supports --auto-correct.
66
+ Rails/WhereNot:
67
+ Exclude:
68
+ - 'test/time_of_day_test.rb'
69
+
70
+ # Offense count: 2
38
71
  # Cop supports --auto-correct.
39
72
  Security/YAMLLoad:
40
73
  Exclude:
41
- - 'matrix_test.rb'
42
74
  - 'test/test_helper.rb'
43
75
  - 'test/time_of_day_test.rb'
76
+
77
+ # Offense count: 1
78
+ # Configuration parameters: AllowModifiersOnSymbols.
79
+ # SupportedStyles: inline, group
80
+ Style/AccessModifierDeclarations:
81
+ EnforcedStyle: inline
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
+
91
+ # Offense count: 1
92
+ # Cop supports --auto-correct.
93
+ # Configuration parameters: EnforcedStyle.
94
+ # SupportedStyles: nested, compact
95
+ Style/ClassAndModuleChildren:
96
+ Exclude:
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
@@ -1,41 +1,27 @@
1
1
  language: ruby
2
2
  sudo: false
3
+ cache: bundler
4
+ services:
5
+ - postgresql
3
6
  jdk:
4
- - oraclejdk8
5
- before_install: gem install bundler # TODO(uwe): https://github.com/travis-ci/travis-ci/issues/9383
7
+ - openjdk
6
8
  rvm:
7
- # - ruby-2.5.1
8
- - ruby-2.4.4
9
- - jruby-9.1.17.0
10
- - ruby-2.3.7
11
- - ruby-2.2.10
12
- - ruby-head
13
- - jruby-head
9
+ - ruby-2.7
10
+ - ruby-2.6
11
+ - ruby-2.5
12
+ - jruby
14
13
  gemfile:
14
+ - gemfiles/ar60.gemfile
15
15
  - gemfiles/ar52.gemfile
16
16
  - gemfiles/ar51.gemfile
17
- - gemfiles/ar50.gemfile
18
- - gemfiles/ar42.gemfile
19
17
  env:
20
- - JRUBY_OPTS="--dev --debug" ADAPTER="postgresql"
21
- - JRUBY_OPTS="--dev --debug" ADAPTER="derby"
22
- - JRUBY_OPTS="--dev --debug" ADAPTER="sqlite3"
18
+ global:
19
+ - JRUBY_OPTS="--dev --debug"
20
+ matrix:
21
+ - ADAPTER="postgresql"
22
+ - ADAPTER="sqlite3"
23
23
  matrix:
24
24
  allow_failures:
25
- - rvm: ruby-head
26
- gemfile: gemfiles/ar42.gemfile
27
- - rvm: jruby-9.1.17.0
28
- gemfile: gemfiles/ar52.gemfile
29
- - rvm: jruby-9.1.17.0
30
- gemfile: gemfiles/ar51.gemfile
31
- - rvm: jruby-9.1.17.0
32
- gemfile: gemfiles/ar50.gemfile
33
- - rvm: jruby-9.1.17.0
34
- gemfile: gemfiles/ar42.gemfile
35
- exclude:
36
- - rvm: ruby-2.4.4
37
- env: JRUBY_OPTS="--dev --debug" ADAPTER="derby"
38
- - rvm: ruby-2.3.7
39
- env: JRUBY_OPTS="--dev --debug" ADAPTER="derby"
40
- - rvm: ruby-2.2.10
41
- env: JRUBY_OPTS="--dev --debug" ADAPTER="derby"
25
+ - rvm: jruby
26
+ env: ADAPTER="sqlite3"
27
+ - rvm: ruby-2.7
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in activerecord-time.gemspec
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubygems'
2
4
  require 'bundler/setup'
3
5
  require 'bundler/gem_tasks'
@@ -1,3 +1,8 @@
1
+ begin
2
+ require 'english'
3
+ rescue LoadError
4
+ end
5
+
1
6
  lib = File.expand_path('lib', __dir__)
2
7
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
8
  require 'activerecord-time/version'
@@ -11,14 +16,14 @@ Gem::Specification.new do |gem|
11
16
  gem.summary = 'A handler for storing TimeOfDay objects in ActiveRecord objects as sql time values.'
12
17
  gem.homepage = 'https://github.com/donv/activerecord-time'
13
18
  gem.license = 'MIT'
14
- gem.required_ruby_version = '>= 2.2'
19
+ gem.required_ruby_version = '>= 2.5'
15
20
 
16
21
  gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
17
22
  gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
18
23
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
24
  gem.require_paths = %w[lib]
20
25
 
21
- gem.add_runtime_dependency 'activerecord', '>=4.2', '<6'
26
+ gem.add_runtime_dependency 'activerecord', '>=5.1', '<7'
22
27
 
23
28
  if defined? JRUBY_VERSION
24
29
  gem.add_development_dependency 'activerecord-jdbcpostgresql-adapter'
@@ -30,5 +35,8 @@ Gem::Specification.new do |gem|
30
35
  gem.add_development_dependency 'minitest-reporters'
31
36
  gem.add_development_dependency 'rake'
32
37
  gem.add_development_dependency 'rubocop'
38
+ gem.add_development_dependency 'rubocop-performance'
39
+ gem.add_development_dependency 'rubocop-rails'
40
+ gem.add_development_dependency 'rubocop-rake'
33
41
  gem.add_development_dependency 'simplecov'
34
42
  end
@@ -1,4 +1,3 @@
1
- RAILS_5 = true
2
1
  eval File.read("#{File.dirname __FILE__}/common.gemfile")
3
2
 
4
3
  gem 'activerecord', '~>5.1.1'
@@ -1,31 +1,24 @@
1
- GIT
2
- remote: https://github.com/jruby/activerecord-jdbc-adapter.git
3
- revision: cfea62ad56141c9e3c5348797028d45b64a193ca
4
- specs:
5
- activerecord-jdbc-adapter (51.0-java)
6
- activerecord (~> 5.1.0)
7
- activerecord-jdbcderby-adapter (51.0)
8
- activerecord-jdbc-adapter (~> 51.0)
9
- jdbc-derby (~> 10.6)
10
- activerecord-jdbcpostgresql-adapter (51.0)
11
- activerecord-jdbc-adapter (~> 51.0)
12
- jdbc-postgres (>= 9.4, < 43)
13
- activerecord-jdbcsqlite3-adapter (51.0)
14
- activerecord-jdbc-adapter (~> 51.0)
15
- jdbc-sqlite3 (~> 3.8, < 3.30)
16
- jdbc-postgres (42.1.4)
17
- jdbc-sqlite3 (3.20.1)
18
-
19
1
  GEM
20
2
  remote: https://rubygems.org/
21
3
  specs:
22
- activemodel (5.1.6)
23
- activesupport (= 5.1.6)
24
- activerecord (5.1.6)
25
- activemodel (= 5.1.6)
26
- activesupport (= 5.1.6)
4
+ activemodel (5.1.7)
5
+ activesupport (= 5.1.7)
6
+ activerecord (5.1.7)
7
+ activemodel (= 5.1.7)
8
+ activesupport (= 5.1.7)
27
9
  arel (~> 8.0)
28
- activesupport (5.1.6)
10
+ activerecord-jdbc-adapter (51.4-java)
11
+ activerecord (~> 5.1.0)
12
+ activerecord-jdbcderby-adapter (0.8.2)
13
+ activerecord-jdbc-adapter (>= 0.8.2)
14
+ jdbc-derby (>= 10.3.2.1)
15
+ activerecord-jdbcpostgresql-adapter (51.4-java)
16
+ activerecord-jdbc-adapter (= 51.4)
17
+ jdbc-postgres (>= 9.4, < 43)
18
+ activerecord-jdbcsqlite3-adapter (51.4-java)
19
+ activerecord-jdbc-adapter (= 51.4)
20
+ jdbc-sqlite3 (~> 3.8, < 3.30)
21
+ activesupport (5.1.7)
29
22
  concurrent-ruby (~> 1.0, >= 1.0.2)
30
23
  i18n (>= 0.7, < 2)
31
24
  minitest (~> 5.1)
@@ -33,29 +26,30 @@ GEM
33
26
  ansi (1.5.0)
34
27
  arel (8.0.0)
35
28
  builder (3.2.3)
36
- concurrent-ruby (1.0.5)
37
- concurrent-ruby (1.0.5-java)
38
- docile (1.3.0)
39
- i18n (1.0.1)
29
+ concurrent-ruby (1.1.5)
30
+ docile (1.3.2)
31
+ i18n (1.7.0)
40
32
  concurrent-ruby (~> 1.0)
41
33
  jdbc-derby (10.12.1.1)
42
- json (2.1.0)
43
- json (2.1.0-java)
44
- minitest (5.10.3)
45
- minitest-reporters (1.2.0)
34
+ jdbc-postgres (42.2.6)
35
+ jdbc-sqlite3 (3.28.0)
36
+ json (2.2.0)
37
+ json (2.2.0-java)
38
+ minitest (5.12.2)
39
+ minitest-reporters (1.4.1)
46
40
  ansi
47
41
  builder
48
42
  minitest (>= 5.0)
49
43
  ruby-progressbar
50
44
  pg (0.21.0)
51
- rake (12.3.1)
52
- ruby-progressbar (1.9.0)
53
- simplecov (0.16.1)
45
+ rake (13.0.0)
46
+ ruby-progressbar (1.10.1)
47
+ simplecov (0.17.1)
54
48
  docile (~> 1.1)
55
49
  json (>= 1.8, < 3)
56
50
  simplecov-html (~> 0.10.0)
57
51
  simplecov-html (0.10.2)
58
- sqlite3 (1.3.13)
52
+ sqlite3 (1.4.1)
59
53
  thread_safe (0.3.6)
60
54
  thread_safe (0.3.6-java)
61
55
  tzinfo (1.2.5)
@@ -67,12 +61,10 @@ PLATFORMS
67
61
 
68
62
  DEPENDENCIES
69
63
  activerecord (~> 5.1.1)
70
- activerecord-jdbc-adapter!
71
- activerecord-jdbcderby-adapter!
72
- activerecord-jdbcpostgresql-adapter!
73
- activerecord-jdbcsqlite3-adapter!
74
- jdbc-postgres!
75
- jdbc-sqlite3!
64
+ activerecord-jdbc-adapter
65
+ activerecord-jdbcderby-adapter
66
+ activerecord-jdbcpostgresql-adapter
67
+ activerecord-jdbcsqlite3-adapter
76
68
  minitest-reporters
77
69
  pg (< 1)
78
70
  rake
@@ -80,4 +72,4 @@ DEPENDENCIES
80
72
  sqlite3
81
73
 
82
74
  BUNDLED WITH
83
- 1.16.1
75
+ 1.17.2
@@ -1,5 +1,3 @@
1
- SKIP_JRUBY = true
2
-
3
1
  eval File.read("#{File.dirname __FILE__}/common.gemfile")
4
2
 
5
3
  gem 'activerecord', '~>5.2.0'