Every repository with this icon (
Every repository with this icon (
| Description: | Annotate ActiveRecord models as a gem edit |
-
% svn st; annotate; annotate -d; svn st Curb not found. Using Net::HTTP. Annotated (9): Account, Answer, Business, Favorite, Friendship, Invitation, Question, Service, User Curb not found. Using Net::HTTP. Removed annotation from: Account, Answer, Business, Favorite, Friendship, Invitation, Question, Service, User M test/unit/user_test.rb M test/unit/favorite_test.rb M test/unit/answer_test.rb M test/unit/service_test.rb M test/unit/invitation_test.rb M test/unit/question_test.rb M test/unit/business_test.rb M test/unit/friendship_test.rb M test/unit/account_test.rbComments
-
522 % svn st; annotate -p after; annotate -d; svn st; annotate -d -p after; svn st Curb not found. Using Net::HTTP. Annotated (9): Account, Answer, Business, Favorite, Friendship, Invitation, Question, Service, User Curb not found. Using Net::HTTP. Removed annotation from: Account, Answer, Business, Favorite, Friendship, Invitation, Question, Service, User M test/unit/user_test.rb M test/unit/favorite_test.rb M test/unit/answer_test.rb M test/unit/service_test.rb M test/unit/invitation_test.rb M test/unit/question_test.rb M test/unit/business_test.rb M test/unit/friendship_test.rb M test/unit/account_test.rb M test/fixtures/accounts.yml M test/fixtures/users.yml M test/fixtures/favorites.yml M test/fixtures/answers.yml M test/fixtures/businesses.yml M test/fixtures/services.yml M test/fixtures/invitations.yml M test/fixtures/questions.yml M test/fixtures/friendships.yml M app/models/user.rb M app/models/favorite.rb M app/models/answer.rb M app/models/service.rb M app/models/invitation.rb M app/models/question.rb M app/models/business.rb M app/models/friendship.rb M app/models/account.rb Curb not found. Using Net::HTTP. Removed annotation from: Account, Answer, Business, Favorite, Friendship, Invitation, Question, Service, User M test/unit/user_test.rb M test/unit/favorite_test.rb M test/unit/answer_test.rb M test/unit/service_test.rb M test/unit/invitation_test.rb M test/unit/question_test.rb M test/unit/business_test.rb M test/unit/friendship_test.rb M test/unit/account_test.rb M test/fixtures/accounts.yml M test/fixtures/users.yml M test/fixtures/favorites.yml M test/fixtures/answers.yml M test/fixtures/businesses.yml M test/fixtures/services.yml M test/fixtures/invitations.yml M test/fixtures/questions.yml M test/fixtures/friendships.yml M app/models/user.rb M app/models/favorite.rb M app/models/answer.rb M app/models/service.rb M app/models/invitation.rb M app/models/question.rb M app/models/business.rb M app/models/friendship.rb M app/models/account.rbComments
I can see why this isn't working the way you expected. The "-d" is expected to be run by itself :-)
Just run annotate -d; annotate -p after.
Can you be more specifics? I wish I could read your mind but it's bit tough for me to guess what the problem is with so many thing listed.
kk. Lemme rewrite the commandline w/o any output and no semicolons:
% svn st
check that there are no edits, there aren't.
% annotate -p after
annotate
% annotate -d
delete the annotations, as you specify I should.
% svn st
check that there are no edits. there are.
% annotate -d -p after
try to delete the annotations telling it that they are at the end
% svn st
check that there are no edits. there are.
still? nothing? there's even been a release... this can't be hard.
Sorry, this issue is not very high on my priority list. I'll try to work on it this week.
Also, I always welcome patches! -
Model with statemachine (AASM) - annotate results with stack level too deep
5 comments Created 4 months ago by caseyhelblingI have two models that use AASM. annotate barfs on models that include the AASM.
Unable to annotate user.rb: stack level too deep (/xxxxx/xxxxx/xxxxx/vendor/plugins/aasm/lib/persistence/active_record_persistence.rb:232:in `aasm_state_without_named_scope')
Any ideas?
Comments
Casey, are you still having this problem? I missed the notification so didn't see this issue.
mini-me:rails mukundr$ annotate
/xxx/rails/vendor/rails/activesupport/lib/active_support/inflector.rb:163:in `singularize': stack level too deep (SystemStackError)from /xxx/rails/vendor/rails/activesupport/lib/active_support/inflector.rb:163:in `each' from /xxx/rails/vendor/rails/activesupport/lib/active_support/inflector.rb:163:in `singularize' from /xxx/rails/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb:32:in `singularize' from /xxx/rails/vendor/plugins/userstamp/lib/userstamp.rb:65:in `user_model' from /xxx/rails/vendor/plugins/userstamp/lib/userstamp.rb:46:in `update_without_user' from /xxx/rails/vendor/plugins/userstamp/lib/userstamp.rb:49:in `update' from /xxx/rails/vendor/rails/activerecord/lib/active_record/base.rb:2699:in `create_or_update_without_callbacks' from /xxx/rails/vendor/rails/activerecord/lib/active_record/callbacks.rb:222:in `create_or_update' ... 54 levels... from /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' from /opt/local/lib/ruby/gems/1.8/gems/ctran-annotate-2.0.2/bin/annotate:20 from /opt/local/bin/annotate:19:in `load' from /opt/local/bin/annotate:19I used to have aasm, not any more though.
It seems to be a problem with annotate. The application runs fine by itself in both production and development modes. It works if I trash the userstamp plugin directory, but it is a defect that needs to be sorted out.
-
userstamp creates a stack too deep exception.
3 comments Created 3 months ago by mukundmrIf I run annotate (2.0.2) with userstamp, I get a stack too deep error.
Comments
Can you point me to the version of userstamp you are using?
The problem only exists with UserStamp version 1.0. It doesn't occur with UserStamp version 2.0
Is this the plugin you're talking about http://agilewebdevelopment.com/plugins/userstamp
-
Best annotation position is different for models and fixtures...
3 comments Created 2 months ago by adamsalterThe 'best' IMHO position for annotations in models is after all code, since you regularly have to edit it and only refer to annotations irregularly. But for fixtures it's is before all the yaml data, since you can have huge yaml files and scrolling to the bottom is annoying/hard, and use usually only refer to fixtures once or twice in their lifetime (certainly less than models).
Could this be changed to the default behaviour? (I know it makes the current 'before|after' syntax a little hard since it is a mix of both...
Thanks in advance,
Comments
adamsalter
Fri Sep 25 08:42:04 -0700 2009
| link
Great!
Thanks for the quick reply ;)I've used Dave Thomas' annotate models plugin since at least mid-07 and just found your fork (I have other devs who never bother to run annotations, so the after migrate hook is my reason for changing). IMHO, having the default change for everyone to after the model class based on 1 person's preference is bad form.
1) Please change annotate_one_file to:
new_content = options[:position] == 'after' ? (old_content + "\n" + info_block) : (info_block + old_content)
2) Or at the very least fix the bug in the annotate_models rake task - :before should be 'before' (:before != 'before').
-
annotate is a system command used in gdlib2
Comments
That's not good but I don't know what I can do about that. Any suggestion?











