fera-api 0.1.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e29c0c0d0d005fc442519426dfbdf44d7f79188251f2b077a06b98b62d8108b7
4
- data.tar.gz: 1cbf38f201a769c0f2148363034ab1d91affc2bcffc5778413eb2651276410fc
3
+ metadata.gz: 340f111ef9ae910374f8b8556b80a4c7cea4a982be22c807e1330b52f5a222a8
4
+ data.tar.gz: 758fe26ac14a9a4012039d14800e657690d821862eda47ea8e0866ea714a16d1
5
5
  SHA512:
6
- metadata.gz: 02f31cc04ea2d869ba3e8531146a1c515469e9ca9178302bc699f43473bb75970a7d0ac92ad98293f298681edac44b546def1cfbd620d68cc05169997c60d31c
7
- data.tar.gz: 4f3d7ea4e03bccbf0b30da1aa8fa2640de2b8b1fb3486f49b54683f5c291139e25e4350bbd6219a9f3d76630f14054dc1a924405ca4f8a978729524fca5461dc
6
+ metadata.gz: db7db0bd5a14e64dce22219b385d21db5675ddc5dc07196756c2a88dc20cb628786a48e911b5ad638b741c2124be96e7008dff341366d4a7ab83e827b767d5b5
7
+ data.tar.gz: 53ea2d445404901fc1377edd5720f186e3cccad97eafd420f4e13959fedb55d8778ca39847e3eb2622226b06b9261e5fbc38417f3d23a523acfe083701f84303
data/.rubocop.yml CHANGED
@@ -1,56 +1,173 @@
1
- Style/StringLiterals:
2
- Enabled: true
3
- EnforcedStyle: double_quotes
4
- Style/StringLiteralsInInterpolation:
5
- Enabled: true
6
- EnforcedStyle: double_quotes
7
- Style/FrozenStringLiteralComment:
1
+ # Base was copied from https://github.com/sider/meowcop/blob/master/config/rubocop.yml which is what Sider uses by default
2
+ AllCops:
3
+ TargetRubyVersion: 2.3
4
+ Exclude:
5
+ - 'vendor/**/*'
6
+ - 'db/schema.rb'
7
+ - 'node_modules/**/*'
8
+ - 'tmp/**/*'
9
+ - 'lib/tasks/one_offs/**/*' # We don't really care about linting one-off tasks
10
+ - 'app/migrators/**/*' # Migrators are one-off tasks so there isn't much need to lint them
11
+ DisplayCopNames: true
12
+ DisplayStyleGuide: true
13
+ NewCops: enable
14
+
15
+ Lint/NonLocalExitFromIterator:
16
+ Enabled: false # We actually believe that it is more readable with premature returns
17
+ Layout/BeginEndAlignment:
18
+ Enabled: false # We believe it's more readable to have begin blocks aligned to the end blocks (and also helps with code smells)
19
+ Lint/AmbiguousRegexpLiteral:
8
20
  Enabled: false
9
- Layout/LeadingCommentSpace:
21
+ Lint/AssignmentInCondition:
10
22
  Enabled: false
11
- Layout/LineLength:
12
- Max: 200
13
- # If AbcSize > 50, really really really really really really really complex
14
23
  Metrics/AbcSize:
15
- Max: 50
24
+ Max: 60
16
25
  # Use the default setting
17
- Metrics/BlockNesting:
18
- Enabled: true
19
26
  Metrics/BlockLength:
20
27
  Max: 200
21
28
  Exclude:
22
29
  # RuboCop's default
23
30
  - 'Rakefile'
24
31
  - '**/*.rake'
25
- - 'spec/**/*.rb'
26
- # In many cases, config/routes.rb has very long blocks
32
+ # In many cases, config/routes.rb has very long block
27
33
  - 'config/routes.rb'
28
34
  Metrics/ClassLength:
29
35
  Enabled: false
30
36
  Metrics/CyclomaticComplexity:
31
- Max: 30
37
+ Max: 60
32
38
  Metrics/MethodLength:
33
39
  Enabled: false
34
40
  Metrics/ModuleLength:
35
41
  Enabled: false
36
42
  Metrics/ParameterLists:
37
- Enabled: true
38
- Max: 4
43
+ Max: 5
39
44
  Metrics/PerceivedComplexity:
40
45
  Enabled: false
41
- Layout/TrailingEmptyLines:
46
+ Layout/ArgumentAlignment:
47
+ Enabled: false
48
+ Layout/HashAlignment:
49
+ Enabled: false
50
+ Layout/ParameterAlignment:
51
+ Enabled: false
52
+ Layout/IndentationWidth:
53
+ Enabled: false
54
+ Layout/FirstHashElementIndentation:
55
+ Enabled: false
56
+ Layout/HeredocIndentation:
57
+ Enabled: false
58
+ Layout/LineLength:
59
+ Max: 200
60
+ AllowedPatterns: ['^\s*#', '^\s*([a-zA-Z]*[lL]og[a-zA-Z]*)[ (]', '^\s*[''"]', '.*#.{30,300}', '^\s*[a-z_]:\s*".+",?[}\s]*$']
61
+ Layout/MultilineArrayBraceLayout:
62
+ Enabled: false
63
+ Layout/MultilineAssignmentLayout:
64
+ Enabled: false
65
+ Layout/MultilineBlockLayout:
66
+ Enabled: false
67
+ Layout/MultilineHashBraceLayout:
68
+ Enabled: false
69
+ Layout/MultilineMethodCallBraceLayout:
70
+ Enabled: false
71
+ Layout/MultilineMethodCallIndentation:
42
72
  Enabled: false
43
- Layout/TrailingWhitespace:
73
+ Layout/MultilineMethodDefinitionBraceLayout:
44
74
  Enabled: false
45
- Layout/BlockAlignment:
75
+ Layout/MultilineOperationIndentation:
46
76
  Enabled: false
47
- Layout/DefEndAlignment:
77
+ Layout/RescueEnsureAlignment:
48
78
  Enabled: false
49
- Layout/EndAlignment:
79
+ Layout/SpaceAfterNot:
50
80
  Enabled: false
51
- Layout/ClosingHeredocIndentation:
81
+ Layout/SpaceBeforeBlockBraces:
52
82
  Enabled: false
53
- Layout/LeadingEmptyLines:
83
+ Layout/SpaceInLambdaLiteral:
54
84
  Enabled: false
55
85
  Layout/SpaceInsideStringInterpolation:
56
86
  EnforcedStyle: space
87
+ Naming/PredicateName:
88
+ Enabled: false # As of February 2022 we now want some methods to have is_ prefix so it is congruent with JavaScript
89
+ Naming/VariableNumber:
90
+ Enabled: false
91
+ Style/AsciiComments:
92
+ Enabled: false # It's 2022, emojis are everywhere
93
+ Style/Alias:
94
+ EnforcedStyle: prefer_alias_method
95
+ Style/CaseLikeIf:
96
+ Enabled: false
97
+ Style/CommentAnnotation:
98
+ Enabled: false # Don't really care about being picky on comments like this. Not worth slowing down the developer.
99
+ Style/CommentedKeyword:
100
+ Enabled: false # We want to allow comments on single-line method definitions like `# @alias`
101
+ Style/ConstantVisibility:
102
+ Enabled: false
103
+ Style/Copyright:
104
+ Enabled: false
105
+ Style/DisableCopsWithinSourceCodeDirective:
106
+ Enabled: false # Allow disabling cops and we will use PRs to determine whether it should be enforced
107
+ Style/Documentation:
108
+ Enabled: false # We will decide in PR whether public method should be documented or not.
109
+ Style/DocumentationMethod:
110
+ Enabled: false # We will decide in PR whether public method should be documented or not.
111
+ Style/EmptyElse:
112
+ AllowComments: true # When a comment is there then it means the programmer thought about the case so we can ignore it.
113
+ EnforcedStyle: empty # When a comment or nil is there it means the programmer thought about the case, so there is no need for concern
114
+ Style/FloatDivision:
115
+ Enabled: false # Sometimes we're trying to force the number to become a float and it could be nil
116
+ Style/FrozenStringLiteralComment:
117
+ Enabled: false
118
+ Style/GlobalVars:
119
+ Enabled: false # If we're using global variables, we have a darn good reason or it should be blocked in the PR
120
+ Style/IfUnlessModifier:
121
+ Enabled: false # This isn't always easier to read. Sometimes you want to put the IF in front of the block of code to make it more clear.
122
+ Style/ImplicitRuntimeError:
123
+ Enabled: false # These are actually readable as long as we all know that they represent a RuntimeError
124
+ Style/InlineComment:
125
+ Enabled: false # Trailing inline comments are pretty compact and more readable
126
+ Style/Lambda:
127
+ Enabled: false
128
+ Style/LambdaCall:
129
+ Enabled: false
130
+ Style/MethodCallWithArgsParentheses:
131
+ Enabled: false
132
+ Style/MethodCallWithoutArgsParentheses:
133
+ Enabled: true # We use whatever is more readable
134
+ Style/MethodCalledOnDoEndBlock:
135
+ Enabled: false # Actually don't mind these - they look more readable
136
+ Style/MissingElse:
137
+ Enabled: false # Sometimes it's obvious we don't care about the else case (e.g. if we're prematurely returning from method)
138
+ Style/MultilineBlockChain:
139
+ Enabled: false # Sometimes these are more readable
140
+ Style/MutableConstant:
141
+ Enabled: false
142
+ Style/MapToHash:
143
+ Enabled: false # We believe it's more readable to use map vs hash with block syntax
144
+ Style/NumericPredicate:
145
+ Enabled: false # .zero? and .positive? are a bit less readable than == 0 IMO
146
+ Style/OptionHash:
147
+ Enabled: false # It is more intuitive to pass option hashes to other objects in many times
148
+ Style/OpenStructUse:
149
+ Enabled: false
150
+ Style/RedundantRegexpCharacterClass:
151
+ Enabled: false # No need to make regexp less readable than they already are by reducing redundancy
152
+ Style/RedundantRegexpEscape:
153
+ Enabled: false # No need to make regexp less readable than they already are by reducing redundancy
154
+ Style/RedundantSelf:
155
+ Enabled: false # Sometimes it's actually more readable to explicitly reference self
156
+ Style/RegexpLiteral:
157
+ Enabled: false
158
+ Style/ReturnNil:
159
+ Enabled: false # Returning nil is more clear what is happening and can prevent issues with returning mixed types
160
+ Style/Send:
161
+ Enabled: false
162
+ Style/SingleLineMethods:
163
+ Enabled: false # Sometimes these are more compact and easier to read. No need to spam our file with simple method definitions.
164
+ Style/StringLiterals:
165
+ Enabled: false
166
+ Style/SymbolArray:
167
+ Enabled: false
168
+ Style/TernaryParentheses:
169
+ Enabled: false
170
+ Style/TrailingCommaInArrayLiteral:
171
+ EnforcedStyleForMultiline: consistent_comma # It makes managing arrays much easier when we have commas at the end
172
+ Style/TrailingCommaInHashLiteral:
173
+ EnforcedStyleForMultiline: consistent_comma # It makes managing hashes much easier when we have commas at the end
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.6
data/.spellr.yml ADDED
@@ -0,0 +1,9 @@
1
+ includes:
2
+ - lib/**/*
3
+ excludes:
4
+ - node_modules/**/*
5
+ - app/**/*.min*
6
+ - "**/*.map"
7
+ word_minimum_length: 4 # any words shorter than this will be ignored
8
+ key_minimum_length: 6 # any strings shorter than this won't be considered non-word strings
9
+ key_heuristic_weight: 5 # higher values mean strings are more likely to be considered words or non-words by the classifier.