add middleware to gemspec