house_style 0.1.1 → 0.2.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 +4 -4
- data/CHANGELOG.md +12 -0
- data/CONTRIBUTING.md +1 -1
- data/README.md +7 -0
- data/house_style.gemspec +2 -3
- data/lib/generators/house_style/install_generator.rb +22 -0
- data/lib/generators/house_style/templates/db_migrate_rubocop.yml +3 -0
- data/lib/generators/house_style/templates/rspec-rubocop.yml +5 -0
- data/lib/generators/house_style/templates/rubocop.yml +2 -0
- data/rails/db_migrate.yml +24 -0
- data/rspec/rubocop.yml +2 -0
- metadata +24 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcabc44f82f66793565b2f2b254107fa249cb939
|
4
|
+
data.tar.gz: 50a45ad11f91645d955a69c758c8fe5970bb57d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f87abc7fc4429838399898ff1c8fab7ab7acd87b724e0dcd3f4f50fdb5781cff39be63c56b6655fffae0f7fd8cf93e3a3befd396a057d41c0c9eef871ace271d
|
7
|
+
data.tar.gz: 187bb131325771a26a916d7ea65c2fce1fecbb79791b708c519f513bb5092117dbccfafd3b9efd47e925fe0b5ffa5d5360af07788c5183744855ba78170f5f36
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# 0.2.1
|
2
|
+
|
3
|
+
- [FIX] Rename generator template files so they are included in gem release.
|
4
|
+
|
5
|
+
# 0.2.0
|
6
|
+
|
7
|
+
- New defaults for `db/migrate` folders in Rails projects.
|
8
|
+
- Rails projects using `house_style` can now use a Rails generator to install the relevant house style configurations:
|
9
|
+
- `{Rails.root}/.rubocop.yml` loads the default Rubocop config
|
10
|
+
- `{Rails.root}/spec/.rubocop.yml` loads tweaked config for RSpec folders, including use of the `rubocop-rspec` plugin
|
11
|
+
- `{Rails.root}/db/migrate/.rubocop.yml` ignores key rules for compatibility with Rails-generated migrations, etc.
|
12
|
+
|
1
13
|
# 0.1.1
|
2
14
|
|
3
15
|
- New `rspec/rubocop.yml` defaults.
|
data/CONTRIBUTING.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Contributing
|
2
2
|
|
3
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/altmetric/house_style
|
3
|
+
Bug reports and pull requests are welcome on GitHub at <https://github.com/altmetric/house_style>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](CODE_OF_CONDUCT.md).
|
4
4
|
|
5
5
|
Pull requests are welcome for general changes such as:
|
6
6
|
|
data/README.md
CHANGED
@@ -32,6 +32,13 @@ inherit_gem:
|
|
32
32
|
house_style: rails/rubocop.yml
|
33
33
|
```
|
34
34
|
|
35
|
+
`house_style` comes with a Rails generator which can set up both your project root and your RSpec folder to start using the default house styles by default. With `house_style` declared in your Gemfile:
|
36
|
+
|
37
|
+
```bash
|
38
|
+
$ rails generate house_style:install
|
39
|
+
```
|
40
|
+
|
41
|
+
This will create `.rubocop.yml` files in your project root and `spec` folders.
|
35
42
|
|
36
43
|
## Development
|
37
44
|
|
data/house_style.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'house_style'
|
7
|
-
spec.version = '0.
|
7
|
+
spec.version = '0.2.2'
|
8
8
|
spec.authors = ['Scott Matthewman']
|
9
9
|
spec.email = ['scott@altmetric.com']
|
10
10
|
|
@@ -14,11 +14,10 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
-
spec.bindir = 'exe'
|
18
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
17
|
spec.require_paths = ['lib']
|
20
18
|
|
21
19
|
spec.add_dependency 'rubocop', '~> 0.35.1'
|
20
|
+
spec.add_dependency 'rubocop-rspec', '~> 1.3.1'
|
22
21
|
|
23
22
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
24
23
|
spec.add_development_dependency 'rake', '~> 10.0'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
require 'rails/generators/base'
|
3
|
+
|
4
|
+
module HouseStyle
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
6
|
+
def self.source_root
|
7
|
+
@source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
8
|
+
end
|
9
|
+
|
10
|
+
def create_root_rubocop_yml
|
11
|
+
copy_file 'rubocop.yml', '.rubocop.yml'
|
12
|
+
end
|
13
|
+
|
14
|
+
def create_rspec_rubocop_yml
|
15
|
+
copy_file 'rspec-rubocop.yml', 'spec/.rubocop.yml'
|
16
|
+
end
|
17
|
+
|
18
|
+
def create_db_migrate_rubocop_yml
|
19
|
+
copy_file 'db_migrate_rubocop.yml', 'db/migrate/.rubocop.yml'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Metrics/ClassLength:
|
2
|
+
Exclude:
|
3
|
+
- db/migrate/*.rb
|
4
|
+
Metrics/LineLength:
|
5
|
+
Exclude:
|
6
|
+
- db/migrate/*.rb
|
7
|
+
Metrics/MethodLength:
|
8
|
+
Exclude:
|
9
|
+
- db/migrate/*.rb
|
10
|
+
Style/BlockDelimiters:
|
11
|
+
Exclude:
|
12
|
+
- db/migrate/*.rb
|
13
|
+
Style/Documentation:
|
14
|
+
Exclude:
|
15
|
+
- db/migrate/*.rb
|
16
|
+
Style/EmptyLineBetweenDefs:
|
17
|
+
Exclude:
|
18
|
+
- db/migrate/*.rb
|
19
|
+
Style/StringLiterals:
|
20
|
+
Exclude:
|
21
|
+
- db/migrate/*.rb
|
22
|
+
Metrics/AbcSize:
|
23
|
+
Exclude:
|
24
|
+
- db/migrate/*.rb
|
data/rspec/rubocop.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: house_style
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Matthewman
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.35.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop-rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.3.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.3.1
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,6 +87,11 @@ files:
|
|
73
87
|
- bin/console
|
74
88
|
- bin/setup
|
75
89
|
- house_style.gemspec
|
90
|
+
- lib/generators/house_style/install_generator.rb
|
91
|
+
- lib/generators/house_style/templates/db_migrate_rubocop.yml
|
92
|
+
- lib/generators/house_style/templates/rspec-rubocop.yml
|
93
|
+
- lib/generators/house_style/templates/rubocop.yml
|
94
|
+
- rails/db_migrate.yml
|
76
95
|
- rails/rubocop.yml
|
77
96
|
- rspec/rubocop.yml
|
78
97
|
- ruby/configuration.yml
|
@@ -99,8 +118,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
118
|
version: '0'
|
100
119
|
requirements: []
|
101
120
|
rubyforge_project:
|
102
|
-
rubygems_version: 2.4.5
|
121
|
+
rubygems_version: 2.4.5.1
|
103
122
|
signing_key:
|
104
123
|
specification_version: 4
|
105
124
|
summary: A centralised store of house style rules
|
106
125
|
test_files: []
|
126
|
+
has_rdoc:
|