-
Notifications
You must be signed in to change notification settings - Fork 896
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
Add rspec-support; Use ::Rails::Engine for model and migration #216
Conversation
requries: Platform gem
... leave track-changes as optional-via-generation
Forgot to push two files. |
Oh... and README.md became ugly when I updated the chunk on migrations. Sorry, don't know that markdown syntax. Please fix it. |
Hi, thanks for the pull request. Just to clarify, is the purpose of this pull request to provide helpers for people that are testing their PaperTrail-enabled rails applications with I'd like to provide extra helpers for RSpec test suites if possible, however, I think the test suite for this gem should probably remain implemented via Test::Unit at this point. Also, what is the purpose of the |
:: Intent I have no interest in engaging in yet-another flame-war of this-vs-that technologies… especially in not-my-project. Use the right tool for the job. However, my projects use Rspec, cucumber and some of those use PaperTrail. Therefore, I need these helpers in some form. As I'm not the only one in this… predicament, I figured it would be good of me to give-back. :: PaperTrail::Engine purpose This pulls the Version model "into" the rails-app that uses PaperTrail… as if it's native. No "require 'version'" required… anywhere. It also allows one of the two migrations to be generated via a On 29 Apr 2013, at 08:42 , Ben Atkins notifications@github.com wrote:
|
Ok cool, I thought that was what you were going for, just wanted to make sure. I understand what you are saying that the Also, was wondering what the purpose of the 'Platform' gem that you added into the I'd also prefer to keep the rails dependency requirements at |
Side note: current migration generation generates an integer column for :item_id … which is a clone of the :id column for the "audited" model. BUT… rails can, does, and should probably use-by-default, non-integer ID's e.g. UIDs. Please make this an option, at the very least, in the current master branch. What are the use cases for-and-against making with-changes? I believe I confused Platform for rbconfig (standard ruby lib) to determine if I should use ruby-debug, ruby-debug19, or debugger. As far as the engine, I do not believe asking for a comparison of the advantages is the best way to ask that question. Why use ERB if there are no variables to evaluate? I believe the reason the "traditional" way of migration generation i.e. using ERB generation from a template, is due to a stack overflow article and one of its respondents ignorance of railsties / engines and-or outdated knowledge i.e. when we didn't have rails-engines… and no one has out-voted what I perceive as the "right" was to integrate migrations, models, controllers etc from a gem into the rails app. On 29 Apr 2013, at 17:30 , Ben Atkins notifications@github.com wrote:
|
@belt - Thank you for the very useful pull request, apologies for the delayed response, but it seemed appropriate to try to put this into the impending With the With the I refrained from pulling in the |
Adds rspec helper functions: with_versioning()
Adds (additional) specs for Version
Uses rails-engine for the model and one of the two migrations
Introduces a behavior change (could be re-coded for original behavior)