deprecation_collector 0.3.0 → 0.5.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 +2 -0
- data/CHANGELOG.md +14 -0
- data/Gemfile +4 -4
- data/Gemfile.lock +3 -2
- data/Rakefile +10 -6
- data/deprecation_collector.gemspec +2 -1
- data/gemfiles/rails_6.gemfile +3 -0
- data/gemfiles/rails_6.gemfile.lock +90 -86
- data/gemfiles/rails_7.gemfile +3 -0
- data/gemfiles/rails_7.gemfile.lock +85 -75
- data/gemfiles/rails_none.gemfile +3 -0
- data/gemfiles/rails_none.gemfile.lock +20 -7
- data/lib/deprecation_collector/deprecation.rb +2 -1
- data/lib/deprecation_collector/storage.rb +205 -0
- data/lib/deprecation_collector/version.rb +1 -1
- data/lib/deprecation_collector/web/application.rb +42 -20
- data/lib/deprecation_collector/web/helpers.rb +48 -4
- data/lib/deprecation_collector/web/router.rb +76 -49
- data/lib/deprecation_collector/web/utils.rb +10 -7
- data/lib/deprecation_collector/web/views/import.html.template.rb +13 -0
- data/lib/deprecation_collector/web/views/index.html.template.rb +57 -31
- data/lib/deprecation_collector/web/views/layout.html.template.rb +77 -4
- data/lib/deprecation_collector/web/views/show.html.template.rb +73 -4
- data/lib/deprecation_collector/web.rb +11 -2
- data/lib/deprecation_collector.rb +88 -116
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f62a11c42b2d8d6ee4236c98960b452d5aa2c0ec76d83d6215101de55edf6a8
|
4
|
+
data.tar.gz: aff231737c13f8e47c63e60706cbee894d50da276caff00ec4898c766da9ee19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d053f33b41ca1dd5b20b81069bef9cf178f4f10fe7a00f193d8a5bdb4e1aa30267223df74bfe3abd234dd08ba2ccfaef757b5febbe8546393c808c1b7b68ecc7
|
7
|
+
data.tar.gz: b4c259673e8b2d4b19de8e3f259563ad19e34381c43b1dfb141e9193bc1f57606eb2b48c81dfb88b699440bbf4f5922a2af92c4ead1c066a90e468bb82a973c0
|
data/.rubocop.yml
CHANGED
@@ -10,6 +10,7 @@ AllCops:
|
|
10
10
|
SuggestExtensions: false
|
11
11
|
Exclude:
|
12
12
|
- gemfiles/*
|
13
|
+
- lib/deprecation_collector/web/views/*.template.rb
|
13
14
|
|
14
15
|
Style/StringLiterals:
|
15
16
|
Enabled: true
|
@@ -30,3 +31,4 @@ Metrics/PerceivedComplexity: { Max: 9 }
|
|
30
31
|
|
31
32
|
RSpec/ExampleLength: { Enabled: false }
|
32
33
|
RSpec/MultipleExpectations: { Enabled: false }
|
34
|
+
RSpec/MessageSpies: { Enabled: false }
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
== 0.5.0
|
2
|
+
- more work on ui
|
3
|
+
- refactored to separate deprecations storage from other logic
|
4
|
+
- when redis is not provided - print all messages to stderr
|
5
|
+
- added `key_prefix` option (default `'deprecations'`, location may change in the future) to allow multiple independent apps to write to one redis
|
6
|
+
- added `app_name` option to record app name as separate field
|
7
|
+
|
8
|
+
== 0.4.0
|
9
|
+
- a bit better ui
|
10
|
+
- simple import/export
|
11
|
+
|
12
|
+
== 0.3.0
|
13
|
+
- simple web ui (mountable rack app)
|
14
|
+
|
1
15
|
== 0.2.0
|
2
16
|
- ability to add custom deprecation fingerprint (for example - controller+action), use `config.fingerprinter`
|
3
17
|
|
data/Gemfile
CHANGED
@@ -20,14 +20,14 @@ unless defined?(Appraisal)
|
|
20
20
|
end
|
21
21
|
|
22
22
|
gem "rails", "~>6.0.0"
|
23
|
-
gem
|
23
|
+
gem "simplecov"
|
24
24
|
end
|
25
25
|
|
26
26
|
gem "fakeredis"
|
27
27
|
gem "redis", "~>4.8"
|
28
28
|
|
29
29
|
# for web tests
|
30
|
-
gem
|
31
|
-
gem
|
30
|
+
gem "rack"
|
31
|
+
gem "webrick"
|
32
32
|
|
33
|
-
gem
|
33
|
+
gem "slim" # not used in production, for compiling templates
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
deprecation_collector (0.
|
4
|
+
deprecation_collector (0.5.0)
|
5
5
|
redis (>= 3.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -230,6 +230,7 @@ DEPENDENCIES
|
|
230
230
|
deprecation_collector!
|
231
231
|
fakeredis
|
232
232
|
rack
|
233
|
+
rack-test
|
233
234
|
rails (~> 6.0.0)
|
234
235
|
rake (~> 13.0)
|
235
236
|
redis (~> 4.8)
|
@@ -245,4 +246,4 @@ DEPENDENCIES
|
|
245
246
|
webrick
|
246
247
|
|
247
248
|
BUNDLED WITH
|
248
|
-
2.
|
249
|
+
2.4.12
|
data/Rakefile
CHANGED
@@ -5,17 +5,20 @@ require "rspec/core/rake_task"
|
|
5
5
|
|
6
6
|
RSpec::Core::RakeTask.new(:spec)
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
RuboCop::RakeTask.new
|
8
|
+
begin
|
9
|
+
require "rubocop/rake_task"
|
10
|
+
RuboCop::RakeTask.new
|
11
|
+
rescue LoadError # rubocop:disable Lint/SuppressedException
|
12
|
+
end
|
11
13
|
|
12
14
|
task default: %i[spec rubocop]
|
13
15
|
|
16
|
+
desc "Compile slim templates (so that slim is not needed as dependency)"
|
14
17
|
task :precompile_templates do
|
15
|
-
require
|
18
|
+
require "slim"
|
16
19
|
# Slim::Template.new { '.lala' }.precompiled_template
|
17
|
-
Dir[
|
18
|
-
target = file.sub(/\.slim\z/,
|
20
|
+
Dir["lib/deprecation_collector/web/views/*.slim"].each do |file|
|
21
|
+
target = file.sub(/\.slim\z/, ".template.rb")
|
19
22
|
puts "Compiling #{file} -> #{target}"
|
20
23
|
content = Slim::Template.new(file).precompiled_template # maybe send(:precompiled, []) is more correct
|
21
24
|
|
@@ -23,4 +26,5 @@ task :precompile_templates do
|
|
23
26
|
end
|
24
27
|
end
|
25
28
|
|
29
|
+
Rake::Task[:spec].enhance [:precompile_templates]
|
26
30
|
Rake::Task[:build].enhance [:precompile_templates]
|
@@ -25,9 +25,10 @@ Gem::Specification.new do |spec|
|
|
25
25
|
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)}) ||
|
26
26
|
f.match(%r{\Alib/deprecation_collector/web/views/.+\.slim\z})
|
27
27
|
end
|
28
|
-
end + Dir[
|
28
|
+
end + Dir["lib/deprecation_collector/web/views/*.slim"].map { |template| template.sub(/\.slim\z/, ".template.rb") }
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
31
|
spec.add_dependency "redis", ">= 3.0"
|
32
32
|
spec.add_development_dependency "appraisal"
|
33
|
+
spec.add_development_dependency "rack-test"
|
33
34
|
end
|
data/gemfiles/rails_6.gemfile
CHANGED
@@ -1,66 +1,66 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
deprecation_collector (0.
|
4
|
+
deprecation_collector (0.5.0)
|
5
5
|
redis (>= 3.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (6.1.7.
|
11
|
-
actionpack (= 6.1.7.
|
12
|
-
activesupport (= 6.1.7.
|
10
|
+
actioncable (6.1.7.3)
|
11
|
+
actionpack (= 6.1.7.3)
|
12
|
+
activesupport (= 6.1.7.3)
|
13
13
|
nio4r (~> 2.0)
|
14
14
|
websocket-driver (>= 0.6.1)
|
15
|
-
actionmailbox (6.1.7.
|
16
|
-
actionpack (= 6.1.7.
|
17
|
-
activejob (= 6.1.7.
|
18
|
-
activerecord (= 6.1.7.
|
19
|
-
activestorage (= 6.1.7.
|
20
|
-
activesupport (= 6.1.7.
|
15
|
+
actionmailbox (6.1.7.3)
|
16
|
+
actionpack (= 6.1.7.3)
|
17
|
+
activejob (= 6.1.7.3)
|
18
|
+
activerecord (= 6.1.7.3)
|
19
|
+
activestorage (= 6.1.7.3)
|
20
|
+
activesupport (= 6.1.7.3)
|
21
21
|
mail (>= 2.7.1)
|
22
|
-
actionmailer (6.1.7.
|
23
|
-
actionpack (= 6.1.7.
|
24
|
-
actionview (= 6.1.7.
|
25
|
-
activejob (= 6.1.7.
|
26
|
-
activesupport (= 6.1.7.
|
22
|
+
actionmailer (6.1.7.3)
|
23
|
+
actionpack (= 6.1.7.3)
|
24
|
+
actionview (= 6.1.7.3)
|
25
|
+
activejob (= 6.1.7.3)
|
26
|
+
activesupport (= 6.1.7.3)
|
27
27
|
mail (~> 2.5, >= 2.5.4)
|
28
28
|
rails-dom-testing (~> 2.0)
|
29
|
-
actionpack (6.1.7.
|
30
|
-
actionview (= 6.1.7.
|
31
|
-
activesupport (= 6.1.7.
|
29
|
+
actionpack (6.1.7.3)
|
30
|
+
actionview (= 6.1.7.3)
|
31
|
+
activesupport (= 6.1.7.3)
|
32
32
|
rack (~> 2.0, >= 2.0.9)
|
33
33
|
rack-test (>= 0.6.3)
|
34
34
|
rails-dom-testing (~> 2.0)
|
35
35
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
36
|
-
actiontext (6.1.7.
|
37
|
-
actionpack (= 6.1.7.
|
38
|
-
activerecord (= 6.1.7.
|
39
|
-
activestorage (= 6.1.7.
|
40
|
-
activesupport (= 6.1.7.
|
36
|
+
actiontext (6.1.7.3)
|
37
|
+
actionpack (= 6.1.7.3)
|
38
|
+
activerecord (= 6.1.7.3)
|
39
|
+
activestorage (= 6.1.7.3)
|
40
|
+
activesupport (= 6.1.7.3)
|
41
41
|
nokogiri (>= 1.8.5)
|
42
|
-
actionview (6.1.7.
|
43
|
-
activesupport (= 6.1.7.
|
42
|
+
actionview (6.1.7.3)
|
43
|
+
activesupport (= 6.1.7.3)
|
44
44
|
builder (~> 3.1)
|
45
45
|
erubi (~> 1.4)
|
46
46
|
rails-dom-testing (~> 2.0)
|
47
47
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
48
|
-
activejob (6.1.7.
|
49
|
-
activesupport (= 6.1.7.
|
48
|
+
activejob (6.1.7.3)
|
49
|
+
activesupport (= 6.1.7.3)
|
50
50
|
globalid (>= 0.3.6)
|
51
|
-
activemodel (6.1.7.
|
52
|
-
activesupport (= 6.1.7.
|
53
|
-
activerecord (6.1.7.
|
54
|
-
activemodel (= 6.1.7.
|
55
|
-
activesupport (= 6.1.7.
|
56
|
-
activestorage (6.1.7.
|
57
|
-
actionpack (= 6.1.7.
|
58
|
-
activejob (= 6.1.7.
|
59
|
-
activerecord (= 6.1.7.
|
60
|
-
activesupport (= 6.1.7.
|
51
|
+
activemodel (6.1.7.3)
|
52
|
+
activesupport (= 6.1.7.3)
|
53
|
+
activerecord (6.1.7.3)
|
54
|
+
activemodel (= 6.1.7.3)
|
55
|
+
activesupport (= 6.1.7.3)
|
56
|
+
activestorage (6.1.7.3)
|
57
|
+
actionpack (= 6.1.7.3)
|
58
|
+
activejob (= 6.1.7.3)
|
59
|
+
activerecord (= 6.1.7.3)
|
60
|
+
activesupport (= 6.1.7.3)
|
61
61
|
marcel (~> 1.0)
|
62
62
|
mini_mime (>= 1.1.0)
|
63
|
-
activesupport (6.1.7.
|
63
|
+
activesupport (6.1.7.3)
|
64
64
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
65
65
|
i18n (>= 1.6, < 2)
|
66
66
|
minitest (>= 5.1)
|
@@ -71,22 +71,21 @@ GEM
|
|
71
71
|
rake
|
72
72
|
thor (>= 0.14.0)
|
73
73
|
builder (3.2.4)
|
74
|
-
concurrent-ruby (1.
|
74
|
+
concurrent-ruby (1.2.2)
|
75
75
|
crass (1.0.6)
|
76
|
+
date (3.3.3)
|
76
77
|
diff-lcs (1.5.0)
|
77
|
-
digest (3.1.1)
|
78
78
|
erubi (1.12.0)
|
79
|
-
fakeredis (0.
|
80
|
-
redis (~> 4.
|
81
|
-
globalid (1.
|
79
|
+
fakeredis (0.9.1)
|
80
|
+
redis (~> 4.8)
|
81
|
+
globalid (1.1.0)
|
82
82
|
activesupport (>= 5.0)
|
83
|
-
i18n (1.
|
83
|
+
i18n (1.13.0)
|
84
84
|
concurrent-ruby (~> 1.0)
|
85
|
-
|
86
|
-
loofah (2.19.1)
|
85
|
+
loofah (2.20.0)
|
87
86
|
crass (~> 1.0.2)
|
88
87
|
nokogiri (>= 1.5.9)
|
89
|
-
mail (2.8.
|
88
|
+
mail (2.8.1)
|
90
89
|
mini_mime (>= 0.1.1)
|
91
90
|
net-imap
|
92
91
|
net-pop
|
@@ -94,70 +93,69 @@ GEM
|
|
94
93
|
marcel (1.0.2)
|
95
94
|
method_source (1.0.0)
|
96
95
|
mini_mime (1.1.2)
|
97
|
-
minitest (5.
|
98
|
-
net-imap (0.
|
99
|
-
|
96
|
+
minitest (5.18.0)
|
97
|
+
net-imap (0.3.4)
|
98
|
+
date
|
100
99
|
net-protocol
|
101
|
-
strscan
|
102
100
|
net-pop (0.1.2)
|
103
101
|
net-protocol
|
104
|
-
net-protocol (0.1
|
105
|
-
io-wait
|
102
|
+
net-protocol (0.2.1)
|
106
103
|
timeout
|
107
|
-
net-smtp (0.3.
|
108
|
-
digest
|
104
|
+
net-smtp (0.3.3)
|
109
105
|
net-protocol
|
110
|
-
|
111
|
-
|
112
|
-
nokogiri (1.12.5-x86_64-darwin)
|
106
|
+
nio4r (2.5.9)
|
107
|
+
nokogiri (1.14.3-x86_64-darwin)
|
113
108
|
racc (~> 1.4)
|
114
|
-
nokogiri (1.
|
109
|
+
nokogiri (1.14.3-x86_64-linux)
|
115
110
|
racc (~> 1.4)
|
116
111
|
racc (1.6.2)
|
117
|
-
rack (2.2.
|
118
|
-
rack-test (2.0
|
112
|
+
rack (2.2.7)
|
113
|
+
rack-test (2.1.0)
|
119
114
|
rack (>= 1.3)
|
120
|
-
rails (6.1.7.
|
121
|
-
actioncable (= 6.1.7.
|
122
|
-
actionmailbox (= 6.1.7.
|
123
|
-
actionmailer (= 6.1.7.
|
124
|
-
actionpack (= 6.1.7.
|
125
|
-
actiontext (= 6.1.7.
|
126
|
-
actionview (= 6.1.7.
|
127
|
-
activejob (= 6.1.7.
|
128
|
-
activemodel (= 6.1.7.
|
129
|
-
activerecord (= 6.1.7.
|
130
|
-
activestorage (= 6.1.7.
|
131
|
-
activesupport (= 6.1.7.
|
115
|
+
rails (6.1.7.3)
|
116
|
+
actioncable (= 6.1.7.3)
|
117
|
+
actionmailbox (= 6.1.7.3)
|
118
|
+
actionmailer (= 6.1.7.3)
|
119
|
+
actionpack (= 6.1.7.3)
|
120
|
+
actiontext (= 6.1.7.3)
|
121
|
+
actionview (= 6.1.7.3)
|
122
|
+
activejob (= 6.1.7.3)
|
123
|
+
activemodel (= 6.1.7.3)
|
124
|
+
activerecord (= 6.1.7.3)
|
125
|
+
activestorage (= 6.1.7.3)
|
126
|
+
activesupport (= 6.1.7.3)
|
132
127
|
bundler (>= 1.15.0)
|
133
|
-
railties (= 6.1.7.
|
128
|
+
railties (= 6.1.7.3)
|
134
129
|
sprockets-rails (>= 2.0.0)
|
135
130
|
rails-dom-testing (2.0.3)
|
136
131
|
activesupport (>= 4.2.0)
|
137
132
|
nokogiri (>= 1.6)
|
138
|
-
rails-html-sanitizer (1.
|
133
|
+
rails-html-sanitizer (1.5.0)
|
139
134
|
loofah (~> 2.19, >= 2.19.1)
|
140
|
-
railties (6.1.7.
|
141
|
-
actionpack (= 6.1.7.
|
142
|
-
activesupport (= 6.1.7.
|
135
|
+
railties (6.1.7.3)
|
136
|
+
actionpack (= 6.1.7.3)
|
137
|
+
activesupport (= 6.1.7.3)
|
143
138
|
method_source
|
144
139
|
rake (>= 12.2)
|
145
140
|
thor (~> 1.0)
|
146
141
|
rake (13.0.6)
|
147
|
-
redis (4.8.
|
142
|
+
redis (4.8.1)
|
148
143
|
rspec (3.12.0)
|
149
144
|
rspec-core (~> 3.12.0)
|
150
145
|
rspec-expectations (~> 3.12.0)
|
151
146
|
rspec-mocks (~> 3.12.0)
|
152
|
-
rspec-core (3.12.
|
147
|
+
rspec-core (3.12.2)
|
153
148
|
rspec-support (~> 3.12.0)
|
154
|
-
rspec-expectations (3.12.
|
149
|
+
rspec-expectations (3.12.3)
|
155
150
|
diff-lcs (>= 1.2.0, < 2.0)
|
156
151
|
rspec-support (~> 3.12.0)
|
157
|
-
rspec-mocks (3.12.
|
152
|
+
rspec-mocks (3.12.5)
|
158
153
|
diff-lcs (>= 1.2.0, < 2.0)
|
159
154
|
rspec-support (~> 3.12.0)
|
160
155
|
rspec-support (3.12.0)
|
156
|
+
slim (5.1.0)
|
157
|
+
temple (~> 0.10.0)
|
158
|
+
tilt (>= 2.0.6, < 2.2)
|
161
159
|
sprockets (4.2.0)
|
162
160
|
concurrent-ruby (~> 1.0)
|
163
161
|
rack (>= 2.2.4, < 4)
|
@@ -165,16 +163,18 @@ GEM
|
|
165
163
|
actionpack (>= 5.2)
|
166
164
|
activesupport (>= 5.2)
|
167
165
|
sprockets (>= 3.0.0)
|
168
|
-
|
166
|
+
temple (0.10.0)
|
169
167
|
thor (1.2.1)
|
168
|
+
tilt (2.1.0)
|
170
169
|
timecop (0.9.6)
|
171
|
-
timeout (0.3.
|
172
|
-
tzinfo (2.0.
|
170
|
+
timeout (0.3.2)
|
171
|
+
tzinfo (2.0.6)
|
173
172
|
concurrent-ruby (~> 1.0)
|
173
|
+
webrick (1.8.1)
|
174
174
|
websocket-driver (0.7.5)
|
175
175
|
websocket-extensions (>= 0.1.0)
|
176
176
|
websocket-extensions (0.1.5)
|
177
|
-
zeitwerk (2.6.
|
177
|
+
zeitwerk (2.6.7)
|
178
178
|
|
179
179
|
PLATFORMS
|
180
180
|
x86_64-darwin-21
|
@@ -184,11 +184,15 @@ DEPENDENCIES
|
|
184
184
|
appraisal
|
185
185
|
deprecation_collector!
|
186
186
|
fakeredis
|
187
|
+
rack
|
188
|
+
rack-test
|
187
189
|
rails (~> 6.0)
|
188
190
|
rake (~> 13.0)
|
189
191
|
redis (~> 4.8)
|
190
192
|
rspec (~> 3.0)
|
193
|
+
slim
|
191
194
|
timecop
|
195
|
+
webrick
|
192
196
|
|
193
197
|
BUNDLED WITH
|
194
198
|
2.3.10
|