Skip to content

Commit 1d085a0

Browse files
authored
LittleWeasel 4.0.0 (#1)
LittleWeasel 4.0.0 See README.md for details.
1 parent 31108fb commit 1d085a0

File tree

150 files changed

+272237
-32042
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+272237
-32042
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ spec/reports
1616
test/tmp
1717
test/version_tmp
1818
tmp
19+
LittleWeasel.sublime-*
20+
scratch.txt
21+
readme.txt

.reek.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
exclude_paths:
2+
- vendor
3+
detectors:
4+
TooManyInstanceVariables:
5+
exclude:
6+
- "LittleWeasel::Configuration"
7+
- "LittleWeasel::WordResults"
8+
# private methods do not have to depend on instance state
9+
# https://github.com/troessner/reek/blob/master/docs/Utility-Function.md
10+
UtilityFunction:
11+
public_methods_only: true
12+
# Check for variable name that doesn't communicate its intent well enough
13+
# https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Variable-Name.md
14+
UncommunicativeVariableName:
15+
accept:
16+
- /^_$/
17+
- /^e$/

.rspec

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
--color
2-
--profile
1+
--require spec_helper
2+
--format d
3+
--force-color
4+
--warnings

.rubocop.yml

+187
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
require:
2+
- rubocop-performance
3+
- rubocop-rspec
4+
5+
AllCops:
6+
TargetRubyVersion: 3.0.1
7+
NewCops: enable
8+
Exclude:
9+
- '.git/**/*'
10+
- '.idea/**/*'
11+
- 'init/*'
12+
- 'Rakefile'
13+
- '*.gemspec'
14+
- 'spec/**/*'
15+
- 'vendor/**/*'
16+
17+
# Align the elements of a hash literal if they span more than one line.
18+
Layout/HashAlignment:
19+
EnforcedLastArgumentHashStyle: always_ignore
20+
21+
# Alignment of parameters in multi-line method definition.
22+
# The `with_fixed_indentation` style aligns the following lines with one
23+
# level of indentation relative to the start of the line with the method
24+
# definition.
25+
#
26+
# def my_method(a,
27+
# b)
28+
Layout/ParameterAlignment:
29+
EnforcedStyle: with_fixed_indentation
30+
31+
# Alignment of parameters in multi-line method call.
32+
# The `with_fixed_indentation` style aligns the following lines with one
33+
# level of indentation relative to the start of the line with the method call.
34+
#
35+
# my_method(a,
36+
# b)
37+
Layout/ArgumentAlignment:
38+
EnforcedStyle: with_fixed_indentation
39+
40+
# a = case n
41+
# when 0
42+
# x * 2
43+
# else
44+
# y / 3
45+
# end
46+
Layout/CaseIndentation:
47+
EnforcedStyle: end
48+
49+
# Enforces a configured order of definitions within a class body
50+
Layout/ClassStructure:
51+
Enabled: true
52+
53+
# Align `end` with the matching keyword or starting expression except for
54+
# assignments, where it should be aligned with the LHS.
55+
Layout/EndAlignment:
56+
EnforcedStyleAlignWith: variable
57+
AutoCorrect: true
58+
59+
# The `consistent` style enforces that the first element in an array
60+
# literal where the opening bracket and the first element are on
61+
# seprate lines is indented the same as an array literal which is not
62+
# defined inside a method call.
63+
Layout/FirstArrayElementIndentation:
64+
EnforcedStyle: consistent
65+
66+
# The `consistent` style enforces that the first key in a hash
67+
# literal where the opening brace and the first key are on
68+
# seprate lines is indented the same as a hash literal which is not
69+
# defined inside a method call.
70+
Layout/FirstHashElementIndentation:
71+
EnforcedStyle: consistent
72+
73+
# Indent multi-line methods instead of aligning with periods
74+
Layout/MultilineMethodCallIndentation:
75+
EnforcedStyle: indented
76+
77+
# Allow `debug` in tasks for now
78+
Lint/Debugger:
79+
Exclude:
80+
- 'RakeFile'
81+
82+
# A calculated magnitude based on number of assignments, branches, and
83+
# conditions.
84+
# NOTE: This is temporarily disabled until we can eliminate existing Rubocop
85+
# complaints
86+
Metrics/AbcSize:
87+
Enabled: false
88+
89+
# Avoid long blocks with many lines.
90+
Metrics/BlockLength:
91+
Exclude:
92+
- 'RakeFile'
93+
- 'db/seeds.rb'
94+
- 'spec/**/*.rb'
95+
96+
# Avoid classes longer than 100 lines of code.
97+
# NOTE: This is temporarily disabled until we can eliminate existing Rubocop
98+
# complaints
99+
Metrics/ClassLength:
100+
Max: 200
101+
Exclude:
102+
- 'spec/**/*.rb'
103+
104+
# A complexity metric that is strongly correlated to the number of test cases
105+
# needed to validate a method.
106+
Metrics/CyclomaticComplexity:
107+
Max: 9
108+
109+
# Limit lines to 80 characters
110+
Layout/LineLength:
111+
Exclude:
112+
- 'RakeFile'
113+
- 'spec/**/*.rb'
114+
115+
# Avoid methods longer than 15 lines of code.
116+
Metrics/MethodLength:
117+
Max: 20
118+
IgnoredMethods:
119+
- swagger_path
120+
- operation
121+
122+
123+
# A complexity metric geared towards measuring complexity for a human reader.
124+
Metrics/PerceivedComplexity:
125+
Max: 10
126+
127+
Naming/FileName:
128+
Exclude:
129+
- 'lib/LittleWeasel.rb'
130+
131+
# Allow `downcase == ` instead of forcing `casecmp`
132+
Performance/Casecmp:
133+
Enabled: false
134+
135+
# Require children definitions to be nested or compact in classes and modules
136+
Style/ClassAndModuleChildren:
137+
Enabled: false
138+
139+
# Document classes and non-namespace modules.
140+
# (Disabled for now, may revisit later)
141+
Style/Documentation:
142+
Enabled: false
143+
144+
# Checks the formatting of empty method definitions.
145+
Style/EmptyMethod:
146+
EnforcedStyle: expanded
147+
148+
# Add the frozen_string_literal comment to the top of files to help transition
149+
# to frozen string literals by default.
150+
Style/FrozenStringLiteralComment:
151+
EnforcedStyle: always
152+
153+
# Check for conditionals that can be replaced with guard clauses
154+
Style/GuardClause:
155+
Enabled: false
156+
157+
Style/MixinUsage:
158+
Exclude:
159+
- 'RakeFile'
160+
161+
# Avoid multi-line method signatures.
162+
Style/MultilineMethodSignature:
163+
Enabled: true
164+
165+
# Don't use option hashes when you can use keyword arguments.
166+
Style/OptionHash:
167+
Enabled: true
168+
169+
# Use return instead of return nil.
170+
Style/ReturnNil:
171+
Enabled: true
172+
173+
# Allow code like `return x, y` as it's occasionally handy.
174+
Style/RedundantReturn:
175+
AllowMultipleReturnValues: true
176+
177+
# Prefer symbols instead of strings as hash keys.
178+
Style/StringHashKeys:
179+
Enabled: true
180+
181+
# Checks if configured preferred methods are used over non-preferred.
182+
Style/StringMethods:
183+
Enabled: true
184+
185+
# Checks for use of parentheses around ternary conditions.
186+
Style/TernaryParentheses:
187+
EnforcedStyle: require_parentheses_when_complex

.ruby-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0-p481
1+
3.0.1

.yardopts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--protected
2+
--private

Gemfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

35
# Specify your gem's dependencies in LittleWeasel.gemspec
4-
gemspec
6+
gemspec

LittleWeasel.gemspec

+31-18
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,41 @@
1-
# coding: utf-8
2-
lib = File.expand_path('../lib', __FILE__)
1+
# frozen_string_literal: true
2+
3+
lib = File.expand_path('lib', __dir__)
34
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
45
require 'LittleWeasel/version'
56

67
Gem::Specification.new do |spec|
7-
spec.name = "LittleWeasel"
8+
spec.name = 'LittleWeasel'
89
spec.version = LittleWeasel::VERSION
9-
spec.authors = ["Gene M. Angelo, Jr."]
10-
spec.email = ["[email protected]"]
11-
spec.description = %q{Simple spellchecker for single, or multiple word blocks.}
12-
spec.summary = %q{Simply checks a word or group of words for validity against an english dictionary file.}
13-
spec.homepage = "http://www.geneangelo.com"
14-
spec.license = "MIT"
10+
spec.authors = ['Gene M. Angelo, Jr.']
11+
spec.email = ['[email protected]']
12+
spec.description = 'Simple spellchecker for single, or multiple word blocks.'
13+
spec.summary = 'Simply checks a word or group of words for validity against an english dictionary file.'
14+
spec.homepage = 'http://www.geneangelo.com'
15+
spec.license = 'MIT'
1516

16-
spec.files = `git ls-files`.split($/)
17+
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
1718
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
1819
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19-
spec.require_paths = ["lib"]
20+
spec.require_paths = ['lib']
2021

21-
spec.required_ruby_version = '~> 2.0'
22-
spec.add_runtime_dependency 'activesupport', '~> 4.1', '>= 4.1.1'
23-
spec.add_development_dependency "bundler", "~> 1.3"
24-
spec.add_development_dependency "rake", '~> 0'
25-
spec.add_development_dependency "rspec", '~> 3.0', '>= 3.0.0'
26-
spec.add_development_dependency "yard", "0.8.6.1"
27-
spec.add_development_dependency "redcarpet", '~> 2.3', '>= 2.3.0'
22+
spec.required_ruby_version = '~> 3.0', '>= 3.0.1'
23+
spec.add_runtime_dependency 'activesupport', '~> 6.1', '>= 6.1.3.2'
24+
spec.add_development_dependency 'benchmark-ips', '~> 2.3'
25+
spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.17'
26+
spec.add_development_dependency 'factory_bot', '~> 6.2'
27+
spec.add_development_dependency 'pry-byebug', '~> 3.9'
28+
spec.add_development_dependency 'rake', '~> 0'
29+
spec.add_development_dependency 'redcarpet', '~> 3.5', '>= 3.5.1'
30+
spec.add_development_dependency 'reek', '~> 6.0', '>= 6.0.4'
31+
spec.add_development_dependency 'rspec', '~> 3.10'
32+
# This verson of rubocop is returning errors.
33+
# spec.add_development_dependency 'rubocop', '~> 1.14'
34+
spec.add_development_dependency 'rubocop', '~> 1.9.1'
35+
spec.add_development_dependency 'rubocop-performance', '~> 1.11', '>= 1.11.3'
36+
spec.add_development_dependency 'rubocop-rspec', '~> 2.3'
37+
spec.add_development_dependency 'simplecov', '~> 0.21.2'
38+
# Needed for yard
39+
spec.add_development_dependency 'webrick', '~> 1.7'
40+
spec.add_development_dependency 'yard', '~> 0.9.26'
2841
end

0 commit comments

Comments
 (0)