Skip to content

Commit dcc87e1

Browse files
authored
Switch to using annotate_rb (#2685)
1 parent 7897911 commit dcc87e1

7 files changed

Lines changed: 87 additions & 68 deletions

File tree

.annotate_rb.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
:position: before
3+
:position_in_additional_file_patterns: before
4+
:position_in_class: before
5+
:position_in_factory: before
6+
:position_in_fixture: before
7+
:position_in_routes: before
8+
:position_in_serializer: before
9+
:position_in_test: before
10+
:classified_sort: true
11+
:exclude_controllers: true
12+
:exclude_factories: true
13+
:exclude_fixtures: false
14+
:exclude_helpers: true
15+
:exclude_scaffolds: true
16+
:exclude_serializers: true
17+
:exclude_sti_subclasses: false
18+
:exclude_tests: true
19+
:force: false
20+
:format_markdown: false
21+
:format_rdoc: false
22+
:format_yard: false
23+
:frozen: false
24+
:ignore_model_sub_dir: false
25+
:ignore_unknown_models: false
26+
:include_version: false
27+
:show_check_constraints: false
28+
:show_complete_foreign_keys: false
29+
:show_foreign_keys: true
30+
:show_indexes: true
31+
:simple_indexes: false
32+
:sort: false
33+
:timestamp: false
34+
:trace: false
35+
:with_comment: true
36+
:with_column_comments: true
37+
:with_table_comments: true
38+
:active_admin: false
39+
:command:
40+
:debug: false
41+
:hide_default_column_types: ''
42+
:hide_limit_column_types: ''
43+
:ignore_columns:
44+
:ignore_routes:
45+
:models: true
46+
:routes: false
47+
:skip_on_db_migrate: false
48+
:target_action: :do_annotations
49+
:wrapper:
50+
:wrapper_close:
51+
:wrapper_open:
52+
:classes_default_to_s: []
53+
:additional_file_patterns: []
54+
:model_dir:
55+
- app/models
56+
:require: []
57+
:root_dir:
58+
- ''

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ group :development do
151151
gem "letter_opener"
152152
gem "rerun" # restart sidekiq processes in development on app change
153153
gem "terminal-notifier"
154-
# Use community-maintained fork to support rails 8 - hopefully, eventually mainlined
155-
gem "annotate", github: "bikeindex/annotate_models", branch: "develop" # Annotate models with schema info
154+
gem 'annotate_rb', github: "sethherr/annotate_rb", branch: "rename-annotate_rb"
156155
end
157156

158157
group :development, :test do

Gemfile.lock

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
GIT
2-
remote: https://github.com/bikeindex/annotate_models.git
3-
revision: 8cf2eeaaeee39a00f6b9573485219910da77b9ff
4-
branch: develop
5-
specs:
6-
annotate (3.2.0)
7-
activerecord (>= 3.2)
8-
rake (>= 10.4, < 14.0)
9-
101
GIT
112
remote: https://github.com/bikeindex/carrierwave_backgrounder.git
123
revision: 7b2b0e9bc43f2ec20f09db3fea7bbc5f167f52c7
@@ -42,6 +33,13 @@ GIT
4233
excon (~> 0.76.0)
4334
json (~> 2.1, >= 2.1.0)
4435

36+
GIT
37+
remote: https://github.com/sethherr/annotate_rb.git
38+
revision: a947916dff1eab2c1b570a8b57020fb24337c797
39+
branch: rename-annotate_rb
40+
specs:
41+
annotate_rb (5.0.0)
42+
4543
GEM
4644
remote: https://rails-assets.org/
4745
specs:
@@ -841,7 +839,7 @@ PLATFORMS
841839
DEPENDENCIES
842840
MailchimpMarketing!
843841
active_model_serializers (~> 0.8.3)
844-
annotate!
842+
annotate_rb!
845843
api-pagination
846844
axlsx (~> 3.0.0.pre)
847845
bcrypt

app/models/logged_search.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
# state_id :bigint
2929
# user_id :bigint
3030
#
31+
# Indexes
32+
#
33+
# index_logged_searches_on_country_id (country_id)
34+
# index_logged_searches_on_organization_id (organization_id)
35+
# index_logged_searches_on_request_id (request_id)
36+
# index_logged_searches_on_state_id (state_id)
37+
# index_logged_searches_on_user_id (user_id)
38+
#
3139
class LoggedSearch < AnalyticsRecord
3240
include Geocodeable
3341

app/models/organization_status.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
# updated_at :datetime not null
1313
# organization_id :bigint
1414
#
15+
# Indexes
16+
#
17+
# index_organization_statuses_on_organization_id (organization_id)
18+
#
1519
class OrganizationStatus < AnalyticsRecord
1620
belongs_to :organization
1721

lib/tasks/annotate_rb.rake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This rake task was added by annotate_rb gem.
2+
3+
# Can set `ANNOTATERB_SKIP_ON_DB_TASKS` to be anything to skip this
4+
if Rails.env.development? && ENV["ANNOTATERB_SKIP_ON_DB_TASKS"].nil?
5+
require "annotate_rb"
6+
7+
AnnotateRb::Core.load_rake_tasks
8+
end

lib/tasks/auto_annotate_models.rake

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)