Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate content in fixtures when annotating models #108

Closed
ThibautGrx opened this issue Apr 15, 2024 · 3 comments
Closed

Duplicate content in fixtures when annotating models #108

ThibautGrx opened this issue Apr 15, 2024 · 3 comments

Comments

@ThibautGrx
Copy link

ThibautGrx commented Apr 15, 2024

When I annotate models, the content of fixture is duplicated. It's working fine for model and model test files.

image

Here is my config:

---
: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_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:
- ''

Commands

$ bundle exec annotaterb models

Version

  • annotaterb version 4.7.0
  • rails version main
  • ruby version 3.3.0
@drwl
Copy link
Owner

drwl commented Apr 16, 2024

@ThibautGrx thanks for reporting, I was able to reproduce this on my end. This is definitely a bug — the new annotation finder and parser is a Ruby file parser and so doesn't support non-Ruby files. Will need to add a different file parser to support this.

I'll try to get to this after the other issue #106

@drwl
Copy link
Owner

drwl commented May 5, 2024

@ThibautGrx sorry for the delay, I was preoccupied with preparing for interviews. I had time today to look into this, would you mind trying this branch of the gem?

#110

I tested it locally using one fixture file and didn't have issues but it's nice to get extra testing before merging.

@drwl
Copy link
Owner

drwl commented May 14, 2024

I just pushed 4.8.0 to Rubygems and it should resolve this issue. Feel free to reopen if the issue isn't resolved.

@drwl drwl closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants