cookstyle 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +201 -0
- data/README.md +91 -0
- data/Rakefile +28 -0
- data/bin/cookstyle +13 -0
- data/config/cookstyle.yml +33 -0
- data/config/cookstyle_base.yml +515 -0
- data/config/default.yml +5 -0
- data/config/disable_all.yml +557 -0
- data/config/disabled.yml +125 -0
- data/config/enabled.yml +1352 -0
- data/config/upstream.yml +1118 -0
- data/cookstyle.gemspec +25 -0
- data/lib/cookstyle.rb +29 -0
- data/lib/cookstyle/version.rb +4 -0
- metadata +119 -0
data/cookstyle.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cookstyle/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "cookstyle"
|
8
|
+
spec.version = Cookstyle::VERSION
|
9
|
+
spec.authors = ["Thom May"]
|
10
|
+
spec.email = ["thom@chef.io"]
|
11
|
+
|
12
|
+
spec.summary = %q{Rubocop configuration for Chef cookbooks}
|
13
|
+
spec.homepage = "https://github.com/chef/cookstyle"
|
14
|
+
spec.license = "Apache-2.0"
|
15
|
+
spec.required_ruby_version = ">= 2.0.0"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.executables = %w[cookstyle]
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_dependency("rubocop", Cookstyle::RUBOCOP_VERSION)
|
25
|
+
end
|
data/lib/cookstyle.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require "cookstyle/version"
|
2
|
+
|
3
|
+
# ensure the desired target version of RuboCop is gem activated
|
4
|
+
gem "rubocop", "= #{Cookstyle::RUBOCOP_VERSION}"
|
5
|
+
require "rubocop"
|
6
|
+
|
7
|
+
module RuboCop
|
8
|
+
class ConfigLoader
|
9
|
+
RUBOCOP_HOME.gsub!(
|
10
|
+
/^.*$/,
|
11
|
+
File.realpath(File.join(File.dirname(__FILE__), ".."))
|
12
|
+
)
|
13
|
+
|
14
|
+
DEFAULT_FILE.gsub!(
|
15
|
+
/^.*$/,
|
16
|
+
File.join(RUBOCOP_HOME, "config", "default.yml")
|
17
|
+
)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# Cookstyle patches the RuboCop tool to set a new default configuration that
|
22
|
+
# is vendored in the Cookstyle codebase.
|
23
|
+
module Cookstyle
|
24
|
+
# @return [String] the absolute path to the main RuboCop configuration YAML
|
25
|
+
# file
|
26
|
+
def self.config
|
27
|
+
RuboCop::ConfigLoader::DEFAULT_FILE
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cookstyle
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Thom May
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.39.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.39.0
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- thom@chef.io
|
72
|
+
executables:
|
73
|
+
- cookstyle
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- ".rspec"
|
79
|
+
- ".travis.yml"
|
80
|
+
- Gemfile
|
81
|
+
- LICENSE.txt
|
82
|
+
- README.md
|
83
|
+
- Rakefile
|
84
|
+
- bin/cookstyle
|
85
|
+
- config/cookstyle.yml
|
86
|
+
- config/cookstyle_base.yml
|
87
|
+
- config/default.yml
|
88
|
+
- config/disable_all.yml
|
89
|
+
- config/disabled.yml
|
90
|
+
- config/enabled.yml
|
91
|
+
- config/upstream.yml
|
92
|
+
- cookstyle.gemspec
|
93
|
+
- lib/cookstyle.rb
|
94
|
+
- lib/cookstyle/version.rb
|
95
|
+
homepage: https://github.com/chef/cookstyle
|
96
|
+
licenses:
|
97
|
+
- Apache-2.0
|
98
|
+
metadata: {}
|
99
|
+
post_install_message:
|
100
|
+
rdoc_options: []
|
101
|
+
require_paths:
|
102
|
+
- lib
|
103
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: 2.0.0
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
requirements: []
|
114
|
+
rubyforge_project:
|
115
|
+
rubygems_version: 2.6.2
|
116
|
+
signing_key:
|
117
|
+
specification_version: 4
|
118
|
+
summary: Rubocop configuration for Chef cookbooks
|
119
|
+
test_files: []
|