local_resource 0.2.0 → 2.0.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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +103 -0
  3. data/.circleci/setup-rubygems.sh +3 -0
  4. data/.rubocop.yml +19 -579
  5. data/.ruby-version +1 -1
  6. data/CHANGELOG.md +17 -0
  7. data/Gemfile.lock +213 -147
  8. data/LICENSE.txt +1 -1
  9. data/README.md +12 -2
  10. data/lib/local_resource/version.rb +1 -1
  11. data/local_resource.gemspec +9 -5
  12. data/spec/dummy/Rakefile +1 -1
  13. data/spec/dummy/app/assets/config/manifest.js +1 -2
  14. data/spec/dummy/app/controllers/application_controller.rb +0 -1
  15. data/spec/dummy/app/{assets/javascripts → javascript/packs}/application.js +2 -0
  16. data/spec/dummy/app/jobs/application_job.rb +5 -0
  17. data/spec/dummy/app/views/layouts/application.html.erb +3 -2
  18. data/spec/dummy/bin/rails +2 -2
  19. data/spec/dummy/bin/rake +2 -2
  20. data/spec/dummy/bin/setup +7 -12
  21. data/spec/dummy/config/application.rb +12 -16
  22. data/spec/dummy/config/boot.rb +1 -1
  23. data/spec/dummy/config/cable.yml +2 -2
  24. data/spec/dummy/config/database.yml +8 -16
  25. data/spec/dummy/config/environment.rb +1 -1
  26. data/spec/dummy/config/environments/development.rb +28 -6
  27. data/spec/dummy/config/environments/production.rb +45 -16
  28. data/spec/dummy/config/environments/test.rb +24 -7
  29. data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -3
  30. data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
  31. data/spec/dummy/config/initializers/filter_parameter_logging.rb +3 -1
  32. data/spec/dummy/config/initializers/permissions_policy.rb +11 -0
  33. data/spec/dummy/config/locales/en.yml +1 -1
  34. data/spec/dummy/config/puma.rb +14 -27
  35. data/spec/dummy/config/routes.rb +1 -1
  36. data/spec/dummy/config/storage.yml +34 -0
  37. data/spec/dummy/config.ru +2 -1
  38. data/spec/dummy/spec/lib/local_resource/instance_spec.rb +1 -1
  39. metadata +65 -32
  40. data/.hound.yml +0 -4
  41. data/.travis.yml +0 -15
  42. data/spec/dummy/app/assets/javascripts/cable.js +0 -13
  43. data/spec/dummy/bin/bundle +0 -3
  44. data/spec/dummy/bin/update +0 -29
  45. data/spec/dummy/bin/yarn +0 -11
  46. data/spec/dummy/config/initializers/assets.rb +0 -14
  47. data/spec/dummy/config/secrets.yml +0 -32
  48. data/spec/dummy/config/spring.rb +0 -6
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3
1
+ 3.2
data/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
+ ### 2.0.0
6
+
7
+ #### Added
8
+
9
+ * Add Ruby 3 support
10
+
11
+ #### Removed
12
+
13
+ * Remove Ruby 2.5 and 2.6 support
14
+
15
+ ### 1.0.0
16
+
17
+ #### Changed
18
+
19
+ * Replace travis with circleci.
20
+ * Use Rails 6 on Dummy app.
21
+
5
22
  ### 0.2.0
6
23
 
7
24
  #### Added
data/Gemfile.lock CHANGED
@@ -1,84 +1,109 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- local_resource (0.2.0)
4
+ local_resource (2.0.0)
5
5
  open_uri_redirections
