Skip to content

Commit

Permalink
Merge pull request #8 from internetee/added-registrant-page
Browse files Browse the repository at this point in the history
added registrant page
  • Loading branch information
OlegPhenomenon authored Mar 14, 2024
2 parents 264e0e7 + db1955d commit a763d56
Show file tree
Hide file tree
Showing 94 changed files with 2,949 additions and 220 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
RAILS_ENV: test
COVERAGE: true
DISABLE_SPRING: 1
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
cp config/application.yml.example config/application.yml
cp config/database_ci.yml config/database.yml
Expand All @@ -57,3 +58,4 @@ jobs:
- name: Dependabot
if: ${{ github.event.label.name == 'dependencies' }}
run: bundle exec rails assets:precompile

55 changes: 55 additions & 0 deletions .rubocop-rails.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

Rails/ActiveRecordCallbacksOrder:
Enabled: true

Rails/AfterCommitOverride:
Enabled: true

Rails/DefaultScope:
Enabled: true

Rails/FindById:
Enabled: true

Rails/Inquiry:
Enabled: true

Rails/MailerName:
Enabled: true

Rails/MatchRoute:
Enabled: true

Rails/NegateInclude:
Enabled: true

Rails/OrderById:
Enabled: true

Rails/Pluck:
Enabled: true

Rails/PluckId:
Enabled: true

Rails/PluckInWhere:
Enabled: true

Rails/RenderInline:
Enabled: true

Rails/RenderPlainText:
Enabled: true

Rails/SaveBang:
Enabled: true
AllowImplicitReturn: false

Rails/ShortI18n:
Enabled: true

Rails/WhereExists:
Enabled: true

Rails/WhereNot:
Enabled: true
292 changes: 289 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,292 @@
inherit_from:
- '.rubocop-rails.yml'

require:
- rubocop-performance
- rubocop-rails

AllCops:
TargetRubyVersion: 3.0
TargetRailsVersion: 7.0
Exclude:
- 'spec/**/*'
- 'config/**/*'
- '**/db/migrate/*'
- '**/Gemfile.lock'
- '**/Rakefile'
- '**/rails'
- '**/vendor/**/*'
- '**/spec_helper.rb'
- 'bin/*'

###########################################################
###################### Rubocop ############################
###########################################################

# You can find all configuration options for rubocop here: https://docs.rubocop.org/rubocop/cops_bundler.html

# ============== Layout =================

Layout/ClassStructure:
ExpectedOrder:
- module_inclusion
- constants
- association
- public_attribute_macros
- public_delegate
- macros
- initializer
- public_class_methods
- public_methods
- protected_attribute_macros
- protected_methods
- private_attribute_macros
- private_delegate
- private_methods

Layout/EmptyLineAfterMultilineCondition:
Enabled: true

Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true

Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent

Layout/FirstArrayElementLineBreak:
Enabled: true

Layout/FirstHashElementIndentation:
EnforcedStyle: consistent

Layout/FirstHashElementLineBreak:
Enabled: true

Layout/LineLength:
Max: 120
Exclude:
- '**/spec/**/*'

Layout/MultilineArrayBraceLayout:
EnforcedStyle: new_line

Layout/MultilineOperationIndentation:
EnforcedStyle: indented

Layout/MultilineHashBraceLayout:
EnforcedStyle: new_line

Layout/MultilineHashKeyLineBreaks:
Enabled: true

Layout/MultilineMethodCallBraceLayout:
EnforcedStyle: new_line

Layout/MultilineMethodDefinitionBraceLayout:
EnforcedStyle: new_line

Layout/SpaceAroundMethodCallOperator:
Enabled: true

Layout/SpaceInLambdaLiteral:
EnforcedStyle: require_space

Lint/AmbiguousBlockAssociation:
Exclude:
- '**/spec/**/*'

Lint/AssignmentInCondition:
AllowSafeAssignment: false

Lint/BinaryOperatorWithIdenticalOperands:
Enabled: true

Lint/DeprecatedOpenSSLConstant:
Enabled: true

Lint/DuplicateElsifCondition:
Enabled: true

Lint/DuplicateRequire:
Enabled: true

Lint/DuplicateRescueException:
Enabled: true

Lint/EmptyConditionalBody:
Enabled: true

Lint/EmptyFile:
Enabled: true

Lint/FloatComparison:
Enabled: true

Lint/MissingSuper:
Enabled: true

Lint/MixedRegexpCaptureTypes:
Enabled: true

Lint/NumberConversion:
Enabled: true

Lint/RaiseException:
Enabled: true

Lint/SelfAssignment:
Enabled: true

Lint/TrailingCommaInAttributeDeclaration:
Enabled: true

Lint/UnusedBlockArgument:
IgnoreEmptyBlocks: false

Lint/UnusedMethodArgument:
IgnoreEmptyMethods: false

Lint/UselessMethodDefinition:
Enabled: true

# ============== Metric =================

Metrics/AbcSize:
Max: 45

Metrics/BlockLength:
CountComments: false
Max: 50
Exclude:
- '**/spec/**/*'
- '**/*.rake'
- '**/factories/**/*'
- '**/config/routes.rb'

Metrics/ClassLength:
CountAsOne: ['array', 'hash']
Max: 150

Metrics/CyclomaticComplexity:
Max: 10

Metrics/MethodLength:
CountAsOne: ['array', 'hash']
Max: 30

Metrics/ModuleLength:
CountAsOne: ['array', 'hash']
Max: 250
Exclude:
- '**/spec/**/*'

Metrics/PerceivedComplexity:
Max: 10

# ============== Variable ==================

# Most of the Naming configurations are enabled by default, we should enable or disable configuration depending on what the team needs

### Example
##
# Naming/VariableNumber:
# Enabled: false
##
###

# ============== Style ================

Style/AccessorGrouping:
Enabled: true

Style/ArrayCoercion:
Enabled: true

Style/AutoResourceCleanup:
Enabled: true

Style/BisectedAttrAccessor:
Enabled: true

Style/CaseLikeIf:
Enabled: true

Style/ClassAndModuleChildren:
Enabled: false

Style/CollectionMethods:
Enabled: true

Style/CombinableLoops:
Enabled: true

Style/CommandLiteral:
EnforcedStyle: percent_x

Style/ConstantVisibility:
Enabled: true

Style/Documentation:
Enabled: false
Enabled: false

Style/ExplicitBlockArgument:
Enabled: true

Style/GlobalStdStream:
Enabled: true

Style/HashEachMethods:
Enabled: true

Style/HashLikeCase:
Enabled: true

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true

Style/ImplicitRuntimeError:
Enabled: true

Style/InlineComment:
Enabled: true

Style/IpAddresses:
Enabled: true

Style/KeywordParametersOrder:
Enabled: true

Style/MethodCallWithArgsParentheses:
Enabled: true

Style/MissingElse:
Enabled: true
EnforcedStyle: case

Style/MultilineMethodSignature:
Enabled: true

Style/OptionalBooleanParameter:
Enabled: true

Style/RedundantAssignment:
Enabled: true

Style/RedundantBegin:
Enabled: true

Style/RedundantFetchBlock:
Enabled: true

Style/RedundantFileExtensionInRequire:
Enabled: true

Style/RedundantSelfAssignment:
Enabled: true

Style/SingleArgumentDig:
Enabled: true

Style/StringConcatenation:
Enabled: true
8 changes: 4 additions & 4 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ RUN apk add --no-cache --update --repository=http://dl-cdn.alpinelinux.org/alpin
postgresql13-dev \
postgresql13 \
postgresql13-client \
gcompat \
# python2 \
tzdata

ENV BUNDLER_VERSION 2.2.24
ENV BUNDLER_VERSION 2.4.6
ENV BUNDLE_JOBS 8
ENV BUNDLE_RETRY 5
ENV BUNDLE_CACHE_ALL true
Expand All @@ -30,15 +31,14 @@ WORKDIR $APP_PATH
COPY Gemfile Gemfile.lock ./
RUN gem install bundler -v $BUNDLER_VERSION

RUN bundle config --global frozen 1 && \
bundle install && \
RUN bundle install && \
rm -rf /usr/local/bundle/cache/*.gem && \
find /usr/local/bundle/gems/ -name "*.c" -delete && \
find /usr/local/bundle/gems/ -name "*.o" -delete


COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile --non-interactive --production
RUN yarn install --non-interactive

ADD . $APP_PATH

Expand Down
Loading

0 comments on commit a763d56

Please sign in to comment.