Skip to content

Commit

Permalink
Swap to AnnotateRB since Annotate is no longer maintained.
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Nov 8, 2024
1 parent 348388f commit 53c72c7
Show file tree
Hide file tree
Showing 16 changed files with 496 additions and 50 deletions.
58 changes: 58 additions & 0 deletions .annotaterb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
:position: before
:position_in_additional_file_patterns: before
:position_in_class: before
:position_in_factory: before
:position_in_fixture: before
:position_in_routes: before
:position_in_serializer: before
:position_in_test: before
:classified_sort: true
:exclude_controllers: true
:exclude_factories: false
:exclude_fixtures: false
:exclude_helpers: true
:exclude_scaffolds: true
:exclude_serializers: false
:exclude_sti_subclasses: false
:exclude_tests: false
:force: false
:format_markdown: false
:format_rdoc: false
:format_yard: false
:frozen: false
:ignore_model_sub_dir: false
:ignore_unknown_models: false
:include_version: false
:show_check_constraints: false
:show_complete_foreign_keys: false
:show_foreign_keys: true
:show_indexes: true
:simple_indexes: false
:sort: false
:timestamp: false
:trace: false
:with_comment: true
:with_column_comments: true
:with_table_comments: true
:active_admin: false
:command:
:debug: false
:hide_default_column_types: ''
:hide_limit_column_types: ''
:ignore_columns:
:ignore_routes:
:models: true
:routes: false
:skip_on_db_migrate: false
:target_action: :do_annotations
:wrapper:
:wrapper_close:
:wrapper_open:
:classes_default_to_s: []
:additional_file_patterns: []
:model_dir:
- app/models
:require: []
:root_dir:
- ''
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem 'web-console'

gem 'annotaterb', '~> 4.13'
# this was commented out in the default build, so doing the same..
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem 'rack-mini-profiler'
Expand All @@ -93,5 +94,3 @@ group :test do
gem 'capybara'
gem 'selenium-webdriver'
end

gem "annotaterb", "~> 4.13"
17 changes: 9 additions & 8 deletions app/jobs/google_analytics_event_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
class GoogleAnalyticsEventJob < ApplicationJob
queue_as :default

def perform data
def perform _data
return unless Analytics::GoogleAnalytics.enabled?

Analytics::GoogleAnalytics.ga.event(
data[:category],
data[:action],
data[:label],
data[:value],
data[:bounce] || false
)
nil # avoid NameError: uninitialized constant URI::PATTERN
# Analytics::GoogleAnalytics.ga.event(
# data[:category],
# data[:action],
# data[:label],
# data[:value],
# data[:bounce] || false
# )
end
end
3 changes: 2 additions & 1 deletion app/models/case.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

# rubocop:disable Metrics/ClassLength

# == Schema Information
#
# Table name: cases
Expand All @@ -25,7 +27,6 @@
# cases_ibfk_1 (owner_id => users.id)
#

# rubocop:disable Metrics/ClassLength
class Case < ApplicationRecord
# Associations
# too late now!
Expand Down
4 changes: 2 additions & 2 deletions app/models/permission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
# Table name: permissions
#
# id :integer not null, primary key
# user_id :integer
# model_type :string(255) not null
# action :string(255) not null
# model_type :string(255) not null
# on :boolean default(FALSE)
# created_at :datetime not null
# updated_at :datetime not null
# user_id :integer
#

class Permission < ApplicationRecord
Expand Down
3 changes: 2 additions & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

# rubocop:disable Metrics/ClassLength

# == Schema Information
#
# Table name: users
Expand Down Expand Up @@ -46,7 +48,6 @@
# fk_rails_... (default_scorer_id => scorers.id)
#

# rubocop:disable Metrics/ClassLength
class User < ApplicationRecord
# Associations

Expand Down
19 changes: 10 additions & 9 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# frozen_string_literal: true

require 'active_support/core_ext/integer/time'
# Sprockets.register_compressor 'application/javascript', :terser, Terser::Compressor

# rubocop:disable Metrics/BlockLength
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.

Expand Down Expand Up @@ -35,15 +36,14 @@

# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :db # :local



# Enable detailed ActionCable logging
config.action_cable.log_tags = [
:channel,
:connection,
:transmissions,
:state_updates
]
config.action_cable.log_tags = [
:channel,
:connection,
:transmissions,
:state_updates
]

config.action_cable.disable_request_forgery_protection = true
config.action_cable.allowed_request_origins = '*'
Expand Down Expand Up @@ -111,3 +111,4 @@
# authentication: :plain
# }
end
# rubocop:enable Metrics/BlockLength
Loading

0 comments on commit 53c72c7

Please sign in to comment.