invalid_record_finder 1.0.1 → 1.0.2

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: a4cec167d246b9e50653de692ffb17cf601d44ed8491816173b1f465781ad722
4
- data.tar.gz: 13a4f551e9a98c3105f2b4bc028a3148b3acce5f11780a945aa02e9a7fada1cb
3
+ metadata.gz: 985c5508227d3709e182f30216f8ab9b4cfb5e661edb9de54f831e0b3c2ebcba
4
+ data.tar.gz: ca02bcbc815e8c64bddc9de0ab145860ea50b7959f398f07835f8c1b35e95832
5
5
  SHA512:
6
- metadata.gz: 5591573b677c5a1137d14045d6c7ebddfad2c96c1748976fa624ce865159fbed81f476750957b8c0abba4e5431acfc8f29c1b9a38b1e421b6564d10218c35f3b
7
- data.tar.gz: 3528e043eb836b124383015636458ebaa65ccae93a2cfa6476fa9e37d6a7ef4d516704ba1b3282fa4f6689a6a06f29419c7afdfc35538661e8f4338381b617c4
6
+ metadata.gz: 7aa7a3e46bc8b5cb0b5e5cddd78429d20755c22c908433b97ea91a7a84b4c99ce9f31010272801cf8067a25365a184234542510e334781bd617f158b7b17ec49
7
+ data.tar.gz: 1fbeb25cf5d98b2297dd2c6549fc4784222bce13c889574193eca303ac7b40b34488b3fe4f02960b6a879a3eb9179508a901b0bf45f2a3dbe4a3fa4a2ceda8aa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.0.2] - 2022-01-11
4
+
5
+ ### Fixed
6
+
7
+ - Fixed report table layout for models with a UUID id
8
+ - Fixed reporting of models with a custom `primary_key`
9
+
3
10
  ## [1.0.1] - 2021-12-18
4
11
 
5
12
  ### Fixed
data/Gemfile.lock CHANGED
@@ -1,69 +1,75 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- invalid_record_finder (1.0.1)
4
+ invalid_record_finder (1.0.2)
5
5
  activerecord (>= 5.0)
6
6
  fortschritt (>= 0.3, < 2)
7
- tabulo (~> 2.7)
7
+ tabulo (~> 2.8)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actioncable (7.0.0)
13
- actionpack (= 7.0.0)
14
- activesupport (= 7.0.0)
12
+ actioncable (7.0.1)
13
+ actionpack (= 7.0.1)
14
+ activesupport (= 7.0.1)
15
15
  nio4r (~> 2.0)
16
16
  websocket-driver (>= 0.6.1)
17
- actionmailbox (7.0.0)
18
- actionpack (= 7.0.0)
19
- activejob (= 7.0.0)
20
- activerecord (= 7.0.0)
21
- activestorage (= 7.0.0)
22
- activesupport (= 7.0.0)
17
+ actionmailbox (7.0.1)
18
+ actionpack (= 7.0.1)
19
+ activejob (= 7.0.1)
20
+ activerecord (= 7.0.1)
21
+ activestorage (= 7.0.1)
22
+ activesupport (= 7.0.1)
23
23
  mail (>= 2.7.1)
24
- actionmailer (7.0.0)
25
- actionpack (= 7.0.0)
26
- actionview (= 7.0.0)
27
- activejob (= 7.0.0)
28
- activesupport (= 7.0.0)
24
+ net-imap
25
+ net-pop
26
+ net-smtp
27
+ actionmailer (7.0.1)
28
+ actionpack (= 7.0.1)
29
+ actionview (= 7.0.1)
30
+ activejob (= 7.0.1)
31
+ activesupport (= 7.0.1)
29
32
  mail (~> 2.5, >= 2.5.4)
33
+ net-imap
34
+ net-pop
35
+ net-smtp
30
36
  rails-dom-testing (~> 2.0)
31
- actionpack (7.0.0)
32
- actionview (= 7.0.0)
33
- activesupport (= 7.0.0)
37
+ actionpack (7.0.1)
38
+ actionview (= 7.0.1)
39
+ activesupport (= 7.0.1)
34
40
  rack (~> 2.0, >= 2.2.0)
35
41
  rack-test (>= 0.6.3)
36
42
  rails-dom-testing (~> 2.0)
37
43
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
38
- actiontext (7.0.0)
39
- actionpack (= 7.0.0)
40
- activerecord (= 7.0.0)
41
- activestorage (= 7.0.0)
42
- activesupport (= 7.0.0)
44
+ actiontext (7.0.1)
45
+ actionpack (= 7.0.1)
46
+ activerecord (= 7.0.1)
47
+ activestorage (= 7.0.1)
48
+ activesupport (= 7.0.1)
43
49
  globalid (>= 0.6.0)
44
50
  nokogiri (>= 1.8.5)
45
- actionview (7.0.0)
46
- activesupport (= 7.0.0)
51
+ actionview (7.0.1)
52
+ activesupport (= 7.0.1)
47
53
  builder (~> 3.1)
48
54
  erubi (~> 1.4)
49
55
  rails-dom-testing (~> 2.0)
50
56
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
51
- activejob (7.0.0)
52
- activesupport (= 7.0.0)
57
+ activejob (7.0.1)
58
+ activesupport (= 7.0.1)
53
59
  globalid (>= 0.3.6)
54
- activemodel (7.0.0)
55
- activesupport (= 7.0.0)
56
- activerecord (7.0.0)
57
- activemodel (= 7.0.0)
58
- activesupport (= 7.0.0)
59
- activestorage (7.0.0)
60
- actionpack (= 7.0.0)
61
- activejob (= 7.0.0)
62
- activerecord (= 7.0.0)
63
- activesupport (= 7.0.0)
60
+ activemodel (7.0.1)
61
+ activesupport (= 7.0.1)
62
+ activerecord (7.0.1)
63
+ activemodel (= 7.0.1)
64
+ activesupport (= 7.0.1)
65
+ activestorage (7.0.1)
66
+ actionpack (= 7.0.1)
67
+ activejob (= 7.0.1)
68
+ activerecord (= 7.0.1)
69
+ activesupport (= 7.0.1)
64
70
  marcel (~> 1.0)
65
71
  mini_mime (>= 1.1.0)
66
- activesupport (7.0.0)
72
+ activesupport (7.0.1)
67
73
  concurrent-ruby (~> 1.0, >= 1.0.2)
68
74
  i18n (>= 1.6, < 2)
69
75
  minitest (>= 5.1)
@@ -71,13 +77,15 @@ GEM
71
77
  builder (3.2.4)
72
78
  concurrent-ruby (1.1.9)
73
79
  crass (1.0.6)
74
- diff-lcs (1.4.4)
80
+ diff-lcs (1.5.0)
81
+ digest (3.1.0)
75
82
  erubi (1.10.0)
76
83
  fortschritt (1.0.0)
77
84
  globalid (1.0.0)
78
85
  activesupport (>= 5.0)
79
86
  i18n (1.8.11)
80
87
  concurrent-ruby (~> 1.0)
88
+ io-wait (0.2.1)
81
89
  loofah (2.13.0)
82
90
  crass (~> 1.0.2)
83
91
  nokogiri (>= 1.5.9)
@@ -86,40 +94,55 @@ GEM
86
94
  marcel (1.0.2)
87
95
  method_source (1.0.0)
88
96
  mini_mime (1.1.2)
89
- mini_portile2 (2.6.1)
97
+ mini_portile2 (2.7.1)
90
98
  minitest (5.15.0)
99
+ net-imap (0.2.3)
100
+ digest
101
+ net-protocol
102
+ strscan
103
+ net-pop (0.1.1)
104
+ digest
105
+ net-protocol
106
+ timeout
107
+ net-protocol (0.1.2)
108
+ io-wait
109
+ timeout
110
+ net-smtp (0.3.1)
111
+ digest
112
+ net-protocol
113
+ timeout
91
114
  nio4r (2.5.8)
92
- nokogiri (1.12.5)
93
- mini_portile2 (~> 2.6.1)
115
+ nokogiri (1.13.0)
116
+ mini_portile2 (~> 2.7.0)
94
117
  racc (~> 1.4)
95
- nokogiri (1.12.5-x86_64-darwin)
118
+ nokogiri (1.13.0-x86_64-darwin)
96
119
  racc (~> 1.4)
97
120
  racc (1.6.0)
98
121
  rack (2.2.3)
99
122
  rack-test (1.1.0)
100
123
  rack (>= 1.0, < 3)
101
- rails (7.0.0)
102
- actioncable (= 7.0.0)
103
- actionmailbox (= 7.0.0)
104
- actionmailer (= 7.0.0)
105
- actionpack (= 7.0.0)
106
- actiontext (= 7.0.0)
107
- actionview (= 7.0.0)
108
- activejob (= 7.0.0)
109
- activemodel (= 7.0.0)
110
- activerecord (= 7.0.0)
111
- activestorage (= 7.0.0)
112
- activesupport (= 7.0.0)
124
+ rails (7.0.1)
125
+ actioncable (= 7.0.1)
126
+ actionmailbox (= 7.0.1)
127
+ actionmailer (= 7.0.1)
128
+ actionpack (= 7.0.1)
129
+ actiontext (= 7.0.1)
130
+ actionview (= 7.0.1)
131
+ activejob (= 7.0.1)
132
+ activemodel (= 7.0.1)
133
+ activerecord (= 7.0.1)
134
+ activestorage (= 7.0.1)
135
+ activesupport (= 7.0.1)
113
136
  bundler (>= 1.15.0)
114
- railties (= 7.0.0)
137
+ railties (= 7.0.1)
115
138
  rails-dom-testing (2.0.3)
116
139
  activesupport (>= 4.2.0)
117
140
  nokogiri (>= 1.6)
118
141
  rails-html-sanitizer (1.4.2)
119
142
  loofah (~> 2.3)
120
- railties (7.0.0)
121
- actionpack (= 7.0.0)
122
- activesupport (= 7.0.0)
143
+ railties (7.0.1)
144
+ actionpack (= 7.0.1)
145
+ activesupport (= 7.0.1)
123
146
  method_source
124
147
  rake (>= 12.2)
125
148
  thor (~> 1.0)
@@ -139,10 +162,12 @@ GEM
139
162
  rspec-support (~> 3.10.0)
140
163
  rspec-support (3.10.3)
141
164
  sqlite3 (1.4.2)
142
- tabulo (2.7.2)
165
+ strscan (3.0.1)
166
+ tabulo (2.8.0)
143
167
  tty-screen (= 0.8.1)
144
168
  unicode-display_width (= 2.1.0)
145
- thor (1.1.0)
169
+ thor (1.2.1)
170
+ timeout (0.2.0)
146
171
  tty-screen (0.8.1)
147
172
  tzinfo (2.0.4)
148
173
  concurrent-ruby (~> 1.0)
@@ -150,11 +175,11 @@ GEM
150
175
  websocket-driver (0.7.5)
151
176
  websocket-extensions (>= 0.1.0)
152
177
  websocket-extensions (0.1.5)
153
- zeitwerk (2.5.1)
178
+ zeitwerk (2.5.3)
154
179
 
155
180
  PLATFORMS
156
181
  ruby
157
- x86_64-darwin-19
182
+ x86_64-darwin-20
158
183
 
159
184
  DEPENDENCIES
160
185
  invalid_record_finder!
@@ -164,4 +189,4 @@ DEPENDENCIES
164
189
  sqlite3
165
190
 
166
191
  BUNDLED WITH
167
- 2.2.32
192
+ 2.3.3
@@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
28
28
 
29
29
  spec.add_dependency 'activerecord', '>= 5.0'
30
30
  spec.add_dependency 'fortschritt', '>= 0.3', '< 2'
31
- spec.add_dependency 'tabulo', '~> 2.7'
31
+ spec.add_dependency 'tabulo', '~> 2.8'
32
32
  end
@@ -8,7 +8,8 @@ module InvalidRecordFinder
8
8
  @field = field
9
9
  @field_value = record[field]
10
10
  @message = message
11
- @id = record.id
11
+ id = record[record.class.primary_key]
12
+ @id = id.respond_to?(:tr) ? id.tr('-', '') : id
12
13
  end
13
14
 
14
15
  def to_a
@@ -26,7 +26,9 @@ module InvalidRecordFinder
26
26
  require 'tabulo'
27
27
 
28
28
  def to_table
29
- Tabulo::Table.new(findings.first(100), *headers, align_header: :left).pack
29
+ Tabulo::Table.new(findings.first(100), *headers, align_header: :left)
30
+ .autosize_columns
31
+ .shrink_to(:screen, except: :id)
30
32
  end
31
33
 
32
34
  require 'csv'
@@ -1,3 +1,3 @@
1
1
  module InvalidRecordFinder
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invalid_record_finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - betterplace development team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-18 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '2.7'
53
+ version: '2.8'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '2.7'
60
+ version: '2.8'
61
61
  description:
62
62
  email:
63
63
  - developers@betterplace.org
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  - !ruby/object:Gem::Version
106
106
  version: '0'
107
107
  requirements: []
108
- rubygems_version: 3.2.32
108
+ rubygems_version: 3.3.3
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: Finds invalid ActiveRecord entries and reports them