alpinelab-codestyle 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -37
  3. data/config/default.yml +3 -0
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e002b181855a8142c04483917605a6360576787b819394290e3c4da762cced3f
4
- data.tar.gz: 21c60ffe6445da80b0570032265665d99c67a7c4124180c3285c106789ba2851
3
+ metadata.gz: 628744994fc69aab7a1ff55eb49c0829477104e7ff84ea0bddfb88663a191375
4
+ data.tar.gz: af6dc45ea9c63ad60d7a095c84627d8cd41667bd596c5d8fed19934ba645b0aa
5
5
  SHA512:
6
- metadata.gz: de5ad48ccfb31ae393f8896142ecdb161d707ace596194e6c7418b1937d0ffe3c9bca844c3b4841ec56197cb0d40a4f042ddfaf9238a3d079540e132d37ad594
7
- data.tar.gz: 0b035ca6c1734b6474ff091655308b6e97968135fa0fca39667bffcba0229d7f184e6548e5ce5c4cacc61faafa102d4420585e64525bd0a93cff0ede6d83ae02
6
+ metadata.gz: c285da9851b4b8e1a72cf9d69392fbe822bd6bbdfa219015a507fcb1a395c7854016c686ceed6fd73f0068f88340dbca97d5bcbe17a8c2e9aad031ca88d967db
7
+ data.tar.gz: 80145ae9669899be70a046ec2e6ea7373220ca327cb11312e30861e9eff4a4feecf823aa6553dffe428e3200e2ec35eb581aa5220bfe719c81314357e3fde928
data/README.md CHANGED
@@ -4,10 +4,11 @@ Code style used by AlpineLab in all our projects.
4
4
 
5
5
  ## Usage
6
6
 
7
- 1. Add `rubocop` gems to your `Gemfile` (or `gems.rb`, or `gems.deps.rb`):
7
+ 1. Add those gems to your `Gemfile` (or `gems.rb`, or `gems.deps.rb`):
8
8
 
9
9
  ```ruby
10
10
  group :development, :test do
11
+ gem "alpinelab-codestyle", "~> x.y", require: false
11
12
  gem "rubocop", "~> x.y", require: false
12
13
  gem "rubocop-md", "~> x.y", require: false
13
14
  end
@@ -16,53 +17,33 @@ Code style used by AlpineLab in all our projects.
16
17
  or install them manually:
17
18
 
18
19
  ```shell
19
- gem install rubocop rubocop-md
20
+ gem install alpinelab-codestyle rubocop rubocop-md
20
21
  ```
21
22
 
22
- 2. Add `alpinelab-codestyle` gem to your `Gemfile`
23
- (or `gems.rb`, or `gems.deps.rb`):
24
-
25
- ```ruby
26
- group :development, :test do
27
- gem "alpinelab-codestyle", "~> x.y"
28
- end
29
- ```
30
-
31
- or install it manually:
32
-
33
- ```shell
34
- gem install alpinelab-codestyle
35
- ```
36
-
37
- 3. Create or prepend your Rubocop configuration (usually `.rubocop.yml`) with:
23
+ 2. Create or prepend your Rubocop configuration (usually `.rubocop.yml`) with:
38
24
 
39
25
  ```yaml
40
26
  inherit_gem:
41
27
  alpinelab-codestyle:
42
28
  - config/default.yml
43
- - config/rails.yml
29
+ - config/rails.yml # for Rails projects only
44
30
  ```
45
31
 
46
32
  ## Best practices
47
33
 
48
- Some conventions are adopted and enforced, in no particular order:
49
-
50
- 1. Developer-specific configuration files must be git-ignored globally, _e.g._:
34
+ Some conventions are adopted and enforced, but cannot be translated as Rubocop
35
+ rules (or are not supposed to). You will find those conventions as Markdown
36
+ files in the [`docs`](docs) directory of this project, organized by subject:
51
37
 
52
- * `.ruby-{version,gemset}`
53
- * `docker-compose.override.yml`
54
-
55
- 2. Project-specific configuration files must be git-ignored per project, _e.g._:
56
-
57
- * `config/database.yml`
38
+ * [File structure and organisation](docs/files.md)
39
+ * [Rails-specific conventions](docs/rails.md)
40
+ * [HTTP API development guidelines](docs/http-api.md)
58
41
 
59
42
  ## Releases
60
43
 
61
44
  To release this very gem:
62
45
 
63
- 1. Bump its version number in
64
- [`lib/alpine_lab/code_style/version.rb`](lib/alpine_lab/code_style/version.rb)
65
- according to [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html)
46
+ 1. Bump its version number in [`version.rb`] respecting [Semantic Versioning 2]
66
47
 
67
48
  2. Use Bundler Rake task to build, tag and push the gem:
68
49
 
@@ -70,13 +51,21 @@ according to [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html)
70
51
  rake release
71
52
  ```
72
53
 
73
- _(with Docker, you need to have configured both
74
- [Git authentication](https://github.com/alpinelab/docker-ruby-dev/blob/latest/RECIPES.md#git-authentication)
75
- and [Rubygems authentication](https://github.com/alpinelab/docker-ruby-dev/blob/latest/RECIPES.md#rubygems-authentication)
76
- then you can run the same command with `docker-compose run app rake release`)_
54
+ _(using Docker, both [Git authentication] and [Rubygems authentication] must
55
+ be configured to run `docker-compose run app rake release`)_
77
56
 
78
57
  ## License
79
58
 
80
- This project is developed by [Alpine Lab](https://www.alpine-lab.com) and released under the terms of the [MIT license](LICENSE.md).
59
+ This project is developed by [Alpine Lab] and released under the terms of the
60
+ [MIT license].
61
+
62
+ <a href="https://www.alpine-lab.com">
63
+ <img src=".github/alpinelab-logo.png" width="40%" />
64
+ </a>
81
65
 
82
- <a href="https://www.alpine-lab.com"><img src=".github/alpinelab-logo.png" width="40%" /></a>
66
+ [Alpine Lab]: https://www.alpine-lab.com
67
+ [git authentication]: https://github.com/alpinelab/docker-ruby-dev/blob/latest/RECIPES.md#git-authentication
68
+ [MIT license]: LICENSE.md
69
+ [RubyGems authentication]: https://github.com/alpinelab/docker-ruby-dev/blob/latest/RECIPES.md#rubygems-authentication
70
+ [Semantic Versioning 2]: https://semver.org/spec/v2.0.0.html
71
+ [`version.rb`]: lib/alpine_lab/code_style/version.rb
@@ -58,6 +58,9 @@ Style/Lambda:
58
58
  Style/StringLiterals:
59
59
  EnforcedStyle: double_quotes
60
60
 
61
+ Style/StringLiteralsInInterpolation:
62
+ EnforcedStyle: double_quotes
63
+
61
64
  Style/TrailingCommaInArguments:
62
65
  EnforcedStyleForMultiline: consistent_comma
63
66
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alpinelab-codestyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AlpineLab developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-03 00:00:00.000000000 Z
11
+ date: 2018-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler