deprecation_collector 0.2.0 → 0.4.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: 21042fb4a7a9045647774128efd65fd4a27b182b6122738a0407da13af1b8786
4
- data.tar.gz: eef445a5a47d88e3b7dc55f90ee07f9cfda0539b2a059ce7bc5286773a5d17e3
3
+ metadata.gz: 7eda71f5ba3b7d7c1aa9a1c622a29e4329b8ab08bccc53d243aabea3a80a70cb
4
+ data.tar.gz: 213fa97a6ceede04c3f37160defb2a6732d84a32f25681a9486a567eae6d7fed
5
5
  SHA512:
6
- metadata.gz: a0309b7c02fcfe4f458feed01b3f3dd37d8510269c8b5b1296cbc545be250d73bb232bdd6a0d8a41595cadf2e268baefa60b0c0158eb87bb8bb186072560056c
7
- data.tar.gz: 736342d4de1fef5b3326f1866f01b22e4642792a013853b849ed1ba42a32e68bc93c843f332d83b824e6f7a840b3364dc83acbfaf2f1c34c4e634bbfc21c94ff
6
+ metadata.gz: d4b4cf6feb4d736114f7324a0b34a65e32ee7f3edd610ee5aabb41daa069fd2417a746e927761c28ec22b37a9ceb1f768c2fa92064c11e0d4e4474801dd9f008
7
+ data.tar.gz: 9e6641fc8b17e5d4d2a5d5d7981afecca83feffbc549d88206105a4f752feeb951290fa9dc77f8d24166519df12da917d83f81685eb2d79b6ca87912d09ff599
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ == 0.4.0
2
+ - a bit better ui
3
+ - simple import/export
4
+
5
+ == 0.3.0
6
+ - simple web ui (mountable rack app)
7
+
1
8
  == 0.2.0
2
9
  - ability to add custom deprecation fingerprint (for example - controller+action), use `config.fingerprinter`
3
10
 
data/Gemfile CHANGED
@@ -25,3 +25,9 @@ end
25
25
 
26
26
  gem "fakeredis"
27
27
  gem "redis", "~>4.8"
28
+
29
+ # for web tests
30
+ gem 'rack'
31
+ gem 'webrick'
32
+
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.2.0)
4
+ deprecation_collector (0.4.0)
5
5
  redis (>= 3.0)
6
6
 
7
7
  GEM
@@ -117,7 +117,7 @@ GEM
117
117
  parser (3.1.3.0)
118
118
  ast (~> 2.4.1)
119
119
  racc (1.6.2)
120
- rack (2.2.4)
120
+ rack (2.2.7)
121
121
  rack-test (2.0.2)
122
122
  rack (>= 1.3)
123
123
  rails (6.0.6)
@@ -194,6 +194,9 @@ GEM
194
194
  simplecov_json_formatter (~> 0.1)
195
195
  simplecov-html (0.12.3)
196
196
  simplecov_json_formatter (0.1.4)
197
+ slim (5.1.0)
198
+ temple (~> 0.10.0)
199
+ tilt (>= 2.0.6, < 2.2)
197
200
  sprockets (4.1.1)
198
201
  concurrent-ruby (~> 1.0)
199
202
  rack (> 1, < 3)
@@ -201,13 +204,16 @@ GEM
201
204
  actionpack (>= 5.2)
202
205
  activesupport (>= 5.2)
203
206
  sprockets (>= 3.0.0)
207
+ temple (0.10.0)
204
208
  thor (1.2.1)
205
209
  thread_safe (0.3.6)
210
+ tilt (2.1.0)
206
211
  timecop (0.9.6)
207
212
  timeout (0.3.1)
208
213
  tzinfo (1.2.10)
209
214
  thread_safe (~> 0.1)
210
215
  unicode-display_width (2.3.0)
216
+ webrick (1.8.1)
211
217
  websocket-driver (0.7.5)
212
218
  websocket-extensions (>= 0.1.0)
213
219
  websocket-extensions (0.1.5)
@@ -223,6 +229,8 @@ DEPENDENCIES
223
229
  appraisal
224
230
  deprecation_collector!
225
231
  fakeredis
232
+ rack
233
+ rack-test
226
234
  rails (~> 6.0.0)
227
235
  rake (~> 13.0)
228
236
  redis (~> 4.8)
@@ -233,7 +241,9 @@ DEPENDENCIES
233
241
  rubocop-rake
234
242
  rubocop-rspec
235
243
  simplecov
244
+ slim
236
245
  timecop
246
+ webrick
237
247
 
238
248
  BUNDLED WITH
239
- 2.3.10
249
+ 2.4.12
data/README.md CHANGED
@@ -45,6 +45,16 @@ Add an initializer with configuration, like
45
45
  end
46
46
  ```
47
47
 
48
+ ## Web UI
49
+
50
+ Mount the rack app into your routes:
51
+ ```ruby
52
+ Rails.application.routes.draw do
53
+ require 'deprecation_collector/web'
54
+ mount DeprecationCollector::Web => '/deprecations', as: :deprecations
55
+ end
56
+ ```
57
+
48
58
  ## Development
49
59
 
50
60
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/Rakefile CHANGED
@@ -5,8 +5,25 @@ require "rspec/core/rake_task"
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
8
- require "rubocop/rake_task"
9
-
10
- RuboCop::RakeTask.new
8
+ begin
9
+ require "rubocop/rake_task"
10
+ RuboCop::RakeTask.new
11
+ rescue LoadError
12
+ end
11
13
 
12
14
  task default: %i[spec rubocop]
15
+
16
+ task :precompile_templates do
17
+ require 'slim'
18
+ # Slim::Template.new { '.lala' }.precompiled_template
19
+ Dir['lib/deprecation_collector/web/views/*.slim'].each do |file|
20
+ target = file.sub(/\.slim\z/, '.template.rb')
21
+ puts "Compiling #{file} -> #{target}"
22
+ content = Slim::Template.new(file).precompiled_template # maybe send(:precompiled, []) is more correct
23
+
24
+ File.write(target, content)
25
+ end
26
+ end
27
+
28
+ Rake::Task[:spec].enhance [:precompile_templates]
29
+ Rake::Task[:build].enhance [:precompile_templates]
@@ -22,11 +22,13 @@ Gem::Specification.new do |spec|
22
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
23
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
24
  `git ls-files -z`.split("\x0").reject do |f|
25
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
25
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)}) ||
26
+ f.match(%r{\Alib/deprecation_collector/web/views/.+\.slim\z})
26
27
  end
27
- end
28
+ end + Dir['lib/deprecation_collector/web/views/*.slim'].map { |template| template.sub(/\.slim\z/, '.template.rb') }
28
29
  spec.require_paths = ["lib"]
29
30
 
30
31
  spec.add_dependency "redis", ">= 3.0"
31
32
  spec.add_development_dependency "appraisal"
33
+ spec.add_development_dependency "rack-test"
32
34
  end
@@ -7,6 +7,9 @@ gem "rspec", "~> 3.0"
7
7
  gem "timecop"
8
8
  gem "fakeredis"
9
9
  gem "redis", "~>4.8"
10
+ gem "rack"
11
+ gem "webrick"
12
+ gem "slim"
10
13
  gem "rails", "~>6.0"
11
14
 
12
15
  gemspec path: "../"
@@ -1,66 +1,66 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- deprecation_collector (0.2.0)
4
+ deprecation_collector (0.4.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.1)
11
- actionpack (= 6.1.7.1)
12
- activesupport (= 6.1.7.1)
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.1)
16
- actionpack (= 6.1.7.1)
17
- activejob (= 6.1.7.1)
18
- activerecord (= 6.1.7.1)
19
- activestorage (= 6.1.7.1)
20
- activesupport (= 6.1.7.1)
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.1)
23
- actionpack (= 6.1.7.1)
24
- actionview (= 6.1.7.1)
25
- activejob (= 6.1.7.1)
26
- activesupport (= 6.1.7.1)
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.1)
30
- actionview (= 6.1.7.1)
31
- activesupport (= 6.1.7.1)
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.1)
37
- actionpack (= 6.1.7.1)
38
- activerecord (= 6.1.7.1)
39
- activestorage (= 6.1.7.1)
40
- activesupport (= 6.1.7.1)
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.1)
43
- activesupport (= 6.1.7.1)
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.1)
49
- activesupport (= 6.1.7.1)
48
+ activejob (6.1.7.3)
49
+ activesupport (= 6.1.7.3)
50
50
  globalid (>= 0.3.6)
51
- activemodel (6.1.7.1)
52
- activesupport (= 6.1.7.1)
53
- activerecord (6.1.7.1)
54
- activemodel (= 6.1.7.1)
55
- activesupport (= 6.1.7.1)
56
- activestorage (6.1.7.1)
57
- actionpack (= 6.1.7.1)
58
- activejob (= 6.1.7.1)
59
- activerecord (= 6.1.7.1)
60
- activesupport (= 6.1.7.1)
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.1)
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.1.10)
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.8.0)
80
- redis (~> 4.1)
81
- globalid (1.0.0)
79
+ fakeredis (0.9.1)
80
+ redis (~> 4.8)
81
+ globalid (1.1.0)
82
82
  activesupport (>= 5.0)
83
- i18n (1.12.0)
83
+ i18n (1.13.0)
84
84
  concurrent-ruby (~> 1.0)
85
- io-wait (0.3.0)
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.0.1)
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.15.0)
98
- net-imap (0.2.2)
99
- digest
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.2)
105
- io-wait
102
+ net-protocol (0.2.1)
106
103
  timeout
107
- net-smtp (0.3.0)
108
- digest
104
+ net-smtp (0.3.3)
109
105
  net-protocol
110
- timeout
111
- nio4r (2.5.8)
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.12.5-x86_64-linux)
109
+ nokogiri (1.14.3-x86_64-linux)
115
110
  racc (~> 1.4)
116
111
  racc (1.6.2)
117
- rack (2.2.6.1)
118
- rack-test (2.0.2)
112
+ rack (2.2.7)
113
+ rack-test (2.1.0)
119
114
  rack (>= 1.3)
120
- rails (6.1.7.1)
121
- actioncable (= 6.1.7.1)
122
- actionmailbox (= 6.1.7.1)
123
- actionmailer (= 6.1.7.1)
124
- actionpack (= 6.1.7.1)
125
- actiontext (= 6.1.7.1)
126
- actionview (= 6.1.7.1)
127
- activejob (= 6.1.7.1)
128
- activemodel (= 6.1.7.1)
129
- activerecord (= 6.1.7.1)
130
- activestorage (= 6.1.7.1)
131
- activesupport (= 6.1.7.1)
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.1)
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.4.4)
133
+ rails-html-sanitizer (1.5.0)
139
134
  loofah (~> 2.19, >= 2.19.1)
140
- railties (6.1.7.1)
141
- actionpack (= 6.1.7.1)
142
- activesupport (= 6.1.7.1)
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.0)
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.0)
147
+ rspec-core (3.12.2)
153
148
  rspec-support (~> 3.12.0)
154
- rspec-expectations (3.12.2)
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.3)
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
- strscan (3.0.5)
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.1)
172
- tzinfo (2.0.5)
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.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
@@ -7,6 +7,9 @@ gem "rspec", "~> 3.0"
7
7
  gem "timecop"
8
8
  gem "fakeredis"
9
9
  gem "redis", "~>4.8"
10
+ gem "rack"
11
+ gem "webrick"
12
+ gem "slim"
10
13
  gem "rails", "~>7.0"
11
14
 
12
15
  gemspec path: "../"