Class names are CamelCase.
Methods and variables are snake_case.
Methods with a ? suffix will return a boolean.
| # Bulk Sample Data | |
| curl -s -XPOST localhost:9200/_bulk?pretty=true --data-binary ' | |
| { "index" : { "_index" : "products", "_type" : "style_variant", "_id" : "1" } } | |
| { "name" : "Style Variant 1" } | |
| { "index" : { "_index" : "products", "_type" : "style_variant", "_id" : "2" } } | |
| { "name" : "Style Variant 2" } | |
| { "index" : { "_index" : "products", "_type" : "style_variant", "_id" : "3" } } | |
| { "name" : "Style Variant 3" } | |
| { "index" : { "_index" : "products", "_type" : "product", "_id" : "1", "parent" : "1" } } | |
| { "name" : "Shirt 1", "vendor_name" : "Alternative Apparel", "size" : "S", "retail_price": 100, "tc_color" : "Black" } |
| #Deploy and rollback on Heroku in staging and production | |
| task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
| task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
| namespace :deploy do | |
| PRODUCTION_APP = 'tc-api-prod' | |
| STAGING_APP = 'tc-api-staging' | |
| task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag] | |
| task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on] |