mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-25 09:19:15 -04:00
Compare commits
97 Commits
release59
...
Style/Sole
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13e8e2747b | ||
|
|
d542326047 | ||
|
|
e69467f056 | ||
|
|
1176d18918 | ||
|
|
78fee52f17 | ||
|
|
de6241b728 | ||
|
|
5b5adad6ab | ||
|
|
000f4979db | ||
|
|
269e1d274a | ||
|
|
327eaf7a03 | ||
|
|
c73d23fa80 | ||
|
|
a1e73f4b19 | ||
|
|
212ed17d60 | ||
|
|
943929b769 | ||
|
|
1f220164bb | ||
|
|
fc0c428799 | ||
|
|
f76258dcab | ||
|
|
653776ae6b | ||
|
|
ba7d9e6905 | ||
|
|
f8aff18492 | ||
|
|
8bfa81990c | ||
|
|
4ed7ea32b5 | ||
|
|
c3b79d1d3f | ||
|
|
fa78997d8c | ||
|
|
b05efe8e8f | ||
|
|
8906454323 | ||
|
|
dfa81aeaf2 | ||
|
|
436c2305b3 | ||
|
|
57f1fd34c9 | ||
|
|
c1dc3cc4c0 | ||
|
|
067fb1671b | ||
|
|
fa6df64221 | ||
|
|
dc473108d0 | ||
|
|
adef9f9622 | ||
|
|
b908777a86 | ||
|
|
fda04a6367 | ||
|
|
3d524bb105 | ||
|
|
92cb0c32ab | ||
|
|
6bde403f17 | ||
|
|
ff2f2014fc | ||
|
|
8e5d8002ff | ||
|
|
a8954d2e12 | ||
|
|
892d850f6a | ||
|
|
b5b5222960 | ||
|
|
a6821d689d | ||
|
|
6ac5dc5ac9 | ||
|
|
82855883ca | ||
|
|
c7b0e036c4 | ||
|
|
ec3a9ab32f | ||
|
|
6f22a7ffb7 | ||
|
|
3246773cd8 | ||
|
|
1270dc91f6 | ||
|
|
c9f3105e89 | ||
|
|
54f340380d | ||
|
|
661930f99e | ||
|
|
b29f2cabe6 | ||
|
|
88a60ca3cf | ||
|
|
4f7098c0f6 | ||
|
|
9de957f39b | ||
|
|
480430af37 | ||
|
|
1c66b8b554 | ||
|
|
405946370b | ||
|
|
f04ad801ba | ||
|
|
08efbb5a54 | ||
|
|
619022c61a | ||
|
|
2528ed3e8b | ||
|
|
411152bc31 | ||
|
|
88ad6d8de9 | ||
|
|
c5df760ce4 | ||
|
|
d9500eff16 | ||
|
|
31fafe6a74 | ||
|
|
f87b83bdd1 | ||
|
|
88e458077b | ||
|
|
a7cc576ef2 | ||
|
|
a713d2936c | ||
|
|
751c2e1a89 | ||
|
|
9fd7e145b5 | ||
|
|
44f864eace | ||
|
|
a762a87d58 | ||
|
|
4ea77fb52f | ||
|
|
56348b1a8e | ||
|
|
82971d773c | ||
|
|
3af5b4a53a | ||
|
|
75571a485d | ||
|
|
8a9137e62e | ||
|
|
ec3c010410 | ||
|
|
2bfd077190 | ||
|
|
b7a7b03029 | ||
|
|
7a470f9fac | ||
|
|
1dc98da520 | ||
|
|
1540a3c1e1 | ||
|
|
fb322a6a80 | ||
|
|
b15f39dd09 | ||
|
|
54211a8cef | ||
|
|
e55b85c559 | ||
|
|
121548df57 | ||
|
|
1918884540 |
@@ -1,2 +1,2 @@
|
||||
# Ruby version
|
||||
VARIANT=3.1.4
|
||||
VARIANT=3.2.4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM mcr.microsoft.com/devcontainers/ruby:0-3.1-bullseye
|
||||
FROM mcr.microsoft.com/devcontainers/ruby:0-3.2-bullseye
|
||||
|
||||
# Install Rails
|
||||
RUN gem install rails:7.0.8
|
||||
@@ -24,3 +24,9 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
|
||||
# [Optional] Uncomment this line to install global node packages.
|
||||
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
||||
|
||||
# We run as the vscode user.
|
||||
# Make sure this is writable as https://github.com/rubygems/rubygems/issues/6272 was removed
|
||||
RUN su root -c "mkdir -p /usr/local/rvm/gems/default/cache/bundler/"
|
||||
RUN su root -c "mkdir -p /usr/local/rvm/gems/default/bundler/gems/"
|
||||
RUN su root -c "chmod -R 777 /usr/local/rvm/gems/"
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
inherit_from: .rubocop_todo.yml
|
||||
require:
|
||||
- rubocop-factory_bot
|
||||
- rubocop-capybara
|
||||
- rubocop-rails
|
||||
- rubocop-rspec
|
||||
- rubocop-rspec_rails
|
||||
- rubocop-rake
|
||||
AllCops:
|
||||
NewCops: enable
|
||||
Exclude:
|
||||
|
||||
@@ -1,15 +1,44 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2023-09-16 07:51:19 UTC using RuboCop version 1.56.3.
|
||||
# on 2024-07-13 05:22:30 UTC using RuboCop version 1.65.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 15
|
||||
# Offense count: 231
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: link_or_button, strict
|
||||
Capybara/ClickLinkOrButtonStyle:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 84
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: have_no, not_to
|
||||
Capybara/NegationMatcher:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 39
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: DefaultSelector.
|
||||
Capybara/RSpec/HaveSelector:
|
||||
Exclude:
|
||||
- 'spec/features/conversations/index_spec.rb'
|
||||
- 'spec/features/footer_spec.rb'
|
||||
- 'spec/features/gardens/adding_gardens_spec.rb'
|
||||
- 'spec/features/harvests/harvesting_a_crop_spec.rb'
|
||||
- 'spec/features/members/list_spec.rb'
|
||||
- 'spec/features/plantings/planting_a_crop_spec.rb'
|
||||
- 'spec/features/seeds/adding_seeds_spec.rb'
|
||||
- 'spec/features/shared_examples/crop_suggest.rb'
|
||||
- 'spec/helpers/application_helper_spec.rb'
|
||||
- 'spec/support/feature_helpers.rb'
|
||||
- 'spec/views/posts/show.html.haml_spec.rb'
|
||||
|
||||
# Offense count: 14
|
||||
Capybara/SpecificMatcher:
|
||||
Exclude:
|
||||
- 'spec/features/crops/browse_crops_spec.rb'
|
||||
- 'spec/features/footer_spec.rb'
|
||||
- 'spec/features/gardens/adding_gardens_spec.rb'
|
||||
- 'spec/features/harvests/harvesting_a_crop_spec.rb'
|
||||
@@ -23,8 +52,7 @@ Capybara/VisibilityMatcher:
|
||||
|
||||
# Offense count: 6
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Include, EnforcedStyle, NonImplicitAssociationMethodNames.
|
||||
# Include: spec/factories.rb, spec/factories/**/*.rb, features/support/factories/**/*.rb
|
||||
# Configuration parameters: EnforcedStyle, NonImplicitAssociationMethodNames.
|
||||
# SupportedStyles: explicit, implicit
|
||||
FactoryBot/AssociationStyle:
|
||||
Exclude:
|
||||
@@ -33,26 +61,59 @@ FactoryBot/AssociationStyle:
|
||||
- 'spec/factories/like.rb'
|
||||
- 'spec/factories/scientific_name.rb'
|
||||
|
||||
# Offense count: 8
|
||||
# Offense count: 3
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Include, EnforcedStyle, ExplicitOnly.
|
||||
# Include: **/*_spec.rb, **/spec/**/*, spec/factories.rb, spec/factories/**/*.rb, features/support/factories/**/*.rb
|
||||
# Configuration parameters: AutoCorrect, Include, EnforcedStyle, ExplicitOnly.
|
||||
# Include: **/*_spec.rb, **/spec/**/*, **/test/**/*, **/features/support/factories/**/*.rb
|
||||
# SupportedStyles: create_list, n_times
|
||||
FactoryBot/CreateList:
|
||||
Exclude:
|
||||
- 'spec/factories/member.rb'
|
||||
- 'spec/helpers/gardens_helper_spec.rb'
|
||||
- 'spec/views/comments/index.rss.haml_spec.rb'
|
||||
- 'spec/views/home/index_spec.rb'
|
||||
- 'spec/views/photos/index.html.haml_spec.rb'
|
||||
- 'spec/views/places/show.html.haml_spec.rb'
|
||||
- 'spec/views/posts/index.html.haml_spec.rb'
|
||||
|
||||
# Offense count: 1135
|
||||
# Offense count: 4
|
||||
# Configuration parameters: Include, MaxAmount.
|
||||
# Include: **/*_spec.rb, **/spec/**/*, **/test/**/*, **/features/support/factories/**/*.rb
|
||||
FactoryBot/ExcessiveCreateList:
|
||||
Exclude:
|
||||
- 'spec/controllers/posts_controller_spec.rb'
|
||||
- 'spec/features/crops/show_spec.rb'
|
||||
- 'spec/features/percy/percy_spec.rb'
|
||||
|
||||
# Offense count: 1127
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Include.
|
||||
# Include: **/*_spec.rb, **/spec/**/*, **/test/**/*, **/features/support/factories/**/*.rb
|
||||
FactoryBot/SyntaxMethods:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyleAlignWith.
|
||||
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
||||
Layout/BlockAlignment:
|
||||
Exclude:
|
||||
- 'spec/factories/activity.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowForAlignment.
|
||||
Layout/CommentIndentation:
|
||||
Exclude:
|
||||
- 'config/environments/production.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Layout/EmptyLineAfterMagicComment:
|
||||
Exclude:
|
||||
- 'config/initializers/application_controller_renderer.rb'
|
||||
- 'config/initializers/backtrace_silencers.rb'
|
||||
- 'config/initializers/content_security_policy.rb'
|
||||
- 'config/initializers/mime_types.rb'
|
||||
- 'config/initializers/new_framework_defaults_5_2.rb'
|
||||
- 'db/migrate/20240218053122_add_slug_to_activity.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, DefLikeMacros, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
||||
@@ -61,6 +122,32 @@ Layout/EmptyLineBetweenDefs:
|
||||
- 'db/migrate/20171129041341_create_photographings.rb'
|
||||
- 'db/migrate/20190130090437_add_crop_to_photographings.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Layout/EmptyLines:
|
||||
Exclude:
|
||||
- 'spec/models/ability_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: empty_lines, no_empty_lines
|
||||
Layout/EmptyLinesAroundBlockBody:
|
||||
Exclude:
|
||||
- 'lib/tasks/gardens.rake'
|
||||
- 'spec/rails_helper.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
||||
# SupportedHashRocketStyles: key, separator, table
|
||||
# SupportedColonStyles: key, separator, table
|
||||
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
||||
Layout/HashAlignment:
|
||||
Exclude:
|
||||
- 'app/models/concerns/search_activities.rb'
|
||||
- 'app/models/concerns/search_plantings.rb'
|
||||
|
||||
# Offense count: 10
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
@@ -88,12 +175,30 @@ Layout/LineEndStringConcatenationIndentation:
|
||||
- 'spec/features/rss/posts_spec.rb'
|
||||
- 'spec/features/rss/seeds_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Offense count: 3
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
||||
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
||||
# URISchemes: http, https
|
||||
Layout/LineLength:
|
||||
Max: 304
|
||||
Exclude:
|
||||
- 'app/helpers/crops_helper.rb'
|
||||
- 'db/seeds.rb'
|
||||
- 'spec/requests/plantings_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: final_newline, final_blank_line
|
||||
Layout/TrailingEmptyLines:
|
||||
Exclude:
|
||||
- 'spec/features/admin/newsletter_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowInHeredoc.
|
||||
Layout/TrailingWhitespace:
|
||||
Exclude:
|
||||
- 'spec/factories/activity.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
@@ -103,11 +208,12 @@ Lint/AmbiguousOperatorPrecedence:
|
||||
- 'spec/helpers/gardens_helper_spec.rb'
|
||||
- 'spec/helpers/seeds_helper_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Offense count: 3
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: RequireParenthesesForMethodChains.
|
||||
Lint/AmbiguousRange:
|
||||
Exclude:
|
||||
- 'app/models/concerns/search_activities.rb'
|
||||
- 'app/models/concerns/search_harvests.rb'
|
||||
- 'app/models/concerns/search_plantings.rb'
|
||||
|
||||
@@ -130,6 +236,12 @@ Lint/EmptyBlock:
|
||||
- 'spec/features/crops/crop_detail_page_spec.rb'
|
||||
- 'spec/requests/authentications_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Lint/RedundantCopDisableDirective:
|
||||
Exclude:
|
||||
- 'db/migrate/20230313015323_create_active_storage_tables.active_storage.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Lint/RedundantDirGlobSort:
|
||||
@@ -142,48 +254,46 @@ Lint/SuppressedException:
|
||||
Exclude:
|
||||
- 'lib/tasks/testing.rake'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: strict, consistent
|
||||
Lint/SymbolConversion:
|
||||
Exclude:
|
||||
- 'app/controllers/likes_controller.rb'
|
||||
|
||||
# Offense count: 7
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: AutoCorrect.
|
||||
Lint/UselessAssignment:
|
||||
Exclude:
|
||||
- 'config.rb'
|
||||
- 'config/compass.rb'
|
||||
|
||||
# Offense count: 45
|
||||
# Offense count: 52
|
||||
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
||||
Metrics/AbcSize:
|
||||
Max: 151
|
||||
|
||||
# Offense count: 10
|
||||
# Offense count: 14
|
||||
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
||||
# AllowedMethods: refine
|
||||
Metrics/BlockLength:
|
||||
Max: 61
|
||||
Max: 115
|
||||
|
||||
# Offense count: 6
|
||||
# Offense count: 7
|
||||
# Configuration parameters: CountComments, CountAsOne.
|
||||
Metrics/ClassLength:
|
||||
Max: 171
|
||||
Max: 183
|
||||
|
||||
# Offense count: 4
|
||||
# Offense count: 6
|
||||
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 32
|
||||
|
||||
# Offense count: 61
|
||||
# Offense count: 71
|
||||
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
||||
Metrics/MethodLength:
|
||||
Max: 59
|
||||
Max: 127
|
||||
|
||||
# Offense count: 3
|
||||
# Offense count: 2
|
||||
# Configuration parameters: CountComments, CountAsOne.
|
||||
Metrics/ModuleLength:
|
||||
Max: 125
|
||||
|
||||
# Offense count: 5
|
||||
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 32
|
||||
@@ -202,7 +312,7 @@ RSpec/ContextWording:
|
||||
|
||||
# Offense count: 36
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: SkipBlocks, EnforcedStyle.
|
||||
# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
|
||||
# SupportedStyles: described_class, explicit
|
||||
RSpec/DescribedClass:
|
||||
Exclude:
|
||||
@@ -212,6 +322,7 @@ RSpec/DescribedClass:
|
||||
|
||||
# Offense count: 13
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: AutoCorrect.
|
||||
RSpec/EmptyExampleGroup:
|
||||
Exclude:
|
||||
- 'spec/controllers/authentications_controller_spec.rb'
|
||||
@@ -227,24 +338,26 @@ RSpec/EmptyExampleGroup:
|
||||
- 'spec/views/photos/edit.html.haml_spec.rb'
|
||||
- 'spec/views/posts/_single.html.haml_spec.rb'
|
||||
|
||||
# Offense count: 134
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowConsecutiveOneLiners.
|
||||
RSpec/EmptyLineAfterExample:
|
||||
Exclude:
|
||||
- 'spec/models/ability_spec.rb'
|
||||
|
||||
# Offense count: 140
|
||||
# Configuration parameters: CountAsOne.
|
||||
RSpec/ExampleLength:
|
||||
Max: 25
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/ExcessiveDocstringSpacing:
|
||||
Exclude:
|
||||
- 'spec/controllers/crops_controller_spec.rb'
|
||||
- 'spec/features/crops/crop_photos_spec.rb'
|
||||
|
||||
# Offense count: 30
|
||||
# Offense count: 32
|
||||
RSpec/ExpectInHook:
|
||||
Exclude:
|
||||
- 'spec/controllers/garden_types_controller_spec.rb'
|
||||
- 'spec/controllers/gardens_controller_spec.rb'
|
||||
- 'spec/features/admin/forums_spec.rb'
|
||||
- 'spec/features/admin/plant_parts_spec.rb'
|
||||
- 'spec/features/admin/roles_spec.rb'
|
||||
- 'spec/features/crops/crop_photos_spec.rb'
|
||||
- 'spec/features/members/list_spec.rb'
|
||||
- 'spec/features/plantings/planting_a_crop_spec.rb'
|
||||
@@ -260,11 +373,12 @@ RSpec/HookArgument:
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AutoCorrect.
|
||||
RSpec/HooksBeforeExamples:
|
||||
Exclude:
|
||||
- 'spec/features/crops/creating_a_crop_spec.rb'
|
||||
|
||||
# Offense count: 35
|
||||
# Offense count: 37
|
||||
# Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns.
|
||||
RSpec/IndexedLet:
|
||||
Exclude:
|
||||
@@ -272,6 +386,7 @@ RSpec/IndexedLet:
|
||||
- 'spec/controllers/plantings_controller_spec.rb'
|
||||
- 'spec/features/crops/crop_photos_spec.rb'
|
||||
- 'spec/features/members/list_spec.rb'
|
||||
- 'spec/features/members/profile_spec.rb'
|
||||
- 'spec/features/percy/percy_spec.rb'
|
||||
- 'spec/features/planting_reminder_spec.rb'
|
||||
- 'spec/features/timeline/index_spec.rb'
|
||||
@@ -279,7 +394,7 @@ RSpec/IndexedLet:
|
||||
- 'spec/models/member_spec.rb'
|
||||
- 'spec/views/forums/index.html.haml_spec.rb'
|
||||
|
||||
# Offense count: 710
|
||||
# Offense count: 720
|
||||
# Configuration parameters: AssignmentOnly.
|
||||
RSpec/InstanceVariable:
|
||||
Enabled: false
|
||||
@@ -288,6 +403,12 @@ RSpec/InstanceVariable:
|
||||
RSpec/LetSetup:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/MatchArray:
|
||||
Exclude:
|
||||
- 'spec/models/post_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
RSpec/MessageChain:
|
||||
Exclude:
|
||||
@@ -304,16 +425,16 @@ RSpec/MultipleDescribes:
|
||||
Exclude:
|
||||
- 'spec/features/crops/crop_wranglers_spec.rb'
|
||||
|
||||
# Offense count: 147
|
||||
# Offense count: 152
|
||||
RSpec/MultipleExpectations:
|
||||
Max: 19
|
||||
|
||||
# Offense count: 137
|
||||
# Offense count: 138
|
||||
# Configuration parameters: AllowSubject.
|
||||
RSpec/MultipleMemoizedHelpers:
|
||||
Max: 14
|
||||
|
||||
# Offense count: 132
|
||||
# Offense count: 133
|
||||
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
|
||||
# SupportedStyles: always, named_only
|
||||
RSpec/NamedSubject:
|
||||
@@ -324,7 +445,7 @@ RSpec/NamedSubject:
|
||||
RSpec/NestedGroups:
|
||||
Max: 6
|
||||
|
||||
# Offense count: 407
|
||||
# Offense count: 403
|
||||
# Configuration parameters: AllowedPatterns.
|
||||
# AllowedPatterns: ^expect_, ^assert_
|
||||
RSpec/NoExpectationExample:
|
||||
@@ -336,21 +457,6 @@ RSpec/PendingWithoutReason:
|
||||
- 'spec/features/seeds/misc_seeds_spec.rb'
|
||||
- 'spec/features/unsubscribing_spec.rb'
|
||||
|
||||
# Offense count: 7
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
RSpec/Rails/HaveHttpStatus:
|
||||
Exclude:
|
||||
- 'spec/controllers/api/v1/plantings_controller_spec.rb'
|
||||
- 'spec/controllers/harvests_controller_spec.rb'
|
||||
- 'spec/controllers/likes_controller_spec.rb'
|
||||
- 'spec/requests/harvests_spec.rb'
|
||||
|
||||
# Offense count: 16
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Inferences.
|
||||
RSpec/Rails/InferredSpecType:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 2
|
||||
RSpec/RepeatedDescription:
|
||||
Exclude:
|
||||
@@ -370,6 +476,7 @@ RSpec/RepeatedExampleGroupBody:
|
||||
|
||||
# Offense count: 6
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AutoCorrect.
|
||||
RSpec/ScatteredSetup:
|
||||
Exclude:
|
||||
- 'spec/features/percy/percy_spec.rb'
|
||||
@@ -382,14 +489,6 @@ RSpec/SpecFilePathFormat:
|
||||
Exclude:
|
||||
- 'spec/controllers/member_controller_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: Include.
|
||||
# Include: **/*_spec*rb*, **/spec/**/*
|
||||
RSpec/SpecFilePathSuffix:
|
||||
Exclude:
|
||||
- 'spec/features/seeds/seed_photos.rb'
|
||||
- 'spec/models/garden_type.rb'
|
||||
|
||||
# Offense count: 3
|
||||
RSpec/StubbedMock:
|
||||
Exclude:
|
||||
@@ -413,7 +512,24 @@ RSpec/VerifiedDoubles:
|
||||
- 'spec/controllers/gardens_controller_spec.rb'
|
||||
- 'spec/views/devise/shared/_links_spec.rb'
|
||||
|
||||
# Offense count: 26
|
||||
# Offense count: 7
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: ResponseMethods.
|
||||
# ResponseMethods: response, last_response
|
||||
RSpecRails/HaveHttpStatus:
|
||||
Exclude:
|
||||
- 'spec/controllers/api/v1/plantings_controller_spec.rb'
|
||||
- 'spec/controllers/harvests_controller_spec.rb'
|
||||
- 'spec/controllers/likes_controller_spec.rb'
|
||||
- 'spec/requests/harvests_spec.rb'
|
||||
|
||||
# Offense count: 16
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Inferences.
|
||||
RSpecRails/InferredSpecType:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 28
|
||||
# Configuration parameters: Database, Include.
|
||||
# SupportedDatabases: mysql, postgresql
|
||||
# Include: db/**/*.rb
|
||||
@@ -436,17 +552,6 @@ Rails/Date:
|
||||
Exclude:
|
||||
- 'app/mailers/notifier_mailer.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: slashes, arguments
|
||||
Rails/FilePath:
|
||||
Exclude:
|
||||
- 'app/controllers/crops_controller.rb'
|
||||
- 'config/application.rb'
|
||||
- 'config/environments/development.rb'
|
||||
- 'db/seeds.rb'
|
||||
|
||||
# Offense count: 11
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
||||
@@ -485,12 +590,13 @@ Rails/I18nLocaleAssignment:
|
||||
Rails/I18nLocaleTexts:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 2
|
||||
# Offense count: 3
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/controllers/**/*.rb, app/mailers/**/*.rb
|
||||
Rails/LexicallyScopedActionFilter:
|
||||
Exclude:
|
||||
- 'app/controllers/data_controller.rb'
|
||||
- 'app/controllers/registrations_controller.rb'
|
||||
|
||||
# Offense count: 2
|
||||
Rails/OutputSafety:
|
||||
@@ -498,6 +604,12 @@ Rails/OutputSafety:
|
||||
- 'app/helpers/auto_suggest_helper.rb'
|
||||
- 'app/helpers/gardens_helper.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Rails/PluralizationGrammar:
|
||||
Exclude:
|
||||
- 'spec/requests/plantings_spec.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Include.
|
||||
@@ -508,8 +620,10 @@ Rails/RakeEnvironment:
|
||||
- 'lib/tasks/i18n.rake'
|
||||
- 'lib/tasks/testing.rake'
|
||||
|
||||
# Offense count: 10
|
||||
# Offense count: 9
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: AllowedReceivers.
|
||||
# AllowedReceivers: ActionMailer::Preview, ActiveSupport::TimeZone
|
||||
Rails/RedundantActiveRecordAllMethod:
|
||||
Exclude:
|
||||
- 'app/controllers/admin/roles_controller.rb'
|
||||
@@ -518,7 +632,6 @@ Rails/RedundantActiveRecordAllMethod:
|
||||
- 'app/controllers/plant_parts_controller.rb'
|
||||
- 'app/controllers/scientific_names_controller.rb'
|
||||
- 'app/services/openfarm_service.rb'
|
||||
- 'spec/features/members/deletion_spec.rb'
|
||||
- 'spec/features/percy/percy_spec.rb'
|
||||
- 'spec/models/harvest_spec.rb'
|
||||
|
||||
@@ -541,8 +654,8 @@ Rails/ResponseParsedBody:
|
||||
- 'spec/controllers/likes_controller_spec.rb'
|
||||
- 'spec/requests/api/v1/crop_request_spec.rb'
|
||||
- 'spec/requests/api/v1/gardens_request_spec.rb'
|
||||
- 'spec/requests/api/v1/harvest_request_spec.rb'
|
||||
- 'spec/requests/api/v1/member_request_spec.rb'
|
||||
- 'spec/requests/api/v1/harvests_request_spec.rb'
|
||||
- 'spec/requests/api/v1/members_request_spec.rb'
|
||||
- 'spec/requests/api/v1/photos_request_spec.rb'
|
||||
- 'spec/requests/api/v1/plantings_request_spec.rb'
|
||||
- 'spec/requests/api/v1/seeds_request_spec.rb'
|
||||
@@ -562,26 +675,11 @@ Rails/RootPathnameMethods:
|
||||
- 'app/controllers/crops_controller.rb'
|
||||
- 'app/helpers/icons_helper.rb'
|
||||
|
||||
# Offense count: 20
|
||||
# Offense count: 21
|
||||
# Configuration parameters: Include.
|
||||
# Include: db/**/*.rb
|
||||
Rails/ThreeStateBooleanColumn:
|
||||
Exclude:
|
||||
- 'db/migrate/20121203034745_add_tos_agreement_to_users.rb'
|
||||
- 'db/migrate/20130206051328_add_show_email_to_member.rb'
|
||||
- 'db/migrate/20130212123628_create_notifications.rb'
|
||||
- 'db/migrate/20130327120024_add_send_email_to_member.rb'
|
||||
- 'db/migrate/20130517051922_create_account_types.rb'
|
||||
- 'db/migrate/20130718011247_add_trading_to_seeds.rb'
|
||||
- 'db/migrate/20130722050836_remove_tradable_from_seeds.rb'
|
||||
- 'db/migrate/20130827105823_add_newsletter_to_member.rb'
|
||||
- 'db/migrate/20131025104228_add_fields_to_gardens.rb'
|
||||
- 'db/migrate/20140829230600_add_finished_to_planting.rb'
|
||||
- 'db/migrate/20140928085713_add_send_planting_reminder_to_member.rb'
|
||||
- 'db/migrate/20171022032108_all_the_predictions.rb'
|
||||
- 'db/migrate/20180213005731_seed_usage.rb'
|
||||
- 'db/migrate/20190720000555_create_mailboxer.mailboxer_engine.rb'
|
||||
- 'db/migrate/20190720000558_add_delivery_tracking_info_to_mailboxer_receipts.mailboxer_engine.rb'
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 6
|
||||
# Configuration parameters: Include.
|
||||
@@ -603,6 +701,18 @@ Rails/WhereEquals:
|
||||
- 'app/models/harvest.rb'
|
||||
- 'app/models/planting.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Rails/WhereRange:
|
||||
Exclude:
|
||||
- 'app/models/concerns/predict_planting.rb'
|
||||
- 'app/models/garden.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Rake/MethodDefinitionInTask:
|
||||
Exclude:
|
||||
- 'lib/tasks/growstuff.rake'
|
||||
|
||||
# Offense count: 3
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
@@ -613,6 +723,14 @@ Style/ClassAndModuleChildren:
|
||||
- 'lib/haml/filters/escaped_markdown.rb'
|
||||
- 'lib/haml/filters/growstuff_markdown.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: Keywords, RequireColon.
|
||||
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
|
||||
Style/CommentAnnotation:
|
||||
Exclude:
|
||||
- 'spec/features/seeds/adding_seeds_spec.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Style/CommentedKeyword:
|
||||
@@ -628,7 +746,7 @@ Style/CommentedKeyword:
|
||||
Style/FetchEnvVar:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 4
|
||||
# Offense count: 3
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: always, always_true, never
|
||||
@@ -636,32 +754,42 @@ Style/FrozenStringLiteralComment:
|
||||
Exclude:
|
||||
- 'config/initializers/new_framework_defaults_6_0.rb'
|
||||
- 'db/migrate/20200801084007_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb'
|
||||
- 'db/migrate/20200815012538_remove_median_function.rb'
|
||||
- 'spec/lib/haml/filters/growstuff_markdown_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Offense count: 3
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Style/GlobalStdStream:
|
||||
Exclude:
|
||||
- 'config/environments/production.rb'
|
||||
- 'lib/tasks/gbif.rake'
|
||||
- 'lib/tasks/openfarm.rake'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
|
||||
Style/GuardClause:
|
||||
Exclude:
|
||||
- 'app/controllers/activities_controller.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
||||
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
||||
# SupportedShorthandSyntax: always, never, either, consistent
|
||||
# SupportedShorthandSyntax: always, never, either, consistent, either_consistent
|
||||
Style/HashSyntax:
|
||||
Exclude:
|
||||
- 'app/models/csv_importer.rb'
|
||||
- 'spec/requests/api/v1/gardens_request_spec.rb'
|
||||
- 'spec/requests/api/v1/plantings_request_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Offense count: 5
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Style/IfUnlessModifier:
|
||||
Exclude:
|
||||
- 'app/controllers/activities_controller.rb'
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'bin/setup'
|
||||
- 'spec/features/shared_examples/crop_suggest.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
@@ -683,13 +811,21 @@ Style/MixinUsage:
|
||||
- 'bin/update'
|
||||
- 'spec/rails_helper.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: literals, strict
|
||||
Style/MutableConstant:
|
||||
Exclude:
|
||||
- 'app/models/activity.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Style/NegatedIfElseCondition:
|
||||
Exclude:
|
||||
- 'app/helpers/crops_helper.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Offense count: 4
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
|
||||
# SupportedStyles: predicate, comparison
|
||||
@@ -697,6 +833,7 @@ Style/NumericPredicate:
|
||||
Exclude:
|
||||
- 'app/helpers/harvests_helper.rb'
|
||||
- 'app/helpers/plantings_helper.rb'
|
||||
- 'app/models/concerns/predict_planting.rb'
|
||||
|
||||
# Offense count: 6
|
||||
Style/OpenStructUse:
|
||||
@@ -752,15 +889,7 @@ Style/RedundantReturn:
|
||||
Exclude:
|
||||
- 'app/controllers/messages_controller.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowModifier.
|
||||
Style/SoleNestedConditional:
|
||||
Exclude:
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'app/controllers/messages_controller.rb'
|
||||
|
||||
# Offense count: 20
|
||||
# Offense count: 24
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Mode.
|
||||
Style/StringConcatenation:
|
||||
@@ -771,6 +900,13 @@ Style/StringConcatenation:
|
||||
- 'spec/helpers/gardens_helper_spec.rb'
|
||||
- 'spec/helpers/seeds_helper_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Style/SuperArguments:
|
||||
Exclude:
|
||||
- 'app/controllers/omniauth_callbacks_controller.rb'
|
||||
- 'lib/haml/filters/escaped_markdown.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.1.4
|
||||
3.2.2
|
||||
|
||||
@@ -94,6 +94,7 @@ submit the change with your pull request.
|
||||
- Rowan Crawford / [wombleton](https://github.com/wombleton)
|
||||
- Ítalo Pires / [italopires](https://github.com/italopires)
|
||||
- Bennett Zink / [bennett-zink](https://github.com/bennett-zink)
|
||||
- Dominick Thornton / [domthor](https://github.com/domthor)
|
||||
|
||||
## Bots
|
||||
|
||||
|
||||
4
Gemfile
4
Gemfile
@@ -167,8 +167,12 @@ group :development, :test do
|
||||
gem 'rspec-activemodel-mocks'
|
||||
gem 'rspec-rails' # unit testing framework
|
||||
gem 'rswag-specs'
|
||||
gem 'rubocop-capybara'
|
||||
gem 'rubocop-factory_bot'
|
||||
gem 'rubocop-rails'
|
||||
gem 'rubocop-rake'
|
||||
gem 'rubocop-rspec'
|
||||
gem 'rubocop-rspec_rails'
|
||||
gem 'webrat' # provides HTML matchers for view tests
|
||||
|
||||
gem 'dotenv-rails'
|
||||
|
||||
94
Gemfile.lock
94
Gemfile.lock
@@ -155,7 +155,7 @@ GEM
|
||||
bootstrap_form (5.4.0)
|
||||
actionpack (>= 6.1)
|
||||
activemodel (>= 6.1)
|
||||
builder (3.2.4)
|
||||
builder (3.3.0)
|
||||
bullet (7.1.6)
|
||||
activesupport (>= 3.0.0)
|
||||
uniform_notifier (~> 1.11)
|
||||
@@ -199,7 +199,7 @@ GEM
|
||||
coffee-script-source (1.12.2)
|
||||
comfy_bootstrap_form (4.0.9)
|
||||
rails (>= 5.0.0)
|
||||
concurrent-ruby (1.3.1)
|
||||
concurrent-ruby (1.3.3)
|
||||
connection_pool (2.4.1)
|
||||
crass (1.0.6)
|
||||
csv (3.3.0)
|
||||
@@ -244,7 +244,7 @@ GEM
|
||||
elasticsearch-transport (7.0.0)
|
||||
faraday
|
||||
multi_json
|
||||
erubi (1.12.0)
|
||||
erubi (1.13.0)
|
||||
erubis (2.7.0)
|
||||
excon (0.110.0)
|
||||
execjs (2.9.1)
|
||||
@@ -255,8 +255,9 @@ GEM
|
||||
railties (>= 5.0.0)
|
||||
faker (3.4.1)
|
||||
i18n (>= 1.8.11, < 2)
|
||||
faraday (2.9.1)
|
||||
faraday (2.10.0)
|
||||
faraday-net_http (>= 2.0, < 3.2)
|
||||
logger
|
||||
faraday-net_http (3.1.0)
|
||||
net-http
|
||||
ffi (1.16.3)
|
||||
@@ -329,7 +330,7 @@ GEM
|
||||
mini_magick (>= 4.9.5, < 5)
|
||||
ruby-vips (>= 2.0.17, < 3)
|
||||
io-console (0.7.2)
|
||||
irb (1.13.1)
|
||||
irb (1.13.2)
|
||||
rdoc (>= 4.0.0)
|
||||
reline (>= 0.4.2)
|
||||
jquery-rails (4.6.0)
|
||||
@@ -359,6 +360,7 @@ GEM
|
||||
listen (3.9.0)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
logger (1.6.0)
|
||||
loofah (2.22.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.12.0)
|
||||
@@ -385,7 +387,7 @@ GEM
|
||||
mini_magick (4.12.0)
|
||||
mini_mime (1.1.5)
|
||||
mini_portile2 (2.8.7)
|
||||
minitest (5.23.1)
|
||||
minitest (5.24.1)
|
||||
moneta (1.0.0)
|
||||
msgpack (1.7.2)
|
||||
multi_json (1.15.0)
|
||||
@@ -403,13 +405,13 @@ GEM
|
||||
net-smtp (0.5.0)
|
||||
net-protocol
|
||||
nio4r (2.7.3)
|
||||
nokogiri (1.16.5)
|
||||
nokogiri (1.16.6)
|
||||
mini_portile2 (~> 2.8.2)
|
||||
racc (~> 1.4)
|
||||
nokogiri (1.16.5-x86_64-linux)
|
||||
nokogiri (1.16.6-x86_64-linux)
|
||||
racc (~> 1.4)
|
||||
oauth (0.5.6)
|
||||
oj (3.16.3)
|
||||
oj (3.16.4)
|
||||
bigdecimal (>= 3.0)
|
||||
omniauth (1.9.2)
|
||||
hashie (>= 3.4.6)
|
||||
@@ -424,8 +426,8 @@ GEM
|
||||
omniauth-oauth (~> 1.1)
|
||||
rack
|
||||
orm_adapter (0.5.0)
|
||||
parallel (1.24.0)
|
||||
parser (3.3.2.0)
|
||||
parallel (1.25.1)
|
||||
parser (3.3.4.0)
|
||||
ast (~> 2.4.1)
|
||||
racc
|
||||
percy-capybara (5.0.0)
|
||||
@@ -507,19 +509,19 @@ GEM
|
||||
rb-fsevent (0.11.2)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rdoc (6.6.3.1)
|
||||
rdoc (6.7.0)
|
||||
psych (>= 4.0.0)
|
||||
recaptcha (5.16.0)
|
||||
redis-client (0.22.1)
|
||||
recaptcha (5.17.0)
|
||||
redis-client (0.22.2)
|
||||
connection_pool
|
||||
regexp_parser (2.9.2)
|
||||
reline (0.5.7)
|
||||
reline (0.5.9)
|
||||
io-console (~> 0.5)
|
||||
responders (3.1.1)
|
||||
actionpack (>= 5.2)
|
||||
railties (>= 5.2)
|
||||
rexml (3.2.8)
|
||||
strscan (>= 3.0.9)
|
||||
rexml (3.3.1)
|
||||
strscan
|
||||
rouge (4.1.2)
|
||||
rspec (3.13.0)
|
||||
rspec-core (~> 3.13.0)
|
||||
@@ -531,13 +533,13 @@ GEM
|
||||
rspec-mocks (>= 2.99, < 4.0)
|
||||
rspec-core (3.13.0)
|
||||
rspec-support (~> 3.13.0)
|
||||
rspec-expectations (3.13.0)
|
||||
rspec-expectations (3.13.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.13.0)
|
||||
rspec-mocks (3.13.0)
|
||||
rspec-mocks (3.13.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.13.0)
|
||||
rspec-rails (6.1.2)
|
||||
rspec-rails (6.1.3)
|
||||
actionpack (>= 6.1)
|
||||
activesupport (>= 6.1)
|
||||
railties (>= 6.1)
|
||||
@@ -560,35 +562,35 @@ GEM
|
||||
rswag-ui (2.13.0)
|
||||
actionpack (>= 3.1, < 7.2)
|
||||
railties (>= 3.1, < 7.2)
|
||||
rubocop (1.64.1)
|
||||
rubocop (1.65.0)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (>= 3.17.0)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.3.0.2)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
regexp_parser (>= 2.4, < 3.0)
|
||||
rexml (>= 3.2.5, < 4.0)
|
||||
rubocop-ast (>= 1.31.1, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 2.4.0, < 3.0)
|
||||
rubocop-ast (1.31.3)
|
||||
parser (>= 3.3.1.0)
|
||||
rubocop-capybara (2.20.0)
|
||||
rubocop-capybara (2.21.0)
|
||||
rubocop (~> 1.41)
|
||||
rubocop-factory_bot (2.25.1)
|
||||
rubocop (~> 1.41)
|
||||
rubocop-rails (2.24.1)
|
||||
rubocop-factory_bot (2.26.1)
|
||||
rubocop (~> 1.61)
|
||||
rubocop-rails (2.25.1)
|
||||
activesupport (>= 4.2.0)
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 1.33.0, < 2.0)
|
||||
rubocop-ast (>= 1.31.1, < 2.0)
|
||||
rubocop-rspec (2.30.0)
|
||||
rubocop (~> 1.40)
|
||||
rubocop-capybara (~> 2.17)
|
||||
rubocop-factory_bot (~> 2.22)
|
||||
rubocop-rspec_rails (~> 2.28)
|
||||
rubocop-rspec_rails (2.28.3)
|
||||
rubocop (~> 1.40)
|
||||
rubocop-rake (0.6.0)
|
||||
rubocop (~> 1.0)
|
||||
rubocop-rspec (3.0.2)
|
||||
rubocop (~> 1.61)
|
||||
rubocop-rspec_rails (2.30.0)
|
||||
rubocop (~> 1.61)
|
||||
rubocop-rspec (~> 3, >= 3.0.1)
|
||||
ruby-progressbar (1.13.0)
|
||||
ruby-units (4.0.3)
|
||||
ruby-vips (2.2.1)
|
||||
@@ -612,16 +614,18 @@ GEM
|
||||
searchkick (5.3.1)
|
||||
activemodel (>= 6.1)
|
||||
hashie
|
||||
selenium-webdriver (4.20.1)
|
||||
selenium-webdriver (4.22.0)
|
||||
base64 (~> 0.2)
|
||||
logger (~> 1.4)
|
||||
rexml (~> 3.2, >= 3.2.5)
|
||||
rubyzip (>= 1.2.2, < 3.0)
|
||||
websocket (~> 1.0)
|
||||
sidekiq (7.2.4)
|
||||
sidekiq (7.3.0)
|
||||
concurrent-ruby (< 2)
|
||||
connection_pool (>= 2.3.0)
|
||||
logger
|
||||
rack (>= 2.2.4)
|
||||
redis-client (>= 0.19.0)
|
||||
redis-client (>= 0.22.2)
|
||||
simplecov (0.13.0)
|
||||
docile (~> 1.1.0)
|
||||
json (>= 1.8, < 3)
|
||||
@@ -636,18 +640,18 @@ GEM
|
||||
activesupport (>= 5.2)
|
||||
sprockets (>= 3.0.0)
|
||||
ssrf_filter (1.1.2)
|
||||
stringio (3.1.0)
|
||||
stringio (3.1.1)
|
||||
strscan (3.1.0)
|
||||
sysexits (1.2.0)
|
||||
temple (0.10.3)
|
||||
terminal-table (3.0.2)
|
||||
unicode-display_width (>= 1.1.1, < 3)
|
||||
terser (1.2.2)
|
||||
terser (1.2.3)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
thor (1.3.1)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.3.0)
|
||||
timecop (0.9.9)
|
||||
timecop (0.9.10)
|
||||
timeout (0.4.1)
|
||||
trollop (1.16.2)
|
||||
tzinfo (2.0.6)
|
||||
@@ -677,14 +681,14 @@ GEM
|
||||
websocket-driver (0.7.6)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.5)
|
||||
will_paginate (4.0.0)
|
||||
will_paginate (4.0.1)
|
||||
will_paginate-bootstrap-style (0.3.0)
|
||||
will_paginate (~> 4.0, >= 4.0.0)
|
||||
xmlrpc (0.3.3)
|
||||
webrick
|
||||
xpath (3.2.0)
|
||||
nokogiri (~> 1.8)
|
||||
zeitwerk (2.6.14)
|
||||
zeitwerk (2.6.16)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@@ -776,8 +780,12 @@ DEPENDENCIES
|
||||
rswag-specs
|
||||
rswag-ui
|
||||
rubocop
|
||||
rubocop-capybara
|
||||
rubocop-factory_bot
|
||||
rubocop-rails
|
||||
rubocop-rake
|
||||
rubocop-rspec
|
||||
rubocop-rspec_rails
|
||||
ruby-units
|
||||
sassc-rails
|
||||
scout_apm
|
||||
@@ -796,7 +804,7 @@ DEPENDENCIES
|
||||
xmlrpc
|
||||
|
||||
RUBY VERSION
|
||||
ruby 3.1.4p223
|
||||
ruby 3.2.2p53
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.11
|
||||
2.4.22
|
||||
|
||||
22
app/assets/javascripts/tab_navigation.js
Normal file
22
app/assets/javascripts/tab_navigation.js
Normal file
@@ -0,0 +1,22 @@
|
||||
$(document).ready(function() {
|
||||
var url = location.href.replace(/\/$/, '');
|
||||
|
||||
if (location.hash) {
|
||||
var hash = url.split('#');
|
||||
var triggerEl = document.querySelector('#myTab a[href="#' + hash[1] + '"]');
|
||||
var tab = new bootstrap.Tab(triggerEl);
|
||||
tab.show();
|
||||
url = location.href.replace(/\/#/, '#');
|
||||
history.replaceState(null, null, url);
|
||||
setTimeout(function() {
|
||||
$(window).scrollTop(0);
|
||||
}, 20);
|
||||
}
|
||||
|
||||
$('a[data-bs-toggle="tab"]').on('click', function() {
|
||||
var newUrl;
|
||||
var hash = $(this).attr('href');
|
||||
newUrl = url.split('#')[0] + hash;
|
||||
history.replaceState(null, null, newUrl);
|
||||
});
|
||||
});
|
||||
@@ -14,13 +14,13 @@ class ApplicationController < ActionController::Base
|
||||
rescue_from ActiveRecord::RecordNotFound, with: :not_found
|
||||
|
||||
def store_location
|
||||
unless request.path.in?(["/members/sign_in",
|
||||
"/members/sign_up",
|
||||
"/members/password/new",
|
||||
"/members/password/edit",
|
||||
"/members/confirmation",
|
||||
"/members/sign_out"]) || request.xhr?
|
||||
store_location_for(:member, request.fullpath) if request.format == :html
|
||||
if !(request.path.in?(["/members/sign_in",
|
||||
"/members/sign_up",
|
||||
"/members/password/new",
|
||||
"/members/password/edit",
|
||||
"/members/confirmation",
|
||||
"/members/sign_out"]) || request.xhr?) && (request.format == :html)
|
||||
store_location_for(:member, request.fullpath)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ class CropsController < ApplicationController
|
||||
@companions = @crop.companions.approved
|
||||
end
|
||||
format.svg do
|
||||
icon_data = @crop.svg_icon.presence || File.read(Rails.root.join('app', 'assets', 'images', 'icons', 'sprout.svg'))
|
||||
icon_data = @crop.svg_icon.presence || File.read(Rails.root.join("app/assets/images/icons/sprout.svg"))
|
||||
send_data(icon_data, type: "image/svg+xml", disposition: "inline")
|
||||
end
|
||||
format.json do
|
||||
|
||||
@@ -58,7 +58,7 @@ class LikesController < ApplicationController
|
||||
|
||||
def failed(like, message)
|
||||
respond_to do |format|
|
||||
format.json { render(json: { 'error': message }, status: :forbidden) }
|
||||
format.json { render(json: { error: message }, status: :forbidden) }
|
||||
format.html do
|
||||
flash[:error] = message
|
||||
if like&.likeable
|
||||
|
||||
@@ -8,11 +8,9 @@ class MessagesController < ApplicationController
|
||||
end
|
||||
|
||||
def show
|
||||
if (@message = Message.find_by(id: params[:id])) && (@conversation = @message.conversation)
|
||||
if @conversation.is_participant?(current_member)
|
||||
redirect_to conversation_path(@conversation, box: @box, anchor: "message_" + @message.id.to_s)
|
||||
return
|
||||
end
|
||||
if (@message = Message.find_by(id: params[:id])) && (@conversation = @message.conversation) && @conversation.is_participant?(current_member)
|
||||
redirect_to conversation_path(@conversation, box: @box, anchor: "message_" + @message.id.to_s)
|
||||
return
|
||||
end
|
||||
redirect_to conversations_path(box: @box)
|
||||
end
|
||||
|
||||
@@ -78,7 +78,7 @@ module PredictPlanting
|
||||
end
|
||||
|
||||
# Deactivate any plantings over time_limit that are super late in small batches.
|
||||
def self.archive!(time_limit: 3.years.ago, limit: 100)
|
||||
def self.archive!(time_limit: 3.years.ago, limit: 1000)
|
||||
active_plantings = Planting.annual.active.where("planted_at < ?", time_limit).order(planted_at: :asc).limit(limit)
|
||||
active_plantings.each do |planting|
|
||||
if planting.finish_is_predicatable? && planting.super_late?
|
||||
|
||||
@@ -80,11 +80,11 @@ class Garden < ApplicationRecord
|
||||
def reindex(refresh: false); end
|
||||
|
||||
# Deactivate any gardens with no active plantings
|
||||
def self.archive!(time_limit: 3.years.ago, limit: 100)
|
||||
Garden.active.where("updated_at < ?", time_limit).order(updated_at: :asc).limit(limit).each do |active_garden|
|
||||
def self.archive!(time_limit: 3.years.ago, limit: 1000)
|
||||
Garden.active.where("gardens.updated_at < ?", time_limit).order(updated_at: :asc).limit(limit).each do |active_garden|
|
||||
unless active_garden.plantings.active.any?
|
||||
garden.active = false
|
||||
garden.save
|
||||
active_garden.active = false
|
||||
active_garden.save
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :delete, class: 'form-horizontal' }) do |f|
|
||||
= form_for(resource, as: resource_name,
|
||||
url: registration_path(resource_name) + '#delete',
|
||||
html: { method: :delete, class: 'form-horizontal' }) do |f|
|
||||
%br/
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
= form_for(resource, as: resource_name,
|
||||
url: registration_path(resource_name),
|
||||
url: registration_path(resource_name) + '#apps',
|
||||
html: { method: :put, class: 'form-horizontal' }) do |_f|
|
||||
%br/
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
= form_for(resource, as: resource_name,
|
||||
url: registration_path(resource_name),
|
||||
url: registration_path(resource_name) + '#email',
|
||||
html: { method: :put, class: 'form-horizontal' }) do |f|
|
||||
%br/
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
= form_for(resource, as: resource_name,
|
||||
url: registration_path(resource_name),
|
||||
url: registration_path(resource_name) + '#password',
|
||||
html: { method: :put, class: 'form-horizontal' }) do |f|
|
||||
%br/
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
= form_for(resource, as: resource_name,
|
||||
url: registration_path(resource_name),
|
||||
url: registration_path(resource_name) + '#profile',
|
||||
html: { method: :put, class: 'form-horizontal' }) do |f|
|
||||
%br/
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
- if @member.last_sign_in_at
|
||||
%p
|
||||
%strong Last Login
|
||||
= @member.last_sign_in_at
|
||||
= @member.last_sign_in_at&.to_fs(:default)
|
||||
|
||||
- if can? :update, @member
|
||||
= link_to edit_member_registration_path, class: 'btn btn-block' do
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
in
|
||||
= link_to @post.forum, @post.forum
|
||||
on
|
||||
= @post.created_at
|
||||
= @post.created_at.to_fs(:default)
|
||||
- if @post.updated_at > @post.created_at
|
||||
and edited at
|
||||
= @post.updated_at
|
||||
= @post.updated_at.to_fs(:default)
|
||||
|
||||
= link_to "Permalink", post
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ module Growstuff
|
||||
config.active_record.yaml_column_permitted_classes = [Symbol, Date, Time, ActiveSupport::TimeWithZone, ActiveSupport::TimeZone]
|
||||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
I18n.load_path += Dir[Rails.root.join('config', 'locales', '*.{rb,yml}')]
|
||||
I18n.load_path += Dir[Rails.root.join("config/locales/*.{rb,yml}")]
|
||||
I18n.default_locale = :en
|
||||
# rails will fallback to config.i18n.default_locale translation
|
||||
config.i18n.fallbacks = true
|
||||
|
||||
@@ -16,7 +16,7 @@ Rails.application.configure do
|
||||
|
||||
# Enable/disable caching. By default caching is disabled.
|
||||
# Run rails dev:cache to toggle caching.
|
||||
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
||||
if Rails.root.join("tmp/caching-dev.txt").exist?
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
config.cache_store = :memory_store
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateCms < ActiveRecord::Migration[4.2]
|
||||
def self.up # rubocop:disable Metrics/MethodLength
|
||||
def self.up
|
||||
# -- Sites --------------------------------------------------------------
|
||||
create_table :comfy_cms_sites do |t|
|
||||
t.string :label, null: false
|
||||
|
||||
@@ -39,7 +39,7 @@ class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
|
||||
t.foreign_key :active_storage_blobs, column: :blob_id
|
||||
end
|
||||
|
||||
create_table :active_storage_variant_records, id: primary_key_type do |t|
|
||||
create_table :active_storage_variant_records, id: primary_key_type do |t| # rubocop:disable Rails/CreateTableWithTimestamps
|
||||
t.belongs_to :blob, null: false, index: false, type: foreign_key_type
|
||||
t.string :variation_digest, null: false
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ def load_data
|
||||
end
|
||||
|
||||
def load_crops
|
||||
source_path = Rails.root.join('db', 'seeds')
|
||||
source_path = Rails.root.join("db/seeds")
|
||||
Dir.glob("#{source_path}/crops*.csv").each do |crop_file|
|
||||
puts "Loading crops from #{crop_file}..."
|
||||
CSV.foreach(crop_file) do |row|
|
||||
@@ -48,7 +48,7 @@ def load_test_users
|
||||
puts "Loading test users..."
|
||||
|
||||
# Open suburb csv
|
||||
source_path = Rails.root.join('db', 'seeds')
|
||||
source_path = Rails.root.join("db/seeds")
|
||||
begin
|
||||
suburb_file = File.open("#{source_path}/suburbs.csv")
|
||||
rescue StandardError
|
||||
|
||||
@@ -28,7 +28,7 @@ describe CropsController do
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET crop hierarchy " do
|
||||
describe "GET crop hierarchy" do
|
||||
describe 'fetches the crop hierarchy page' do
|
||||
context 'wrangler' do
|
||||
include_context 'login as wrangler'
|
||||
|
||||
@@ -69,7 +69,7 @@ describe "crop detail page", :js, :search do
|
||||
include_examples "shows photos"
|
||||
end
|
||||
|
||||
context "when not signed in " do
|
||||
context "when not signed in" do
|
||||
include_examples "shows photos"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -144,7 +144,7 @@ describe Post do
|
||||
end
|
||||
|
||||
it "does not duplicate" do
|
||||
expect(post.crops) =~ [tomato, maize]
|
||||
expect(post.crops).to match_array([tomato, maize])
|
||||
end
|
||||
|
||||
it "is updated when post was modified" do
|
||||
|
||||
@@ -68,7 +68,7 @@ describe "posts/_single" do
|
||||
end
|
||||
|
||||
it "shows the updated time" do
|
||||
rendered.should have_content @post.updated_at
|
||||
rendered.should have_content @post.updated_at.to_fs(:default)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
22
yarn.lock
22
yarn.lock
@@ -292,11 +292,11 @@ brace-expansion@^1.1.7:
|
||||
concat-map "0.0.1"
|
||||
|
||||
braces@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
|
||||
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
|
||||
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
|
||||
dependencies:
|
||||
fill-range "^7.0.1"
|
||||
fill-range "^7.1.1"
|
||||
|
||||
buffer-crc32@~0.2.3:
|
||||
version "0.2.13"
|
||||
@@ -767,10 +767,10 @@ file-entry-cache@^5.0.1:
|
||||
dependencies:
|
||||
flat-cache "^2.0.1"
|
||||
|
||||
fill-range@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
|
||||
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
|
||||
fill-range@^7.1.1:
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
|
||||
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
|
||||
dependencies:
|
||||
to-regex-range "^5.0.1"
|
||||
|
||||
@@ -1693,9 +1693,9 @@ write@1.0.3:
|
||||
mkdirp "^0.5.1"
|
||||
|
||||
ws@^8.0.0:
|
||||
version "8.5.0"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f"
|
||||
integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==
|
||||
version "8.17.1"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b"
|
||||
integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==
|
||||
|
||||
y18n@^4.0.0:
|
||||
version "4.0.3"
|
||||
|
||||
Reference in New Issue
Block a user