Skip to content

Initial scaffolding#1

Open
dominicsayers wants to merge 13 commits into
mainfrom
initial-scaffolding
Open

Initial scaffolding#1
dominicsayers wants to merge 13 commits into
mainfrom
initial-scaffolding

Conversation

@dominicsayers

Copy link
Copy Markdown
Owner

No description provided.

@dominicsayers
dominicsayers force-pushed the initial-scaffolding branch 10 times, most recently from 75b61b0 to b3bc6ae Compare May 21, 2018 19:29
@dominicsayers
dominicsayers force-pushed the initial-scaffolding branch 3 times, most recently from d356c43 to 3960701 Compare June 18, 2018 14:41
@dominicsayers
dominicsayers force-pushed the initial-scaffolding branch 5 times, most recently from b7a4619 to 802e943 Compare July 17, 2018 23:08
@dominicsayers
dominicsayers force-pushed the initial-scaffolding branch 2 times, most recently from c166481 to f23c92d Compare August 3, 2018 15:11
@dominicsayers
dominicsayers force-pushed the initial-scaffolding branch 10 times, most recently from 84ccf1e to 2283838 Compare August 11, 2018 19:18
@dominicsayers
dominicsayers force-pushed the initial-scaffolding branch 2 times, most recently from 0c5f3f7 to b874c41 Compare November 2, 2019 22:12
@dominicsayers
dominicsayers force-pushed the initial-scaffolding branch 7 times, most recently from e74bdf9 to f02209d Compare June 11, 2020 11:02
@dominicsayers
dominicsayers force-pushed the initial-scaffolding branch 2 times, most recently from 16aea08 to 5ac01f1 Compare June 11, 2020 11:33
Install Yarn as described here: [Install Yarn](https://yarnpkg.com/lang/en/docs/install)

`rails new . -d postgresql --skip-test`
`bundle install`

We won't be using these platforms so no need to cater for them.
This is an opinionated configuration which you of course are at liberty
to amend.

Here are some of the reasons behind these choices:

```
Layout/LineLength:
  Max: 125
```

I defer to Linus Torvalds: https://lkml.org/lkml/2020/5/29/1038

```
Metrics/AbcSize:
  Exclude:
    - db/migrate/**/*
```

The generated migrations sometimes breach this limit. I see no sense in
making people refactor generated code.

```
Metrics/BlockLength:
  Exclude:
    - spec/**/*
```

The structure of RSpec blocks makes this cop impossible to comply with
for specs.

```
Metrics/MethodLength:
  Exclude:
    - db/migrate/**/*
```

This is also difficult to comply with for even the simplest and most
orderly of specs.

```
Rails/FilePath:
  EnforcedStyle: arguments
```

Because `Rails.root` is a `Pathname`, say the wise people, you don't
need to bother concatenating comma-separated arguments. `Pathname` does
it all for you behind the scenes and you can go ahead and use forward
slashes in safety and comfort. But I still don't like seeing the
forward slashes. They *look* platform specific.

```
RSpec/ExampleLength:
  Max: 10
```

Similar to `Metrics/MethodLength`, this is impossible to comply with in
real life.

```
Style/Documentation:
  Enabled: false
```

Comments in code are just as likely to mislead as to illuminate.

```
Style/TrailingCommaInArrayLiteral:
  EnforcedStyleForMultiline: comma

Style/TrailingCommaInArguments:
  EnforcedStyleForMultiline: comma

Style/TrailingCommaInHashLiteral:
  EnforcedStyleForMultiline: comma
```

I know it's ugly. I know. But you'll thank me when you're reviewing
code because the diffs are so much more logical.
`bundle install`

`bin/spring binstub rspec && bin/rubocop -a`

`bin/rails generate rspec:install && bin/rubocop -a`
@dominicsayers
dominicsayers force-pushed the initial-scaffolding branch 2 times, most recently from 743ed5c to f83f6cd Compare June 11, 2020 12:51
@dominicsayers
dominicsayers force-pushed the initial-scaffolding branch 2 times, most recently from f2f022f to 66bb97d Compare June 27, 2020 13:55
To create a new app from this template, just rename the module in `application.rb`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant