armadura 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +17 -0
- data/README.md +0 -8
- data/armadura.gemspec +1 -1
- data/lib/armadura/app_builder.rb +14 -14
- data/lib/armadura/generators/app_generator.rb +3 -0
- data/lib/armadura/generators/stylesheet_base_generator.rb +1 -1
- data/lib/armadura/version.rb +1 -1
- data/spec/features/bower_spec.rb +23 -0
- data/spec/features/heroku_spec.rb +2 -2
- data/spec/features/new_project_spec.rb +4 -0
- data/spec/features/teaspoon_spec.rb +19 -0
- data/templates/Gemfile.erb +2 -0
- data/templates/Procfile +1 -1
- data/templates/README.md.erb +70 -16
- data/templates/armadura_gitignore +1 -0
- data/templates/bin_setup.erb +76 -0
- data/templates/bower.json.erb +8 -0
- data/templates/dotfiles/.eslintrc.yml +49 -0
- data/templates/dotfiles/.rubocop.yml +632 -0
- metadata +12 -4
- data/templates/bin_setup +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec32599e8aaa9bdd3a835869b60b40ee068db547
|
4
|
+
data.tar.gz: 4d9ec3f339229d330465d65891b6adc68760b0ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13307c4ccee9bfeb2941758e42b882c453a96c5d98a2dbc600bdec76639df599220434f8ac6051392e3706e8938bd3250b9ac458d5bcbb0234ab795e005eec39
|
7
|
+
data.tar.gz: 0a63e28b2ccd8fdd870f6a03e5a61a69c1751598db80e25ff694be322291a4b1558b41f91fcaadecf929e61df8a931a3dc083846bbbe26dfb41fd34a8203d28f
|
data/HISTORY.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# History of releases
|
2
|
+
|
3
|
+
## 0.1.2 (Nov 30, 2016)
|
4
|
+
|
5
|
+
* Upgrade Bourbon to 5.0.0.beta.7.
|
6
|
+
* Generated apps now include Bower and Teaspoon.
|
7
|
+
* Fix generated Procfile so that Sidekiq is run instead of Delayed Job.
|
8
|
+
* Add config files for Rubocop and ESLint so that Ruby and JavaScript files are
|
9
|
+
automatically parsed.
|
10
|
+
|
11
|
+
## 0.1.1 (Sept, 19, 2016)
|
12
|
+
|
13
|
+
* Fix generated Gemfile so that it includes `armadura`.
|
14
|
+
|
15
|
+
## 0.1.0 (Sept, 19, 2016)
|
16
|
+
|
17
|
+
First public release of Armadura.
|
data/README.md
CHANGED
@@ -198,14 +198,6 @@ PostgreSQL needs to be installed and running for the `db:create` rake task.
|
|
198
198
|
If you have problems, please create a
|
199
199
|
[GitHub Issue](https://github.com/mcmire/armadura/issues).
|
200
200
|
|
201
|
-
## Contributing
|
202
|
-
|
203
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
204
|
-
|
205
|
-
Thank you, [contributors]!
|
206
|
-
|
207
|
-
[contributors]: https://github.com/thoughtbot/armadura/graphs/contributors
|
208
|
-
|
209
201
|
## License
|
210
202
|
|
211
203
|
Armadura is copyright © 2016 Elliot Winkler.
|
data/armadura.gemspec
CHANGED
@@ -5,7 +5,7 @@ require 'date'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.required_ruby_version = ">= #{Armadura::RUBY_VERSION}"
|
8
|
-
s.authors = ['Elliot Winkler
|
8
|
+
s.authors = ['Elliot Winkler (elliot.winkler@gmail.com)']
|
9
9
|
s.date = Date.today.strftime('%Y-%m-%d')
|
10
10
|
s.description = "Armadura generates Rails projects, preconfigured with sensible defaults."
|
11
11
|
s.summary = "Armadura generates Rails projects, preconfigured with sensible defaults."
|
data/lib/armadura/app_builder.rb
CHANGED
@@ -93,7 +93,7 @@ module Armadura
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def provide_setup_script
|
96
|
-
template "bin_setup", "bin/setup", force: true
|
96
|
+
template "bin_setup.erb", "bin/setup", force: true
|
97
97
|
run "chmod a+x bin/setup"
|
98
98
|
end
|
99
99
|
|
@@ -266,6 +266,10 @@ config.public_file_server.headers = {
|
|
266
266
|
copy_file "spec_helper.rb", "spec/spec_helper.rb"
|
267
267
|
end
|
268
268
|
|
269
|
+
def remove_test_directory
|
270
|
+
remove_file "test"
|
271
|
+
end
|
272
|
+
|
269
273
|
def configure_ci
|
270
274
|
template "circle.yml.erb", "circle.yml"
|
271
275
|
end
|
@@ -360,19 +364,6 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
|
|
360
364
|
|
361
365
|
def create_deploy_script
|
362
366
|
copy_file "bin_deploy", "bin/deploy"
|
363
|
-
|
364
|
-
instructions = <<-MARKDOWN
|
365
|
-
|
366
|
-
## Deploying
|
367
|
-
|
368
|
-
If you have previously run the `./bin/setup` script,
|
369
|
-
you can deploy to staging and production with:
|
370
|
-
|
371
|
-
$ ./bin/deploy staging
|
372
|
-
$ ./bin/deploy production
|
373
|
-
MARKDOWN
|
374
|
-
|
375
|
-
append_file "README.md", instructions
|
376
367
|
run "chmod a+x bin/deploy"
|
377
368
|
end
|
378
369
|
|
@@ -469,6 +460,15 @@ end
|
|
469
460
|
end
|
470
461
|
end
|
471
462
|
|
463
|
+
def add_bower
|
464
|
+
run "bin/rails g bower:install"
|
465
|
+
template "bower.json.erb", "bower.json", force: true
|
466
|
+
end
|
467
|
+
|
468
|
+
def add_teaspoon
|
469
|
+
run "bin/rails g teaspoon:install"
|
470
|
+
end
|
471
|
+
|
472
472
|
private
|
473
473
|
|
474
474
|
def raise_on_missing_translations_in(environment)
|
@@ -102,6 +102,7 @@ module Armadura
|
|
102
102
|
build :configure_i18n_for_test_environment
|
103
103
|
build :configure_action_mailer_in_specs
|
104
104
|
build :configure_capybara_webkit
|
105
|
+
build :remove_test_directory
|
105
106
|
end
|
106
107
|
|
107
108
|
def setup_production_environment
|
@@ -137,6 +138,8 @@ module Armadura
|
|
137
138
|
build :replace_default_puma_configuration
|
138
139
|
build :set_up_forego
|
139
140
|
build :setup_rack_mini_profiler
|
141
|
+
build :add_bower
|
142
|
+
build :add_teaspoon
|
140
143
|
end
|
141
144
|
|
142
145
|
def setup_git
|
data/lib/armadura/version.rb
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe "Bower" do
|
4
|
+
before(:all) do
|
5
|
+
drop_dummy_database
|
6
|
+
remove_project_directory
|
7
|
+
run_armadura
|
8
|
+
setup_app_dependencies
|
9
|
+
end
|
10
|
+
|
11
|
+
it "adds the Bower gem to the Gemfile" do
|
12
|
+
gemfile = IO.read("#{project_path}/Gemfile")
|
13
|
+
expect(gemfile).to include "bower"
|
14
|
+
end
|
15
|
+
|
16
|
+
it "adds a bower.json file to the project" do
|
17
|
+
expect(File.exist?("#{project_path}/bower.json")).to be true
|
18
|
+
end
|
19
|
+
|
20
|
+
it "adds a .bowerrc file to the project" do
|
21
|
+
expect(File.exist?("#{project_path}/.bowerrc")).to be true
|
22
|
+
end
|
23
|
+
end
|
@@ -38,8 +38,8 @@ RSpec.describe "Heroku" do
|
|
38
38
|
|
39
39
|
readme = IO.read("#{project_path}/README.md")
|
40
40
|
|
41
|
-
expect(readme).to include("
|
42
|
-
expect(readme).to include("
|
41
|
+
expect(readme).to include("bin/deploy staging")
|
42
|
+
expect(readme).to include("bin/deploy production")
|
43
43
|
|
44
44
|
circle_yml_path = "#{project_path}/circle.yml"
|
45
45
|
circle_yml = IO.read(circle_yml_path)
|
@@ -271,6 +271,10 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
271
271
|
expect(app_js).not_to match(/turbolinks/)
|
272
272
|
end
|
273
273
|
|
274
|
+
it "removes the test directory" do
|
275
|
+
expect(File.exist?("#{project_path}/test")).to be false
|
276
|
+
end
|
277
|
+
|
274
278
|
def development_config
|
275
279
|
@_development_config ||=
|
276
280
|
read_project_file %w(config environments development.rb)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe "Teaspoon" do
|
4
|
+
before(:all) do
|
5
|
+
drop_dummy_database
|
6
|
+
remove_project_directory
|
7
|
+
run_armadura
|
8
|
+
setup_app_dependencies
|
9
|
+
end
|
10
|
+
|
11
|
+
it "adds the Teaspoon gem to the Gemfile" do
|
12
|
+
gemfile = IO.read("#{project_path}/Gemfile")
|
13
|
+
expect(gemfile).to include "teaspoon"
|
14
|
+
end
|
15
|
+
|
16
|
+
it "creates spec/javascripts" do
|
17
|
+
expect(File.exist?("#{project_path}/spec/javascripts")).to be true
|
18
|
+
end
|
19
|
+
end
|
data/templates/Gemfile.erb
CHANGED
@@ -4,6 +4,7 @@ ruby "<%= Armadura::RUBY_VERSION %>"
|
|
4
4
|
|
5
5
|
gem "armadura"
|
6
6
|
gem "autoprefixer-rails"
|
7
|
+
gem "bower"
|
7
8
|
gem "flutie"
|
8
9
|
gem "jquery-rails"
|
9
10
|
gem "normalize-rails", "~> 3.0.0"
|
@@ -38,6 +39,7 @@ group :development, :test do
|
|
38
39
|
gem "pry-byebug"
|
39
40
|
gem "pry-rails"
|
40
41
|
gem "rspec-rails", "~> 3.5.0.beta4"
|
42
|
+
gem "teaspoon-jasmine"
|
41
43
|
end
|
42
44
|
|
43
45
|
group :development, :staging do
|
data/templates/Procfile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
web: bundle exec puma -p $PORT -C ./config/puma.rb
|
2
|
-
worker: bundle exec
|
2
|
+
worker: bundle exec sidekiq
|
data/templates/README.md.erb
CHANGED
@@ -1,28 +1,82 @@
|
|
1
|
-
# <%= app_name.
|
1
|
+
# <%= app_name.gsub("-", "_").titleize %>
|
2
2
|
|
3
|
-
|
3
|
+
[YOU SHOULD FILL ME IN: What does this app do?]
|
4
4
|
|
5
|
-
|
6
|
-
with the necessary dependencies to run and test this app:
|
5
|
+
## Quick links
|
7
6
|
|
8
|
-
|
7
|
+
* **Staging:** [FILL ME IN]
|
8
|
+
* **Production:** [FILL ME IN]
|
9
|
+
* **Trello:** [FILL ME IN]
|
10
|
+
* **GitHub:** [FILL ME IN]
|
11
|
+
* ...
|
9
12
|
|
10
|
-
|
11
|
-
your machine with [this script].
|
13
|
+
## Architecture
|
12
14
|
|
13
|
-
|
15
|
+
* **Backend:** Ruby on Rails 4, PostgreSQL, Redis (for background jobs)
|
16
|
+
* **Frontend:** ES2015 (transpiled using [Babel] to ES5)
|
14
17
|
|
15
|
-
|
18
|
+
[Babel]: http://babeljs.io
|
16
19
|
|
17
|
-
|
20
|
+
## Getting started
|
21
|
+
|
22
|
+
After you've cloned this repo, run the following script to install backend and
|
23
|
+
frontend dependencies and set up the database:
|
24
|
+
|
25
|
+
bin/setup
|
26
|
+
|
27
|
+
This assumes that you have Ruby, PostgreSQL, and Redis installed on your
|
28
|
+
computer. If you don't, then you'll be given the appropriate instructions to
|
29
|
+
install these dependencies first.
|
30
|
+
|
31
|
+
To run the app, use [Heroku Local]:
|
32
|
+
|
33
|
+
heroku local
|
18
34
|
|
19
35
|
[Heroku Local]: https://devcenter.heroku.com/articles/heroku-local
|
20
36
|
|
21
|
-
##
|
37
|
+
## Development workflow
|
38
|
+
|
39
|
+
* The mainline branch is `master`.
|
40
|
+
* Create a card for a feature or bugfix on Trello.
|
41
|
+
* Cut feature or bugfix branches off of `master`.
|
42
|
+
* Write tests.
|
43
|
+
* Create pull requests on GitHub and get others to review your work.
|
44
|
+
* Rebase and squash your commits if needed to prevent cluttering up the history
|
45
|
+
with needless commits.
|
46
|
+
* Merge those branches into `master` using `--ff-only` to prevent merge commits
|
47
|
+
from being created.
|
48
|
+
* Deploy changes to staging so that the client can try out those changes in a
|
49
|
+
live environment.
|
50
|
+
* Move cards on Trello to the appropriate columns as you are working.
|
51
|
+
|
52
|
+
## Testing
|
53
|
+
|
54
|
+
[RSpec] is used to write tests for Ruby code.
|
55
|
+
|
56
|
+
You can run the test suite for the project by saying:
|
57
|
+
|
58
|
+
bundle exec rake
|
59
|
+
|
60
|
+
[RSpec]: http://rspec.info
|
61
|
+
|
62
|
+
## Style
|
63
|
+
|
64
|
+
Ruby and JavaScript code follows a consistent style, enforced by [Rubocop] and
|
65
|
+
[ESLint]. Configure your editor to run code you write against these tools.
|
66
|
+
Configuration is kept in [`.rubocop.yml`](.rubocop.yml) and
|
67
|
+
[`.eslintrc.yml`](.eslintrc.yml).
|
68
|
+
|
69
|
+
[Rubocop]: https://github.com/bbatsov/rubocop
|
70
|
+
[ESLint]: http://eslint.org/
|
71
|
+
|
72
|
+
## Deployment
|
73
|
+
|
74
|
+
There are two versions of the app, staging and production, and they are hosted
|
75
|
+
on [Heroku].
|
76
|
+
|
77
|
+
To deploy staging, choose one of:
|
22
78
|
|
23
|
-
|
24
|
-
|
79
|
+
bin/deploy staging
|
80
|
+
bin/deploy production
|
25
81
|
|
26
|
-
|
27
|
-
* [Best Practices](http://github.com/thoughtbot/guides/blob/master/best-practices)
|
28
|
-
* [Style](http://github.com/thoughtbot/guides/blob/master/style)
|
82
|
+
[Heroku]: http://heroku.com
|
@@ -0,0 +1,76 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# Set up the application.
|
4
|
+
# Run this script immediately after cloning the codebase.
|
5
|
+
|
6
|
+
# Exit if any command fails
|
7
|
+
set -e
|
8
|
+
|
9
|
+
echo "=== Ensuring current Ruby version is installed ==="
|
10
|
+
if [[ ! "$(ruby -v)" =~ "<%= Armadura::RUBY_VERSION %>" ]]; then
|
11
|
+
if which rbenv &>/dev/null; then
|
12
|
+
rbenv install <%= Armadura::RUBY_VERSION %>
|
13
|
+
else
|
14
|
+
echo "You don't have Ruby <%= Armadura::RUBY_VERSION %> installed."
|
15
|
+
echo "Use a Ruby version manager such as rbenv or RVM to install it,"
|
16
|
+
echo " then re-run this script when you're done."
|
17
|
+
exit 1
|
18
|
+
fi
|
19
|
+
fi
|
20
|
+
|
21
|
+
echo "=== Ensuring Postgres is installed ==="
|
22
|
+
if ! which pg_config &>/dev/null; then
|
23
|
+
brew install postgresql
|
24
|
+
brew services install postgresql
|
25
|
+
fi
|
26
|
+
|
27
|
+
echo "=== Ensuring Redis is installed ==="
|
28
|
+
if ! which redis-cli &>/dev/null; then
|
29
|
+
brew install redis
|
30
|
+
brew services install redis
|
31
|
+
fi
|
32
|
+
|
33
|
+
echo "=== Ensuring Node is installed ==="
|
34
|
+
if ! which node &>/dev/null; then
|
35
|
+
brew install nodejs
|
36
|
+
fi
|
37
|
+
|
38
|
+
echo "=== Ensuring Heroku is installed ==="
|
39
|
+
if ! which heroku &>/dev/null; then
|
40
|
+
brew install heroku-toolbelt
|
41
|
+
fi
|
42
|
+
|
43
|
+
echo "=== Ensuring Bower is installed ==="
|
44
|
+
if ! which bower &>/dev/null; then
|
45
|
+
npm install -g bower
|
46
|
+
fi
|
47
|
+
|
48
|
+
echo "=== Ensuring Rubocop is installed ==="
|
49
|
+
if ! which rubocop &>/dev/null; then
|
50
|
+
gem install rubocop
|
51
|
+
fi
|
52
|
+
|
53
|
+
echo "=== Ensuring ESLint is installed ==="
|
54
|
+
if ! which eslint &>/dev/null; then
|
55
|
+
npm install -g eslint
|
56
|
+
fi
|
57
|
+
|
58
|
+
echo "=== Installing Ruby dependencies ==="
|
59
|
+
gem install bundler --conservative
|
60
|
+
bundle check || bundle install
|
61
|
+
|
62
|
+
echo "=== Installing JavaScript dependencies ==="
|
63
|
+
bower install
|
64
|
+
|
65
|
+
echo "=== Setting up database ==="
|
66
|
+
bin/rake dev:prime
|
67
|
+
|
68
|
+
echo "=== Adding binstubs to PATH ==="
|
69
|
+
mkdir -p .git/safe
|
70
|
+
|
71
|
+
if [[ -z "$CI" ]]; then
|
72
|
+
if [[ ! -f .env.local ]]; then
|
73
|
+
echo "=== Copying .env to .env.local ==="
|
74
|
+
cp .env .env.local
|
75
|
+
fi
|
76
|
+
fi
|
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
env:
|
3
|
+
browser: true
|
4
|
+
es6: true
|
5
|
+
jquery: true
|
6
|
+
extends: "eslint:recommended"
|
7
|
+
rules:
|
8
|
+
array-bracket-spacing: error
|
9
|
+
array-callback-return: error
|
10
|
+
block-scoped-var: error
|
11
|
+
block-spacing: error
|
12
|
+
brace-style: error
|
13
|
+
camelcase: error
|
14
|
+
comma-dangle: ["error", "always-multiline"]
|
15
|
+
comma-style: error
|
16
|
+
complexity: error
|
17
|
+
curly: error
|
18
|
+
default-case: error
|
19
|
+
eol-last: error
|
20
|
+
eqeqeq: ["error", "smart"]
|
21
|
+
func-call-spacing: error
|
22
|
+
indent: ["error", 2]
|
23
|
+
max-len: error
|
24
|
+
no-caller: error
|
25
|
+
no-catch-shadow: error
|
26
|
+
no-lonely-if: error
|
27
|
+
no-loop-func: error
|
28
|
+
no-magic-numbers: error
|
29
|
+
no-multiple-empty-lines: error
|
30
|
+
no-param-reassign: error
|
31
|
+
no-redeclare: error
|
32
|
+
no-shadow: error
|
33
|
+
no-ternary: error
|
34
|
+
no-trailing-spaces: error
|
35
|
+
no-unneeded-ternary: error
|
36
|
+
no-unused-expressions: error
|
37
|
+
no-var: error
|
38
|
+
no-with: error
|
39
|
+
one-var: ["error", "never"]
|
40
|
+
prefer-const: error
|
41
|
+
prefer-rest-arguments: error
|
42
|
+
prefer-spread: error
|
43
|
+
prefer-template: error
|
44
|
+
quotes: error
|
45
|
+
semi: ["error", "never"]
|
46
|
+
space-before-blocks: error
|
47
|
+
vars-on-top: error
|
48
|
+
wrap-iife: error
|
49
|
+
yoda: error
|
@@ -0,0 +1,632 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- db/schema.rb
|
4
|
+
|
5
|
+
Style/AccessorMethodName:
|
6
|
+
Description: Check the naming of accessor methods for get_/set_.
|
7
|
+
Enabled: false
|
8
|
+
|
9
|
+
Style/Alias:
|
10
|
+
Description: 'Use alias_method instead of alias.'
|
11
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
Style/ArrayJoin:
|
15
|
+
Description: 'Use Array#join instead of Array#*.'
|
16
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
Style/AsciiComments:
|
20
|
+
Description: 'Use only ascii symbols in comments.'
|
21
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Style/AsciiIdentifiers:
|
25
|
+
Description: 'Use only ascii symbols in identifiers.'
|
26
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
Style/Attr:
|
30
|
+
Description: 'Checks for uses of Module#attr.'
|
31
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Metrics/BlockNesting:
|
35
|
+
Description: 'Avoid excessive block nesting'
|
36
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
Style/CaseEquality:
|
40
|
+
Description: 'Avoid explicit use of the case equality operator(===).'
|
41
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Style/CharacterLiteral:
|
45
|
+
Description: 'Checks for uses of character literals.'
|
46
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
Style/ClassAndModuleChildren:
|
50
|
+
Description: 'Checks style of children classes and modules.'
|
51
|
+
Enabled: true
|
52
|
+
EnforcedStyle: nested
|
53
|
+
|
54
|
+
Metrics/ClassLength:
|
55
|
+
Description: 'Avoid classes longer than 100 lines of code.'
|
56
|
+
Enabled: false
|
57
|
+
|
58
|
+
Metrics/ModuleLength:
|
59
|
+
Description: 'Avoid modules longer than 100 lines of code.'
|
60
|
+
Enabled: false
|
61
|
+
|
62
|
+
Style/ClassVars:
|
63
|
+
Description: 'Avoid the use of class variables.'
|
64
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
|
65
|
+
Enabled: false
|
66
|
+
|
67
|
+
Style/CollectionMethods:
|
68
|
+
Enabled: true
|
69
|
+
PreferredMethods:
|
70
|
+
find: detect
|
71
|
+
inject: reduce
|
72
|
+
collect: map
|
73
|
+
find_all: select
|
74
|
+
|
75
|
+
Style/ColonMethodCall:
|
76
|
+
Description: 'Do not use :: for method call.'
|
77
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
|
78
|
+
Enabled: false
|
79
|
+
|
80
|
+
Style/CommentAnnotation:
|
81
|
+
Description: >-
|
82
|
+
Checks formatting of special comments
|
83
|
+
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
84
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
|
85
|
+
Enabled: false
|
86
|
+
|
87
|
+
Metrics/AbcSize:
|
88
|
+
Description: >-
|
89
|
+
A calculated magnitude based on number of assignments,
|
90
|
+
branches, and conditions.
|
91
|
+
Enabled: false
|
92
|
+
|
93
|
+
Metrics/CyclomaticComplexity:
|
94
|
+
Description: >-
|
95
|
+
A complexity metric that is strongly correlated to the number
|
96
|
+
of test cases needed to validate a method.
|
97
|
+
Enabled: false
|
98
|
+
|
99
|
+
Rails/Delegate:
|
100
|
+
Description: 'Prefer delegate method for delegations.'
|
101
|
+
Enabled: false
|
102
|
+
|
103
|
+
Style/DeprecatedHashMethods:
|
104
|
+
Description: 'Checks for use of deprecated Hash methods.'
|
105
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
|
106
|
+
Enabled: false
|
107
|
+
|
108
|
+
Style/Documentation:
|
109
|
+
Description: 'Document classes and non-namespace modules.'
|
110
|
+
Enabled: false
|
111
|
+
|
112
|
+
Style/DotPosition:
|
113
|
+
Description: 'Checks the position of the dot in multi-line method calls.'
|
114
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
|
115
|
+
EnforcedStyle: trailing
|
116
|
+
|
117
|
+
Style/DoubleNegation:
|
118
|
+
Description: 'Checks for uses of double negation (!!).'
|
119
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
|
120
|
+
Enabled: false
|
121
|
+
|
122
|
+
Style/EachWithObject:
|
123
|
+
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
124
|
+
Enabled: false
|
125
|
+
|
126
|
+
Style/EmptyLiteral:
|
127
|
+
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
128
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
|
129
|
+
Enabled: false
|
130
|
+
|
131
|
+
# Checks whether the source file has a utf-8 encoding comment or not
|
132
|
+
# AutoCorrectEncodingComment must match the regex
|
133
|
+
# /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
|
134
|
+
Style/Encoding:
|
135
|
+
Enabled: false
|
136
|
+
|
137
|
+
Style/EvenOdd:
|
138
|
+
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
|
139
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
140
|
+
Enabled: false
|
141
|
+
|
142
|
+
Style/ExtraSpacing:
|
143
|
+
Description: 'Do not use unnecessary spacing.'
|
144
|
+
Enabled: true
|
145
|
+
|
146
|
+
Style/FileName:
|
147
|
+
Description: 'Use snake_case for source file names.'
|
148
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
|
149
|
+
Enabled: false
|
150
|
+
|
151
|
+
Style/FrozenStringLiteralComment:
|
152
|
+
Description: >-
|
153
|
+
Add the frozen_string_literal comment to the top of files
|
154
|
+
to help transition from Ruby 2.3.0 to Ruby 3.0.
|
155
|
+
Enabled: false
|
156
|
+
|
157
|
+
Style/FlipFlop:
|
158
|
+
Description: 'Checks for flip flops'
|
159
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
|
160
|
+
Enabled: false
|
161
|
+
|
162
|
+
Style/FormatString:
|
163
|
+
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
164
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
|
165
|
+
Enabled: false
|
166
|
+
|
167
|
+
Style/GlobalVars:
|
168
|
+
Description: 'Do not introduce global variables.'
|
169
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
|
170
|
+
Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
|
171
|
+
Enabled: false
|
172
|
+
|
173
|
+
Style/GuardClause:
|
174
|
+
Description: 'Check for conditionals that can be replaced with guard clauses'
|
175
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
176
|
+
Enabled: false
|
177
|
+
|
178
|
+
Style/IfUnlessModifier:
|
179
|
+
Description: >-
|
180
|
+
Favor modifier if/unless usage when you have a
|
181
|
+
single-line body.
|
182
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
|
183
|
+
Enabled: false
|
184
|
+
|
185
|
+
Style/IfWithSemicolon:
|
186
|
+
Description: 'Do not use if x; .... Use the ternary operator instead.'
|
187
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
|
188
|
+
Enabled: false
|
189
|
+
|
190
|
+
Style/InlineComment:
|
191
|
+
Description: 'Avoid inline comments.'
|
192
|
+
Enabled: false
|
193
|
+
|
194
|
+
Style/Lambda:
|
195
|
+
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
196
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
|
197
|
+
Enabled: false
|
198
|
+
|
199
|
+
Style/LambdaCall:
|
200
|
+
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
201
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
|
202
|
+
Enabled: false
|
203
|
+
|
204
|
+
Style/LineEndConcatenation:
|
205
|
+
Description: >-
|
206
|
+
Use \ instead of + or << to concatenate two string literals at
|
207
|
+
line end.
|
208
|
+
Enabled: false
|
209
|
+
|
210
|
+
Metrics/LineLength:
|
211
|
+
Description: 'Limit lines to 80 characters.'
|
212
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
|
213
|
+
Max: 80
|
214
|
+
|
215
|
+
Metrics/MethodLength:
|
216
|
+
Description: 'Avoid methods longer than 10 lines of code.'
|
217
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
|
218
|
+
Enabled: false
|
219
|
+
|
220
|
+
Style/ModuleFunction:
|
221
|
+
Description: 'Checks for usage of `extend self` in modules.'
|
222
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
|
223
|
+
Enabled: false
|
224
|
+
|
225
|
+
Style/MultilineOperationIndentation:
|
226
|
+
Description: >-
|
227
|
+
Checks indentation of binary operations that span more than
|
228
|
+
one line.
|
229
|
+
Enabled: true
|
230
|
+
EnforcedStyle: indented
|
231
|
+
|
232
|
+
Style/MultilineBlockChain:
|
233
|
+
Description: 'Avoid multi-line chains of blocks.'
|
234
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
235
|
+
Enabled: false
|
236
|
+
|
237
|
+
Style/MultilineMethodCallIndentation:
|
238
|
+
Description: >-
|
239
|
+
Checks indentation of method calls with the dot operator
|
240
|
+
that span more than one line.
|
241
|
+
Enabled: true
|
242
|
+
EnforcedStyle: indented
|
243
|
+
|
244
|
+
Style/NegatedIf:
|
245
|
+
Description: >-
|
246
|
+
Favor unless over if for negative conditions
|
247
|
+
(or control flow or).
|
248
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
|
249
|
+
Enabled: false
|
250
|
+
|
251
|
+
Style/NegatedWhile:
|
252
|
+
Description: 'Favor until over while for negative conditions.'
|
253
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
|
254
|
+
Enabled: false
|
255
|
+
|
256
|
+
Style/Next:
|
257
|
+
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
258
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
259
|
+
Enabled: false
|
260
|
+
|
261
|
+
Style/NilComparison:
|
262
|
+
Description: 'Prefer x.nil? to x == nil.'
|
263
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
264
|
+
Enabled: false
|
265
|
+
|
266
|
+
Style/Not:
|
267
|
+
Description: 'Use ! instead of not.'
|
268
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
|
269
|
+
Enabled: false
|
270
|
+
|
271
|
+
Style/NumericLiterals:
|
272
|
+
Description: >-
|
273
|
+
Add underscores to large numeric literals to improve their
|
274
|
+
readability.
|
275
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
|
276
|
+
Enabled: false
|
277
|
+
|
278
|
+
Style/OneLineConditional:
|
279
|
+
Description: >-
|
280
|
+
Favor the ternary operator(?:) over
|
281
|
+
if/then/else/end constructs.
|
282
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
|
283
|
+
Enabled: false
|
284
|
+
|
285
|
+
Style/OpMethod:
|
286
|
+
Description: 'When defining binary operators, name the argument other.'
|
287
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
|
288
|
+
Enabled: false
|
289
|
+
|
290
|
+
Metrics/ParameterLists:
|
291
|
+
Description: 'Avoid parameter lists longer than three or four parameters.'
|
292
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
|
293
|
+
Enabled: false
|
294
|
+
|
295
|
+
Style/PercentLiteralDelimiters:
|
296
|
+
Description: 'Use `%`-literal delimiters consistently'
|
297
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
|
298
|
+
Enabled: false
|
299
|
+
|
300
|
+
Style/PerlBackrefs:
|
301
|
+
Description: 'Avoid Perl-style regex back references.'
|
302
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
|
303
|
+
Enabled: false
|
304
|
+
|
305
|
+
Style/PredicateName:
|
306
|
+
Description: 'Check the names of predicate methods.'
|
307
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
|
308
|
+
NamePrefixBlacklist:
|
309
|
+
- is_
|
310
|
+
Exclude:
|
311
|
+
- spec/**/*
|
312
|
+
|
313
|
+
Style/Proc:
|
314
|
+
Description: 'Use proc instead of Proc.new.'
|
315
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
|
316
|
+
Enabled: false
|
317
|
+
|
318
|
+
Style/RaiseArgs:
|
319
|
+
Description: 'Checks the arguments passed to raise/fail.'
|
320
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
|
321
|
+
Enabled: false
|
322
|
+
|
323
|
+
Style/RegexpLiteral:
|
324
|
+
Description: 'Use / or %r around regular expressions.'
|
325
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
|
326
|
+
Enabled: false
|
327
|
+
|
328
|
+
Style/SelfAssignment:
|
329
|
+
Description: >-
|
330
|
+
Checks for places where self-assignment shorthand should have
|
331
|
+
been used.
|
332
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
|
333
|
+
Enabled: false
|
334
|
+
|
335
|
+
Style/SingleLineBlockParams:
|
336
|
+
Description: 'Enforces the names of some block params.'
|
337
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
|
338
|
+
Enabled: false
|
339
|
+
|
340
|
+
Style/SingleLineMethods:
|
341
|
+
Description: 'Avoid single-line methods.'
|
342
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
|
343
|
+
Enabled: false
|
344
|
+
|
345
|
+
Style/SignalException:
|
346
|
+
Description: 'Checks for proper usage of fail and raise.'
|
347
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
|
348
|
+
Enabled: false
|
349
|
+
|
350
|
+
Style/SpecialGlobalVars:
|
351
|
+
Description: 'Avoid Perl-style global variables.'
|
352
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
|
353
|
+
Enabled: false
|
354
|
+
|
355
|
+
Style/StringLiterals:
|
356
|
+
Description: 'Checks if uses of quotes match the configured preference.'
|
357
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
|
358
|
+
EnforcedStyle: double_quotes
|
359
|
+
Enabled: true
|
360
|
+
|
361
|
+
Style/TrailingCommaInArguments:
|
362
|
+
Description: 'Checks for trailing comma in argument lists.'
|
363
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
364
|
+
EnforcedStyleForMultiline: comma
|
365
|
+
SupportedStyles:
|
366
|
+
- comma
|
367
|
+
- consistent_comma
|
368
|
+
- no_comma
|
369
|
+
Enabled: true
|
370
|
+
|
371
|
+
Style/TrailingCommaInLiteral:
|
372
|
+
Description: 'Checks for trailing comma in array and hash literals.'
|
373
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
374
|
+
EnforcedStyleForMultiline: comma
|
375
|
+
SupportedStyles:
|
376
|
+
- comma
|
377
|
+
- consistent_comma
|
378
|
+
- no_comma
|
379
|
+
Enabled: true
|
380
|
+
|
381
|
+
Style/TrivialAccessors:
|
382
|
+
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
383
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
|
384
|
+
Enabled: false
|
385
|
+
|
386
|
+
Style/VariableInterpolation:
|
387
|
+
Description: >-
|
388
|
+
Don't interpolate global, instance and class variables
|
389
|
+
directly in strings.
|
390
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
|
391
|
+
Enabled: false
|
392
|
+
|
393
|
+
Style/WhenThen:
|
394
|
+
Description: 'Use when x then ... for one-line cases.'
|
395
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
|
396
|
+
Enabled: false
|
397
|
+
|
398
|
+
Style/WhileUntilModifier:
|
399
|
+
Description: >-
|
400
|
+
Favor modifier while/until usage when you have a
|
401
|
+
single-line body.
|
402
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
|
403
|
+
Enabled: false
|
404
|
+
|
405
|
+
Style/WordArray:
|
406
|
+
Description: 'Use %w or %W for arrays of words.'
|
407
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
|
408
|
+
Enabled: false
|
409
|
+
|
410
|
+
# Lint
|
411
|
+
|
412
|
+
Lint/AmbiguousOperator:
|
413
|
+
Description: >-
|
414
|
+
Checks for ambiguous operators in the first argument of a
|
415
|
+
method invocation without parentheses.
|
416
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
|
417
|
+
Enabled: false
|
418
|
+
|
419
|
+
Lint/AmbiguousRegexpLiteral:
|
420
|
+
Description: >-
|
421
|
+
Checks for ambiguous regexp literals in the first argument of
|
422
|
+
a method invocation without parenthesis.
|
423
|
+
Enabled: false
|
424
|
+
|
425
|
+
Lint/AssignmentInCondition:
|
426
|
+
Description: "Don't use assignment in conditions."
|
427
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
|
428
|
+
Enabled: false
|
429
|
+
|
430
|
+
Lint/CircularArgumentReference:
|
431
|
+
Description: "Don't refer to the keyword argument in the default value."
|
432
|
+
Enabled: false
|
433
|
+
|
434
|
+
Lint/ConditionPosition:
|
435
|
+
Description: >-
|
436
|
+
Checks for condition placed in a confusing position relative to
|
437
|
+
the keyword.
|
438
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
|
439
|
+
Enabled: false
|
440
|
+
|
441
|
+
Lint/DeprecatedClassMethods:
|
442
|
+
Description: 'Check for deprecated class method calls.'
|
443
|
+
Enabled: false
|
444
|
+
|
445
|
+
Lint/DuplicatedKey:
|
446
|
+
Description: 'Check for duplicate keys in hash literals.'
|
447
|
+
Enabled: false
|
448
|
+
|
449
|
+
Lint/EachWithObjectArgument:
|
450
|
+
Description: 'Check for immutable argument given to each_with_object.'
|
451
|
+
Enabled: false
|
452
|
+
|
453
|
+
Lint/ElseLayout:
|
454
|
+
Description: 'Check for odd code arrangement in an else block.'
|
455
|
+
Enabled: false
|
456
|
+
|
457
|
+
Lint/FormatParameterMismatch:
|
458
|
+
Description: 'The number of parameters to format/sprint must match the fields.'
|
459
|
+
Enabled: false
|
460
|
+
|
461
|
+
Lint/HandleExceptions:
|
462
|
+
Description: "Don't suppress exception."
|
463
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
|
464
|
+
Enabled: false
|
465
|
+
|
466
|
+
Lint/InvalidCharacterLiteral:
|
467
|
+
Description: >-
|
468
|
+
Checks for invalid character literals with a non-escaped
|
469
|
+
whitespace character.
|
470
|
+
Enabled: false
|
471
|
+
|
472
|
+
Style/InitialIndentation:
|
473
|
+
Description: >-
|
474
|
+
Checks the indentation of the first non-blank non-comment line in a file.
|
475
|
+
Enabled: false
|
476
|
+
|
477
|
+
Lint/LiteralInCondition:
|
478
|
+
Description: 'Checks of literals used in conditions.'
|
479
|
+
Enabled: false
|
480
|
+
|
481
|
+
Lint/LiteralInInterpolation:
|
482
|
+
Description: 'Checks for literals used in interpolation.'
|
483
|
+
Enabled: false
|
484
|
+
|
485
|
+
Lint/Loop:
|
486
|
+
Description: >-
|
487
|
+
Use Kernel#loop with break rather than begin/end/until or
|
488
|
+
begin/end/while for post-loop tests.
|
489
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
|
490
|
+
Enabled: false
|
491
|
+
|
492
|
+
Lint/NestedMethodDefinition:
|
493
|
+
Description: 'Do not use nested method definitions.'
|
494
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
|
495
|
+
Enabled: false
|
496
|
+
|
497
|
+
Lint/NonLocalExitFromIterator:
|
498
|
+
Description: 'Do not use return in iterator to cause non-local exit.'
|
499
|
+
Enabled: false
|
500
|
+
|
501
|
+
Lint/ParenthesesAsGroupedExpression:
|
502
|
+
Description: >-
|
503
|
+
Checks for method calls with a space before the opening
|
504
|
+
parenthesis.
|
505
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
506
|
+
Enabled: false
|
507
|
+
|
508
|
+
Lint/RequireParentheses:
|
509
|
+
Description: >-
|
510
|
+
Use parentheses in the method call to avoid confusion
|
511
|
+
about precedence.
|
512
|
+
Enabled: false
|
513
|
+
|
514
|
+
Lint/UnderscorePrefixedVariableName:
|
515
|
+
Description: 'Do not use prefix `_` for a variable that is used.'
|
516
|
+
Enabled: false
|
517
|
+
|
518
|
+
Lint/UnneededDisable:
|
519
|
+
Description: >-
|
520
|
+
Checks for rubocop:disable comments that can be removed.
|
521
|
+
Note: this cop is not disabled when disabling all cops.
|
522
|
+
It must be explicitly disabled.
|
523
|
+
Enabled: false
|
524
|
+
|
525
|
+
Lint/Void:
|
526
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
527
|
+
Enabled: false
|
528
|
+
|
529
|
+
# Performance
|
530
|
+
|
531
|
+
Performance/CaseWhenSplat:
|
532
|
+
Description: >-
|
533
|
+
Place `when` conditions that use splat at the end
|
534
|
+
of the list of `when` branches.
|
535
|
+
Enabled: false
|
536
|
+
|
537
|
+
Performance/Count:
|
538
|
+
Description: >-
|
539
|
+
Use `count` instead of `select...size`, `reject...size`,
|
540
|
+
`select...count`, `reject...count`, `select...length`,
|
541
|
+
and `reject...length`.
|
542
|
+
Enabled: false
|
543
|
+
|
544
|
+
Performance/Detect:
|
545
|
+
Description: >-
|
546
|
+
Use `detect` instead of `select.first`, `find_all.first`,
|
547
|
+
`select.last`, and `find_all.last`.
|
548
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
549
|
+
Enabled: false
|
550
|
+
|
551
|
+
Performance/FlatMap:
|
552
|
+
Description: >-
|
553
|
+
Use `Enumerable#flat_map`
|
554
|
+
instead of `Enumerable#map...Array#flatten(1)`
|
555
|
+
or `Enumberable#collect..Array#flatten(1)`
|
556
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
|
557
|
+
Enabled: false
|
558
|
+
|
559
|
+
Performance/ReverseEach:
|
560
|
+
Description: 'Use `reverse_each` instead of `reverse.each`.'
|
561
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
|
562
|
+
Enabled: false
|
563
|
+
|
564
|
+
Performance/Sample:
|
565
|
+
Description: >-
|
566
|
+
Use `sample` instead of `shuffle.first`,
|
567
|
+
`shuffle.last`, and `shuffle[Fixnum]`.
|
568
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
|
569
|
+
Enabled: false
|
570
|
+
|
571
|
+
Performance/Size:
|
572
|
+
Description: >-
|
573
|
+
Use `size` instead of `count` for counting
|
574
|
+
the number of elements in `Array` and `Hash`.
|
575
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
|
576
|
+
Enabled: false
|
577
|
+
|
578
|
+
Performance/StringReplacement:
|
579
|
+
Description: >-
|
580
|
+
Use `tr` instead of `gsub` when you are replacing the same
|
581
|
+
number of characters. Use `delete` instead of `gsub` when
|
582
|
+
you are deleting characters.
|
583
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
|
584
|
+
Enabled: false
|
585
|
+
|
586
|
+
# Rails
|
587
|
+
|
588
|
+
Rails/ActionFilter:
|
589
|
+
Description: 'Enforces consistent use of action filter methods.'
|
590
|
+
Enabled: false
|
591
|
+
|
592
|
+
Rails/Date:
|
593
|
+
Description: >-
|
594
|
+
Checks the correct usage of date aware methods,
|
595
|
+
such as Date.today, Date.current etc.
|
596
|
+
Enabled: false
|
597
|
+
|
598
|
+
Rails/FindBy:
|
599
|
+
Description: 'Prefer find_by over where.first.'
|
600
|
+
Enabled: false
|
601
|
+
|
602
|
+
Rails/FindEach:
|
603
|
+
Description: 'Prefer all.find_each over all.find.'
|
604
|
+
Enabled: false
|
605
|
+
|
606
|
+
Rails/HasAndBelongsToMany:
|
607
|
+
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
|
608
|
+
Enabled: false
|
609
|
+
|
610
|
+
Rails/Output:
|
611
|
+
Description: 'Checks for calls to puts, print, etc.'
|
612
|
+
Enabled: false
|
613
|
+
|
614
|
+
Rails/ReadWriteAttribute:
|
615
|
+
Description: >-
|
616
|
+
Checks for read_attribute(:attr) and
|
617
|
+
write_attribute(:attr, val).
|
618
|
+
Enabled: false
|
619
|
+
|
620
|
+
Rails/ScopeArgs:
|
621
|
+
Description: 'Checks the arguments of ActiveRecord scopes.'
|
622
|
+
Enabled: false
|
623
|
+
|
624
|
+
Rails/TimeZone:
|
625
|
+
Description: 'Checks the correct usage of time zone aware methods.'
|
626
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
|
627
|
+
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
|
628
|
+
Enabled: false
|
629
|
+
|
630
|
+
Rails/Validation:
|
631
|
+
Description: 'Use validates :attribute, hash of validations.'
|
632
|
+
Enabled: false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: armadura
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Elliot Winkler
|
7
|
+
- Elliot Winkler (elliot.winkler@gmail.com)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bitters
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- ".ruby-version"
|
80
80
|
- ".travis.yml"
|
81
81
|
- Gemfile
|
82
|
+
- HISTORY.md
|
82
83
|
- LICENSE
|
83
84
|
- README.md
|
84
85
|
- Rakefile
|
@@ -99,11 +100,13 @@ files:
|
|
99
100
|
- spec/adapters/heroku_spec.rb
|
100
101
|
- spec/fakes/bin/heroku
|
101
102
|
- spec/fakes/bin/hub
|
103
|
+
- spec/features/bower_spec.rb
|
102
104
|
- spec/features/cli_help_spec.rb
|
103
105
|
- spec/features/github_spec.rb
|
104
106
|
- spec/features/heroku_spec.rb
|
105
107
|
- spec/features/new_project_spec.rb
|
106
108
|
- spec/features/sidekiq_spec.rb
|
109
|
+
- spec/features/teaspoon_spec.rb
|
107
110
|
- spec/spec_helper.rb
|
108
111
|
- spec/support/armadura.rb
|
109
112
|
- spec/support/fake_github.rb
|
@@ -121,8 +124,9 @@ files:
|
|
121
124
|
- templates/armadura_gitignore
|
122
125
|
- templates/armadura_layout.html.erb.erb
|
123
126
|
- templates/bin_deploy
|
124
|
-
- templates/bin_setup
|
127
|
+
- templates/bin_setup.erb
|
125
128
|
- templates/bin_setup_review_app.erb
|
129
|
+
- templates/bower.json.erb
|
126
130
|
- templates/browserslist
|
127
131
|
- templates/bundler_audit.rake
|
128
132
|
- templates/capybara_webkit.rb
|
@@ -132,6 +136,8 @@ files:
|
|
132
136
|
- templates/dev.rake
|
133
137
|
- templates/dotfiles/.ctags
|
134
138
|
- templates/dotfiles/.env
|
139
|
+
- templates/dotfiles/.eslintrc.yml
|
140
|
+
- templates/dotfiles/.rubocop.yml
|
135
141
|
- templates/errors.rb
|
136
142
|
- templates/factories.rb
|
137
143
|
- templates/factory_girl_rspec.rb
|
@@ -177,11 +183,13 @@ test_files:
|
|
177
183
|
- spec/adapters/heroku_spec.rb
|
178
184
|
- spec/fakes/bin/heroku
|
179
185
|
- spec/fakes/bin/hub
|
186
|
+
- spec/features/bower_spec.rb
|
180
187
|
- spec/features/cli_help_spec.rb
|
181
188
|
- spec/features/github_spec.rb
|
182
189
|
- spec/features/heroku_spec.rb
|
183
190
|
- spec/features/new_project_spec.rb
|
184
191
|
- spec/features/sidekiq_spec.rb
|
192
|
+
- spec/features/teaspoon_spec.rb
|
185
193
|
- spec/spec_helper.rb
|
186
194
|
- spec/support/armadura.rb
|
187
195
|
- spec/support/fake_github.rb
|
data/templates/bin_setup
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
|
3
|
-
# Set up Rails app. Run this script immediately after cloning the codebase.
|
4
|
-
# https://github.com/thoughtbot/guides/tree/master/protocol
|
5
|
-
|
6
|
-
# Exit if any subcommand fails
|
7
|
-
set -e
|
8
|
-
|
9
|
-
# Set up Ruby dependencies via Bundler
|
10
|
-
gem install bundler --conservative
|
11
|
-
bundle check || bundle install
|
12
|
-
|
13
|
-
# Set up database and add any development seed data
|
14
|
-
bin/rake dev:prime
|
15
|
-
|
16
|
-
# Add binstubs to PATH via export PATH=".git/safe/../../bin:$PATH" in ~/.zshenv
|
17
|
-
mkdir -p .git/safe
|
18
|
-
|
19
|
-
# Only if this isn't CI
|
20
|
-
if [ -z "$CI" ]; then
|
21
|
-
cp .env .env.local
|
22
|
-
fi
|