6
- rails (>= 4.2.0)
6
+ rails (>= 6.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (5.2.0)
12
- actionpack (= 5.2.0)
11
+ actioncable (7.0.6)
12
+ actionpack (= 7.0.6)
13
+ activesupport (= 7.0.6)
13
14
  nio4r (~> 2.0)
14
15
  websocket-driver (>= 0.6.1)
15
- actionmailer (5.2.0)
16
- actionpack (= 5.2.0)
17
- actionview (= 5.2.0)
18
- activejob (= 5.2.0)
16
+ actionmailbox (7.0.6)
17
+ actionpack (= 7.0.6)
18
+ activejob (= 7.0.6)
19
+ activerecord (= 7.0.6)
20
+ activestorage (= 7.0.6)
21
+ activesupport (= 7.0.6)
22
+ mail (>= 2.7.1)
23
+ net-imap
24
+ net-pop
25
+ net-smtp
26
+ actionmailer (7.0.6)
27
+ actionpack (= 7.0.6)
28
+ actionview (= 7.0.6)
29
+ activejob (= 7.0.6)
30
+ activesupport (= 7.0.6)
19
31
  mail (~> 2.5, >= 2.5.4)
32
+ net-imap
33
+ net-pop
34
+ net-smtp
20
35
  rails-dom-testing (~> 2.0)
21
- actionpack (5.2.0)
22
- actionview (= 5.2.0)
23
- activesupport (= 5.2.0)
24
- rack (~> 2.0)
36
+ actionpack (7.0.6)
37
+ actionview (= 7.0.6)
38
+ activesupport (= 7.0.6)
39
+ rack (~> 2.0, >= 2.2.4)
25
40
  rack-test (>= 0.6.3)
26
41
  rails-dom-testing (~> 2.0)
27
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
- actionview (5.2.0)
29
- activesupport (= 5.2.0)
42
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
43
+ actiontext (7.0.6)
44
+ actionpack (= 7.0.6)
45
+ activerecord (= 7.0.6)
46
+ activestorage (= 7.0.6)
47
+ activesupport (= 7.0.6)
48
+ globalid (>= 0.6.0)
49
+ nokogiri (>= 1.8.5)
50
+ actionview (7.0.6)
51
+ activesupport (= 7.0.6)
30
52
  builder (~> 3.1)
31
53
  erubi (~> 1.4)
32
54
  rails-dom-testing (~> 2.0)
33
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
- activejob (5.2.0)
35
- activesupport (= 5.2.0)
55
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
56
+ activejob (7.0.6)
57
+ activesupport (= 7.0.6)
36
58
  globalid (>= 0.3.6)
37
- activemodel (5.2.0)
38
- activesupport (= 5.2.0)
39
- activerecord (5.2.0)
40
- activemodel (= 5.2.0)
41
- activesupport (= 5.2.0)
42
- arel (>= 9.0)
43
- activestorage (5.2.0)
44
- actionpack (= 5.2.0)
45
- activerecord (= 5.2.0)
46
- marcel (~> 0.3.1)
47
- activesupport (5.2.0)
59
+ activemodel (7.0.6)
60
+ activesupport (= 7.0.6)
61
+ activerecord (7.0.6)
62
+ activemodel (= 7.0.6)
63
+ activesupport (= 7.0.6)
64
+ activestorage (7.0.6)
65
+ actionpack (= 7.0.6)
66
+ activejob (= 7.0.6)
67
+ activerecord (= 7.0.6)
68
+ activesupport (= 7.0.6)
69
+ marcel (~> 1.0)
70
+ mini_mime (>= 1.1.0)
71
+ activesupport (7.0.6)
48
72
  concurrent-ruby (~> 1.0, >= 1.0.2)
49
- i18n (>= 0.7, < 2)
50
- minitest (~> 5.1)
51
- tzinfo (~> 1.1)
52
- arel (9.0.0)
53
- builder (3.2.3)
54
- coderay (1.1.2)
55
- concurrent-ruby (1.0.5)
56
- coveralls (0.8.21)
73
+ i18n (>= 1.6, < 2)
74
+ minitest (>= 5.1)
75
+ tzinfo (~> 2.0)
76
+ ast (2.4.2)
77
+ builder (3.2.4)
78
+ coderay (1.1.3)
79
+ concurrent-ruby (1.2.2)
80
+ coveralls (0.8.23)
57
81
  json (>= 1.8, < 3)
58
- simplecov (~> 0.14.1)
82
+ simplecov (~> 0.16.1)
59
83
  term-ansicolor (~> 1.3)
60
- thor (~> 0.19.4)
84
+ thor (>= 0.19.4, < 2.0)
61
85
  tins (~> 1.6)
62
- crass (1.0.4)
63
- diff-lcs (1.3)
64
- docile (1.1.5)
65
- erubi (1.7.1)
66
- factory_bot (4.10.0)
67
- activesupport (>= 3.0.0)
68
- factory_bot_rails (4.10.0)
69
- factory_bot (~> 4.10.0)
70
- railties (>= 3.0.0)
71
- ffi (1.9.25)
72
- formatador (0.2.5)
73
- globalid (0.4.1)
74
- activesupport (>= 4.2.0)
75
- guard (2.14.2)
86
+ crass (1.0.6)
87
+ date (3.3.3)
88
+ diff-lcs (1.5.0)
89
+ docile (1.4.0)
90
+ erubi (1.12.0)
91
+ factory_bot (6.2.1)
92
+ activesupport (>= 5.0.0)
93
+ factory_bot_rails (6.2.0)
94
+ factory_bot (~> 6.2.0)
95
+ railties (>= 5.0.0)
96
+ ffi (1.15.5)
97
+ formatador (1.1.0)
98
+ globalid (1.1.0)
99
+ activesupport (>= 5.0)
100
+ guard (2.18.0)
76
101
  formatador (>= 0.2.4)
77
102
  listen (>= 2.7, < 4.0)
78
103
  lumberjack (>= 1.0.12, < 2.0)
79
104
  nenv (~> 0.1)
80
105
  notiffany (~> 0.0)
81
- pry (>= 0.9.12)
106
+ pry (>= 0.13.0)
82
107
  shellany (~> 0.0)
83
108
  thor (>= 0.18.1)
84
109
  guard-compat (1.2.1)
@@ -86,119 +111,157 @@ GEM
86
111
  guard (~> 2.1)
87
112
  guard-compat (~> 1.1)
88
113
  rspec (>= 2.99.0, < 4.0)
89
- i18n (1.0.1)
114
+ i18n (1.14.1)
90
115
  concurrent-ruby (~> 1.0)
91
- json (2.1.0)
92
- listen (3.1.5)
93
- rb-fsevent (~> 0.9, >= 0.9.4)
94
- rb-inotify (~> 0.9, >= 0.9.7)
95
- ruby_dep (~> 1.2)
96
- loofah (2.2.2)
116
+ jaro_winkler (1.5.6)
117
+ json (2.6.3)
118
+ listen (3.8.0)
119
+ rb-fsevent (~> 0.10, >= 0.10.3)
120
+ rb-inotify (~> 0.9, >= 0.9.10)
121
+ loofah (2.21.3)
97
122
  crass (~> 1.0.2)
98
- nokogiri (>= 1.5.9)
99
- lumberjack (1.0.13)
100
- mail (2.7.0)
123
+ nokogiri (>= 1.12.0)
124
+ lumberjack (1.2.8)
125
+ mail (2.8.1)
101
126
  mini_mime (>= 0.1.1)
102
- marcel (0.3.2)
103
- mimemagic (~> 0.3.2)
104
- method_source (0.9.0)
105
- mimemagic (0.3.2)
106
- mini_mime (1.0.0)
107
- mini_portile2 (2.3.0)
108
- minitest (5.11.3)
127
+ net-imap
128
+ net-pop
129
+ net-smtp
130
+ marcel (1.0.2)
131
+ method_source (1.0.0)
132
+ mini_mime (1.1.2)
133
+ minitest (5.18.1)
109
134
  nenv (0.3.0)
110
- nio4r (2.3.1)
111
- nokogiri (1.8.3)
112
- mini_portile2 (~> 2.3.0)
113
- notiffany (0.1.1)
135
+ net-imap (0.3.6)
136
+ date
137
+ net-protocol
138
+ net-pop (0.1.2)
139
+ net-protocol
140
+ net-protocol (0.2.1)
141
+ timeout
142
+ net-smtp (0.3.3)
143
+ net-protocol
144
+ nio4r (2.5.9)
145
+ nokogiri (1.15.2-arm64-darwin)
146
+ racc (~> 1.4)
147
+ nokogiri (1.15.2-x86_64-darwin)
148
+ racc (~> 1.4)
149
+ nokogiri (1.15.2-x86_64-linux)
150
+ racc (~> 1.4)
151
+ notiffany (0.1.3)
114
152
  nenv (~> 0.1)
115
153
  shellany (~> 0.0)
116
154
  open_uri_redirections (0.2.1)
117
- pry (0.11.3)
118
- coderay (~> 1.1.0)
119
- method_source (~> 0.9.0)
120
- pry-rails (0.3.6)
155
+ parallel (1.23.0)
156
+ parser (3.2.2.3)
157
+ ast (~> 2.4.1)
158
+ racc
159
+ powerpack (0.1.3)
160
+ pry (0.14.2)
161
+ coderay (~> 1.1)
162
+ method_source (~> 1.0)
163
+ pry-rails (0.3.9)
121
164
  pry (>= 0.10.4)
122
- rack (2.0.5)
123
- rack-test (1.0.0)
124
- rack (>= 1.0, < 3)
125
- rails (5.2.0)
126
- actioncable (= 5.2.0)
127
- actionmailer (= 5.2.0)
128
- actionpack (= 5.2.0)
129
- actionview (= 5.2.0)
130
- activejob (= 5.2.0)
131
- activemodel (= 5.2.0)
132
- activerecord (= 5.2.0)
133
- activestorage (= 5.2.0)
134
- activesupport (= 5.2.0)
135
- bundler (>= 1.3.0)
136
- railties (= 5.2.0)
137
- sprockets-rails (>= 2.0.0)
165
+ psych (5.1.0)
166
+ stringio
167
+ racc (1.7.1)
168
+ rack (2.2.7)
169
+ rack-test (2.1.0)
170
+ rack (>= 1.3)
171
+ rails (7.0.6)
172
+ actioncable (= 7.0.6)
173
+ actionmailbox (= 7.0.6)
174
+ actionmailer (= 7.0.6)
175
+ actionpack (= 7.0.6)
176
+ actiontext (= 7.0.6)
177
+ actionview (= 7.0.6)
178
+ activejob (= 7.0.6)
179
+ activemodel (= 7.0.6)
180
+ activerecord (= 7.0.6)
181
+ activestorage (= 7.0.6)
182
+ activesupport (= 7.0.6)
183
+ bundler (>= 1.15.0)
184
+ railties (= 7.0.6)
138
185
  rails-dom-testing (2.0.3)
139
186
  activesupport (>= 4.2.0)
140
187
  nokogiri (>= 1.6)
141
- rails-html-sanitizer (1.0.4)
142
- loofah (~> 2.2, >= 2.2.2)
143
- railties (5.2.0)
144
- actionpack (= 5.2.0)
145
- activesupport (= 5.2.0)
188
+ rails-html-sanitizer (1.6.0)
189
+ loofah (~> 2.21)
190
+ nokogiri (~> 1.14)
191
+ railties (7.0.6)
192
+ actionpack (= 7.0.6)
193
+ activesupport (= 7.0.6)
146
194
  method_source
147
- rake (>= 0.8.7)
148
- thor (>= 0.18.1, < 2.0)
149
- rake (12.3.1)
150
- rb-fsevent (0.10.3)
151
- rb-inotify (0.9.10)
152
- ffi (>= 0.5.0, < 2)
153
- rspec (3.7.0)
154
- rspec-core (~> 3.7.0)
155
- rspec-expectations (~> 3.7.0)
156
- rspec-mocks (~> 3.7.0)
157
- rspec-core (3.7.1)
158
- rspec-support (~> 3.7.0)
159
- rspec-expectations (3.7.0)
195
+ rake (>= 12.2)
196
+ thor (~> 1.0)
197
+ zeitwerk (~> 2.5)
198
+ rainbow (3.1.1)
199
+ rake (13.0.6)
200
+ rb-fsevent (0.11.2)
201
+ rb-inotify (0.10.1)
202
+ ffi (~> 1.0)
203
+ rspec (3.12.0)
204
+ rspec-core (~> 3.12.0)
205
+ rspec-expectations (~> 3.12.0)
206
+ rspec-mocks (~> 3.12.0)
207
+ rspec-core (3.12.2)
208
+ rspec-support (~> 3.12.0)
209
+ rspec-expectations (3.12.3)
160
210
  diff-lcs (>= 1.2.0, < 2.0)
161
- rspec-support (~> 3.7.0)
162
- rspec-mocks (3.7.0)
211
+ rspec-support (~> 3.12.0)
212
+ rspec-mocks (3.12.5)
163
213
  diff-lcs (>= 1.2.0, < 2.0)
164
- rspec-support (~> 3.7.0)
165
- rspec-rails (3.7.2)
166
- actionpack (>= 3.0)
167
- activesupport (>= 3.0)
168
- railties (>= 3.0)
169
- rspec-core (~> 3.7.0)
170
- rspec-expectations (~> 3.7.0)
171
- rspec-mocks (~> 3.7.0)
172
- rspec-support (~> 3.7.0)
173
- rspec-support (3.7.1)
174
- ruby_dep (1.5.0)
214
+ rspec-support (~> 3.12.0)
215
+ rspec-rails (6.0.3)
216
+ actionpack (>= 6.1)
217
+ activesupport (>= 6.1)
218
+ railties (>= 6.1)
219
+ rspec-core (~> 3.12)
220
+ rspec-expectations (~> 3.12)
221
+ rspec-mocks (~> 3.12)
222
+ rspec-support (~> 3.12)
223
+ rspec-support (3.12.1)
224
+ rspec_junit_formatter (0.6.0)
225
+ rspec-core (>= 2, < 4, != 2.12.0)
226
+ rubocop (0.65.0)
227
+ jaro_winkler (~> 1.5.1)
228
+ parallel (~> 1.10)
229
+ parser (>= 2.5, != 2.5.1.1)
230
+ powerpack (~> 0.1)
231
+ psych (>= 3.1.0)
232
+ rainbow (>= 2.2.2, < 4.0)
233
+ ruby-progressbar (~> 1.7)
234
+ unicode-display_width (~> 1.4.0)
235
+ rubocop-rspec (1.35.0)
236
+ rubocop (>= 0.60.0)
237
+ ruby-progressbar (1.13.0)
175
238
  shellany (0.0.1)
176
- simplecov (0.14.1)
177
- docile (~> 1.1.0)
239
+ simplecov (0.16.1)
240
+ docile (~> 1.1)
178
241
  json (>= 1.8, < 3)
179
242
  simplecov-html (~> 0.10.0)
180
243
  simplecov-html (0.10.2)
181
- sprockets (3.7.2)
182
- concurrent-ruby (~> 1.0)
183
- rack (> 1, < 3)
184
- sprockets-rails (3.2.1)
185
- actionpack (>= 4.0)
186
- activesupport (>= 4.0)
187
- sprockets (>= 3.0.0)
188
- sqlite3 (1.3.13)
189
- term-ansicolor (1.6.0)
244
+ sqlite3 (1.4.4)
245
+ stringio (3.0.7)
246
+ sync (0.5.0)
247
+ term-ansicolor (1.7.1)
190
248
  tins (~> 1.0)
191
- thor (0.19.4)
192
- thread_safe (0.3.6)
193
- tins (1.16.3)
194
- tzinfo (1.2.5)
195
- thread_safe (~> 0.1)
196
- websocket-driver (0.7.0)
249
+ thor (1.2.2)
250
+ timeout (0.4.0)
251
+ tins (1.32.1)
252
+ sync
253
+ tzinfo (2.0.6)
254
+ concurrent-ruby (~> 1.0)
255
+ unicode-display_width (1.4.1)
256
+ websocket-driver (0.7.5)
197
257
  websocket-extensions (>= 0.1.0)
198
- websocket-extensions (0.1.3)
258
+ websocket-extensions (0.1.5)
259
+ zeitwerk (2.6.8)
199
260
 
200
261
  PLATFORMS
201
- ruby
262
+ arm64-darwin-22
263
+ x86_64-darwin-20
264
+ x86_64-linux
202
265
 
203
266
  DEPENDENCIES
204
267
  coveralls
@@ -208,7 +271,10 @@ DEPENDENCIES
208
271
  pry
209
272
  pry-rails
210
273
  rspec-rails
211
- sqlite3
274
+ rspec_junit_formatter
275
+ rubocop (= 0.65.0)
276
+ rubocop-rspec
277
+ sqlite3 (~> 1.4.2)
212
278
 
213
279
  BUNDLED WITH
214
- 1.16.1
280
+ 2.2.15
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright 2018 Platanus
3
+ Copyright 2021 Platanus
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Local Resource
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/local_resource.svg)](https://badge.fury.io/rb/local_resource)
4
- [![Build Status](https://travis-ci.org/platanus/local_resource.svg?branch=master)](https://travis-ci.org/platanus/local_resource)
4
+ [![CircleCI](https://circleci.com/gh/platanus/local_resource.svg?style=shield)](https://app.circleci.com/pipelines/github/platanus/local_resource)
5
5
  [![Coverage Status](https://coveralls.io/repos/github/platanus/local_resource/badge.svg?branch=master)](https://coveralls.io/github/platanus/local_resource?branch=master)
6
6
 
7
- Rails engine to take a file from a url, download it to the tmp, use it and delete it
7
+ Rails engine to treat external resources as if they were local.
8
8
 
9
9
  ## Installation
10
10
 
@@ -53,6 +53,16 @@ bundle exec guard
53
53
 
54
54
  You need to put **all your tests** in the `/local_resource/spec/dummy/spec/` directory.
55
55
 
56
+ ## Publishing
57
+
58
+ On master/main branch...
59
+
60
+ 1. Change `VERSION` in `lib/local_resource/version.rb`.
61
+ 2. Change `Unreleased` title to current version in `CHANGELOG.md`.
62
+ 3. Commit new release. For example: `Releasing v0.1.0`.
63
+ 4. Create tag. For example: `git tag v0.1.0`.
64
+ 5. Push tag. For example: `git push origin v0.1.0`.
65
+
56
66
  ## Contributing
57
67
 
58
68
  1. Fork it
@@ -1,3 +1,3 @@
1
1
  module LocalResource
2
- VERSION = '0.2.0'
2
+ VERSION = '2.0.0'
3
3
  end
@@ -19,13 +19,17 @@ Gem::Specification.new do |s|
19
19
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  s.test_files = Dir["spec/**/*"]
21
21
 
22
- s.add_dependency "rails", ">= 4.2.0"
22
+ s.add_dependency "rails", ">= 6.0"
23
23
  s.add_dependency "open_uri_redirections"
24
+
25
+ s.add_development_dependency "coveralls"
26
+ s.add_development_dependency "factory_bot_rails"
27
+ s.add_development_dependency "guard-rspec"
24
28
  s.add_development_dependency "pry"
25
29
  s.add_development_dependency "pry-rails"
26
- s.add_development_dependency "sqlite3"
27
30
  s.add_development_dependency "rspec-rails"
28
- s.add_development_dependency "guard-rspec"
29
- s.add_development_dependency "factory_bot_rails"
30
- s.add_development_dependency "coveralls"
31
+ s.add_development_dependency "rspec_junit_formatter"
32
+ s.add_development_dependency "rubocop", "0.65.0"
33
+ s.add_development_dependency "rubocop-rspec"
34
+ s.add_development_dependency "sqlite3", "~> 1.4.2"
31
35
  end
data/spec/dummy/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
3
 
4
- require_relative 'config/application'
4
+ require_relative "config/application"
5
5
 
6
6
  Rails.application.load_tasks
@@ -1,4 +1,3 @@
1
-
2
1
  //= link_tree ../images
3
- //= link_directory ../javascripts .js
4
2
  //= link_directory ../stylesheets .css
3
+ //= link local_resource_manifest.js
@@ -1,3 +1,2 @@
1
1
  class ApplicationController < ActionController::Base
2
- protect_from_forgery with: :exception
3
2
  end
@@ -10,4 +10,6 @@
10
10
  // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
+ //= require rails-ujs
14
+ //= require activestorage
13
15
  //= require_tree .
@@ -1,2 +1,7 @@
1
1
  class ApplicationJob < ActiveJob::Base
2
+ # Automatically retry jobs that encountered a deadlock
3
+ # retry_on ActiveRecord::Deadlocked
4
+
5
+ # Most jobs are safe to ignore if the underlying records are no longer available
6
+ # discard_on ActiveJob::DeserializationError
2
7
  end
@@ -2,10 +2,11 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Dummy</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
5
6
  <%= csrf_meta_tags %>
7
+ <%= csp_meta_tag %>
6
8
 
7
- <%= stylesheet_link_tag 'application', media: 'all' %>
8
- <%= javascript_include_tag 'application' %>
9
+ <%= stylesheet_link_tag 'application', media: 'all' %>
9
10
  </head>
10
11
 
11
12
  <body>
data/spec/dummy/bin/rails CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
  APP_PATH = File.expand_path('../config/application', __dir__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
3
+ require_relative "../config/boot"
4
+ require "rails/commands"
data/spec/dummy/bin/rake CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
2
+ require_relative "../config/boot"
3
+ require "rake"
4
4
  Rake.application.run
data/spec/dummy/bin/setup CHANGED
@@ -1,34 +1,29 @@
1
1
  #!/usr/bin/env ruby
2
- require 'pathname'
3
- require 'fileutils'
4
- include FileUtils
2
+ require "fileutils"
5
3
 
6
4
  # path to your application root.
7
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
5
+ APP_ROOT = File.expand_path('..', __dir__)
8
6
 
9
7
  def system!(*args)
10
8
  system(*args) || abort("\n== Command #{args} failed ==")
11
9
  end
12
10
 
13
- chdir APP_ROOT do
14
- # This script is a starting point to setup your application.
11
+ FileUtils.chdir APP_ROOT do
12
+ # This script is a way to set up or update your development environment automatically.
13
+ # This script is idempotent, so that you can run it at any time and get an expectable outcome.
15
14
  # Add necessary setup steps to this file.
16
15
 
17
16
  puts '== Installing dependencies =='
18
17
  system! 'gem install bundler --conservative'
19
18
  system('bundle check') || system!('bundle install')
20
19
 
21
- # Install JavaScript dependencies if using Yarn
22
- # system('bin/yarn')
23
-
24
-
25
20
  # puts "\n== Copying sample files =="
26
21
  # unless File.exist?('config/database.yml')
27
- # cp 'config/database.yml.sample', 'config/database.yml'
22
+ # FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
28
23
  # end
29
24
 
30
25
  puts "\n== Preparing database =="
31
- system! 'bin/rails db:setup'
26
+ system! 'bin/rails db:prepare'
32
27
 
33
28
  puts "\n== Removing old logs and tempfiles =="
34
29
  system! 'bin/rails log:clear tmp:clear'