sigurd 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 87854913818982a8f760090652f1a5f23984d7e9b4c6636a9bd9504bc23a92eb
4
+ data.tar.gz: 186bbe65f6b7b8a4bc6fd8c6241673322db2379f5e84e5b3809b0550951b901b
5
+ SHA512:
6
+ metadata.gz: 89db617898198aeefb795e3e5ea93d287b7d23bd39841af5a8ca264c9aff2aae4b717f609039ab0a41414de5c8d1fc4a1eb231797aa25f6f5c1ee46ba091f05f
7
+ data.tar.gz: 60eeb987aabb420dd01129ae6d8bd0811239283f964854763847094f7b7953b0250f47f97020c02859382b8d5d0d4369516644cb6a8a0b4f3768e2fd18593a97
@@ -0,0 +1,83 @@
1
+ defaults: &defaults
2
+ parallelism: 1
3
+ working_directory: ~/workspace
4
+ docker:
5
+ - image: ruby:2.6
6
+ environment:
7
+ RAILS_ENV: test
8
+ DB_HOST_IP: 127.0.0.1
9
+ version: 2.1
10
+ jobs:
11
+ build:
12
+ <<: *defaults
13
+ steps:
14
+ - checkout
15
+
16
+ # Restore bundle cache & npm cache
17
+ - restore_cache:
18
+ key: 'rails-{{ checksum "Gemfile.lock" }}'
19
+
20
+ # Bundle install dependencies in /tmp/
21
+ # so Dockerfile does not copy them since
22
+ # its base image is different than CircleCI
23
+ - run:
24
+ name: Install bundler
25
+ command: gem install bundler:2.1.4
26
+ - run:
27
+ name: Bundle install
28
+ command: bundle install --path vendor/bundle --jobs=4 --retry=3
29
+
30
+ # Store bundle cache
31
+ - save_cache:
32
+ key: 'rails-{{ checksum "Gemfile.lock" }}'
33
+ paths:
34
+ - ~/workspace/vendor/bundle
35
+
36
+ - persist_to_workspace:
37
+ root: ~/workspace
38
+ paths:
39
+ - .
40
+
41
+ lint:
42
+ <<: *defaults
43
+ steps:
44
+ - attach_workspace:
45
+ at: ~/workspace
46
+ - run:
47
+ name: Install bundler
48
+ command: gem install bundler:2.1.4
49
+ - run:
50
+ name: Point bundle to vendor/bundle
51
+ command: bundle --path vendor/bundle
52
+ - run: bundle exec rubocop --display-only-fail-level-offenses --fail-level C
53
+
54
+ test-rspec:
55
+ <<: *defaults
56
+ steps:
57
+ - attach_workspace:
58
+ at: ~/workspace
59
+ - run:
60
+ name: Install bundler
61
+ command: gem install bundler:2.1.4
62
+ - run:
63
+ name: Point bundle to vendor/bundle
64
+ command: bundle --path vendor/bundle
65
+ - run: mkdir result
66
+ - run:
67
+ name: Running rspec
68
+ command: bundle exec rspec --format progress --format RspecJunitFormatter -o result/rspec.xml
69
+ when: always
70
+ - store_test_results:
71
+ path: ~/workspace/result
72
+
73
+ workflows:
74
+ version: 2
75
+ build-and-test:
76
+ jobs:
77
+ - build
78
+ - test-rspec:
79
+ requires:
80
+ - build
81
+ - lint:
82
+ requires:
83
+ - build
@@ -0,0 +1,39 @@
1
+ # Created by .ignore support plugin (hsz.mobi)
2
+ ### Ruby template
3
+ *.gem
4
+ *.rbc
5
+ /.config
6
+ /coverage/
7
+ /InstalledFiles
8
+ /pkg/
9
+ /spec/reports/
10
+ /spec/examples.txt
11
+ /test/tmp/
12
+ /test/version_tmp/
13
+ /tmp/
14
+ /log/
15
+
16
+ # Used by dotenv library to load environment variables.
17
+ # .env
18
+
19
+ ## Documentation cache and generated files:
20
+ /.yardoc/
21
+ /_yardoc/
22
+ /doc/
23
+ /rdoc/
24
+
25
+ ## Environment normalization:
26
+ /.bundle/
27
+ /vendor/bundle
28
+ /lib/bundler/man/
29
+
30
+ # for a library or gem, you might want to ignore these files since the code is
31
+ # intended to run in multiple environments; otherwise, check them in:
32
+ # Gemfile.lock
33
+ # .ruby-version
34
+ # .ruby-gemset
35
+
36
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
37
+ .rvmrc
38
+
39
+ .idea
File without changes
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper --format documentation
@@ -0,0 +1,312 @@
1
+ require: rubocop-rspec
2
+
3
+ AllCops:
4
+ TargetRubyVersion: 2.4
5
+ Exclude:
6
+ - vendor/**/*
7
+ NewCops: enable
8
+
9
+ # class Plumbus
10
+ # private
11
+ # def smooth; end
12
+ # end
13
+ Layout/AccessModifierIndentation:
14
+ EnforcedStyle: outdent
15
+
16
+ # foo.bar.
17
+ # each do
18
+ # baz
19
+ # end
20
+ Layout/BlockAlignment:
21
+ EnforcedStyleAlignWith: start_of_block
22
+
23
+ # something.
24
+ # method
25
+ #
26
+ # instead of
27
+ #
28
+ # something
29
+ # .method
30
+ Layout/DotPosition:
31
+ EnforcedStyle: trailing
32
+
33
+ # sometimes empty lines can be used for clarity
34
+ Layout/EmptyLinesAroundBlockBody:
35
+ Enabled: false
36
+
37
+ Layout/LineLength:
38
+ Max: 100
39
+ Severity: refactor
40
+ Exclude:
41
+ - 'spec/**/*'
42
+
43
+ # foo = if expression
44
+ # 'bar'
45
+ # end
46
+ Layout/MultilineAssignmentLayout:
47
+ Enabled: true
48
+ EnforcedStyle: same_line
49
+
50
+ # while myvariable.
51
+ # a.
52
+ # b
53
+ #
54
+ # # do something
55
+ # end
56
+ Layout/MultilineMethodCallIndentation:
57
+ EnforcedStyle: indented
58
+
59
+ # def some_method(arg1=true, arg2=42)
60
+ Layout/SpaceAroundEqualsInParameterDefault:
61
+ EnforcedStyle: no_space
62
+
63
+ # do not allow e.g.
64
+ # if (v = array.grep(/foo/))
65
+ # do_something(v)
66
+ # end
67
+ Lint/AssignmentInCondition:
68
+ AllowSafeAssignment: false
69
+ Severity: convention
70
+
71
+ Lint/UnusedBlockArgument:
72
+ AllowUnusedKeywordArguments: true
73
+
74
+ Lint/UnusedMethodArgument:
75
+ AllowUnusedKeywordArguments: true
76
+
77
+ Metrics/AbcSize:
78
+ Severity: refactor
79
+ Max: 20
80
+
81
+ Metrics/BlockLength:
82
+ Severity: refactor
83
+
84
+ Metrics/ClassLength:
85
+ Severity: refactor
86
+
87
+ Metrics/CyclomaticComplexity:
88
+ Severity: refactor
89
+ Max: 20
90
+
91
+ Metrics/MethodLength:
92
+ Severity: refactor
93
+ Max: 30
94
+
95
+ Metrics/ModuleLength:
96
+ Severity: refactor
97
+
98
+ Metrics/ParameterLists:
99
+ Max: 5
100
+ CountKeywordArgs: false
101
+
102
+ Metrics/PerceivedComplexity:
103
+ Severity: refactor
104
+
105
+ # Use alias_method instead of alias
106
+ Style/Alias:
107
+ EnforcedStyle: prefer_alias_method
108
+
109
+ # Allow "and" or "or" to be used as a statement but not a conditional operator
110
+ Style/AndOr:
111
+ EnforcedStyle: conditionals
112
+
113
+ # Force use of File.open {...} instead of File.open but as a refactor
114
+ Style/AutoResourceCleanup:
115
+ Enabled: true
116
+ Severity: refactor
117
+
118
+ # Do not allow multiline {} blocks unless it is chained with a .
119
+ Style/BlockDelimiters:
120
+ EnforcedStyle: braces_for_chaining
121
+
122
+ # bad
123
+ # some_method(x, y, {a: 1, b: 2})
124
+ # some_method(x, y, {a: 1, b: 2}, a: 1, b: 2)
125
+
126
+ # Enable both this:
127
+ # MyModule::MyClass
128
+ # and this:
129
+ # module MyModule
130
+ # class MyClass
131
+ Style/ClassAndModuleChildren:
132
+ Enabled: false
133
+
134
+ # Don't force "reduce" over "inject"
135
+ Style/CollectionMethods:
136
+ Enabled: true
137
+ AutoCorrect: false
138
+ PreferredMethods:
139
+ collect: map
140
+ collect!: map!
141
+ detect: find
142
+ find_all: select
143
+
144
+ Style/DateTime:
145
+ AllowCoercion: true
146
+
147
+ Style/Documentation:
148
+ Exclude:
149
+ - 'app/controllers/**/*'
150
+ - 'app/helpers/**/*'
151
+ - 'db/**/*'
152
+
153
+ # Force documentation for public methods and classes
154
+ Style/DocumentationMethod:
155
+ Enabled: true
156
+ Exclude:
157
+ - 'app/controllers/**/*'
158
+ - 'db/**/*'
159
+
160
+ # Allow else with just nil in it
161
+ Style/EmptyElse:
162
+ EnforcedStyle: empty
163
+
164
+ # Do not allow one-line methods
165
+ Style/EmptyMethod:
166
+ EnforcedStyle: expanded
167
+
168
+ # One-line bodies are fine without a guard clause
169
+ Style/GuardClause:
170
+ MinBodyLength: 2
171
+
172
+ # Require hash syntax { key: value } in all cases
173
+ Style/HashSyntax:
174
+ EnforcedStyle: ruby19_no_mixed_keys
175
+
176
+ # We are still unofficially targeting Ruby 2.3
177
+ Style/HashTransformKeys:
178
+ Enabled: false
179
+
180
+ Style/HashTransformValues:
181
+ Enabled: false
182
+
183
+ Style/IfUnlessModifier:
184
+ Enabled: false
185
+
186
+ # Allow the following:
187
+ # var x = "foo" +
188
+ # "bar"
189
+ Style/LineEndConcatenation:
190
+ Enabled: false
191
+
192
+ # Require parentheses around all method arguments except for whitelist
193
+ Style/MethodCallWithArgsParentheses:
194
+ Enabled: true
195
+ IgnoredMethods:
196
+ - puts
197
+ - require
198
+ - include
199
+ - require_relative
200
+ - specify
201
+ - example
202
+ - describe
203
+ - it
204
+ - to
205
+ - not_to
206
+ - to_not
207
+ - define
208
+ - expect_with
209
+ - mock_with
210
+ - factory
211
+ - travel_to
212
+ - travel
213
+ - get
214
+ - raise
215
+ - attr_accessor
216
+ - class_attribute
217
+ Exclude:
218
+ - 'bin/**/*'
219
+ - 'Gemfile'
220
+
221
+ # Do not allow "end.something"
222
+ Style/MethodCalledOnDoEndBlock:
223
+ Enabled: true
224
+
225
+ Style/OptionHash:
226
+ Enabled: false
227
+
228
+ # Use %i() and %w() instead of []
229
+ Style/PercentLiteralDelimiters:
230
+ PreferredDelimiters:
231
+ '%i': '()'
232
+ '%I': '()'
233
+ '%w': '()'
234
+ '%W': '()'
235
+
236
+ # Allow self.x in all cases - it helps make it obvious when dealing with
237
+ # instance variables
238
+ Style/RedundantSelf:
239
+ Enabled: false
240
+
241
+ # Do not allow single line methods
242
+ Style/SingleLineMethods:
243
+ AllowIfMethodIsEmpty: false
244
+
245
+ # NOTE change this for Ruby < 2.0
246
+ # require %i()
247
+ Style/SymbolArray:
248
+ EnforcedStyle: percent
249
+
250
+ RSpec/AlignLeftLetBrace:
251
+ Enabled: false
252
+
253
+ RSpec/AlignRightLetBrace:
254
+ Enabled: false
255
+
256
+ # Allow allow_any_instance_of().to receive
257
+ RSpec/AnyInstance:
258
+ Enabled: false
259
+
260
+ # Allow describe MyClass, 'some descriptor that isn't a method'
261
+ RSpec/DescribeMethod:
262
+ Enabled: false
263
+
264
+ RSpec/ExampleLength:
265
+ Severity: refactor
266
+ Max: 40
267
+
268
+ # Allow it 'should do something'
269
+ RSpec/ExampleWording:
270
+ Enabled: false
271
+
272
+ # Allow describing specs without only using classes and methods
273
+ RSpec/FilePath:
274
+ Enabled: false
275
+
276
+ # Use before(:each), not before or before(:example)
277
+ RSpec/HookArgument:
278
+ EnforcedStyle: each
279
+
280
+ RSpec/ItBehavesLike:
281
+ EnforcedStyle: it_should_behave_like
282
+
283
+ RSpec/LeakyConstantDeclaration:
284
+ Enabled: false
285
+
286
+ RSpec/MessageChain:
287
+ Severity: refactor
288
+
289
+ # Allow both "allow" and "expect"
290
+ RSpec/MessageExpectation:
291
+ Enabled: false
292
+
293
+ # Use to receive, not to have_received
294
+ RSpec/MessageSpies:
295
+ Enabled: false
296
+
297
+ RSpec/MultipleExpectations:
298
+ Max: 10
299
+ Severity: refactor
300
+
301
+ # Allow both and_return() and block returns (use these for multi-line)
302
+ RSpec/ReturnFromStub:
303
+ Enabled: false
304
+
305
+ RSpec/SubjectStub:
306
+ Severity: refactor
307
+
308
+ RSpec/ExpectActual:
309
+ Enabled: false
310
+
311
+ RSpec/BeforeAfterAll:
312
+ Enabled: false