surveymonkey-style 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 +11 -0
- data/.rspec +3 -0
- data/.rubocop.yml +9 -0
- data/.travis.yml +6 -0
- data/Gemfile +20 -0
- data/Gemfile.lock +109 -0
- data/LICENSE.txt +21 -0
- data/README.md +34 -0
- data/Rakefile +21 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/surveymonkey/style.rb +25 -0
- data/lib/surveymonkey/style/version.rb +27 -0
- data/rubocop/rspec.yml +10 -0
- data/rubocop/ruby.yml +24 -0
- data/surveymonkey-style.gemspec +26 -0
- data/yardstick/.yardstick.yml +10 -0
- metadata +87 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6fa423d533e1db15ac33ae06f01bcc8da4027ffc4f353e9be7444443b798643e
|
4
|
+
data.tar.gz: 5ca3e96d666c7d79da1de48181bb1f5e4144dcfde3035e52473d0f59a7336f1a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1e8c8c2bbf8408411e22bcb3e99046566e8073c84c6328575dffc8e41ef3151750f6ecba2fcef4d98be994557a44b366704cb697a980e1f376e1a661d2f507a0
|
7
|
+
data.tar.gz: 700f635d860e3991b4c053fe9c43adc87c29df2ea9b6fae9e9763ce9c16911ff483abc25815d1a99e56ba56c287cac2d1a3595e909e42e8c56c4862269664017
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
group :development do
|
6
|
+
gem 'guard-bundler', require: false
|
7
|
+
gem 'guard-rspec', require: false
|
8
|
+
gem 'guard-rubocop', require: false
|
9
|
+
gem 'guard-yardstick', require: false
|
10
|
+
end
|
11
|
+
|
12
|
+
group :test do
|
13
|
+
gem 'rspec', require: false
|
14
|
+
gem 'rubocop', require: false
|
15
|
+
gem 'rubocop-performance', require: false
|
16
|
+
gem 'rubocop-rspec', require: false
|
17
|
+
gem 'yardstick', require: false
|
18
|
+
end
|
19
|
+
|
20
|
+
gemspec
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
surveymonkey-style (0.0.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.0)
|
10
|
+
coderay (1.1.2)
|
11
|
+
diff-lcs (1.3)
|
12
|
+
ffi (1.12.2)
|
13
|
+
formatador (0.2.5)
|
14
|
+
guard (2.16.1)
|
15
|
+
formatador (>= 0.2.4)
|
16
|
+
listen (>= 2.7, < 4.0)
|
17
|
+
lumberjack (>= 1.0.12, < 2.0)
|
18
|
+
nenv (~> 0.1)
|
19
|
+
notiffany (~> 0.0)
|
20
|
+
pry (>= 0.9.12)
|
21
|
+
shellany (~> 0.0)
|
22
|
+
thor (>= 0.18.1)
|
23
|
+
guard-bundler (3.0.0)
|
24
|
+
bundler (>= 2.1, < 3)
|
25
|
+
guard (~> 2.2)
|
26
|
+
guard-compat (~> 1.1)
|
27
|
+
guard-compat (1.2.1)
|
28
|
+
guard-rspec (4.7.3)
|
29
|
+
guard (~> 2.1)
|
30
|
+
guard-compat (~> 1.1)
|
31
|
+
rspec (>= 2.99.0, < 4.0)
|
32
|
+
guard-rubocop (1.3.0)
|
33
|
+
guard (~> 2.0)
|
34
|
+
rubocop (~> 0.20)
|
35
|
+
guard-yardstick (1.0.0)
|
36
|
+
guard (>= 2.0)
|
37
|
+
guard-compat (>= 1.2)
|
38
|
+
yardstick (>= 0.9)
|
39
|
+
jaro_winkler (1.5.4)
|
40
|
+
listen (3.2.1)
|
41
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
42
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
43
|
+
lumberjack (1.2.1)
|
44
|
+
method_source (0.9.2)
|
45
|
+
nenv (0.3.0)
|
46
|
+
notiffany (0.1.3)
|
47
|
+
nenv (~> 0.1)
|
48
|
+
shellany (~> 0.0)
|
49
|
+
parallel (1.19.1)
|
50
|
+
parser (2.7.0.2)
|
51
|
+
ast (~> 2.4.0)
|
52
|
+
pry (0.12.2)
|
53
|
+
coderay (~> 1.1.0)
|
54
|
+
method_source (~> 0.9.0)
|
55
|
+
rainbow (3.0.0)
|
56
|
+
rake (10.5.0)
|
57
|
+
rb-fsevent (0.10.3)
|
58
|
+
rb-inotify (0.10.1)
|
59
|
+
ffi (~> 1.0)
|
60
|
+
rspec (3.9.0)
|
61
|
+
rspec-core (~> 3.9.0)
|
62
|
+
rspec-expectations (~> 3.9.0)
|
63
|
+
rspec-mocks (~> 3.9.0)
|
64
|
+
rspec-core (3.9.1)
|
65
|
+
rspec-support (~> 3.9.1)
|
66
|
+
rspec-expectations (3.9.0)
|
67
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
68
|
+
rspec-support (~> 3.9.0)
|
69
|
+
rspec-mocks (3.9.1)
|
70
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
71
|
+
rspec-support (~> 3.9.0)
|
72
|
+
rspec-support (3.9.2)
|
73
|
+
rubocop (0.79.0)
|
74
|
+
jaro_winkler (~> 1.5.1)
|
75
|
+
parallel (~> 1.10)
|
76
|
+
parser (>= 2.7.0.1)
|
77
|
+
rainbow (>= 2.2.2, < 4.0)
|
78
|
+
ruby-progressbar (~> 1.7)
|
79
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
80
|
+
rubocop-performance (1.5.2)
|
81
|
+
rubocop (>= 0.71.0)
|
82
|
+
rubocop-rspec (1.37.1)
|
83
|
+
rubocop (>= 0.68.1)
|
84
|
+
ruby-progressbar (1.10.1)
|
85
|
+
shellany (0.0.1)
|
86
|
+
thor (1.0.1)
|
87
|
+
unicode-display_width (1.6.1)
|
88
|
+
yard (0.9.24)
|
89
|
+
yardstick (0.9.9)
|
90
|
+
yard (~> 0.8, >= 0.8.7.2)
|
91
|
+
|
92
|
+
PLATFORMS
|
93
|
+
ruby
|
94
|
+
|
95
|
+
DEPENDENCIES
|
96
|
+
guard-bundler
|
97
|
+
guard-rspec
|
98
|
+
guard-rubocop
|
99
|
+
guard-yardstick
|
100
|
+
rake (~> 10.0)
|
101
|
+
rspec
|
102
|
+
rubocop
|
103
|
+
rubocop-performance
|
104
|
+
rubocop-rspec
|
105
|
+
surveymonkey-style!
|
106
|
+
yardstick
|
107
|
+
|
108
|
+
BUNDLED WITH
|
109
|
+
2.1.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Michael Deering
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# SurveyMonkey::Style
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
Add this line to your application's Gemfile:
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
group :development, :test do
|
9
|
+
gem 'surveymonkey-style', require: false
|
10
|
+
end
|
11
|
+
```
|
12
|
+
## Usage
|
13
|
+
|
14
|
+
### RuboCop
|
15
|
+
|
16
|
+
Add the following to your .rubocop.yml
|
17
|
+
|
18
|
+
```yaml
|
19
|
+
inherit_gem:
|
20
|
+
surveymonkey-style:
|
21
|
+
- rubocop/all.yml # Includes Rails, Ruby && RSpec Cops
|
22
|
+
# - rubocop/ruby.yml # Includes Ruby && RSpec Cops
|
23
|
+
```
|
24
|
+
|
25
|
+
### Yardstick
|
26
|
+
|
27
|
+
Pull in the yardstick configuration options like so.
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
require 'yardstick/rake/verify'
|
31
|
+
require 'surveymonkey/style'
|
32
|
+
yardstick_options = YAML.load_file(SurveyMonkey::Style.yardstick)
|
33
|
+
Yardstick::Rake::Verify.new(:yardstick, yardstick_options)
|
34
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
require 'bundler/gem_tasks'
|
6
|
+
require 'rspec/core/rake_task'
|
7
|
+
|
8
|
+
RSpec::Core::RakeTask.new(:spec)
|
9
|
+
|
10
|
+
require 'rubocop/rake_task'
|
11
|
+
|
12
|
+
RuboCop::RakeTask.new(:rubocop)
|
13
|
+
|
14
|
+
require 'yardstick/rake/verify'
|
15
|
+
|
16
|
+
require 'surveymonkey/style'
|
17
|
+
|
18
|
+
yardstick_options = YAML.load_file(SurveyMonkey::Style.yardstick)
|
19
|
+
Yardstick::Rake::Verify.new(:yardstick, yardstick_options)
|
20
|
+
|
21
|
+
task default: [:spec, :rubocop, :yardstick]
|
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'surveymonkey/style'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require 'irb'
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'surveymonkey/style/version'
|
4
|
+
|
5
|
+
module SurveyMonkey
|
6
|
+
# SurveyMonkey common code and linting settings and configurations
|
7
|
+
module Style
|
8
|
+
class Error < StandardError; end
|
9
|
+
|
10
|
+
# Path to yarstick.yml configuration
|
11
|
+
#
|
12
|
+
# @api public
|
13
|
+
#
|
14
|
+
# @example
|
15
|
+
# require 'yardstick/rake/verify'
|
16
|
+
# require 'surveymonkey/style'
|
17
|
+
# yardstick_options = YAML.load_file(SurveyMonkey::Style.yardstick)
|
18
|
+
# Yardstick::Rake::Verify.new(:yardstick, yardstick_options)
|
19
|
+
#
|
20
|
+
# @return [String]
|
21
|
+
def self.yardstick
|
22
|
+
File.expand_path('../../yardstick/.yardstick.yml', __dir__)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SurveyMonkey
|
4
|
+
module Style
|
5
|
+
# Semantic versioning
|
6
|
+
module Version
|
7
|
+
|
8
|
+
MAJOR = 0
|
9
|
+
MINOR = 0
|
10
|
+
PATCH = 1
|
11
|
+
PRE_RELEASE = nil
|
12
|
+
|
13
|
+
# Current semantic version of the gem
|
14
|
+
#
|
15
|
+
# @api public
|
16
|
+
#
|
17
|
+
# @example
|
18
|
+
# "surveymonkey-style #{SurveyMonkey::Style::Version} has been loaded!"
|
19
|
+
#
|
20
|
+
# @return [string] Current semantic version of the gem
|
21
|
+
def self.to_s
|
22
|
+
[MAJOR, MINOR, PATCH, PRE_RELEASE].compact.join('.')
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/rubocop/rspec.yml
ADDED
data/rubocop/ruby.yml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
AllCops:
|
2
|
+
DisplayCopNames: true
|
3
|
+
|
4
|
+
# Whitespace is never a bad thing
|
5
|
+
Layout/EmptyLinesAroundBlockBody:
|
6
|
+
Enabled: false
|
7
|
+
|
8
|
+
# Whitespace is never a bad thing
|
9
|
+
Layout/EmptyLinesAroundClassBody:
|
10
|
+
Enabled: false
|
11
|
+
|
12
|
+
# Whitespace is never a bad thing
|
13
|
+
Layout/EmptyLinesAroundModuleBody:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Layout/LineLength:
|
17
|
+
# Chosen the value of 125 as that is the width GitHub/GitLab provide
|
18
|
+
# before you need to do any horizontal scrolling
|
19
|
+
Max: 125
|
20
|
+
|
21
|
+
# SymbolArrays are jarring to anyone coming from any other language. What are you gaining
|
22
|
+
# anyway with %i[foo bar baz] VS [:foo, :bar, :baz]? Street cred../
|
23
|
+
Style/SymbolArray:
|
24
|
+
EnforcedStyle: brackets
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/surveymonkey/style/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'surveymonkey-style'
|
7
|
+
spec.version = SurveyMonkey::Style::Version
|
8
|
+
spec.authors = ['Michael Deering']
|
9
|
+
spec.email = ['mdeering@mdeering.com']
|
10
|
+
|
11
|
+
spec.summary = 'SurveyMonkey coding standards'
|
12
|
+
spec.description = 'Set of common SurveyMonkey coding and linting settings and configurations'
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
14
|
+
|
15
|
+
# Specify which files should be added to the gem when it is released.
|
16
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
17
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
18
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
end
|
20
|
+
spec.bindir = 'exe'
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ['lib']
|
23
|
+
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: surveymonkey-style
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael Deering
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-02-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '10.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '10.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
41
|
+
description: Set of common SurveyMonkey coding and linting settings and configurations
|
42
|
+
email:
|
43
|
+
- mdeering@mdeering.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- ".rspec"
|
50
|
+
- ".rubocop.yml"
|
51
|
+
- ".travis.yml"
|
52
|
+
- Gemfile
|
53
|
+
- Gemfile.lock
|
54
|
+
- LICENSE.txt
|
55
|
+
- README.md
|
56
|
+
- Rakefile
|
57
|
+
- bin/console
|
58
|
+
- bin/setup
|
59
|
+
- lib/surveymonkey/style.rb
|
60
|
+
- lib/surveymonkey/style/version.rb
|
61
|
+
- rubocop/rspec.yml
|
62
|
+
- rubocop/ruby.yml
|
63
|
+
- surveymonkey-style.gemspec
|
64
|
+
- yardstick/.yardstick.yml
|
65
|
+
homepage:
|
66
|
+
licenses: []
|
67
|
+
metadata: {}
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options: []
|
70
|
+
require_paths:
|
71
|
+
- lib
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 2.3.0
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
requirements: []
|
83
|
+
rubygems_version: 3.1.2
|
84
|
+
signing_key:
|
85
|
+
specification_version: 4
|
86
|
+
summary: SurveyMonkey coding standards
|
87
|
+
test_files: []
|