jt_tools 0.0.2 → 0.0.3

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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +12 -2
  3. data/.github/FUNDING.yml +4 -0
  4. data/README.md +19 -10
  5. data/_config.yml +2 -1
  6. data/bin/test +17 -5
  7. data/jt_tools.gemspec +1 -1
  8. data/lib/install/.circleci/{config.yml.sample → config.yml} +88 -19
  9. data/lib/install/.dependabot/config.yml +3 -3
  10. data/lib/install/.editorconfig +301 -0
  11. data/lib/install/.erb-lint.yml +2 -2
  12. data/lib/install/.eslintrc.js +8 -11
  13. data/lib/install/.pronto.yml +3 -5
  14. data/lib/install/.reek.yml +3 -6
  15. data/lib/install/.rubocop.yml +22 -19
  16. data/lib/install/.simplecov +17 -0
  17. data/lib/install/{.yamllint → .yamllint.yml} +2 -1
  18. data/lib/install/Brewfile +6 -2
  19. data/lib/install/Gemfile.tools +2 -2
  20. data/lib/install/app.json +17 -46
  21. data/lib/install/bin/git-hooks/post-merge.sample +0 -9
  22. data/lib/install/bin/git-hooks/pre-push.sample +1 -1
  23. data/lib/install/bin/heroku-postdeploy +1 -7
  24. data/lib/install/bin/heroku-release +4 -1
  25. data/lib/install/bin/{lint-github-pr → lint-pr} +0 -0
  26. data/lib/install/bin/tools-setup +1 -1
  27. data/lib/install/bin/tools-upgrade +2 -0
  28. data/lib/install/codecov.yml +5 -4
  29. data/lib/install/config/rails_best_practices.yml +43 -0
  30. data/lib/jt_tools/railtie.rb +2 -0
  31. data/lib/{version.rb → jt_tools/version.rb} +1 -1
  32. data/lib/jt_tools.rb +2 -0
  33. data/lib/tasks/install.rake +3 -1
  34. data/template.rb +36 -17
  35. metadata +11 -12
  36. data/_sample/test_erb.html.erb +0 -2
  37. data/_sample/test_eslint.js +0 -1
  38. data/_sample/test_yamlint.yml +0 -1
  39. data/lib/install/.prettierrc.js +0 -4
  40. data/lib/install/lib/test/coverage.rb +0 -14
@@ -0,0 +1,301 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ indent_size = 2
7
+ indent_style = space
8
+ insert_final_newline = true
9
+ max_line_length = 113
10
+ tab_width = 2
11
+ trim_trailing_whitespace = true
12
+
13
+ [*.css]
14
+ ij_continuation_indent_size = 2
15
+ ij_css_align_closing_brace_with_properties = false
16
+ ij_css_blank_lines_around_nested_selector = 1
17
+ ij_css_blank_lines_between_blocks = 1
18
+ # ij_css_brace_placement = 0
19
+ # ij_css_enforce_quotes_on_format = false
20
+ # ij_css_hex_color_long_format = false
21
+ # ij_css_hex_color_lower_case = false
22
+ # ij_css_hex_color_short_format = false
23
+ # ij_css_hex_color_upper_case = false
24
+ ij_css_keep_blank_lines_in_code = 2
25
+ # ij_css_keep_indents_on_empty_lines = false
26
+ # ij_css_keep_single_line_blocks = false
27
+ ij_css_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
28
+ # ij_css_space_after_colon = true
29
+ # ij_css_space_before_opening_brace = true
30
+ # ij_css_use_double_quotes = true
31
+ # ij_css_value_alignment = 0
32
+
33
+ [*.haml]
34
+ tab_width = 2
35
+ ij_haml_keep_indents_on_empty_lines = false
36
+
37
+ [*.properties]
38
+ # ij_properties_align_group_field_declarations = false
39
+
40
+ [*.scss]
41
+ ij_continuation_indent_size = 2
42
+ ij_scss_align_closing_brace_with_properties = false
43
+ ij_scss_blank_lines_around_nested_selector = 1
44
+ ij_scss_blank_lines_between_blocks = 1
45
+ # ij_scss_brace_placement = 0
46
+ # ij_scss_enforce_quotes_on_format = false
47
+ # ij_scss_hex_color_long_format = false
48
+ # ij_scss_hex_color_lower_case = false
49
+ # ij_scss_hex_color_short_format = false
50
+ # ij_scss_hex_color_upper_case = false
51
+ # ij_scss_keep_blank_lines_in_code = 2
52
+ # ij_scss_keep_indents_on_empty_lines = false
53
+ # ij_scss_keep_single_line_blocks = false
54
+ # ij_scss_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
55
+ # ij_scss_space_after_colon = true
56
+ # ij_scss_space_before_opening_brace = true
57
+ # ij_scss_use_double_quotes = true
58
+ # ij_scss_value_alignment = 0
59
+
60
+ [.editorconfig]
61
+ # ij_editorconfig_align_group_field_declarations = true
62
+ # ij_editorconfig_space_after_colon = true
63
+ # ij_editorconfig_space_after_comma = true
64
+ # ij_editorconfig_space_before_colon = false
65
+ # ij_editorconfig_space_before_comma = false
66
+ # ij_editorconfig_spaces_around_assignment_operators = true
67
+
68
+ [{*.js,*.cjs}]
69
+ ij_continuation_indent_size = 2
70
+ # ij_javascript_align_imports = false
71
+ # ij_javascript_align_multiline_array_initializer_expression = false
72
+ # ij_javascript_align_multiline_binary_operation = false
73
+ # ij_javascript_align_multiline_chained_methods = false
74
+ # ij_javascript_align_multiline_extends_list = false
75
+ # ij_javascript_align_multiline_for = false
76
+ # ij_javascript_align_multiline_parameters = false
77
+ # ij_javascript_align_multiline_parameters_in_calls = false
78
+ # ij_javascript_align_multiline_ternary_operation = false
79
+ # ij_javascript_align_object_properties = 0
80
+ # ij_javascript_align_union_types = false
81
+ # ij_javascript_align_var_statements = 0
82
+ # ij_javascript_array_initializer_new_line_after_left_brace = false
83
+ # ij_javascript_array_initializer_right_brace_on_new_line = false
84
+ # ij_javascript_array_initializer_wrap = off
85
+ # ij_javascript_assignment_wrap = off
86
+ # ij_javascript_binary_operation_sign_on_next_line = false
87
+ # ij_javascript_binary_operation_wrap = off
88
+ # ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**/*,@angular/material,@angular/material/typings/**
89
+ # ij_javascript_blank_lines_after_imports = 1
90
+ # ij_javascript_blank_lines_around_class = 1
91
+ # ij_javascript_blank_lines_around_field = 0
92
+ # ij_javascript_blank_lines_around_function = 1
93
+ # ij_javascript_blank_lines_around_method = 1
94
+ # ij_javascript_block_brace_style = end_of_line
95
+ # ij_javascript_call_parameters_new_line_after_left_paren = false
96
+ # ij_javascript_call_parameters_right_paren_on_new_line = false
97
+ # ij_javascript_call_parameters_wrap = off
98
+ # ij_javascript_catch_on_new_line = false
99
+ # ij_javascript_chained_call_dot_on_new_line = true
100
+ # ij_javascript_class_brace_style = end_of_line
101
+ # ij_javascript_comma_on_new_line = false
102
+ # ij_javascript_do_while_brace_force = never
103
+ # ij_javascript_else_on_new_line = false
104
+ # ij_javascript_enforce_trailing_comma = keep
105
+ # ij_javascript_extends_keyword_wrap = off
106
+ # ij_javascript_extends_list_wrap = off
107
+ # ij_javascript_field_prefix = _
108
+ # ij_javascript_file_name_style = relaxed
109
+ # ij_javascript_finally_on_new_line = false
110
+ # ij_javascript_for_brace_force = never
111
+ # ij_javascript_for_statement_new_line_after_left_paren = false
112
+ # ij_javascript_for_statement_right_paren_on_new_line = false
113
+ # ij_javascript_for_statement_wrap = off
114
+ # ij_javascript_force_quote_style = true
115
+ # ij_javascript_force_semicolon_style = true
116
+ # ij_javascript_function_expression_brace_style = end_of_line
117
+ # ij_javascript_if_brace_force = never
118
+ # ij_javascript_import_merge_members = global
119
+ # ij_javascript_import_prefer_absolute_path = global
120
+ # ij_javascript_import_sort_members = true
121
+ # ij_javascript_import_sort_module_name = false
122
+ # ij_javascript_import_use_node_resolution = true
123
+ # ij_javascript_imports_wrap = on_every_item
124
+ # ij_javascript_indent_case_from_switch = true
125
+ # ij_javascript_indent_chained_calls = true
126
+ # ij_javascript_indent_package_children = 0
127
+ # ij_javascript_jsx_attribute_value = braces
128
+ # ij_javascript_keep_blank_lines_in_code = 1
129
+ # ij_javascript_keep_first_column_comment = true
130
+ # ij_javascript_keep_indents_on_empty_lines = false
131
+ # ij_javascript_keep_line_breaks = true
132
+ # ij_javascript_keep_simple_blocks_in_one_line = true
133
+ # ij_javascript_keep_simple_methods_in_one_line = true
134
+ # ij_javascript_line_comment_add_space = true
135
+ # ij_javascript_line_comment_at_first_column = false
136
+ # ij_javascript_method_brace_style = end_of_line
137
+ # ij_javascript_method_call_chain_wrap = off
138
+ # ij_javascript_method_parameters_new_line_after_left_paren = false
139
+ # ij_javascript_method_parameters_right_paren_on_new_line = false
140
+ # ij_javascript_method_parameters_wrap = off
141
+ # ij_javascript_object_literal_wrap = on_every_item
142
+ # ij_javascript_parentheses_expression_new_line_after_left_paren = false
143
+ # ij_javascript_parentheses_expression_right_paren_on_new_line = false
144
+ # ij_javascript_place_assignment_sign_on_next_line = false
145
+ # ij_javascript_prefer_as_type_cast = false
146
+ # ij_javascript_prefer_parameters_wrap = false
147
+ # ij_javascript_reformat_c_style_comments = false
148
+ # ij_javascript_space_after_colon = true
149
+ # ij_javascript_space_after_comma = true
150
+ # ij_javascript_space_after_dots_in_rest_parameter = false
151
+ # ij_javascript_space_after_generator_mult = true
152
+ # ij_javascript_space_after_property_colon = true
153
+ # ij_javascript_space_after_quest = true
154
+ # ij_javascript_space_after_type_colon = true
155
+ # ij_javascript_space_after_unary_not = false
156
+ # ij_javascript_space_before_async_arrow_lparen = true
157
+ # ij_javascript_space_before_catch_keyword = true
158
+ # ij_javascript_space_before_catch_left_brace = true
159
+ # ij_javascript_space_before_catch_parentheses = true
160
+ # ij_javascript_space_before_class_lbrace = true
161
+ # ij_javascript_space_before_class_left_brace = true
162
+ # ij_javascript_space_before_colon = true
163
+ # ij_javascript_space_before_comma = false
164
+ # ij_javascript_space_before_do_left_brace = true
165
+ # ij_javascript_space_before_else_keyword = true
166
+ # ij_javascript_space_before_else_left_brace = true
167
+ # ij_javascript_space_before_finally_keyword = true
168
+ # ij_javascript_space_before_finally_left_brace = true
169
+ # ij_javascript_space_before_for_left_brace = true
170
+ # ij_javascript_space_before_for_parentheses = true
171
+ # ij_javascript_space_before_for_semicolon = false
172
+ # ij_javascript_space_before_function_left_parenth = true
173
+ # ij_javascript_space_before_generator_mult = true
174
+ # ij_javascript_space_before_if_left_brace = true
175
+ # ij_javascript_space_before_if_parentheses = true
176
+ # ij_javascript_space_before_method_call_parentheses = false
177
+ # ij_javascript_space_before_method_left_brace = true
178
+ # ij_javascript_space_before_method_parentheses = true
179
+ # ij_javascript_space_before_property_colon = false
180
+ # ij_javascript_space_before_quest = true
181
+ # ij_javascript_space_before_switch_left_brace = true
182
+ # ij_javascript_space_before_switch_parentheses = true
183
+ # ij_javascript_space_before_try_left_brace = true
184
+ # ij_javascript_space_before_type_colon = false
185
+ # ij_javascript_space_before_unary_not = false
186
+ # ij_javascript_space_before_while_keyword = true
187
+ # ij_javascript_space_before_while_left_brace = true
188
+ # ij_javascript_space_before_while_parentheses = true
189
+ # ij_javascript_spaces_around_additive_operators = true
190
+ # ij_javascript_spaces_around_arrow_function_operator = true
191
+ # ij_javascript_spaces_around_assignment_operators = true
192
+ # ij_javascript_spaces_around_bitwise_operators = true
193
+ # ij_javascript_spaces_around_equality_operators = true
194
+ # ij_javascript_spaces_around_logical_operators = true
195
+ # ij_javascript_spaces_around_multiplicative_operators = true
196
+ # ij_javascript_spaces_around_relational_operators = true
197
+ # ij_javascript_spaces_around_shift_operators = true
198
+ # ij_javascript_spaces_around_unary_operator = false
199
+ # ij_javascript_spaces_within_array_initializer_brackets = false
200
+ # ij_javascript_spaces_within_brackets = false
201
+ # ij_javascript_spaces_within_catch_parentheses = false
202
+ # ij_javascript_spaces_within_for_parentheses = false
203
+ # ij_javascript_spaces_within_if_parentheses = false
204
+ # ij_javascript_spaces_within_imports = true
205
+ # ij_javascript_spaces_within_interpolation_expressions = false
206
+ # ij_javascript_spaces_within_method_call_parentheses = false
207
+ # ij_javascript_spaces_within_method_parentheses = false
208
+ # ij_javascript_spaces_within_object_literal_braces = true
209
+ # ij_javascript_spaces_within_object_type_braces = true
210
+ # ij_javascript_spaces_within_parentheses = false
211
+ # ij_javascript_spaces_within_switch_parentheses = false
212
+ # ij_javascript_spaces_within_type_assertion = false
213
+ # ij_javascript_spaces_within_union_types = true
214
+ # ij_javascript_spaces_within_while_parentheses = false
215
+ # ij_javascript_special_else_if_treatment = true
216
+ # ij_javascript_ternary_operation_signs_on_next_line = true
217
+ # ij_javascript_ternary_operation_wrap = off
218
+ # ij_javascript_union_types_wrap = on_every_item
219
+ # ij_javascript_use_chained_calls_group_indents = false
220
+ # ij_javascript_use_double_quotes = false
221
+ # ij_javascript_use_explicit_js_extension = global
222
+ # ij_javascript_use_path_mapping = always
223
+ # ij_javascript_use_public_modifier = false
224
+ # ij_javascript_use_semicolon_after_statement = false
225
+ # ij_javascript_var_declaration_wrap = normal
226
+ # ij_javascript_while_brace_force = never
227
+ # ij_javascript_while_on_new_line = false
228
+ # ij_javascript_wrap_comments = false
229
+
230
+ [{*.sht,*.html,*.shtm,*.shtml,*.htm}]
231
+ ij_continuation_indent_size = 2
232
+ # ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3
233
+ # ij_html_align_attributes = true
234
+ # ij_html_align_text = false
235
+ # ij_html_attribute_wrap = normal
236
+ # ij_html_block_comment_at_first_column = true
237
+ # ij_html_do_not_align_children_of_min_lines = 0
238
+ # ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p
239
+ # ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot,script,style
240
+ # ij_html_enforce_quotes = false
241
+ # ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var
242
+ # ij_html_keep_blank_lines = 2
243
+ # ij_html_keep_indents_on_empty_lines = false
244
+ # ij_html_keep_line_breaks = true
245
+ # ij_html_keep_line_breaks_in_text = true
246
+ # ij_html_keep_whitespaces = false
247
+ # ij_html_keep_whitespaces_inside = span,pre,textarea
248
+ # ij_html_line_comment_at_first_column = true
249
+ # ij_html_new_line_after_last_attribute = never
250
+ # ij_html_new_line_before_first_attribute = never
251
+ # ij_html_quote_style = double
252
+ # ij_html_remove_new_line_before_tags = br
253
+ # ij_html_space_after_tag_name = false
254
+ # ij_html_space_around_equality_in_attribute = false
255
+ # ij_html_space_inside_empty_tag = true
256
+ # ij_html_text_wrap = normal
257
+
258
+ [{*.xslt,*.rng,*.ant,*.xsl,*.xsd,*.xul,*.jhm,*.xml,*.tld,*.fxml,*.wsdl,*.jrxml,*.jnlp}]
259
+ tab_width = 2
260
+ # ij_xml_block_comment_at_first_column = true
261
+ # ij_xml_keep_indents_on_empty_lines = false
262
+ # ij_xml_line_comment_at_first_column = true
263
+
264
+ [{*.yml,*.yaml}]
265
+ # ij_yaml_keep_indents_on_empty_lines = false
266
+ # ij_yaml_keep_line_breaks = true
267
+
268
+ [{.babelrc,.stylelintrc,.eslintrc,jest.config,.resultset.json.lock,bowerrc,*.json,*.jsb3,*.jsb2}]
269
+ tab_width = 2
270
+ # ij_json_keep_blank_lines_in_code = 0
271
+ # ij_json_keep_indents_on_empty_lines = false
272
+ # ij_json_keep_line_breaks = true
273
+ # ij_json_space_after_colon = true
274
+ # ij_json_space_after_comma = true
275
+ # ij_json_space_before_colon = true
276
+ # ij_json_space_before_comma = false
277
+ # ij_json_spaces_within_braces = false
278
+ # ij_json_spaces_within_brackets = false
279
+ # ij_json_wrap_long_lines = false
280
+
281
+ [{Podfile,Brewfile,cucumber,yarn,spork,Gemfile.tools,rake,.simplecov,rcov,rails,spec,capfile,gemfile,rakefile,guardfile,isolate,vagrantfile,*.gemspec,*.jbuilder,*.thor,*.rbw,*.ru,*.rb,*.rake}]
282
+ ij_ruby_align_group_field_declarations = false
283
+ ij_ruby_align_multiline_parameters = false
284
+ ij_ruby_blank_lines_around_method = 1
285
+ ij_ruby_chain_calls_alignment = 0
286
+ ij_ruby_convert_brace_block_by_enter = true
287
+ ij_ruby_force_newlines_around_visibility_mods = true
288
+ ij_ruby_indent_private_methods = false
289
+ ij_ruby_indent_protected_methods = false
290
+ ij_ruby_indent_public_methods = false
291
+ ij_ruby_indent_when_cases = false
292
+ ij_ruby_keep_blank_lines_in_declarations = 2
293
+ ij_ruby_keep_line_breaks = true
294
+ ij_ruby_parentheses_around_method_arguments = true
295
+ ij_ruby_spaces_around_assignment_operators = true
296
+ ij_ruby_spaces_around_hashrocket = true
297
+ ij_ruby_spaces_around_other_operators = true
298
+ ij_ruby_spaces_around_range_operators = false
299
+ ij_ruby_spaces_around_relational_operators = true
300
+ ij_ruby_spaces_within_array_initializer_braces = true
301
+ ij_ruby_spaces_within_braces = true
@@ -10,7 +10,7 @@ linters:
10
10
  - .rubocop.yml
