-
Notifications
You must be signed in to change notification settings - Fork 631
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
bundle exec annotate doesn't run on models, just routes #563
Comments
@jywei Sorry, I don't quite understand what the problem is with your description. Did this work on some version and stop working with certain version? |
Model annotation only works when I run |
yea, my annotate stopped working once i upgraded to 2.7.4 when it goes to annotate migration and rollbacks. Only tries to annotate routes now. Was working on 2.7.2 except for the issues in #538 |
I'm having the same problem. |
I'm having the same problem with version 2.7.4. Rails 5.2.1 |
Hi! I'm having the same problem. I am able to work around it with: |
I have same issue. It's added in #485. Main reason - if you have routes = true in Annotate.set_defaults, then annotate_models doesn't called. |
I have same problem.
It does not work after migrate either. Ruby 2.5.3 |
FWIW, I have noticed that any time I use the |
I'm also experiencing this, any idea when v2.7.5 release is coming with the fix? Thanks! |
I'm also experiencing this. Does this relate to the changes from issue #485? |
I have the same problem, after modifying the options Ruby: 2.5.3 |
2.7.5 was released a few days ago. I'm not sure if this particular issue is fixed though so if someone can confirm. |
I'm on annotate v2.7.5. Running Also running NameError: undefined local variable or method `after' for #<Rake::Application:0x00007fb587135da0> |
Sorry for the delay everyone. This is my first time working with an open source project using the Github features like milestones for releases. I've since removed the v2.7.5 milestone and added v3.0.0. I'll be taking a look at this for the v3 release. |
In looking into #563, I realized there are gaps in test coverage. For example, `bin/annotate` doesn't have any tests. Tidying the spec directory to make it easier to add tests in future work.
Prior to this change, `Annotate.include_models?` returned the inverse of `Annotate.include_routes?`. This made it so annotating models and routes was not possible to do together. This PR adds an explicit `--models` flag and also adds it the option to `lib/generators/annotate/templates/auto_annotate_models.rake` with the default being set to `false`. Fixes #563 and undoes the bug introduced in #485.
Just closing the loop for everyone, I added a fix for this issue. Will cut and publish the new gem shortly. |
Great! thanks so much |
Great @drwl, but how do we know when the update is ready? is there a way to do it within the rails app or we need to go to ruby gems to check this out manually? |
Just waiting for some help from @ctran (repo owner) to push it to Rubygems.
In the mean time you could make your gemfile point to this git repository.
https://bundler.io/guides/git.html
On Tue, Sep 3, 2019 at 7:52 AM Alejandro Ventura ***@***.***> wrote:
Great @drwl <https://github.com/drwl>, but how do we know when the update
is ready? is there a way to do it within the rails app or we need to go to
ruby gems to check this out manually?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#563?email_source=notifications&email_token=AAKMUC5QQ6ZGW7F36UTLTTTQHZ235A5CNFSM4FDIHRP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5YO2DQ#issuecomment-527494414>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKMUC2ZODMTNZM2TIVJSQDQHZ235ANCNFSM4FDIHRPQ>
.
--
Sent from phone
|
In looking into ctran#563, I realized there are gaps in test coverage. For example, `bin/annotate` doesn't have any tests. Tidying the spec directory to make it easier to add tests in future work.
Prior to this change, `Annotate.include_models?` returned the inverse of `Annotate.include_routes?`. This made it so annotating models and routes was not possible to do together. This PR adds an explicit `--models` flag and also adds it the option to `lib/generators/annotate/templates/auto_annotate_models.rake` with the default being set to `false`. Fixes ctran#563 and undoes the bug introduced in ctran#485.
In looking into ctran#563, I realized there are gaps in test coverage. For example, `bin/annotate` doesn't have any tests. Tidying the spec directory to make it easier to add tests in future work.
Prior to this change, `Annotate.include_models?` returned the inverse of `Annotate.include_routes?`. This made it so annotating models and routes was not possible to do together. This PR adds an explicit `--models` flag and also adds it the option to `lib/generators/annotate/templates/auto_annotate_models.rake` with the default being set to `false`. Fixes ctran#563 and undoes the bug introduced in ctran#485.
When I run
bundle exec annotate --exclude tests,fixtures,factories,serializers
, I will only getconfig/routes.rb unchanged.
(expectation:Model files unchanged.
andconfig/routes.rb unchanged.
However, I need to run it with rake, with
bundle exec rake annotate_models
, annotate will finally run with my models.It means my after migration auto-hook also doesn't work on models (also only routes)
TL;DR
Model annotation doesn't run on command line, only on rake version, HELP :(
The text was updated successfully, but these errors were encountered: