Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Commit

Permalink
Fix arms, test cap
Browse files Browse the repository at this point in the history
  • Loading branch information
afischer committed Aug 23, 2018
1 parent b4e49f8 commit 8f92274
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
2 changes: 0 additions & 2 deletions Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ require 'capistrano/puma'
require 'capistrano/scm/git'
require 'capistrano/rails/console'

set :rvm_type, :user
set :rvm_ruby_version, '2.4.1'
install_plugin Capistrano::Puma
install_plugin Capistrano::SCM::Git
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
4 changes: 3 additions & 1 deletion config/deploy.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# config valid for current version and patch releases of Capistrano
lock "~> 3.11.0"

set :forward_agent, true
set :rvm_type, :user
set :rvm_ruby_version, '2.4.1'

set :bundle_flags, '--deployment' # verbose bundler output
set :application, "eventsatpenn"
set :repo_url, "[email protected]:dailypenn/eventsatpenn.git"
Expand Down
2 changes: 1 addition & 1 deletion config/deploy/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Defines a single server with a list of roles and multiple properties.
# You can define all roles on a single server, or split them:

server '35.194.71.134', user: 'rails', roles: %w{app db web}
server 'eventsatpenn.com', user: 'rails', roles: %w{app db web}

# server "example.com", user: "deploy", roles: %w{app db web}, my_property: :my_value
# server "example.com", user: "deploy", roles: %w{app web}, other_property: :other_value
Expand Down
30 changes: 16 additions & 14 deletions config/provision.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
require 'net/http'
require 'json'

ignored_fields = ['ssh-keys']
uri = URI.parse('http://metadata.google.internal/computeMetadata/v1/instance/attributes/?recursive=true')

req = Net::HTTP::Get.new(uri.to_s)
req.add_field('Metadata-Flavor', 'Google')

res = Net::HTTP.new(uri.host, uri.port).start do |http|
http.request(req)
end

vars = JSON.parse(res.body)
ignored_fields.each {|k| vars.delete(k) }

vars.each { |k, v| ENV[k] = v }
#### COMBAK

# ignored_fields = ['ssh-keys']
# uri = URI.parse('http://metadata.google.internal/computeMetadata/v1/instance/attributes/?recursive=true')
#
# req = Net::HTTP::Get.new(uri.to_s)
# req.add_field('Metadata-Flavor', 'Google')
#
# res = Net::HTTP.new(uri.host, uri.port).start do |http|
# http.request(req)
# end
#
# vars = JSON.parse(res.body)
# ignored_fields.each {|k| vars.delete(k) }
#
# vars.each { |k, v| ENV[k] = v }
#
2 changes: 1 addition & 1 deletion public/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</div>
<div class="dialog">
<div>
<h1>Something went wrong ¯\_()_/¯</h1>
<h1>Something went wrong &#xAF;\_(&#x30C4;)_/&#xAF;</h1>
<p>We're working on a fix!</p>
<a href="mailto:[email protected]" class="btn">Report this as a bug</a>
</div>
Expand Down

0 comments on commit 8f92274

Please sign in to comment.