blue_steel 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5380af4e3107116fccabf7cdf28f97e6e579f8bf
4
- data.tar.gz: 7246764080dc351c0f0a0ca840a8e74ce7705d90
3
+ metadata.gz: a51a97a53da0841c3a75a905504c25fd3353ad02
4
+ data.tar.gz: c7ba6e274bdb850ae6503fa990d2a46dbc398a6d
5
5
  SHA512:
6
- metadata.gz: bca8b7184a076d00d9411d9125c1a5f13089f8cc5124f5d78a3f752b2a494c6ec8500a5d9e56e5c9c4620e45fab196ad1d5116c2003ba5d60b6d1c76251ee619
7
- data.tar.gz: 711a4abcb66fcba2901bdc5e8e2f4683f7a4a442809bce0ef423c86253d262740a6bb679f2eda6e6a7b5d432c0091dc7dbd2d36327d79f32f065a6c10867ac5c
6
+ metadata.gz: ed3a1db32e443594a9ea54deaf5e86ff566c236902c0601c096b18ed286391d47be6f08744464cfe80622bae850be80f5833a763de5864dd27d8663f4c2689a2
7
+ data.tar.gz: 4660612e561bdcb2c79e9a1c6bcfa6ec93a2f99939c58d8f77a4e3abbcf9a22bc5d61f14e7baa782b86f61509273af20678863eea964a477ff5730ae56bb08bd
File without changes
File without changes
File without changes
File without changes
data/README.md CHANGED
@@ -1,15 +1,10 @@
1
- # Coding In Style
1
+ # BlueSteel
2
2
 
3
3
  We all recognize that style matters, and particularly that having _a_ consistent