11
11
  Layout/InitialIndentation:
12
12
  Enabled: false
13
- Layout/TrailingBlankLines:
13
+ Layout/TrailingEmptyLines:
14
14
  Enabled: false
15
15
  Layout/TrailingWhitespace:
16
16
  Enabled: false
@@ -18,7 +18,7 @@ linters:
18
18
  Enabled: false
19
19
  Style/FrozenStringLiteralComment:
20
20
  Enabled: false
21
- Metrics/LineLength:
21
+ Layout/LineLength:
22
22
  Enabled: false
23
23
  Lint/UselessAssignment:
24
24
  Enabled: false
@@ -1,16 +1,13 @@
1
1
  // Documentation on http://eslint.org/docs/rules/
2
2
 
3
3
  module.exports = {
4
- "extends": ["airbnb-base", "prettier"],
5
- "plugins": ["prettier"],
6
- "env": {
7
- "browser": true,
8
- "node": true,
9
- "jquery": true
4
+ 'env': {
5
+ 'browser': true,
6
+ 'node': true,
7
+ 'jquery': true
10
8
  },
11
- "rules": {
12
- "no-unused-expressions": ["error", { "allowShortCircuit": true }],
13
- "max-len": ["error", { "code": 113, "tabWidth": 2 }],
14
- "prettier/prettier": ["error"]
9
+ 'rules': {
10
+ 'no-unused-expressions': ['error', { 'allowShortCircuit': true }],
11
+ 'max-len': ['error', { 'code': 113 }]
15
12
  },
16
- };
13
+ }
@@ -3,10 +3,10 @@ all:
3
3
  exclude:
4
4
  - .*
5
5
  - .**/*
6
- - bin/*
7
- - db/schema.rb
8
- - db/migrate/**/*
6
+ - bin/**/*
9
7
  - config/**/*
8
+ - db/migrate/**/*
9
+ - db/schema.rb
10
10
  - docs/**/*
11
11
  - node_modules/**/*
12
12
  - public/**/*
@@ -21,8 +21,6 @@ flay:
21
21
  exclude:
22
22
  - test/**/*
23
23
 
24
- format: "%{runner} %{level} %{msg}"
25
-
26
24
  max_warnings: 10
27
25
  verbose: true
28
26
  warnings_per_review: 5
@@ -5,9 +5,6 @@ detectors:
5
5
  UncommunicativeVariableName:
6
6
  accept:
7
7
  - e
8
- NestedIterators:
9
- exclude:
10
- - "ActiveJob::TestHelper#enqueued_jobs_for"
11
8
  UnusedPrivateMethod:
12
9
  enabled: false
13
10
  DuplicateMethodCall:
@@ -19,12 +16,12 @@ directories:
19
16
  enabled: false
20
17
  UtilityFunction:
21
18
  enabled: false
22
- "**/app/jobs":
19
+ "**/app/jobs/**":
23
20
  UtilityFunction:
24
21
  enabled: false
25
- "**/app/helpers":
22
+ "**/app/helpers/**":
26
23
  UtilityFunction:
27
24
  enabled: false
28
- "**/spec":
25
+ "**/spec/**":
29
26
  UtilityFunction:
30
27
  enabled: false
@@ -6,43 +6,45 @@ require:
6
6
  AllCops:
7
7
  TargetRubyVersion: 2.6
8
8
  Exclude:
9
- - 'db/schema.rb'
10
9
  - 'db/migrate/**/*'
10
+ - 'db/schema.rb'
11
11
 
12
12
  Layout/EmptyLinesAroundBlockBody:
13
13
  Exclude:
14
14
  - 'db/schema.rb'
15
15
 
16
+ Layout/FirstHashElementIndentation:
17
+ EnforcedStyle: consistent
18
+
16
19
  Layout/HashAlignment:
17
- EnforcedHashRocketStyle: key
18
- EnforcedColonStyle: key
20
+ EnforcedHashRocketStyle: table
21
+ EnforcedColonStyle: table
19
22
  EnforcedLastArgumentHashStyle: always_inspect
20
23
 
21
- Layout/MultilineOperationIndentation:
22
- EnforcedStyle: indented
24
+ Layout/LineLength:
25
+ Max: 113
23
26
 
24
- Layout/MultilineMethodCallIndentation:
25
- EnforcedStyle: indented
27
+ Layout/MultilineMethodArgumentLineBreaks:
28
+ Enabled: true
26
29
 
27
30
  Layout/MultilineMethodCallBraceLayout:
28
31
  EnforcedStyle: symmetrical
29
32
 
30
- Layout/SpaceInLambdaLiteral:
31
- EnforcedStyle: require_space
33
+ Layout/MultilineMethodCallIndentation:
34
+ EnforcedStyle: indented
35
+
36
+ Layout/MultilineOperationIndentation:
37
+ EnforcedStyle: indented
32
38
 
33
39
  Layout/ParameterAlignment:
34
40
  EnforcedStyle: with_fixed_indentation
35
41
 
36
- Naming/PredicateName:
37
- Exclude:
38
- - 'app/helpers/application_helper.rb'
42
+ Layout/SpaceInLambdaLiteral:
43
+ EnforcedStyle: require_space
39
44
 
40
45
  Metrics/AbcSize:
41
46
  Exclude:
42
- - test/**/*.rb
43
-
44
- Metrics/LineLength:
45
- Max: 113
47
+ - 'test/**/*.rb'
46
48
 
47
49
  Metrics/ClassLength:
48
50
  CountComments: false
@@ -62,6 +64,10 @@ Metrics/ModuleLength:
62
64
  Naming/MemoizedInstanceVariableName:
63
65
  EnforcedStyleForLeadingUnderscores: required
64
66
 
67
+ Naming/PredicateName:
68
+ Exclude:
69
+ - 'app/helpers/application_helper.rb'
70
+
65
71
  Style/ClassAndModuleChildren:
66
72
  Exclude:
67
73
  - 'test/**/*.rb'
@@ -90,9 +96,6 @@ Style/TrailingCommaInHashLiteral:
90
96
  Rails:
91
97
  Enabled: true
92
98
 
93
- Rails/HasAndBelongsToMany:
94
- Enabled: false
95
-
96
99
  Rails/SkipsModelValidations:
97
100
  Blacklist: []
98
101
 
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ if defined?(Spring) && ENV['DISABLE_SPRING'].nil?
4
+ puts '**** NO COVERAGE FOR YOU! ****'
5
+ puts 'Please disable Spring to get COVERAGE by `DISABLE_SPRING=1 COVERAGE=1 bin/rspec`'
6
+ else
7
+ SimpleCov.start 'rails' do
8
+ add_filter %w[app/views bin spec test]
9
+
10
+ maximum_coverage_drop 0.5
11
+ end
12
+
13
+ # if ENV['CODECOV_TOKEN']
14
+ # require 'codecov'
15
+ # SimpleCov.formatter = SimpleCov::Formatter::Codecov
16
+ # end
17
+ end
@@ -3,6 +3,7 @@
3
3
  extends: default
4
4
 
5
5
  rules:
6
+ braces:
7
+ max-spaces-inside: 1
6
8
  line-length:
7
9
  max: 113
8
-
data/lib/install/Brewfile CHANGED
@@ -1,12 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  tap 'caskroom/cask'
2
4
  cask_args appdir: '/Applications'
3
5
 
4
6
  tap 'heroku/brew'
5
7
 
8
+ # brew 'circleci'
9
+ brew 'graphicsmagick'
6
10
  brew 'heroku'
7
11
  brew 'hub'
8
- # brew 'circleci'
9
12
  brew 'rbenv'
10
13
  brew 'ruby-build'
11
- brew 'ruby'
14
+ brew 'vips'
15
+ brew 'yamllint'
12
16
  brew 'yarn'
@@ -7,7 +7,7 @@ git_source(:github) do |repo_name|
7
7
  "https://github.com/#{repo_name}.git"
8
8
  end
9
9
 
10
- gem 'oj', require: false
10
+ gem 'oj'
11
11
 
12
12
  group :tools do
13
13
  gem 'pronto'
@@ -20,6 +20,6 @@ group :tools do
20
20
  gem 'pronto-rubocop', require: false
21
21
  gem 'pronto-yamllint', require: false
22
22
 
23
- gem 'rubocop-rails', require: false
24
23
  gem 'rubocop-performance', require: false
24
+ gem 'rubocop-rails', require: false
25
25
  end
data/lib/install/app.json CHANGED
@@ -4,69 +4,40 @@
4
4
  "postdeploy": "bin/heroku-postdeploy"
5
5
  },
