Skip to content

Commit 1da19e1

Browse files
committed
Add the usual gems and appease rubocop
1 parent c8be8ec commit 1da19e1

24 files changed

+1286
-91
lines changed

Diff for: .rubocop.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
inherit_from: .rubocop_todo.yml
2+
3+
require:
4+
- rubocop-rails
5+
- rubocop-rspec
6+
- rubocop-performance
7+
8+
AllCops:
9+
TargetRubyVersion: 2.7
10+
DisplayCopNames: true
11+
NewCops: enable
12+
Exclude:
13+
- 'Gemfile'
14+
- 'bin/**/*'
15+
- 'db/**/*'
16+
- 'config/**/*'
17+
- 'node_modules/**/*'
18+
- 'spec/spec_helper.rb'
19+
- 'spec/teaspoon_env.rb'
20+
- 'vendor/**/*'
21+
- 'app/controllers/concerns/action_controller/**/*'
22+
23+
Rails:
24+
Enabled: true

Diff for: .rubocop_todo.yml

Whitespace-only changes.

Diff for: Gemfile

+25
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@ group :development, :test do
3131
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
3232

3333
gem 'rspec-rails'
34+
gem 'rails-controller-testing'
35+
36+
# Capybara for feature/integration tests
37+
gem 'capybara'
38+
gem 'selenium-webdriver'
39+
40+
gem 'webdrivers'
41+
42+
# Rubocop is a static code analyzer to enforce style.
43+
gem 'rubocop', require: false
44+
gem 'rubocop-performance', require: false
45+
gem 'rubocop-rails', require: false
46+
gem 'rubocop-rspec', require: false
47+
48+
gem 'scss-lint'
49+
50+
gem 'simplecov'
51+
gem 'webmock'
3452
end
3553

3654
group :development do
@@ -44,3 +62,10 @@ end
4462

4563
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
4664
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
65+
66+
gem 'bootstrap'
67+
gem 'cancancan'
68+
gem 'config'
69+
gem 'honeybadger'
70+
gem 'http'
71+
gem 'okcomputer'

Diff for: Gemfile.lock

