diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..518833d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,5 @@ +- repo: https://github.com/mattlqx/pre-commit-ruby + rev: v1.3.3 + hooks: + - id: rubocop + - id: rspec diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..c99d2e7 --- /dev/null +++ b/.rspec @@ -0,0 +1 @@ +--require spec_helper diff --git a/Gemfile b/Gemfile index 91f9fe2..1feac33 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,7 @@ gem 'bootsnap', '>= 1.4.4', require: false group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] + gem 'rspec-rails', '~> 5.0.0' end group :development do @@ -43,7 +44,10 @@ group :development do gem 'rack-mini-profiler', '~> 2.0' gem 'listen', '~> 3.3' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring + gem 'spring' + gem 'rubocop', require: false + end group :test do @@ -52,6 +56,8 @@ group :test do gem 'selenium-webdriver' # Easy installation and use of web drivers to run system tests with browsers gem 'webdrivers' + gem 'simplecov', require: false + gem 'simplecov_json_formatter' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem diff --git a/Gemfile.lock b/Gemfile.lock index c0c3d2b..277e80a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -67,6 +67,7 @@ GEM zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) + ast (2.4.2) bindex (0.8.1) bootsnap (1.7.5) msgpack (~> 1.0) @@ -86,6 +87,8 @@ GEM coderay (1.1.3) concurrent-ruby (1.1.9) crass (1.0.6) + diff-lcs (1.4.4) + docile (1.4.0) erubi (1.10.0) ffi (1.15.3) globalid (0.4.2) @@ -113,6 +116,9 @@ GEM nokogiri (1.11.7) mini_portile2 (~> 2.5.0) racc (~> 1.4) + parallel (1.20.1) + parser (3.0.1.1) + ast (~> 2.4.1) pg (1.2.3) pry (0.14.1) coderay (~> 1.1) @@ -154,11 +160,42 @@ GEM method_source rake (>= 0.13) thor (~> 1.0) + rainbow (3.0.0) rake (13.0.6) rb-fsevent (0.11.0) rb-inotify (0.10.1) ffi (~> 1.0) regexp_parser (2.1.1) + rexml (3.2.5) + rspec-core (3.10.1) + rspec-support (~> 3.10.0) + rspec-expectations (3.10.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.10.0) + rspec-mocks (3.10.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.10.0) + rspec-rails (5.0.1) + actionpack (>= 5.2) + activesupport (>= 5.2) + railties (>= 5.2) + rspec-core (~> 3.10) + rspec-expectations (~> 3.10) + rspec-mocks (~> 3.10) + rspec-support (~> 3.10) + rspec-support (3.10.2) + rubocop (1.16.1) + parallel (~> 1.10) + parser (>= 3.0.0.0) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml + rubocop-ast (>= 1.7.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.7.0) + parser (>= 3.0.1.1) + ruby-progressbar (1.11.0) rubyzip (2.3.2) sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) @@ -174,6 +211,12 @@ GEM childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) semantic_range (3.0.0) + simplecov (0.21.2) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.3) spring (2.1.1) sprockets (4.0.2) concurrent-ruby (~> 1.0) @@ -189,6 +232,7 @@ GEM turbolinks-source (5.2.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) + unicode-display_width (2.0.0) web-console (4.1.0) actionview (>= 6.0.0) activemodel (>= 6.0.0) @@ -225,8 +269,12 @@ DEPENDENCIES puma (~> 5.0) rack-mini-profiler (~> 2.0) rails (~> 6.1.3, >= 6.1.3.2) + rspec-rails (~> 5.0.0) + rubocop sass-rails (>= 6) selenium-webdriver + simplecov + simplecov_json_formatter spring turbolinks (~> 5) tzinfo-data diff --git a/app/models/user.rb b/app/models/user.rb index 379658a..3c33bee 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,2 +1,7 @@ class User < ApplicationRecord + validates :name, presence: true + + def name + "name" + end end diff --git a/bin/rails b/bin/rails index 21d3e02..c7bab25 100755 --- a/bin/rails +++ b/bin/rails @@ -1,5 +1,13 @@ #!/usr/bin/env ruby + load File.expand_path("spring", __dir__) APP_PATH = File.expand_path('../config/application', __dir__) require_relative "../config/boot" + +if ENV['RAILS_ENV'] == 'test' + require 'simplecov' + SimpleCov.start 'rails' + puts "required simplecov" +end + require "rails/commands" diff --git a/coverage/.last_run.json b/coverage/.last_run.json new file mode 100644 index 0000000..05fb8ac --- /dev/null +++ b/coverage/.last_run.json @@ -0,0 +1,5 @@ +{ + "result": { + "line": 6.48 + } +} diff --git a/coverage/.resultset.json b/coverage/.resultset.json new file mode 100644 index 0000000..e0d25c8 --- /dev/null +++ b/coverage/.resultset.json @@ -0,0 +1,225 @@ +{ + "RSpec": { + "coverage": { + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/helpers/application_helper.rb": { + "lines": [ + 1, + null + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/helpers/users_helper.rb": { + "lines": [ + 1, + null + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/models/user.rb": { + "lines": [ + 1, + 1, + null, + 1, + 0, + null, + null + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/models/application_record.rb": { + "lines": [ + 1, + 1, + null + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/mailers/application_mailer.rb": { + "lines": [ + 0, + 0, + 0, + 0 + ], + "branches": { + } + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/decorators/user_decorator.rb": { + "lines": [ + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + null, + 0, + null, + 0, + 0 + ], + "branches": { + } + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/serializers/user_serializer.rb": { + "lines": [ + 0, + 0, + null, + 0, + 0, + 0, + 0 + ], + "branches": { + } + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/jobs/application_job.rb": { + "lines": [ + 0, + null, + null, + null, + null, + null, + 0 + ], + "branches": { + } + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/controllers/application_controller.rb": { + "lines": [ + 0, + 0 + ], + "branches": { + } + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/controllers/users_controller.rb": { + "lines": [ + 0, + 0, + null, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + null, + null, + 0, + 0, + null, + null, + 0, + 0, + 0, + null, + null, + 0, + 0, + null, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0, + 0 + ], + "branches": { + } + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/services/user_service.rb": { + "lines": [ + 0, + null, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0 + ], + "branches": { + } + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/channels/application_cable/connection.rb": { + "lines": [ + 0, + 0, + 0, + 0 + ], + "branches": { + } + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/channels/application_cable/channel.rb": { + "lines": [ + 0, + 0, + 0, + 0 + ], + "branches": { + } + } + }, + "timestamp": 1627731448 + } +} diff --git a/coverage/.resultset.json.lock b/coverage/.resultset.json.lock new file mode 100644 index 0000000..e69de29 diff --git a/coverage/coverage.json b/coverage/coverage.json new file mode 100644 index 0000000..1941c97 --- /dev/null +++ b/coverage/coverage.json @@ -0,0 +1,207 @@ +{ + "meta": { + "simplecov_version": "0.21.2" + }, + "coverage": { + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/channels/application_cable/channel.rb": { + "lines": [ + 0, + 0, + 0, + 0 + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/channels/application_cable/connection.rb": { + "lines": [ + 0, + 0, + 0, + 0 + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/controllers/application_controller.rb": { + "lines": [ + 0, + 0 + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/controllers/users_controller.rb": { + "lines": [ + 0, + 0, + null, + null, + 0, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + null, + null, + 0, + 0, + null, + null, + 0, + 0, + 0, + null, + null, + 0, + 0, + null, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + 0, + null, + 0, + 0, + 0, + null, + null, + 0, + 0, + 0, + 0 + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/decorators/user_decorator.rb": { + "lines": [ + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + null, + null, + 0, + null, + 0, + 0 + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/helpers/application_helper.rb": { + "lines": [ + 1, + null + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/helpers/users_helper.rb": { + "lines": [ + 1, + null + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/jobs/application_job.rb": { + "lines": [ + 0, + null, + null, + null, + null, + null, + 0 + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/mailers/application_mailer.rb": { + "lines": [ + 0, + 0, + 0, + 0 + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/models/application_record.rb": { + "lines": [ + 1, + 1, + null + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/models/user.rb": { + "lines": [ + 1, + 1, + null, + 1, + 0, + null, + null + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/serializers/user_serializer.rb": { + "lines": [ + 0, + 0, + null, + 0, + 0, + 0, + 0 + ] + }, + "/Users/sameeragayan/workspace/r_and_d/sampleapp/app/services/user_service.rb": { + "lines": [ + 0, + null, + 0, + null, + 0, + 0, + 0, + null, + 0, + 0, + 0, + 0, + 0 + ] + } + } +} \ No newline at end of file diff --git a/rubocop.json b/rubocop.json new file mode 100644 index 0000000..92b0941 --- /dev/null +++ b/rubocop.json @@ -0,0 +1 @@ +{"metadata":{"rubocop_version":"1.16.1","ruby_engine":"ruby","ruby_version":"2.7.3","ruby_patchlevel":"183","ruby_platform":"x86_64-darwin19"},"files":[{"path":"Gemfile","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Trailing whitespace detected.","cop_name":"Layout/TrailingWhitespace","corrected":false,"correctable":true,"location":{"start_line":27,"start_column":31,"last_line":27,"last_column":31,"length":1,"line":27,"column":31}},{"severity":"convention","message":"Use `%i` or `%I` for an array of symbols.","cop_name":"Style/SymbolArray","corrected":false,"correctable":true,"location":{"start_line":35,"start_column":28,"last_line":35,"last_column":53,"length":26,"line":35,"column":28}},{"severity":"convention","message":"Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem `listen` should appear before `rack-mini-profiler`.","cop_name":"Bundler/OrderedGems","corrected":false,"correctable":true,"location":{"start_line":44,"start_column":3,"last_line":44,"last_column":24,"length":22,"line":44,"column":3}},{"severity":"convention","message":"Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem `rubocop` should appear before `spring`.","cop_name":"Bundler/OrderedGems","corrected":false,"correctable":true,"location":{"start_line":48,"start_column":3,"last_line":48,"last_column":31,"length":29,"line":48,"column":3}},{"severity":"convention","message":"Use `%i` or `%I` for an array of symbols.","cop_name":"Style/SymbolArray","corrected":false,"correctable":true,"location":{"start_line":60,"start_column":31,"last_line":60,"last_column":66,"length":36,"line":60,"column":31}}]},{"path":"Rakefile","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":18,"last_line":4,"last_column":37,"length":20,"line":4,"column":18}}]},{"path":"app/channels/application_cable/channel.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"app/channels/application_cable/connection.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"app/controllers/application_controller.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"app/controllers/users_controller.rb","offenses":[{"severity":"convention","message":"Missing top-level class documentation comment.","cop_name":"Style/Documentation","corrected":false,"correctable":false,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":5,"length":5,"line":1,"column":1}},{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Do not use spaces inside percent literal delimiters.","cop_name":"Layout/SpaceInsidePercentLiteralDelimiters","corrected":false,"correctable":true,"location":{"start_line":2,"start_column":37,"last_line":2,"last_column":37,"length":1,"line":2,"column":37}},{"severity":"convention","message":"Do not use spaces inside percent literal delimiters.","cop_name":"Layout/SpaceInsidePercentLiteralDelimiters","corrected":false,"correctable":true,"location":{"start_line":2,"start_column":62,"last_line":2,"last_column":62,"length":1,"line":2,"column":62}},{"severity":"convention","message":"Trailing whitespace detected.","cop_name":"Layout/TrailingWhitespace","corrected":false,"correctable":true,"location":{"start_line":9,"start_column":50,"last_line":9,"last_column":50,"length":1,"line":9,"column":50}},{"severity":"convention","message":"Put empty method definitions on a single line.","cop_name":"Style/EmptyMethod","corrected":false,"correctable":true,"location":{"start_line":16,"start_column":3,"last_line":17,"last_column":5,"length":14,"line":16,"column":3}},{"severity":"convention","message":"Put empty method definitions on a single line.","cop_name":"Style/EmptyMethod","corrected":false,"correctable":true,"location":{"start_line":25,"start_column":3,"last_line":26,"last_column":5,"length":14,"line":25,"column":3}},{"severity":"convention","message":"Method has too many lines. [11/10]","cop_name":"Metrics/MethodLength","corrected":false,"correctable":false,"location":{"start_line":29,"start_column":3,"last_line":42,"last_column":5,"length":463,"line":29,"column":3}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":35,"start_column":50,"last_line":35,"last_column":81,"length":32,"line":35,"column":50}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":48,"start_column":50,"last_line":48,"last_column":81,"length":32,"line":48,"column":50}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":61,"start_column":52,"last_line":61,"last_column":85,"length":34,"line":61,"column":52}},{"severity":"convention","message":"Keep a blank line before and after `private`.","cop_name":"Layout/EmptyLinesAroundAccessModifier","corrected":false,"correctable":true,"location":{"start_line":66,"start_column":3,"last_line":66,"last_column":9,"length":7,"line":66,"column":3}},{"severity":"convention","message":"Use 2 (not 4) spaces for indentation.","cop_name":"Layout/IndentationWidth","corrected":false,"correctable":true,"location":{"start_line":68,"start_column":1,"last_line":68,"last_column":4,"length":4,"line":68,"column":1}},{"severity":"convention","message":"Inconsistent indentation detected.","cop_name":"Layout/IndentationConsistency","corrected":false,"correctable":true,"location":{"start_line":68,"start_column":5,"last_line":70,"last_column":7,"length":57,"line":68,"column":5}},{"severity":"convention","message":"Use 2 (not 4) spaces for indentation.","cop_name":"Layout/IndentationWidth","corrected":false,"correctable":true,"location":{"start_line":73,"start_column":1,"last_line":73,"last_column":4,"length":4,"line":73,"column":1}},{"severity":"convention","message":"Inconsistent indentation detected.","cop_name":"Layout/IndentationConsistency","corrected":false,"correctable":true,"location":{"start_line":73,"start_column":5,"last_line":75,"last_column":7,"length":73,"line":73,"column":5}}]},{"path":"app/decorators/user_decorator.rb","offenses":[{"severity":"convention","message":"Missing top-level class documentation comment.","cop_name":"Style/Documentation","corrected":false,"correctable":false,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":5,"length":5,"line":1,"column":1}},{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":7,"start_column":7,"last_line":7,"last_column":13,"length":7,"line":7,"column":7}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":9,"start_column":7,"last_line":9,"last_column":17,"length":11,"line":9,"column":7}}]},{"path":"app/helpers/application_helper.rb","offenses":[{"severity":"convention","message":"Missing top-level module documentation comment.","cop_name":"Style/Documentation","corrected":false,"correctable":false,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":6,"length":6,"line":1,"column":1}},{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"app/helpers/users_helper.rb","offenses":[{"severity":"convention","message":"Missing top-level module documentation comment.","cop_name":"Style/Documentation","corrected":false,"correctable":false,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":6,"length":6,"line":1,"column":1}},{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"app/jobs/application_job.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"app/mailers/application_mailer.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"app/models/application_record.rb","offenses":[{"severity":"convention","message":"Missing top-level class documentation comment.","cop_name":"Style/Documentation","corrected":false,"correctable":false,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":5,"length":5,"line":1,"column":1}},{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"app/models/user.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"app/serializers/user_serializer.rb","offenses":[{"severity":"convention","message":"Missing top-level class documentation comment.","cop_name":"Style/Documentation","corrected":false,"correctable":false,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":5,"length":5,"line":1,"column":1}},{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"app/services/user_service.rb","offenses":[{"severity":"convention","message":"Missing top-level class documentation comment.","cop_name":"Style/Documentation","corrected":false,"correctable":false,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":5,"length":5,"line":1,"column":1}},{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Extra empty line detected at class body beginning.","cop_name":"Layout/EmptyLinesAroundClassBody","corrected":false,"correctable":true,"location":{"start_line":2,"start_column":1,"last_line":3,"last_column":0,"length":1,"line":2,"column":1}}]},{"path":"app/views/users/_user.json.jbuilder","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"app/views/users/index.json.jbuilder","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":30,"last_line":1,"last_column":41,"length":12,"line":1,"column":30}}]},{"path":"app/views/users/show.json.jbuilder","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":15,"last_line":1,"last_column":26,"length":12,"line":1,"column":15}}]},{"path":"bin/bundle","offenses":[{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":11,"start_column":9,"last_line":11,"last_column":18,"length":10,"line":11,"column":9}},{"severity":"convention","message":"Prefer `$PROGRAM_NAME` over `$0`.","cop_name":"Style/SpecialGlobalVars","corrected":false,"correctable":true,"location":{"start_line":17,"start_column":22,"last_line":17,"last_column":23,"length":2,"line":17,"column":22}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":21,"start_column":9,"last_line":21,"last_column":25,"length":17,"line":21,"column":9}},{"severity":"convention","message":"Cyclomatic complexity for cli_arg_version is too high. [9/7]","cop_name":"Metrics/CyclomaticComplexity","corrected":false,"correctable":false,"location":{"start_line":24,"start_column":3,"last_line":38,"last_column":5,"length":569,"line":24,"column":3}},{"severity":"convention","message":"Method has too many lines. [13/10]","cop_name":"Metrics/MethodLength","corrected":false,"correctable":false,"location":{"start_line":24,"start_column":3,"last_line":38,"last_column":5,"length":569,"line":24,"column":3}},{"severity":"convention","message":"Perceived complexity for cli_arg_version is too high. [9/8]","cop_name":"Metrics/PerceivedComplexity","corrected":false,"correctable":false,"location":{"start_line":24,"start_column":3,"last_line":38,"last_column":5,"length":569,"line":24,"column":3}},{"severity":"convention","message":"Add empty line after guard clause.","cop_name":"Layout/EmptyLineAfterGuardClause","corrected":false,"correctable":true,"location":{"start_line":26,"start_column":5,"last_line":26,"last_column":57,"length":53,"line":26,"column":5}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":26,"start_column":19,"last_line":26,"last_column":26,"length":8,"line":26,"column":19}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":26,"start_column":54,"last_line":26,"last_column":56,"length":3,"line":26,"column":54}},{"severity":"convention","message":"Favor modifier `if` usage when having a single-line body. Another good alternative is the usage of control flow `&&`/`||`.","cop_name":"Style/IfUnlessModifier","corrected":false,"correctable":true,"location":{"start_line":30,"start_column":7,"last_line":30,"last_column":8,"length":2,"line":30,"column":7}},{"severity":"convention","message":"Add empty line after guard clause.","cop_name":"Layout/EmptyLineAfterGuardClause","corrected":false,"correctable":true,"location":{"start_line":33,"start_column":7,"last_line":33,"last_column":81,"length":75,"line":33,"column":7}},{"severity":"convention","message":"Prefer `Regexp.last_match(1)` over `$1`.","cop_name":"Style/PerlBackrefs","corrected":false,"correctable":true,"location":{"start_line":34,"start_column":25,"last_line":34,"last_column":26,"length":2,"line":34,"column":25}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":41,"start_column":19,"last_line":41,"last_column":34,"length":16,"line":41,"column":19}},{"severity":"convention","message":"Use `expand_path('../Gemfile', __dir__)` instead of `expand_path('../../Gemfile', __FILE__)`.","cop_name":"Style/ExpandPathArguments","corrected":false,"correctable":true,"location":{"start_line":44,"start_column":10,"last_line":44,"last_column":20,"length":11,"line":44,"column":10}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":44,"start_column":22,"last_line":44,"last_column":36,"length":15,"line":44,"column":22}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":50,"start_column":12,"last_line":50,"last_column":20,"length":9,"line":50,"column":12}},{"severity":"convention","message":"Add empty line after guard clause.","cop_name":"Layout/EmptyLineAfterGuardClause","corrected":false,"correctable":true,"location":{"start_line":57,"start_column":5,"last_line":57,"last_column":38,"length":34,"line":57,"column":5}},{"severity":"convention","message":"Add empty line after guard clause.","cop_name":"Layout/EmptyLineAfterGuardClause","corrected":false,"correctable":true,"location":{"start_line":59,"start_column":5,"last_line":59,"last_column":101,"length":97,"line":59,"column":5}},{"severity":"convention","message":"Align the operands of an expression in an assignment spanning multiple lines.","cop_name":"Layout/MultilineOperationIndentation","corrected":false,"correctable":true,"location":{"start_line":66,"start_column":9,"last_line":66,"last_column":24,"length":16,"line":66,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":76,"start_column":81,"last_line":76,"last_column":87,"length":7,"line":76,"column":81}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":78,"start_column":20,"last_line":78,"last_column":23,"length":4,"line":78,"column":20}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":84,"start_column":9,"last_line":84,"last_column":24,"length":16,"line":84,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":91,"start_column":11,"last_line":91,"last_column":19,"length":9,"line":91,"column":11}},{"severity":"convention","message":"Add empty line after guard clause.","cop_name":"Layout/EmptyLineAfterGuardClause","corrected":false,"correctable":true,"location":{"start_line":93,"start_column":5,"last_line":93,"last_column":28,"length":24,"line":93,"column":5}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":95,"start_column":15,"last_line":95,"last_column":31,"length":17,"line":95,"column":15}},{"severity":"convention","message":"Add empty line after guard clause.","cop_name":"Layout/EmptyLineAfterGuardClause","corrected":false,"correctable":true,"location":{"start_line":97,"start_column":5,"last_line":97,"last_column":127,"length":123,"line":97,"column":5}},{"severity":"convention","message":"Modifier form of `if` makes the line too long.","cop_name":"Style/IfUnlessModifier","corrected":false,"correctable":true,"location":{"start_line":97,"start_column":12,"last_line":97,"last_column":13,"length":2,"line":97,"column":12}},{"severity":"convention","message":"Line is too long. [127/120]","cop_name":"Layout/LineLength","corrected":false,"correctable":false,"location":{"start_line":97,"start_column":121,"last_line":97,"last_column":127,"length":7,"line":97,"column":121}},{"severity":"convention","message":"Line is too long. [198/120]","cop_name":"Layout/LineLength","corrected":false,"correctable":false,"location":{"start_line":98,"start_column":121,"last_line":98,"last_column":198,"length":78,"line":98,"column":121}},{"severity":"convention","message":"Favor modifier `if` usage when having a single-line body. Another good alternative is the usage of control flow `&&`/`||`.","cop_name":"Style/IfUnlessModifier","corrected":false,"correctable":true,"location":{"start_line":112,"start_column":1,"last_line":112,"last_column":2,"length":2,"line":112,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":113,"start_column":21,"last_line":113,"last_column":29,"length":9,"line":113,"column":21}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":113,"start_column":32,"last_line":113,"last_column":39,"length":8,"line":113,"column":32}}]},{"path":"bin/rails","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":2,"start_column":23,"last_line":2,"last_column":30,"length":8,"line":2,"column":23}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":18,"last_line":4,"last_column":33,"length":16,"line":4,"column":18}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":5,"start_column":9,"last_line":5,"last_column":24,"length":16,"line":5,"column":9}}]},{"path":"bin/rake","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":2,"start_column":23,"last_line":2,"last_column":30,"length":8,"line":2,"column":23}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":18,"last_line":3,"last_column":33,"length":16,"line":3,"column":18}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":9,"last_line":4,"last_column":14,"length":6,"line":4,"column":9}}]},{"path":"bin/setup","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":2,"start_column":9,"last_line":2,"last_column":19,"length":11,"line":2,"column":9}}]},{"path":"bin/spring","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":2,"start_column":31,"last_line":2,"last_column":43,"length":13,"line":2,"column":31}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":2,"start_column":46,"last_line":2,"last_column":51,"length":6,"line":2,"column":46}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":2,"start_column":67,"last_line":2,"last_column":77,"length":11,"line":2,"column":67}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":7,"last_line":3,"last_column":15,"length":9,"line":3,"column":7}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":11,"last_line":4,"last_column":19,"length":9,"line":4,"column":11}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":7,"start_column":58,"last_line":7,"last_column":65,"length":8,"line":7,"column":58}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":9,"start_column":9,"last_line":9,"last_column":16,"length":8,"line":9,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":10,"start_column":13,"last_line":10,"last_column":28,"length":16,"line":10,"column":13}}]},{"path":"bin/webpack","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":5,"last_line":3,"last_column":15,"length":11,"line":3,"column":5}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":26,"last_line":3,"last_column":35,"length":10,"line":3,"column":26}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":41,"last_line":3,"last_column":53,"length":13,"line":3,"column":41}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":5,"last_line":4,"last_column":14,"length":10,"line":4,"column":5}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":22,"last_line":4,"last_column":34,"length":13,"line":4,"column":22}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":6,"start_column":9,"last_line":6,"last_column":18,"length":10,"line":6,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":7,"start_column":5,"last_line":7,"last_column":20,"length":16,"line":7,"column":5}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":7,"start_column":44,"last_line":7,"last_column":58,"length":15,"line":7,"column":44}},{"severity":"convention","message":"Align the arguments of a method call if they span more than one line.","cop_name":"Layout/ArgumentAlignment","corrected":false,"correctable":true,"location":{"start_line":8,"start_column":3,"last_line":8,"last_column":33,"length":31,"line":8,"column":3}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":10,"start_column":9,"last_line":10,"last_column":23,"length":15,"line":10,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":12,"start_column":9,"last_line":12,"last_column":19,"length":11,"line":12,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":13,"start_column":9,"last_line":13,"last_column":34,"length":26,"line":13,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":15,"start_column":29,"last_line":15,"last_column":32,"length":4,"line":15,"column":29}}]},{"path":"bin/webpack-dev-server","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":5,"last_line":3,"last_column":15,"length":11,"line":3,"column":5}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":26,"last_line":3,"last_column":35,"length":10,"line":3,"column":26}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":41,"last_line":3,"last_column":53,"length":13,"line":3,"column":41}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":5,"last_line":4,"last_column":14,"length":10,"line":4,"column":5}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":22,"last_line":4,"last_column":34,"length":13,"line":4,"column":22}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":6,"start_column":9,"last_line":6,"last_column":18,"length":10,"line":6,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":7,"start_column":5,"last_line":7,"last_column":20,"length":16,"line":7,"column":5}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":7,"start_column":44,"last_line":7,"last_column":58,"length":15,"line":7,"column":44}},{"severity":"convention","message":"Align the arguments of a method call if they span more than one line.","cop_name":"Layout/ArgumentAlignment","corrected":false,"correctable":true,"location":{"start_line":8,"start_column":3,"last_line":8,"last_column":33,"length":31,"line":8,"column":3}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":10,"start_column":9,"last_line":10,"last_column":23,"length":15,"line":10,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":12,"start_column":9,"last_line":12,"last_column":19,"length":11,"line":12,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":13,"start_column":9,"last_line":13,"last_column":37,"length":29,"line":13,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":15,"start_column":29,"last_line":15,"last_column":32,"length":4,"line":15,"column":29}}]},{"path":"bin/yarn","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Use `reject` instead of inverting `select`.","cop_name":"Style/InverseMethods","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":10,"last_line":5,"last_column":53,"length":94,"line":4,"column":10}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":14,"last_line":4,"last_column":19,"length":6,"line":4,"column":14}},{"severity":"convention","message":"Place the . on the next line, together with the method name.","cop_name":"Layout/DotPosition","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":49,"last_line":4,"last_column":49,"length":1,"line":4,"column":49}},{"severity":"convention","message":"Align `select` with `ENV[\"PATH\"].split(File::PATH_SEPARATOR).` on line 4.","cop_name":"Layout/MultilineMethodCallIndentation","corrected":false,"correctable":true,"location":{"start_line":5,"start_column":5,"last_line":5,"last_column":10,"length":6,"line":5,"column":5}},{"severity":"convention","message":"Place the . on the next line, together with the method name.","cop_name":"Layout/DotPosition","corrected":false,"correctable":true,"location":{"start_line":5,"start_column":54,"last_line":5,"last_column":54,"length":1,"line":5,"column":54}},{"severity":"convention","message":"Align `product` with `ENV[\"PATH\"].split(File::PATH_SEPARATOR).` on line 4.","cop_name":"Layout/MultilineMethodCallIndentation","corrected":false,"correctable":true,"location":{"start_line":6,"start_column":5,"last_line":6,"last_column":11,"length":7,"line":6,"column":5}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":6,"start_column":14,"last_line":6,"last_column":19,"length":6,"line":6,"column":14}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":6,"start_column":22,"last_line":6,"last_column":31,"length":10,"line":6,"column":22}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":6,"start_column":34,"last_line":6,"last_column":43,"length":10,"line":6,"column":34}},{"severity":"convention","message":"Place the . on the next line, together with the method name.","cop_name":"Layout/DotPosition","corrected":false,"correctable":true,"location":{"start_line":6,"start_column":46,"last_line":6,"last_column":46,"length":1,"line":6,"column":46}},{"severity":"convention","message":"Align `map` with `ENV[\"PATH\"].split(File::PATH_SEPARATOR).` on line 4.","cop_name":"Layout/MultilineMethodCallIndentation","corrected":false,"correctable":true,"location":{"start_line":7,"start_column":5,"last_line":7,"last_column":7,"length":3,"line":7,"column":5}},{"severity":"convention","message":"Place the . on the next line, together with the method name.","cop_name":"Layout/DotPosition","corrected":false,"correctable":true,"location":{"start_line":7,"start_column":52,"last_line":7,"last_column":52,"length":1,"line":7,"column":52}},{"severity":"convention","message":"Align `find` with `ENV[\"PATH\"].split(File::PATH_SEPARATOR).` on line 4.","cop_name":"Layout/MultilineMethodCallIndentation","corrected":false,"correctable":true,"location":{"start_line":8,"start_column":5,"last_line":8,"last_column":8,"length":4,"line":8,"column":5}},{"severity":"convention","message":"Use `warn` instead of `$stderr.puts` to allow such output to be disabled.","cop_name":"Style/StderrPuts","corrected":false,"correctable":true,"location":{"start_line":13,"start_column":5,"last_line":13,"last_column":16,"length":12,"line":13,"column":5}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":13,"start_column":18,"last_line":13,"last_column":66,"length":49,"line":13,"column":18}},{"severity":"convention","message":"Use `warn` instead of `$stderr.puts` to allow such output to be disabled.","cop_name":"Style/StderrPuts","corrected":false,"correctable":true,"location":{"start_line":14,"start_column":5,"last_line":14,"last_column":16,"length":12,"line":14,"column":5}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":14,"start_column":18,"last_line":14,"last_column":71,"length":54,"line":14,"column":18}}]},{"path":"config.ru","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":18,"last_line":3,"last_column":37,"length":20,"line":3,"column":18}}]},{"path":"config/application.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":18,"last_line":1,"last_column":23,"length":6,"line":1,"column":18}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":9,"last_line":3,"last_column":19,"length":11,"line":3,"column":9}},{"severity":"convention","message":"Missing top-level class documentation comment.","cop_name":"Style/Documentation","corrected":false,"correctable":false,"location":{"start_line":10,"start_column":3,"last_line":10,"last_column":7,"length":5,"line":10,"column":3}},{"severity":"convention","message":"`%W`-literals should be delimited by `[` and `]`.","cop_name":"Style/PercentLiteralDelimiters","corrected":false,"correctable":true,"location":{"start_line":21,"start_column":30,"last_line":21,"last_column":64,"length":35,"line":21,"column":30}},{"severity":"convention","message":"`%W`-literals should be delimited by `[` and `]`.","cop_name":"Style/PercentLiteralDelimiters","corrected":false,"correctable":true,"location":{"start_line":22,"start_column":30,"last_line":22,"last_column":66,"length":37,"line":22,"column":30}}]},{"path":"config/boot.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":9,"last_line":3,"last_column":23,"length":15,"line":3,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":9,"last_line":4,"last_column":24,"length":16,"line":4,"column":9}}]},{"path":"config/environment.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":2,"start_column":18,"last_line":2,"last_column":30,"length":13,"line":2,"column":18}}]},{"path":"config/environments/development.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":9,"last_line":1,"last_column":46,"length":38,"line":1,"column":9}}]},{"path":"config/environments/production.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":9,"last_line":1,"last_column":46,"length":38,"line":1,"column":9}},{"severity":"convention","message":"Do not use space inside array brackets.","cop_name":"Layout/SpaceInsideArrayLiteralBrackets","corrected":false,"correctable":true,"location":{"start_line":56,"start_column":22,"last_line":56,"last_column":22,"length":1,"line":56,"column":22}},{"severity":"convention","message":"Do not use space inside array brackets.","cop_name":"Layout/SpaceInsideArrayLiteralBrackets","corrected":false,"correctable":false,"location":{"start_line":56,"start_column":34,"last_line":56,"last_column":34,"length":1,"line":56,"column":34}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":91,"start_column":10,"last_line":91,"last_column":30,"length":21,"line":91,"column":10}},{"severity":"convention","message":"Use `$stdout` instead of `STDOUT`.","cop_name":"Style/GlobalStdStream","corrected":false,"correctable":true,"location":{"start_line":92,"start_column":50,"last_line":92,"last_column":55,"length":6,"line":92,"column":50}}]},{"path":"config/environments/test.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":9,"last_line":1,"last_column":46,"length":38,"line":1,"column":9}}]},{"path":"config/initializers/application_controller_renderer.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"config/initializers/assets.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"config/initializers/backtrace_silencers.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":8,"start_column":50,"last_line":8,"last_column":60,"length":11,"line":8,"column":50}}]},{"path":"config/initializers/content_security_policy.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"config/initializers/cookies_serializer.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"config/initializers/filter_parameter_logging.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Use `%i` or `%I` for an array of symbols.","cop_name":"Style/SymbolArray","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":47,"last_line":6,"last_column":1,"length":77,"line":4,"column":47}}]},{"path":"config/initializers/inflections.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"config/initializers/mime_types.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"config/initializers/permissions_policy.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"config/initializers/wrap_parameters.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"config/puma.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Use `fetch(\"RAILS_MAX_THREADS\", 5)` instead of `fetch(\"RAILS_MAX_THREADS\") { 5 }`.","cop_name":"Style/RedundantFetchBlock","corrected":false,"correctable":true,"location":{"start_line":7,"start_column":25,"last_line":7,"last_column":56,"length":32,"line":7,"column":25}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":7,"start_column":31,"last_line":7,"last_column":49,"length":19,"line":7,"column":31}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":8,"start_column":31,"last_line":8,"last_column":49,"length":19,"line":8,"column":31}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":14,"start_column":34,"last_line":14,"last_column":44,"length":11,"line":14,"column":34}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":14,"start_column":47,"last_line":14,"last_column":59,"length":13,"line":14,"column":47}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":14,"start_column":65,"last_line":14,"last_column":77,"length":13,"line":14,"column":65}},{"severity":"convention","message":"Use `fetch(\"PORT\", 3000)` instead of `fetch(\"PORT\") { 3000 }`.","cop_name":"Style/RedundantFetchBlock","corrected":false,"correctable":true,"location":{"start_line":18,"start_column":10,"last_line":18,"last_column":31,"length":22,"line":18,"column":10}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":18,"start_column":16,"last_line":18,"last_column":21,"length":6,"line":18,"column":16}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":22,"start_column":23,"last_line":22,"last_column":33,"length":11,"line":22,"column":23}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":22,"start_column":38,"last_line":22,"last_column":50,"length":13,"line":22,"column":38}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":25,"start_column":19,"last_line":25,"last_column":27,"length":9,"line":25,"column":19}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":25,"start_column":32,"last_line":25,"last_column":52,"length":21,"line":25,"column":32}}]},{"path":"config/routes.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"config/spring.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":2,"start_column":3,"last_line":2,"last_column":17,"length":15,"line":2,"column":3}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":3,"last_line":3,"last_column":15,"length":13,"line":3,"column":3}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":4,"start_column":3,"last_line":4,"last_column":19,"length":17,"line":4,"column":3}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":5,"start_column":3,"last_line":5,"last_column":23,"length":21,"line":5,"column":3}}]},{"path":"db/migrate/20210724061210_create_users.rb","offenses":[{"severity":"convention","message":"Missing top-level class documentation comment.","cop_name":"Style/Documentation","corrected":false,"correctable":false,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":5,"length":5,"line":1,"column":1}},{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"db/schema.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Use underscores(_) as thousands separator and separate every 3 digits with them.","cop_name":"Style/NumericLiterals","corrected":false,"correctable":true,"location":{"start_line":13,"start_column":38,"last_line":13,"last_column":54,"length":17,"line":13,"column":38}},{"severity":"convention","message":"Extra empty line detected at block body beginning.","cop_name":"Layout/EmptyLinesAroundBlockBody","corrected":false,"correctable":true,"location":{"start_line":14,"start_column":1,"last_line":15,"last_column":0,"length":1,"line":14,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":16,"start_column":20,"last_line":16,"last_column":28,"length":9,"line":16,"column":20}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":18,"start_column":16,"last_line":18,"last_column":22,"length":7,"line":18,"column":16}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":19,"start_column":14,"last_line":19,"last_column":19,"length":6,"line":19,"column":14}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":20,"start_column":15,"last_line":20,"last_column":21,"length":7,"line":20,"column":15}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":21,"start_column":16,"last_line":21,"last_column":27,"length":12,"line":21,"column":16}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":22,"start_column":16,"last_line":22,"last_column":27,"length":12,"line":22,"column":16}},{"severity":"convention","message":"Extra empty line detected at block body end.","cop_name":"Layout/EmptyLinesAroundBlockBody","corrected":false,"correctable":true,"location":{"start_line":24,"start_column":1,"last_line":25,"last_column":0,"length":1,"line":24,"column":1}}]},{"path":"db/seeds.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}}]},{"path":"test/application_system_test_case.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":9,"last_line":1,"last_column":21,"length":13,"line":1,"column":9}}]},{"path":"test/channels/application_cable/connection_test.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":9,"last_line":1,"last_column":21,"length":13,"line":1,"column":9}},{"severity":"convention","message":"Use nested module/class definitions instead of compact style.","cop_name":"Style/ClassAndModuleChildren","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":7,"last_line":3,"last_column":38,"length":32,"line":3,"column":7}}]},{"path":"test/controllers/users_controller_test.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":9,"last_line":1,"last_column":21,"length":13,"line":1,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":8,"start_column":8,"last_line":8,"last_column":25,"length":18,"line":8,"column":8}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":13,"start_column":8,"last_line":13,"last_column":23,"length":16,"line":13,"column":8}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":18,"start_column":8,"last_line":18,"last_column":27,"length":20,"line":18,"column":8}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":26,"start_column":8,"last_line":26,"last_column":25,"length":18,"line":26,"column":8}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":31,"start_column":8,"last_line":31,"last_column":24,"length":17,"line":31,"column":8}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":36,"start_column":8,"last_line":36,"last_column":27,"length":20,"line":36,"column":8}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":41,"start_column":8,"last_line":41,"last_column":28,"length":21,"line":41,"column":8}}]},{"path":"test/models/user_test.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":9,"last_line":1,"last_column":21,"length":13,"line":1,"column":9}}]},{"path":"test/system/users_test.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":9,"last_line":1,"last_column":38,"length":30,"line":1,"column":9}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":8,"start_column":8,"last_line":8,"last_column":27,"length":20,"line":8,"column":8}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":10,"start_column":21,"last_line":10,"last_column":24,"length":4,"line":10,"column":21}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":10,"start_column":33,"last_line":10,"last_column":39,"length":7,"line":10,"column":33}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":13,"start_column":8,"last_line":13,"last_column":24,"length":17,"line":13,"column":8}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":15,"start_column":14,"last_line":15,"last_column":23,"length":10,"line":15,"column":14}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":17,"start_column":11,"last_line":17,"last_column":17,"length":7,"line":17,"column":11}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":18,"start_column":13,"last_line":18,"last_column":18,"length":6,"line":18,"column":13}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":19,"start_column":14,"last_line":19,"last_column":26,"length":13,"line":19,"column":14}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":21,"start_column":17,"last_line":21,"last_column":47,"length":31,"line":21,"column":17}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":22,"start_column":14,"last_line":22,"last_column":19,"length":6,"line":22,"column":14}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":25,"start_column":8,"last_line":25,"last_column":24,"length":17,"line":25,"column":8}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":27,"start_column":14,"last_line":27,"last_column":19,"length":6,"line":27,"column":14}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":29,"start_column":11,"last_line":29,"last_column":17,"length":7,"line":29,"column":11}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":30,"start_column":13,"last_line":30,"last_column":18,"length":6,"line":30,"column":13}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":31,"start_column":14,"last_line":31,"last_column":26,"length":13,"line":31,"column":14}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":33,"start_column":17,"last_line":33,"last_column":47,"length":31,"line":33,"column":17}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":34,"start_column":14,"last_line":34,"last_column":19,"length":6,"line":34,"column":14}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":37,"start_column":8,"last_line":37,"last_column":26,"length":19,"line":37,"column":8}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":40,"start_column":16,"last_line":40,"last_column":24,"length":9,"line":40,"column":16}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":43,"start_column":17,"last_line":43,"last_column":49,"length":33,"line":43,"column":17}}]},{"path":"test/test_helper.rb","offenses":[{"severity":"convention","message":"Missing frozen string literal comment.","cop_name":"Style/FrozenStringLiteralComment","corrected":false,"correctable":true,"location":{"start_line":1,"start_column":1,"last_line":1,"last_column":1,"length":1,"line":1,"column":1}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":2,"start_column":18,"last_line":2,"last_column":40,"length":23,"line":2,"column":18}},{"severity":"convention","message":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","cop_name":"Style/StringLiterals","corrected":false,"correctable":true,"location":{"start_line":3,"start_column":9,"last_line":3,"last_column":25,"length":17,"line":3,"column":9}},{"severity":"convention","message":"Use nested module/class definitions instead of compact style.","cop_name":"Style/ClassAndModuleChildren","corrected":false,"correctable":true,"location":{"start_line":5,"start_column":7,"last_line":5,"last_column":29,"length":23,"line":5,"column":7}}]}],"summary":{"offense_count":256,"target_file_count":55,"inspected_file_count":55}} \ No newline at end of file diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb new file mode 100644 index 0000000..bc9158c --- /dev/null +++ b/spec/models/user_spec.rb @@ -0,0 +1,6 @@ +require 'rails_helper' + +RSpec.describe User do + + +end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb new file mode 100644 index 0000000..e547c44 --- /dev/null +++ b/spec/rails_helper.rb @@ -0,0 +1,69 @@ +require 'simplecov' +require "simplecov_json_formatter" +SimpleCov.start 'rails' +SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter + +# This file is copied to spec/ when you run 'rails generate rspec:install' +require 'spec_helper' +ENV['RAILS_ENV'] ||= 'test' +require File.expand_path('../config/environment', __dir__) +# Prevent database truncation if the environment is production +abort("The Rails environment is running in production mode!") if Rails.env.production? +require 'rspec/rails' +# Add additional requires below this line. Rails is not loaded until this point! + +# Requires supporting ruby files with custom matchers and macros, etc, in +# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are +# run as spec files by default. This means that files in spec/support that end +# in _spec.rb will both be required and run as specs, causing the specs to be +# run twice. It is recommended that you do not name files matching this glob to +# end with _spec.rb. You can configure this pattern with the --pattern +# option on the command line or in ~/.rspec, .rspec or `.rspec-local`. +# +# The following line is provided for convenience purposes. It has the downside +# of increasing the boot-up time by auto-requiring all files in the support +# directory. Alternatively, in the individual `*_spec.rb` files, manually +# require only the support files necessary. +# +# Dir[Rails.root.join('spec', 'support', '**', '*.rb')].sort.each { |f| require f } + +# Checks for pending migrations and applies them before tests are run. +# If you are not using ActiveRecord, you can remove these lines. +begin + ActiveRecord::Migration.maintain_test_schema! +rescue ActiveRecord::PendingMigrationError => e + puts e.to_s.strip + exit 1 +end +RSpec.configure do |config| + # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures + config.fixture_path = "#{::Rails.root}/spec/fixtures" + + # If you're not using ActiveRecord, or you'd prefer not to run each of your + # examples within a transaction, remove the following line or assign false + # instead of true. + config.use_transactional_fixtures = true + + # You can uncomment this line to turn off ActiveRecord support entirely. + # config.use_active_record = false + + # RSpec Rails can automatically mix in different behaviours to your tests + # based on their file location, for example enabling you to call `get` and + # `post` in specs under `spec/controllers`. + # + # You can disable this behaviour by removing the line below, and instead + # explicitly tag your specs with their type, e.g.: + # + # RSpec.describe UsersController, type: :controller do + # # ... + # end + # + # The different available types are documented in the features, such as in + # https://relishapp.com/rspec/rspec-rails/docs + config.infer_spec_type_from_file_location! + + # Filter lines from Rails gems in backtraces. + config.filter_rails_from_backtrace! + # arbitrary gems may also be filtered via: + # config.filter_gems_from_backtrace("gem name") +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..ce33d66 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,96 @@ +# This file was generated by the `rails generate rspec:install` command. Conventionally, all +# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. +# The generated `.rspec` file contains `--require spec_helper` which will cause +# this file to always be loaded, without a need to explicitly require it in any +# files. +# +# Given that it is always loaded, you are encouraged to keep this file as +# light-weight as possible. Requiring heavyweight dependencies from this file +# will add to the boot time of your test suite on EVERY test run, even for an +# individual file that may not need all of that loaded. Instead, consider making +# a separate helper file that requires the additional dependencies and performs +# the additional setup, and require it from the spec files that actually need +# it. +# +# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration +RSpec.configure do |config| + # rspec-expectations config goes here. You can use an alternate + # assertion/expectation library such as wrong or the stdlib/minitest + # assertions if you prefer. + config.expect_with :rspec do |expectations| + # This option will default to `true` in RSpec 4. It makes the `description` + # and `failure_message` of custom matchers include text for helper methods + # defined using `chain`, e.g.: + # be_bigger_than(2).and_smaller_than(4).description + # # => "be bigger than 2 and smaller than 4" + # ...rather than: + # # => "be bigger than 2" + expectations.include_chain_clauses_in_custom_matcher_descriptions = true + end + + # rspec-mocks config goes here. You can use an alternate test double + # library (such as bogus or mocha) by changing the `mock_with` option here. + config.mock_with :rspec do |mocks| + # Prevents you from mocking or stubbing a method that does not exist on + # a real object. This is generally recommended, and will default to + # `true` in RSpec 4. + mocks.verify_partial_doubles = true + end + + # This option will default to `:apply_to_host_groups` in RSpec 4 (and will + # have no way to turn it off -- the option exists only for backwards + # compatibility in RSpec 3). It causes shared context metadata to be + # inherited by the metadata hash of host groups and examples, rather than + # triggering implicit auto-inclusion in groups with matching metadata. + config.shared_context_metadata_behavior = :apply_to_host_groups + +# The settings below are suggested to provide a good initial experience +# with RSpec, but feel free to customize to your heart's content. +=begin + # This allows you to limit a spec run to individual examples or groups + # you care about by tagging them with `:focus` metadata. When nothing + # is tagged with `:focus`, all examples get run. RSpec also provides + # aliases for `it`, `describe`, and `context` that include `:focus` + # metadata: `fit`, `fdescribe` and `fcontext`, respectively. + config.filter_run_when_matching :focus + + # Allows RSpec to persist some state between runs in order to support + # the `--only-failures` and `--next-failure` CLI options. We recommend + # you configure your source control system to ignore this file. + config.example_status_persistence_file_path = "spec/examples.txt" + + # Limits the available syntax to the non-monkey patched syntax that is + # recommended. For more details, see: + # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ + # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ + # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode + config.disable_monkey_patching! + + # Many RSpec users commonly either run the entire suite or an individual + # file, and it's useful to allow more verbose output when running an + # individual spec file. + if config.files_to_run.one? + # Use the documentation formatter for detailed output, + # unless a formatter has already been configured + # (e.g. via a command-line flag). + config.default_formatter = "doc" + end + + # Print the 10 slowest examples and example groups at the + # end of the spec run, to help surface which specs are running + # particularly slow. + config.profile_examples = 10 + + # Run specs in random order to surface order dependencies. If you find an + # order dependency and want to debug it, you can fix the order by providing + # the seed, which is printed after each run. + # --seed 1234 + config.order = :random + + # Seed global randomization in this process using the `--seed` CLI option. + # Setting this allows you to use `--seed` to deterministically reproduce + # test failures related to randomization by passing the same `--seed` value + # as the one that triggered the failure. + Kernel.srand config.seed +=end +end