6
6
  "env": {
7
- "HEROKU_APP_NAME": {
8
- "required": true
9
- },
10
- "HEROKU_PARENT_APP_NAME": {
11
- "required": true
12
- },
13
- "DB_SEED_ON_DEPLOY": "true",
14
- "BUNDLE_WITHOUT": "development:test:production",
15
- "MAILTRAP_ADDRESS": {
16
- "required": true
17
- },
18
- "MAILTRAP_API_TOKEN": {
19
- "required": true
20
- },
21
- "MAILTRAP_CATCH_MAIL": {
22
- "required": true
23
- },
24
- "MAILTRAP_DOMAIN": {
25
- "required": true
26
- },
27
- "MAILTRAP_PASSWORD": {
28
- "required": true
29
- },
30
- "MAILTRAP_PORT": {
7
+ "RAILS_MASTER_KEY": {
31
8
  "required": true
32
9
  },
33
- "MAILTRAP_USER_NAME": {
10
+ "ROLLBAR_ACCESS_TOKEN": {
34
11
  "required": true
35
12
  },
36
- "RACK_ENV": {
13
+ "ROLLBAR_ENDPOINT": {
37
14
  "required": true
38
15
  },
39
- "RAILS_ENV": {
40
- "required": true
16
+ "SECRET_KEY_BASE": {
17
+ "generator": "secret"
41
18
  },
19
+ "BUNDLE_WITHOUT": "development:test:production",
20
+ "DISABLE_DATABASE_ENVIRONMENT_CHECK": "1",
21
+ "LANG": "en_US.UTF-8",
22
+ "MALLOC_ARENA_MAX": "2",
23
+ "NODE_ENV": "production",
24
+ "RACK_ENV": "staging",
25
+ "RAILS_ENV": "staging",
42
26
  "RAILS_LOG_TO_STDOUT": "enabled",
43
- "RAILS_MASTER_KEY": {
44
- "required": true
45
- },
27
+ "RAILS_MAX_THREADS": "5",
46
28
  "RAILS_SERVE_STATIC_FILES": "enabled",
47
29
  "REDIS_PROVIDER": "REDISTOGO_URL",
48
- "SECRET_KEY_BASE": {
49
- "generator": "secret"
50
- },
51
- "ROLLBAR_ACCESS_TOKEN": {
52
- "required": true
53
- },
54
- "ROLLBAR_ENDPOINT": {
55
- "required": true
56
- },
57
- "ROLLBAR_ENV": "development"
30
+ "ROLLBAR_ENV": "staging",
31
+ "SIDEKIQ_CONCURRENCY": "5",
32
+ "WEB_CONCURRENCY": "2"
58
33
  },
59
34
  "addons": [
60
- "mailtrap:unpaid",
61
35
  "memcachier:dev",
62
- "papertrail:choklad",
36
+ "logentries:le_tryit",
63
37
  "heroku-postgresql:hobby-dev",
64
38
  "redistogo:nano"
65
39
  ],
66
40
  "buildpacks": [
67
- {
68
- "url": "https://github.com/heroku/heroku-buildpack-activestorage-preview"
69
- },
70
41
  {
71
42
  "url": "heroku/ruby"
72
43
  }
@@ -15,15 +15,6 @@ if [[ $branch_name == "master" ]]; then
15
15
  bin/update
16
16
  bin/rake db:reset
17
17
 
18
- # For crystalball gem usage
19
- # file=tmp/crystalball_data.yml
20
- # find $file -mtime +5 -exec rm {} \;
21
- #
22
- # if [ ! -f "$file" ]; then
23
- # echo "Generete crystall ball index"
24
- # DISABLE_SPRING=1 CRYSTALBALL=true bin/rspec
25
- # fi
26
-
27
18
  echo "Removing merged branches..."
28
19
  git branch --merged master | grep -v "\*" | grep -v master | xargs -n 1 git branch -d
29
20
  fi
@@ -2,7 +2,7 @@
2
2
 
3
3
  set -eo pipefail
4
4
 
5
- bin/lint-github-pr
5
+ bin/lint-pr
6
6
 
7
7
  # bin/rspec --tag critical
8
8
  # bin/rails test
@@ -1,10 +1,4 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  echo "== Preparing database =="
4
- bin/rails db:migrate
5
-
6
- if [ "$DB_SEED_ON_DEPLOY" = "true" ]; then
7
- echo "Seeding ..."
8
- bin/rails db:seed
9
- echo "Seeding has been done!"
10
- fi
4
+ bin/rails db:prepare db:seed