dpn_cops 0.0.3

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 47a6268e4ba62e7d95ba58b2ada3b7fc35a9358c
4
+ data.tar.gz: 216d82e7d42aa49b127ecc27de4bf4bf7f50b2ef
5
+ SHA512:
6
+ metadata.gz: 282ab8390e66f6e40974adecf355fc00d7ed2724fd3a8d5b6471c0a49fb3c45564d6d8400176b4c48cb30138d7a23c95d49f7d64b546521f9ec2a55b89de93ee
7
+ data.tar.gz: 22776ec04152872b43696aca18145653bd26d85ace9c64aa557b11d6c33c07833ea032d927faad266623aac2f1dff0b30f129f3cde8ddbb387dc1d51a6e72c37
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ .ruby-*
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ inherit_from:
2
+ - ./config/dpn_baseline.yml
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in dlss_cops.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # DpnCops
2
+
3
+ DpnCops is a Rubocop configuration gem that holds DPN's baseline Ruby style guide. See https://github.com/bbatsov/rubocop for more information about Rubocop.
4
+
5
+ This style guide adapted from a [DLSS style guide](https://github.com/sul-dlss/DeveloperPlaybook/tree/master/style).
6
+
7
+ ## Installation
8
+
9
+ We recommend you use the latest version of DpnCops but if needed, you can
10
+ select a specific version to manage change.
11
+
12
+ Add a development_dependency in your gem's gemspec file
13
+
14
+ ```ruby
15
+ gemspec.add_development_dependency 'dpn_cops'
16
+ ```
17
+
18
+ OR, if it's not a gem, add these lines to your Gemfile:
19
+
20
+ ```ruby
21
+ group :development, :test do
22
+ gem 'dpn_cops'
23
+ end
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ Set up your .rubocop.yml file:
29
+
30
+ ```yaml
31
+ inherit_gem:
32
+ dpn_cops: "config/dpn_baseline.yml"
33
+
34
+ AllCops:
35
+ TargetRubyVersion: 2.2
36
+ ```
37
+
38
+ Then you can launch rubocop via: `bundle exec rubocop <options>`
39
+
40
+ See https://github.com/bbatsov/rubocop#basic-usage for more information.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
data/bin/console ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'dpn_cops'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ require "pry"
10
+ Pry.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,134 @@
1
+ # Turn on RSpec cops
2
+ require: rubocop-rspec
3
+
4
+ AllCops:
5
+ DisplayCopNames: true
6
+ Include:
7
+ - '**/Rakefile'
8
+ - '**/config.ru'
9
+ Exclude:
10
+ - 'Gemfile.lock'
11
+ - '**/*.md'
12
+ - 'bin/*'
13
+ - 'config/**/*.yml'
14
+ - 'db/**/*'
15
+ - 'script/**/*'
16
+ - '.internal_test_app/**/*'
17
+ - 'spec/fixtures/**/*'
18
+ - 'spec/internal/**/*'
19
+ - 'spec/test_app_templates/**/*'
20
+ - 'vendor/**/*'
21
+
22
+ # Turn on Rails cops
23
+ Rails:
24
+ Enabled: true
25
+
26
+ # DPN configuration changes for these cops enabled by default in Rubocop
27
+
28
+ Metrics/AbcSize:
29
+ Max: 20
30
+
31
+ Metrics/BlockNesting:
32
+ Max: 4
33
+
34
+ Metrics/ClassLength:
35
+ Max: 200
36
+
37
+ Metrics/LineLength:
38
+ Max: 120
39
+
40
+ Metrics/MethodLength:
41
+ Max: 25
42
+
43
+ Metrics/ModuleLength:
44
+ Max: 200
45
+
46
+ Style/IfUnlessModifier:
47
+ MaxLineLength: 120
48
+
49
+ Style/IndentationConsistency:
50
+ EnforcedStyle: rails
51
+
52
+ Style/WhileUntilModifier:
53
+ MaxLineLength: 120
54
+
55
+ RSpec/ExampleWording:
56
+ CustomTransform:
57
+ be: is
58
+ have: has
59
+ not: does not
60
+ NOT: does NOT
61
+ IgnoredWords:
62
+ - only
63
+
64
+ # DPN explicitly disabling these cops enabled by default in Rubocop
65
+ # (DPN agrees they should be disabled, or we disagree about whether they should be enabled)
66
+
67
+ Style/AccessModifierIndentation:
68
+ Enabled: false
69
+
70
+ Style/AlignHash:
71
+ Enabled: false
72
+
73
+ Style/AlignParameters:
74
+ Enabled: false
75
+
76
+ Style/AsciiComments:
77
+ Enabled: false
78
+
79
+ Style/BlockComments:
80
+ Enabled: false
81
+
82
+ Style/ClassAndModuleChildren:
83
+ Enabled: false
84
+
85
+ Style/Documentation:
86
+ Enabled: false
87
+
88
+ Style/EmptyLinesAroundClassBody:
89
+ Enabled: false
90
+
91
+ Style/EmptyLinesAroundModuleBody:
92
+ Enabled: false
93
+
94
+ Style/LeadingCommentSpace:
95
+ Enabled: false
96
+
97
+ Style/NegatedIf:
98
+ Enabled: false
99
+
100
+ Style/NegatedWhile:
101
+ Enabled: false
102
+
103
+ Style/RegexpLiteral:
104
+ Enabled: false
105
+
106
+ Style/SingleLineBlockParams:
107
+ Enabled: false
108
+
109
+ Style/SpaceAfterNot:
110
+ Enabled: false
111
+
112
+ Style/SpaceAroundEqualsInParameterDefault:
113
+ Enabled: false
114
+
115
+ Style/SpaceInsideBrackets:
116
+ Enabled: false
117
+
118
+ Style/StringLiterals:
119
+ Enabled: false
120
+
121
+ Style/TrailingBlankLines:
122
+ Enabled: false
123
+
124
+ Style/TrailingCommaInLiteral:
125
+ Enabled: false
126
+
127
+ Style/WordArray:
128
+ Enabled: false
129
+
130
+ RSpec/DescribeClass:
131
+ Enabled: false
132
+
133
+ RSpec/FilePath:
134
+ Enabled: false
data/dpn_cops.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'dpn_cops/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'dpn_cops'
8
+ spec.version = DpnCops::VERSION
9
+ spec.authors = ['Michael J. Giarlo', 'Darren L. Weber']
10
+ spec.email = ['mjgiarlo@stanford.edu', 'darren.weber@stanford.edu']
11
+
12
+ spec.summary = "DpnCops is a Rubocop configuration gem that holds DPN's baseline Ruby style guide."
13
+ spec.description = "DpnCops is a Rubocop configuration gem that holds DPN's baseline Ruby style guide."
14
+ spec.homepage = 'https://github.com/dpn-admin/dpn_cops'
15
+
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
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_dependency 'rubocop', '~> 0.37.0'
22
+ spec.add_dependency 'rubocop-rspec', '~> 1.4.0'
23
+ spec.add_development_dependency 'bundler', '~> 1.11'
24
+ spec.add_development_dependency 'rake', '~> 10.0'
25
+ spec.add_development_dependency 'pry'
26
+ end
data/lib/dpn_cops.rb ADDED
@@ -0,0 +1,5 @@
1
+ require 'dpn_cops/version'
2
+
3
+ module DpnCops
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,3 @@
1
+ module DpnCops
2
+ VERSION = '0.0.3'.freeze
3
+ end
metadata ADDED
@@ -0,0 +1,129 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dpn_cops
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Michael J. Giarlo
8
+ - Darren L. Weber
9
+ autorequire:
10
+ bindir: exe
11
+ cert_chain: []
12
+ date: 2016-08-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rubocop
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: 0.37.0
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: 0.37.0
28
+ - !ruby/object:Gem::Dependency
29
+ name: rubocop-rspec
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: 1.4.0
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: 1.4.0
42
+ - !ruby/object:Gem::Dependency
43
+ name: bundler
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '1.11'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '1.11'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rake
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '10.0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '10.0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: pry
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ description: DpnCops is a Rubocop configuration gem that holds DPN's baseline Ruby
85
+ style guide.
86
+ email:
87
+ - mjgiarlo@stanford.edu
88
+ - darren.weber@stanford.edu
89
+ executables: []
90
+ extensions: []
91
+ extra_rdoc_files: []
92
+ files:
93
+ - ".gitignore"
94
+ - ".rubocop.yml"
95
+ - Gemfile
96
+ - README.md
97
+ - Rakefile
98
+ - bin/console
99
+ - bin/setup
100
+ - config/dpn_baseline.yml
101
+ - dpn_cops.gemspec
102
+ - lib/dpn_cops.rb
103
+ - lib/dpn_cops/version.rb
104
+ homepage: https://github.com/dpn-admin/dpn_cops
105
+ licenses: []
106
+ metadata: {}
107
+ post_install_message:
108
+ rdoc_options: []
109
+ require_paths:
110
+ - lib
111
+ required_ruby_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ requirements: []
122
+ rubyforge_project:
123
+ rubygems_version: 2.4.5.1
124
+ signing_key:
125
+ specification_version: 4
126
+ summary: DpnCops is a Rubocop configuration gem that holds DPN's baseline Ruby style
127
+ guide.
128
+ test_files: []
129
+ has_rdoc: