Get ordered list of middleware in a generic rack application?

$ rake middleware use ActionDispatch::Static use Rack::Lock use #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x007ffd148f9468> use Rack::Runtime use Rack::MethodOverride use ActionDispatch::RequestId use Rails::Rack::Logger use ActionDispatch::ShowExceptions use ActionDispatch::DebugExceptions use ActionDispatch::RemoteIp use ActionDispatch::Reloader use ActionDispatch::Callbacks use ActiveRecord::Migration::CheckPending use ActiveRecord::ConnectionAdapters::ConnectionManagement use ActiveRecord::QueryCache use ActionDispatch::Cookies use ActionDispatch::Session::CookieStore use ActionDispatch::Flash use ActionDispatch::ParamsParser use Rack::Head use Rack::ConditionalGet use Rack::ETag run RackTest::Application.routes http://pothibo.com/2013/11/ruby-on-rails-inside-actiondispatch-and-rack/

how to pass multiple parameters to rake task

You can use args.extras to iterate over all the arguments without explicitly stating how many parameters you have. Example: desc “Bring it on, parameters!” task :infinite_parameters do |task, args| puts args.extras.count args.extras.each do |params| puts params end end To run: rake infinite_parameters[‘The’,’World’,’Is’,’Just’,’Awesome’,’Boomdeyada’] Output: 6 The World Is Just Awesome Boomdeyada

Why are there no Makefiles for automation in Python projects?

Actually, automation is useful to Python developers too! Invoke is probably the closest tool to what you have in mind, for automation of common repetitive Python tasks: https://github.com/pyinvoke/invoke With invoke, you can create a tasks.py like this one (borrowed from the invoke docs) from invoke import run, task @task def clean(docs=False, bytecode=False, extra=””): patterns = … Read more

Running Ruby unit tests with Rake

Use Rake::TestTask http://rake.rubyforge.org/classes/Rake/TestTask.html . Put this into your Rake file and then run rake test: require ‘rake/testtask’ Rake::TestTask.new do |t| t.libs << “test” t.test_files = FileList[‘test/test*.rb’] t.verbose = true end

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)