Skip to content

Instantly share code, notes, and snippets.

@jhass
Last active August 7, 2017 14:03
Show Gist options
  • Select an option

  • Save jhass/5960353 to your computer and use it in GitHub Desktop.

Select an option

Save jhass/5960353 to your computer and use it in GitHub Desktop.
Simple rack redirect app
class Redirect
def initialize target
@target = target
end
def call env
[301, {"Location" => @target}, []]
end
end
run Redirect.new("http://diasporafoundation.org")
source "https://rubygems.org"
ruby "2.0.0"
gem 'rack'
gem 'puma'
group :development do
gem 'foreman'
end
GEM
remote: https://rubygems.org/
specs:
dotenv (0.8.0)
foreman (0.63.0)
dotenv (>= 0.7)
thor (>= 0.13.6)
puma (2.3.2)
rack (>= 1.1, < 2.0)
rack (1.5.2)
thor (0.18.1)
PLATFORMS
ruby
DEPENDENCIES
foreman
puma
rack
web: puma -p $PORT
@denschub
Copy link

thank you! ;D

@alexbrahastoll
Copy link

Thanks 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment