fig_tree 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 359a81208b3825233a55fd631b7b4e9c00ba34451286679c5ceb2c93cc50787d
4
+ data.tar.gz: 58f8342253d10c7d37575a05761b05f89d9bff3579f85ba682cc5341a0b55b29
5
+ SHA512:
6
+ metadata.gz: 6ec628b03063fc54940a2a6503362d4c13937541865a786f1a1197719b0b4e4e08a4eb24c07acf32cd99237010ef53b7d2247c224f7900da41567a8b414d30c4
7
+ data.tar.gz: d29f30d43a4bc821da27b36c5c3c3af7e983780eb758f6baa5a55e638427a94844a2284341977e3a75d0792ab8a725cc9c80e9c20608d61e5ebf1c02bb015d08
@@ -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
data/.gitignore ADDED
@@ -0,0 +1,41 @@
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
40
+ Gemfile.lock
41
+
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper --format documentation
data/.rubocop.yml ADDED
@@ -0,0 +1,320 @@
1
+ require: rubocop-rspec
2
+
3
+ AllCops:
4
+ TargetRubyVersion: 2.4
5
+ Exclude:
6
+ - vendor/**/*
7
+ - Guardfile
8
+ NewCops: enable
9
+
10
+ # class Plumbus
11
+ # private
12
+ # def smooth; end
13
+ # end
14
+ Layout/AccessModifierIndentation:
15
+ EnforcedStyle: outdent
16
+
17
+ # foo.bar.
18
+ # each do
19
+ # baz
20
+ # end
21
+ Layout/BlockAlignment:
22
+ EnforcedStyleAlignWith: start_of_block
23
+
24
+ # something.
25
+ # method
26
+ #
27
+ # instead of
28
+ #
29
+ # something
30
+ # .method
31
+ Layout/DotPosition:
32
+ EnforcedStyle: trailing
33
+
34
+ # sometimes empty lines can be used for clarity
35
+ Layout/EmptyLinesAroundBlockBody:
36
+ Enabled: false
37
+
38
+ Layout/LineLength:
39
+ Max: 100
40
+ Severity: refactor
41
+ Exclude:
42
+ - 'spec/**/*'
43
+
44
+ # foo = if expression
45
+ # 'bar'
46
+ # end
47
+ Layout/MultilineAssignmentLayout:
48
+ Enabled: true
49
+ EnforcedStyle: same_line
50
+
51
+ # while myvariable.
52
+ # a.
53
+ # b
54
+ #
55
+ # # do something
56
+ # end
57
+ Layout/MultilineMethodCallIndentation:
58
+ EnforcedStyle: indented
59
+
60
+ # def some_method(arg1=true, arg2=42)
61
+ Layout/SpaceAroundEqualsInParameterDefault:
62
+ EnforcedStyle: no_space
63
+
64
+ # do not allow e.g.
65
+ # if (v = array.grep(/foo/))
66
+ # do_something(v)
67
+ # end
68
+ Lint/AssignmentInCondition:
69
+ AllowSafeAssignment: false
70
+ Severity: convention
71
+
72
+ Lint/UnusedBlockArgument:
73
+ AllowUnusedKeywordArguments: true
74
+
75
+ Lint/UnusedMethodArgument:
76
+ AllowUnusedKeywordArguments: true
77
+
78
+ Metrics/AbcSize:
79
+ Severity: refactor
80
+ Max: 25
81
+
82
+ Metrics/BlockLength:
83
+ Severity: refactor
84
+ Exclude:
85
+ - spec/**/*
86
+
87
+ Metrics/ClassLength:
88
+ Severity: refactor
89
+ Max: 150
90
+
91
+ Metrics/CyclomaticComplexity:
92
+ Severity: refactor
93
+ Max: 20
94
+
95
+ Metrics/MethodLength:
96
+ Severity: refactor
97
+ Max: 30
98
+
99
+ Metrics/ModuleLength:
100
+ Severity: refactor
101
+
102
+ Metrics/ParameterLists:
103
+ Max: 5
104
+ CountKeywordArgs: false
105
+
106
+ Metrics/PerceivedComplexity:
107
+ Severity: refactor
108
+
109
+ # Use alias_method instead of alias
110
+ Style/Alias:
111
+ EnforcedStyle: prefer_alias_method
112
+
113
+ # Allow "and" or "or" to be used as a statement but not a conditional operator
114
+ Style/AndOr:
115
+ EnforcedStyle: conditionals
116
+
117
+ # Force use of File.open {...} instead of File.open but as a refactor
118
+ Style/AutoResourceCleanup:
119
+ Enabled: true
120
+ Severity: refactor
121
+
122
+ # Do not allow multiline {} blocks unless it is chained with a .
123
+ Style/BlockDelimiters:
124
+ EnforcedStyle: braces_for_chaining
125
+
126
+ # bad
127
+ # some_method(x, y, {a: 1, b: 2})
128
+ # some_method(x, y, {a: 1, b: 2}, a: 1, b: 2)
129
+
130
+ # Enable both this:
131
+ # MyModule::MyClass
132
+ # and this:
133
+ # module MyModule
134
+ # class MyClass
135
+ Style/ClassAndModuleChildren:
136
+ Enabled: false
137
+
138
+ # Don't force "reduce" over "inject"
139
+ Style/CollectionMethods:
140
+ Enabled: true
141
+ AutoCorrect: false
142
+ PreferredMethods:
143
+ collect: map
144
+ collect!: map!
145
+ detect: find
146
+ find_all: select
147
+
148
+ Style/DateTime:
149
+ AllowCoercion: true
150
+
151
+ Style/Documentation:
152
+ Exclude:
153
+ - 'app/controllers/**/*'
154
+ - 'app/helpers/**/*'
155
+ - 'db/**/*'
156
+
157
+ # Force documentation for public methods and classes
158
+ Style/DocumentationMethod:
159
+ Enabled: true
160
+ Exclude:
161
+ - 'app/controllers/**/*'
162
+ - 'db/**/*'
163
+
164
+ # Allow else with just nil in it
165
+ Style/EmptyElse:
166
+ EnforcedStyle: empty
167
+
168
+ # Do not allow one-line methods
169
+ Style/EmptyMethod:
170
+ EnforcedStyle: expanded
171
+
172
+ # One-line bodies are fine without a guard clause
173
+ Style/GuardClause:
174
+ MinBodyLength: 2
175
+
176
+ # Require hash syntax { key: value } in all cases
177
+ Style/HashSyntax:
178
+ EnforcedStyle: ruby19_no_mixed_keys
179
+
180
+ # We are still unofficially targeting Ruby 2.3
181
+ Style/HashTransformKeys:
182
+ Enabled: false
183
+
184
+ Style/HashTransformValues:
185
+ Enabled: false
186
+
187
+ Style/IfUnlessModifier:
188
+ Enabled: false
189
+
190
+ # Allow the following:
191
+ # var x = "foo" +
192
+ # "bar"
193
+ Style/LineEndConcatenation:
194
+ Enabled: false
195
+
196
+ # Require parentheses around all method arguments except for whitelist
197
+ Style/MethodCallWithArgsParentheses:
198
+ Enabled: true
199
+ IgnoredMethods:
200
+ - puts
201
+ - require
202
+ - include
203
+ - require_relative
204
+ - specify
205
+ - example
206
+ - describe
207
+ - it
208
+ - to
209
+ - not_to
210
+ - to_not
211
+ - define
212
+ - expect_with
213
+ - mock_with
214
+ - factory
215
+ - travel_to
216
+ - travel
217
+ - get
218
+ - raise
219
+ - attr_accessor
220
+ - class_attribute
221
+ Exclude:
222
+ - 'bin/**/*'
223
+ - 'Gemfile'
224
+
225
+ # Do not allow "end.something"
226
+ Style/MethodCalledOnDoEndBlock:
227
+ Enabled: true
228
+
229
+ Style/OptionHash:
230
+ Enabled: false
231
+
232
+ # Use %i() and %w() instead of []
233
+ Style/PercentLiteralDelimiters:
234
+ PreferredDelimiters:
235
+ '%i': '()'
236
+ '%I': '()'
237
+ '%w': '()'
238
+ '%W': '()'
239
+
240
+ # Allow self.x in all cases - it helps make it obvious when dealing with
241
+ # instance variables
242
+ Style/RedundantSelf:
243
+ Enabled: false
244
+
245
+ # Do not allow single line methods
246
+ Style/SingleLineMethods:
247
+ AllowIfMethodIsEmpty: false
248
+
249
+ # NOTE change this for Ruby < 2.0
250
+ # require %i()
251
+ Style/SymbolArray:
252
+ EnforcedStyle: percent
253
+
254
+ RSpec/AlignLeftLetBrace:
255
+ Enabled: false
256
+
257
+ RSpec/AlignRightLetBrace:
258
+ Enabled: false
259
+
260
+ # Allow allow_any_instance_of().to receive
261
+ RSpec/AnyInstance:
262
+ Enabled: false
263
+
264
+ # Allow describe MyClass, 'some descriptor that isn't a method'
265
+ RSpec/DescribeMethod:
266
+ Enabled: false
267
+
268
+ RSpec/ExampleLength:
269
+ Severity: refactor
270
+ Max: 40
271
+
272
+ # Allow it 'should do something'
273
+ RSpec/ExampleWording:
274
+ Enabled: false
275
+
276
+ # Allow describing specs without only using classes and methods
277
+ RSpec/FilePath:
278
+ Enabled: false
279
+
280
+ # Use before(:each), not before or before(:example)
281
+ RSpec/HookArgument:
282
+ EnforcedStyle: each
283
+
284
+ RSpec/ItBehavesLike:
285
+ EnforcedStyle: it_should_behave_like
286
+
287
+ RSpec/LeakyConstantDeclaration:
288
+ Enabled: false
289
+
290
+ RSpec/MessageChain:
291
+ Severity: refactor
292
+
293
+ # Allow both "allow" and "expect"
294
+ RSpec/MessageExpectation:
295
+ Enabled: false
296
+
297
+ # Use to receive, not to have_received
298
+ RSpec/MessageSpies:
299
+ Enabled: false
300
+
301
+ RSpec/MultipleExpectations:
302
+ Max: 10
303
+ Severity: refactor
304
+
305
+ # Allow both and_return() and block returns (use these for multi-line)
306
+ RSpec/ReturnFromStub:
307
+ Enabled: false
308
+
309
+ RSpec/SubjectStub:
310
+ Severity: refactor
311
+
312
+ RSpec/ExpectActual:
313
+ Enabled: false
314
+
315
+ RSpec/BeforeAfterAll:
316
+ Enabled: false
317
+
318
+ Gemspec/RequiredRubyVersion:
319
+ Enabled: false
320
+