4
4
  style matters more than _my_ or _your_ particular preference for a style (See
5
5
  Sandi Metz's _Looks Matter_). This repository contains the Apartment List style.
6
6
 
7
- # Installation
8
-
9
- See each directory for installation in that language:
10
- - [Ruby](/ruby)
11
-
12
- # Changing Style
7
+ ### Changing Style
13
8
 
14
9
  Thrash is anathema to consistency, so we are making it very difficult to change
15
10
  styles. Consider it a Constitution. We all agreed on it hundreds of years ago,
@@ -20,3 +15,37 @@ Since we're intentionally making it difficult to change, I'm only going to give
20
15
  you one criterion to consider when you want to propose a change:
21
16
 
22
17
  1. The style is probably not going to change, and that's ok!
18
+
19
+ ## Installation
20
+
21
+ Add this line to your application's Gemfile:
22
+
23
+ ```ruby
24
+ gem 'blue_steel'
25
+ ```
26
+
27
+ And then execute:
28
+
29
+ $ bundle
30
+
31
+ Or install it yourself as:
32
+
33
+ $ gem install blue_steel
34
+
35
+ ## Usage
36
+
37
+ TODO: Write usage instructions here
38
+
39
+ ## Development
40
+
41
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
42
+
43
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
44
+
45
+ ## Contributing
46
+
47
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/blue_steel.
48
+
49
+ ## License
50
+
51
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
File without changes
File without changes
File without changes
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["cirmas@apartmentlist.com"]
11
11
 
12
12
  spec.summary = %q{Apartment List's internal coding style guide}
13
- spec.homepage = "https://github.com/apartmentlist/style/tree/master/ruby/blue_steel"
13
+ spec.homepage = "https://github.com/apartmentlist/blue_steel"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ module BlueSteel
2
+ VERSION = '0.1.2'.freeze
3
+ end
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blue_steel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Irmas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-08 00:00:00.000000000 Z
11
+ date: 2017-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop-git
@@ -87,26 +87,21 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
+ - ".gitignore"
91
+ - ".rubocop.yml"
92
+ - Gemfile
93
+ - LICENSE.txt
90
94
  - README.md
91
- - ruby/README.md
92
- - ruby/blue_steel/.gitignore
93
- - ruby/blue_steel/.rubocop.yml
94
- - ruby/blue_steel/Gemfile
95
- - ruby/blue_steel/LICENSE.txt
96
- - ruby/blue_steel/README.md
97
- - ruby/blue_steel/Rakefile
98
- - ruby/blue_steel/bin/console
99
- - ruby/blue_steel/bin/setup
100
- - ruby/blue_steel/blue_steel.gemspec
101
- - ruby/blue_steel/global.yml
102
- - ruby/blue_steel/lib/blue_steel.rb
103
- - ruby/blue_steel/lib/blue_steel/railtie.rb
104
- - ruby/blue_steel/lib/blue_steel/version.rb
105
- - ruby/blue_steel/lib/tasks/style.rake
106
- - ruby/global.yml
107
- - ruby/lib/tasks/style.rake
108
- - ruby/sample.yml
109
- homepage: https://github.com/apartmentlist/style/tree/master/ruby/blue_steel
95
+ - Rakefile
96
+ - bin/console
97
+ - bin/setup
98
+ - blue_steel.gemspec
99
+ - global.yml
100
+ - lib/blue_steel.rb
101
+ - lib/blue_steel/railtie.rb
102
+ - lib/blue_steel/version.rb
103
+ - lib/tasks/style.rake
104
+ homepage: https://github.com/apartmentlist/blue_steel
110
105
  licenses:
111
106
  - MIT
112
107
  metadata: {}
data/ruby/README.md DELETED
@@ -1,52 +0,0 @@
1
- # Installation
2
-
3
- 1. Add these gems to your `Gemfile`, most likely just in the `development`
4
- group:
5
-
6
- - [`rubocop`](https://github.com/bbatsov/rubocop) - The base rules, more or
7
- less agreed upon by the Ruby community.
8
- - [`rubocop-rspec`](https://github.com/backus/rubocop-rspec) - More
9
- customized rules for the `spec/` directory, where RSpec's DSL is more
10
- valuable than "normal" Ruby style.
11
- - [`rubocop-git`](https://github.com/m4i/rubocop-git) - This lets you run
12
- style checks on just your changes, so you're not responsible for a whole
13
- history of accumulated style mishaps.
14
-
15
- 2. Copy the minimal Rubocop configuration to your repository:
16
-
17
- ```
18
- cp style/ruby/sample.yml my_app/.rubocop.yml
19
- ```
20
-
21
- This file does little more than inherit from `global.yml`, which allows us
22
- to configure and change global style in a single place.
23
-
24
- 3. Add this pattern to your repo's `.gitignore`:
25
-
26
- ```
27
- .rubocop-http*yml
28
- ```
29
-
30
- When Rubocop inherits from a URL, it downloads and caches the file locally
31
- so you don't have to hit the network every time. There's no need for that
32
- cache to be committed to the repository or clutter `git status`.
33
-
34
- 4. Install the Rake tasks:
35
-
36
- ```
37
- cp style/ruby/lib/tasks/style.rake my_app/lib/tasks/
38
- ```
39
-
40
- This provides you three Rake tasks:
41
- - `style:branch` - Runs style checks only on your diff from `master`
42
- - `style:all` - Runs all style checks
43
- - `style:count` - Prints counts of all style violations
44
-
45
- 5. Set your `Rakefile` default to include style checks:
46
-
47
- ```
48
- task default: %i[spec style:branch]
49
- ```
50
-
51
- Style checks will only run if specs passed, so you don't have to worry about
52
- pretty code until you have working code.
@@ -1,51 +0,0 @@
1
- # BlueSteel
2
-
3
- We all recognize that style matters, and particularly that having _a_ consistent
4
- style matters more than _my_ or _your_ particular preference for a style (See
5
- Sandi Metz's _Looks Matter_). This repository contains the Apartment List style.
6
-
7
- ### Changing Style
8
-
9
- Thrash is anathema to consistency, so we are making it very difficult to change
10
- styles. Consider it a Constitution. We all agreed on it hundreds of years ago,
11
- and though everyone has some gripes with it, it's pretty good and we're leaving
12
- it alone.
13
-
14
- Since we're intentionally making it difficult to change, I'm only going to give
15
- you one criterion to consider when you want to propose a change:
16
-
17
- 1. The style is probably not going to change, and that's ok!
18
-
19
- ## Installation
20
-
21
- Add this line to your application's Gemfile:
22
-
23
- ```ruby
24
- gem 'blue_steel'
25
- ```
26
-
27
- And then execute:
28
-
29
- $ bundle
30
-
31
- Or install it yourself as:
32
-
33
- $ gem install blue_steel
34
-
35
- ## Usage
36
-
37
- TODO: Write usage instructions here
38
-
39
- ## Development
40
-
41
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
42
-
43
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
44
-
45
- ## Contributing
46
-
47
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/blue_steel.
48
-
49
- ## License
50
-
51
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -1,3 +0,0 @@
1
- module BlueSteel
2
- VERSION = '0.1.1'.freeze
3
- end
data/ruby/global.yml DELETED
@@ -1,87 +0,0 @@
1
- require: rubocop-rspec
2
-
3
- AllCops:
4
- # Ruby files that are otherwise missed, since default is just *.rb
5
- Include:
6
- - config.ru
7
- - Gemfile
8
- - Rakefile
9
- # Files that aren't helpful to check, even if they're Ruby
10
- Exclude:
11
- - 'db/schema.rb'
12
- - 'node_modules/**/*'
13
-
14
- CollectionMethods:
15
- PreferredMethods:
16
- collect: map
17
- inject: reduce
18
- # Avoid confusion with ActiveRecord methods
19
- find_all: select
20
- find: detect
21
-
22
- FileName:
23
- Exclude:
24
- - Guardfile # Like Rakefile
25
-
26
- # Default is 79, a whole 1.25% reduction in usable space!
27
- LineLength:
28
- Max: 80
29
-
30
- # RSpec's DSL leads to long blocks, and that's ok
31
- Metrics/BlockLength:
32
- ExcludedMethods: ['context', 'describe', 'shared_examples']
33
-
34
- # Don't require underscores in long numbers, eg. 123_456_789.
35
- # We often have IDs, not "numbers".
36
- NumericLiterals:
37
- Enabled: false
38
-
39
- # We've set RSpec to infer_spec_type_from_file_location!, but RuboCop doesn't
40
- # have access to that config. Rather than have to tag everything `type: :view`,
41
- # just ignore the cop for those specs.
42
- RSpec/DescribeClass:
43
- Exclude:
44
- - spec/views/**/*_spec.rb
45
-
46
- # The default is not_to, but we've historically used to_not basically 100% of
47
- # the time. There doesn't appear to be a particular reason one is better, and
48
- # it's not worth changing.
49
- RSpec/NotToNot:
50
- EnforcedStyle: to_not
51
-
52
- # Don't force single line blocks to name their block arguments things like
53
- # |a, e| for accumulator, element. Eg:
54
- #
55
- # things.reduce { |a, e| ... }
56
- #
57
- # We have more semantic context than Rubocop, so there's no reason it should be
58
- # dictating our variable names.
59
- SingleLineBlockParams:
60
- Enabled: false
61
-
62
- # Migrations are particularly self-explanatory, so there's very little reason to
63
- # write class documentation for them.
64
- Style/Documentation:
65
- Exclude:
66
- - db/migrate/*.rb
67
-
68
- # This requires us to parenthesize simple things like (a % 10).zero?, which
69
- # we've never done and find cumbersome without improving clarity. The community
70
- # doesn't appear to have a clear reason why one is superior.
71
- Style/NumericPredicate:
72
- Enabled: false
73
-
74
- Style/PercentLiteralDelimiters:
75
- PreferredDelimiters:
76
- # Prefer [] for things that are arrays
77
- '%i': '[]'
78
- '%I': '[]'
79
- '%w': '[]'
80
- '%W': '[]'
81
- # Prefer () otherwise
82
- '%': '()'
83
- '%q': '()'
84
- '%Q': '()'
85
- '%r': '()'
86
- '%s': '()'
87
- '%x': '()'
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # No need to have Rubocop in production, so be careful loading it.
4
- begin
5
- require 'rubocop/git/cli'
6
- rescue LoadError
7
- puts <<-MSG
8
- Warning: RuboCop::Git is not available.
9
- Run `gem install rubocop-git` or add it to your Gemfile
10
- MSG
11
- end
12
-
13
- namespace :style do
14
- desc 'Run style checks for the entire repository'
15
- task all: :environment do
16
- system('rubocop --display-cop-names')
17
- end
18
-
19
- desc 'Run style checks on your diff from `master`'
20
- task branch: :environment do
21
- RuboCop::Git::CLI.new.run(%w[--display-cop-names master])
22
- end
23
-
24
- desc 'Print total violation counts'
25
- task count: :environment do
26
- puts `
27
- rubocop --display-cop-names |
28
- grep -oE '[CW]: [^:]+' | # Extract "C: Thing/YouBroke"
29
- sort |
30
- uniq -c |
31
- sort -rn
32
- `
33
- end
34
- end
data/ruby/sample.yml DELETED
@@ -1,2 +0,0 @@
1
- inherit_from:
2
- - https://raw.githubusercontent.com/apartmentlist/style/master/ruby/global.yml