-
-
Notifications
You must be signed in to change notification settings - Fork 524
Introduce development:seed and development:seed:replant tasks
#1251
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
base: main
Are you sure you want to change the base?
Conversation
Since `db:seeds.rb` is intended to ensure > ... the existence of records required to run the application in every environment (production, development, test) we have relied on [`dev:prime`][1] for loading data necessary for users to view most of the features of the app in development. However, there were a few areas of improvement. First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. Introduces `Seeder` class to encapsulate seed data, which is called in the `development:seed` and `development:seed:replant` tasks. The advantage to this is that the class can be called independently from the task, and can also be [unit tested][2]. [1]: https://thoughtbot.com/blog/priming-the-pump [2]: https://thoughtbot.com/blog/seeds-of-destruction
f4bfbe1 to
04589ab
Compare
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump
| namespace :development do | ||
| desc "Loads seed data into development." | ||
| task seed: :environment do | ||
| Seeder.load_seeds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't care about unit testing this, or being able to load seeds outside of this task, we could always load the seeds directly in this file, like before.
Curious to hear what others think.
| @@ -0,0 +1,11 @@ | |||
| namespace :development do | |||
| desc "Loads seed data into development." | |||
| task seed: :environment do | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should consider wrapping this in the db namespace.
bin/rails development:db:seed
bin/rails development:db:seed:replant
|
I've found that people find One of the nice things about |
| system! "bin/rails db:prepare" | ||
| system! "bin/rails development:seed" if File.exist? "lib/tasks/development.rake" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the nice things about
dev:primewas that it read nicely when in scripts. I'd not call any other database tasks, just that one and it looked good:
Are you suggesting something like this?
| system! "bin/rails db:prepare" | |
| system! "bin/rails development:seed" if File.exist? "lib/tasks/development.rake" | |
| system! "bin/rails development:seed" if File.exist? "lib/tasks/development.rake" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right — you don't need to call db:prepare, because the task for seeding calls it in it's dependency chain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does? I might be misunderstanding, but the newly introduced development:seed has no other dependencies other than the :environment.
| task seed: :environment do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean that in comparison to the original (not the new one!), one of the "hidden" features of it was that it'd also setup the database for you. This is why Administrate's bin/setup is so small.
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in ChatBot. thoughtbot/chat_bot#52 [1]: thoughtbot/suspenders#1251
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in ChatBot. thoughtbot/chat_bot#52 [1]: thoughtbot/suspenders#1251
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: thoughtbot/chat_bot#52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. We're already doing this in [ChatBot][3]. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump [3]: https://github.com/thoughtbot/chat_bot/pull/52
Since
db:seeds.rbis intended to ensurewe have relied on
dev:primefor loading data necessary for usersto view most of the features of the app in development.
However, there were a few areas of improvement.
First, rename
devnamespace todevelopment, and renameprimetask to
seedfor improved clarity.Then, introduces
development:seed:replanttake to create parity withthe existing
db:seed:replanttask.Introduces
Seederclass to encapsulate seed data, which is called inthe
development:seedanddevelopment:seed:replanttasks. Theadvantage to this is that the class can be called independently from the
task, and can also be unit tested.