Many Pipelines operations can be performed via the CLI, which requires the Pipelines plugin for the Heroku Toolbelt. To install:
% heroku plugins:install heroku-pipelines
% heroku help pipelines
% heroku apps:create une-pipe-staging
| # frozen_string_literal: true | |
| class User | |
| attr_accessor :admin | |
| def initialize(options = {}) | |
| @admin = options[:admin] || false | |
| end | |
| def admin?; @admin end |
| user nobody; | |
| worker_processes 1; | |
| #pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| # This file is used by Rack-based servers to start the application. | |
| require ::File.expand_path('../config/environment', __FILE__) | |
| class MyMiddleware | |
| def initialize(app) | |
| @app = app | |
| end | |
| def call(env) | |
| puts 'foobar' |
| user nobody; | |
| worker_processes 1; | |
| #pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| module JsonapiUtils | |
| extend ActiveSupport::Concern | |
| include do | |
| helper_method :jsonapi_serialize, :jsonapi_serialize_collection | |
| end | |
| def jsonapi_serialize_collection(records) | |
| records = records.map { |record| @request.resource_klass.new(record) } | |
| jsonapi_serialize(records) |
| def print_enum(enum) | |
| puts enum | |
| puts enum.inspect | |
| end | |
| # Example: 1 | |
| enum = %w(foo bar).each | |
| print_enum(enum) | |
| 3.times { puts enum.next } rescue nil |
| require 'sequel' | |
| DB = Sequel.connect('postgres:///beautydate_dev') | |
| puts DB[:users].where(name: /ti/i).first | |
| user nobody; | |
| worker_processes 1; | |
| #pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| user: tiagopog | |
| hosts: | |
| "beautydate.dev": | |
| listen: | |
| port: 80 | |
| paths: | |
| /: | |
| proxy.reverse.url: http://localhost:3000/ | |
| proxy.preserve-host: ON | |
| proxy.timeout.io: 5000 |