+160-3
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,101 @@ GEM
5656
minitest (~> 5.1)
5757
tzinfo (~> 1.1)
5858
zeitwerk (~> 2.2, >= 2.2.2)
59+
addressable (2.7.0)
60+
public_suffix (>= 2.0.2, < 5.0)
61+
ast (2.4.1)
62+
autoprefixer-rails (9.8.6.3)
63+
execjs
5964
bindex (0.8.1)
6065
bootsnap (1.4.8)
6166
msgpack (~> 1.0)
67+
bootstrap (4.5.2)
68+
autoprefixer-rails (>= 9.1.0)
69+
popper_js (>= 1.14.3, < 2)
70+
sassc-rails (>= 2.0.0)
6271
builder (3.2.4)
6372
byebug (11.1.3)
73+
cancancan (3.1.0)
74+
capybara (3.33.0)
75+
addressable
76+
mini_mime (>= 0.1.3)
77+
nokogiri (~> 1.8)
78+
rack (>= 1.6.0)
79+
rack-test (>= 0.6.3)
80+
regexp_parser (~> 1.5)
81+
xpath (~> 3.2)
82+
childprocess (3.0.0)
83+
colorize (0.5.8)
6484
concurrent-ruby (1.1.7)
85+
config (2.2.1)
86+
deep_merge (~> 1.2, >= 1.2.1)
87+
dry-validation (~> 1.0, >= 1.0.0)
88+
crack (0.4.3)
89+
safe_yaml (~> 1.0.0)
6590
crass (1.0.6)
91+
deep_merge (1.2.1)
6692
diff-lcs (1.4.4)
93+
docile (1.3.2)
94+
domain_name (0.5.20190701)
95+
unf (>= 0.0.5, < 1.0.0)
96+
dry-configurable (0.11.6)
97+
concurrent-ruby (~> 1.0)
98+
dry-core (~> 0.4, >= 0.4.7)
99+
dry-equalizer (~> 0.2)
100+
dry-container (0.7.2)
101+
concurrent-ruby (~> 1.0)
102+
dry-configurable (~> 0.1, >= 0.1.3)
103+
dry-core (0.4.9)
104+
concurrent-ruby (~> 1.0)
105+
dry-equalizer (0.3.0)
106+
dry-inflector (0.2.0)
107+
dry-initializer (3.0.3)
108+
dry-logic (1.0.7)
109+
concurrent-ruby (~> 1.0)
110+
dry-core (~> 0.2)
111+
dry-equalizer (~> 0.2)
112+
dry-schema (1.5.4)
113+
concurrent-ruby (~> 1.0)
114+
dry-configurable (~> 0.8, >= 0.8.3)
115+
dry-core (~> 0.4)
116+
dry-equalizer (~> 0.2)
117+
dry-initializer (~> 3.0)
118+
dry-logic (~> 1.0)
119+
dry-types (~> 1.4)
120+
dry-types (1.4.0)
121+
concurrent-ruby (~> 1.0)
122+
dry-container (~> 0.3)
123+
dry-core (~> 0.4, >= 0.4.4)
124+
dry-equalizer (~> 0.3)
125+
dry-inflector (~> 0.1, >= 0.1.2)
126+
dry-logic (~> 1.0, >= 1.0.2)
127+
dry-validation (1.5.6)
128+
concurrent-ruby (~> 1.0)
129+
dry-container (~> 0.7, >= 0.7.1)
130+
dry-core (~> 0.4)
131+
dry-equalizer (~> 0.2)
132+
dry-initializer (~> 3.0)
133+
dry-schema (~> 1.5, >= 1.5.2)
67134
erubi (1.9.0)
135+
execjs (2.7.0)
68136
ffi (1.13.1)
137+
ffi-compiler (1.0.1)
138+
ffi (>= 1.0.0)
139+
rake
69140
globalid (0.4.2)
70141
activesupport (>= 4.2.0)
142+
hashdiff (1.0.1)
143+
honeybadger (4.7.2)
144+
http (4.4.1)
145+
addressable (~> 2.3)
146+
http-cookie (~> 1.0)
147+
http-form_data (~> 2.2)
148+
http-parser (~> 1.2.0)
149+
http-cookie (1.0.3)
150+
domain_name (~> 0.5)
151+
http-form_data (2.3.0)
152+
http-parser (1.2.1)
153+
ffi-compiler (>= 1.0, < 2.0)
71154
i18n (1.8.5)
72155
concurrent-ruby (~> 1.0)
73156
jbuilder (2.10.0)
@@ -91,6 +174,12 @@ GEM
91174
nio4r (2.5.3)
92175
nokogiri (1.10.10)
93176
mini_portile2 (~> 2.4.0)
177+
okcomputer (1.18.2)
178+
parallel (1.19.2)
179+
parser (2.7.1.4)
180+
ast (~> 2.4.1)
181+
popper_js (1.16.0)
182+
public_suffix (4.0.6)
94183
puma (4.3.6)
95184
nio4r (~> 2.0)
96185
rack (2.2.3)
@@ -113,6 +202,10 @@ GEM
113202
bundler (>= 1.3.0)
114203
railties (= 6.0.3.3)
115204
sprockets-rails (>= 2.0.0)
205+
rails-controller-testing (1.0.5)
206+
actionpack (>= 5.0.1.rc1)
207+
actionview (>= 5.0.1.rc1)
208+
activesupport (>= 5.0.1.rc1)
116209
rails-dom-testing (2.0.3)
117210
activesupport (>= 4.2.0)
118211
nokogiri (>= 1.6)
@@ -124,10 +217,13 @@ GEM
124217
method_source
125218
rake (>= 0.8.7)
126219
thor (>= 0.20.3, < 2.0)
220+
rainbow (3.0.0)
127221
rake (13.0.1)
128222
rb-fsevent (0.10.4)
129223
rb-inotify (0.10.1)
130224
ffi (~> 1.0)
225+
regexp_parser (1.7.1)
226+
rexml (3.2.4)
131227
rspec-core (3.9.2)
132228
rspec-support (~> 3.9.3)
133229
rspec-expectations (3.9.2)
@@ -145,6 +241,29 @@ GEM
145241
rspec-mocks (~> 3.9)
146242
rspec-support (~> 3.9)
147243
rspec-support (3.9.3)
244+
rubocop (0.90.0)
245+
parallel (~> 1.10)
246+
parser (>= 2.7.1.1)
247+
rainbow (>= 2.2.2, < 4.0)
248+
regexp_parser (>= 1.7)
249+
rexml
250+
rubocop-ast (>= 0.3.0, < 1.0)
251+
ruby-progressbar (~> 1.7)
252+
unicode-display_width (>= 1.4.0, < 2.0)
253+
rubocop-ast (0.3.0)
254+
parser (>= 2.7.1.4)
255+
rubocop-performance (1.8.0)
256+
rubocop (>= 0.87.0)
257+
rubocop-rails (2.8.0)
258+
activesupport (>= 4.2.0)
259+
rack (>= 1.1)
260+
rubocop (>= 0.87.0)
261+
rubocop-rspec (1.43.2)
262+
rubocop (~> 0.87)
263+
ruby-progressbar (1.10.1)
264+
rubyzip (2.3.0)
265+
safe_yaml (1.0.5)
266+
sass (3.3.14)
148267
sass-rails (6.0.0)
149268
sassc-rails (~> 2.1, >= 2.1.1)
150269
sassc (2.4.0)
@@ -155,6 +274,16 @@ GEM
155274
sprockets (> 3.0)
156275
sprockets-rails
157276
tilt
277+
scss-lint (0.20.3)
278+
colorize (= 0.5.8)
279+
sass (~> 3.3.0)
280+
selenium-webdriver (3.142.7)
281+
childprocess (>= 0.5, < 4.0)
282+
rubyzip (>= 1.2.2)
283+
simplecov (0.19.0)
284+
docile (~> 1.1)
285+
simplecov-html (~> 0.11)
286+
simplecov-html (0.12.2)
158287
spring (2.1.1)
159288
spring-watcher-listen (2.0.1)
160289
listen (>= 2.7, < 4.0)
@@ -175,42 +304,70 @@ GEM
175304
turbolinks-source (5.2.0)
176305
tzinfo (1.2.7)
177306
thread_safe (~> 0.1)
307+
unf (0.1.4)
308+
unf_ext
309+
unf_ext (0.0.7.7)
310+
unicode-display_width (1.7.0)
178311
web-console (4.0.4)
179312
actionview (>= 6.0.0)
180313
activemodel (>= 6.0.0)
181314
bindex (>= 0.4.0)
182315
railties (>= 6.0.0)
316+
webdrivers (4.4.1)
317+
nokogiri (~> 1.6)
318+
rubyzip (>= 1.3.0)
319+
selenium-webdriver (>= 3.0, < 4.0)
320+
webmock (3.8.3)
321+
addressable (>= 2.3.6)
322+
crack (>= 0.3.2)
323+
hashdiff (>= 0.4.0, < 2.0.0)
183324
webpacker (4.3.0)
184325
activesupport (>= 4.2)
185326
rack-proxy (>= 0.6.1)
186327
railties (>= 4.2)
187328
websocket-driver (0.7.3)
188329
websocket-extensions (>= 0.1.0)
189330
websocket-extensions (0.1.5)
331+
xpath (3.2.0)
332+
nokogiri (~> 1.8)
190333
zeitwerk (2.4.0)
191334

192335
PLATFORMS
193336
ruby
194337

195338
DEPENDENCIES
196339
bootsnap (>= 1.4.2)
340+
bootstrap
197341
byebug
342+
cancancan
343+
capybara
344+
config
345+
honeybadger
346+
http
198347
jbuilder (~> 2.7)
199348
listen (~> 3.2)
349+
okcomputer
200350
puma (~> 4.1)
201351
rails (~> 6.0.3, >= 6.0.3.3)
352+
rails-controller-testing
202353
rspec-rails
354+
rubocop
355+
rubocop-performance
356+
rubocop-rails
357+
rubocop-rspec
203358
sass-rails (>= 6)
359+
scss-lint
360+
selenium-webdriver
361+
simplecov
204362
spring
205363
spring-watcher-listen (~> 2.0.0)
206364
sqlite3 (~> 1.4)
207365
turbolinks (~> 5)
208366
tzinfo-data
209367
web-console (>= 3.3.0)
368+
webdrivers
369+
webmock
210370
webpacker (~> 4.0)
211371

212-
RUBY VERSION
213-
ruby 2.7.0p0
214-
215372
BUNDLED WITH
216373
2.1.2

Diff for: Rakefile

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Add your own tasks in files placed in lib/tasks ending in .rake,
24
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
35

Diff for: app/channels/application_cable/channel.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module ApplicationCable
24
class Channel < ActionCable::Channel::Base
35
end

Diff for: app/channels/application_cable/connection.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module ApplicationCable
24
class Connection < ActionCable::Connection::Base
35
end

Diff for: app/controllers/application_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# frozen_string_literal: true
2+
13
class ApplicationController < ActionController::Base
24
end

Diff for: app/helpers/application_helper.rb

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
# :nodoc:
14
module ApplicationHelper
25
end

Diff for: app/javascript/channels/consumer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Action Cable provides the framework to deal with WebSockets in Rails.
22
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
33

4-
import { createConsumer } from "@rails/actioncable"
4+
import { createConsumer } from '@rails/actioncable';
55

6-
export default createConsumer()
6+
export default createConsumer();

Diff for: app/javascript/channels/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Load all the channels within this directory and all subdirectories.
22
// Channel files must be named *_channel.js.
33

4-
const channels = require.context('.', true, /_channel\.js$/)
5-
channels.keys().forEach(channels)
4+
const channels = require.context('.', true, /_channel\.js$/);
5+
channels.keys().forEach(channels);

Diff for: app/javascript/packs/application.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
// a relevant structure within app/javascript and only use these pack files to reference
44
// that code so it'll be compiled.
55

6-
require("@rails/ujs").start()
7-
require("turbolinks").start()
8-
require("@rails/activestorage").start()
9-
require("channels")
10-
6+
require('@rails/ujs').start();
7+
require('turbolinks').start();
8+
require('@rails/activestorage').start();
9+
require('channels');
1110

1211
// Uncomment to copy all static images under ../images to the output folder and reference
1312
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)

Diff for: app/jobs/application_job.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class ApplicationJob < ActiveJob::Base
24
# Automatically retry jobs that encountered a deadlock
35
# retry_on ActiveRecord::Deadlocked

Diff for: app/mailers/application_mailer.rb

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# frozen_string_literal: true
2+
3+
# :nodoc:
14
class ApplicationMailer < ActionMailer::Base
25
default from: '[email protected]'
36
layout 'mailer'

0 commit comments

Comments
 (0)