Skip to content

Instantly share code, notes, and snippets.

@dsaronin
Created February 14, 2012 03:19
Show Gist options
  • Save dsaronin/1823103 to your computer and use it in GitHub Desktop.
Save dsaronin/1823103 to your computer and use it in GitHub Desktop.
RefineryCMS edge engine generation
$ rails generate refinery:engine store name:string description:text keywords:string
create vendor/engines/stores/Gemfile
create vendor/engines/stores/Guardfile
create vendor/engines/stores/Rakefile
create vendor/engines/stores/app/controllers/refinery/stores/admin/stores_controller.rb
create vendor/engines/stores/app/controllers/refinery/stores/stores_controller.rb
create vendor/engines/stores/app/models/refinery/stores/store.rb
create vendor/engines/stores/app/views/refinery/stores/admin/stores/_actions.html.erb
create vendor/engines/stores/app/views/refinery/stores/admin/stores/_form.html.erb
create vendor/engines/stores/app/views/refinery/stores/admin/stores/_stores.html.erb
create vendor/engines/stores/app/views/refinery/stores/admin/stores/_records.html.erb
create vendor/engines/stores/app/views/refinery/stores/admin/stores/_store.html.erb
create vendor/engines/stores/app/views/refinery/stores/admin/stores/_sortable_list.html.erb
create vendor/engines/stores/app/views/refinery/stores/admin/stores/edit.html.erb
create vendor/engines/stores/app/views/refinery/stores/admin/stores/index.html.erb
create vendor/engines/stores/app/views/refinery/stores/admin/stores/new.html.erb
create vendor/engines/stores/app/views/refinery/stores/stores/index.html.erb
create vendor/engines/stores/app/views/refinery/stores/stores/show.html.erb
create vendor/engines/stores/config/locales/en.yml
create vendor/engines/stores/config/locales/es.yml
create vendor/engines/stores/config/locales/fr.yml
create vendor/engines/stores/config/locales/lolcat.yml
create vendor/engines/stores/config/locales/nb.yml
create vendor/engines/stores/config/locales/nl.yml
create vendor/engines/stores/config/routes.rb
create vendor/engines/stores/db/migrate/1_create_stores_stores.rb
create vendor/engines/stores/db/seeds.rb
create vendor/engines/stores/lib/generators/refinery/stores_generator.rb
create vendor/engines/stores/lib/refinery/stores/engine.rb
create vendor/engines/stores/lib/refinery/stores.rb
create vendor/engines/stores/lib/refinerycms-stores.rb
create vendor/engines/stores/lib/tasks/refinery/stores.rake
create vendor/engines/stores/readme.md
create vendor/engines/stores/refinerycms-stores.gemspec
create vendor/engines/stores/spec/models/refinery/stores/store_spec.rb
create vendor/engines/stores/spec/requests/refinery/stores/admin/stores_spec.rb
create vendor/engines/stores/spec/support/factories/refinery/stores.rb
create vendor/engines/stores/tasks/rspec.rake
create vendor/engines/stores/tasks/testing.rake
append Gemfile
------------------------
Now run:
bundle install
rails generate refinery:stores
rake db:migrate
------------------------
APPENDS to Gemfile:
gem 'refinerycms-stores', :path => 'vendor/engines'
$ rails generate refinery:stores
rake refinery_stores:install:migrations
Copied migration 20120214031520_create_stores_stores.refinery_stores.rb from refinery_stores
append db/seeds.rb
APPENDS to db/seeds.rb
Refinery::Stores::Engine.load_seed
$ rake db:migrate
== CreateStoresStores: migrating =============================================
-- create_table(:refinery_stores)
-> 0.0015s
== CreateStoresStores: migrated (0.0016s) ====================================
$ rails g refinery:engine product name:string code:string description:text date_available:datetime price:float size_width:float size_height:float size_depth:float weight:float tax_type:references is_digital_download:boolean --engine stores --update_files
[Devise] We have detected that you are using devise_for inside engine routes. In this case, you probably want to set Devise.router_name = MOUNT_POINT, where MOUNT_POINT is a symbol representing where this engine will be mounted at. For now, Devise will default the mount point to :main_app.
identical vendor/engines/stores/Gemfile
identical vendor/engines/stores/Guardfile
identical vendor/engines/stores/Rakefile
create vendor/engines/stores/app/controllers/refinery/products/admin/products_controller.rb
create vendor/engines/stores/app/controllers/refinery/products/products_controller.rb
create vendor/engines/stores/app/models/refinery/products/product.rb
create vendor/engines/stores/app/views/refinery/products/admin/products/_actions.html.erb
create vendor/engines/stores/app/views/refinery/products/admin/products/_form.html.erb
create vendor/engines/stores/app/views/refinery/products/admin/products/_products.html.erb
create vendor/engines/stores/app/views/refinery/products/admin/products/_records.html.erb
create vendor/engines/stores/app/views/refinery/products/admin/products/_product.html.erb
create vendor/engines/stores/app/views/refinery/products/admin/products/_sortable_list.html.erb
create vendor/engines/stores/app/views/refinery/products/admin/products/edit.html.erb
create vendor/engines/stores/app/views/refinery/products/admin/products/index.html.erb
create vendor/engines/stores/app/views/refinery/products/admin/products/new.html.erb
create vendor/engines/stores/app/views/refinery/products/products/index.html.erb
create vendor/engines/stores/app/views/refinery/products/products/show.html.erb
create vendor/engines/stores/config/locales/tmp/en.yml
create vendor/engines/stores/config/locales/tmp/es.yml
create vendor/engines/stores/config/locales/tmp/fr.yml
create vendor/engines/stores/config/locales/tmp/lolcat.yml
create vendor/engines/stores/config/locales/tmp/nb.yml
create vendor/engines/stores/config/locales/tmp/nl.yml
create vendor/engines/stores/config/tmp/routes.rb
create vendor/engines/stores/db/migrate/2_create_products_products.rb
conflict vendor/engines/stores/db/seeds.rb
Overwrite /home/daudi/projectspace/kikapu/vendor/engines/stores/db/seeds.rb? (enter "h" for help) [Ynaqdh] n
skip vendor/engines/stores/db/seeds.rb
conflict vendor/engines/stores/lib/generators/refinery/stores_generator.rb
Overwrite /home/daudi/projectspace/kikapu/vendor/engines/stores/lib/generators/refinery/stores_generator.rb? (enter "h" for help) [Ynaqdh] n
skip vendor/engines/stores/lib/generators/refinery/stores_generator.rb
create vendor/engines/stores/lib/refinery/products/engine.rb
create vendor/engines/stores/lib/refinery/products.rb
create vendor/engines/stores/lib/tmp/refinerycms-stores.rb
identical vendor/engines/stores/lib/tasks/refinery/stores.rake
conflict vendor/engines/stores/refinerycms-stores.gemspec
Overwrite /home/daudi/projectspace/kikapu/vendor/engines/stores/refinerycms-stores.gemspec? (enter "h" for help) [Ynaqdh] n
skip vendor/engines/stores/refinerycms-stores.gemspec
create vendor/engines/stores/spec/models/refinery/products/product_spec.rb
create vendor/engines/stores/spec/requests/refinery/products/admin/products_spec.rb
create vendor/engines/stores/spec/support/factories/refinery/products.rb
identical vendor/engines/stores/tasks/rspec.rake
identical vendor/engines/stores/tasks/testing.rake
remove vendor/engines/stores/config/locales/tmp
remove vendor/engines/stores/config/tmp
remove vendor/engines/stores/lib/tmp
------------------------
Now run:
bundle install
rails generate refinery:stores
rake db:migrate
------------------------
$ rails g refinery:stores
rake refinery_stores:install:migrations
Copied migration 20120214033809_create_products_products.refinery_stores.rb from refinery_stores
append db/seeds.rb
$ rake db:migrate
== CreateProductsProducts: migrating =========================================
-- create_table(:refinery_products)
-> 0.0031s
== CreateProductsProducts: migrated (0.0032s) ================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment