From 59a0b245f449ae761c44706b0078e60ddddf0633 Mon Sep 17 00:00:00 2001 From: Anders Nickelsen Date: Mon, 11 Apr 2016 13:08:35 +0000 Subject: [PATCH 1/3] Run ggtracker in Vagrant. --- Gemfile | 2 +- Gemfile.lock | 12 +++++++++--- README.md | 13 +++++++++++++ Vagrantfile | 13 +++++++++++++ setup-vagrantbox.sh | 12 ++++++++++++ 5 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 Vagrantfile create mode 100644 setup-vagrantbox.sh diff --git a/Gemfile b/Gemfile index f12d598..5c48fed 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,7 @@ gem 'rails', '3.2.22' gem 'mysql2' -gem 'unicorn', '1.1.5' +gem 'unicorn' # Gems used only for assets and not required # in production environments by default. diff --git a/Gemfile.lock b/Gemfile.lock index 5869570..cdc043e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -157,6 +157,7 @@ GEM json (1.8.3) juggernaut (2.1.1) redis + kgio (2.10.0) listen (1.1.6) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) @@ -213,6 +214,7 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) + raindrops (0.16.0) rake (10.4.2) rb-fsevent (0.9.3) rb-inotify (0.9.2) @@ -282,8 +284,9 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.6) - unicorn (1.1.5) - rack + unicorn (5.1.0) + kgio (~> 2.6) + raindrops (~> 0.7) uuidtools (2.1.4) vegas (0.1.11) rack (>= 1.0.0) @@ -332,4 +335,7 @@ DEPENDENCIES simplecov uglifier (>= 1.0.3) unf_ext (= 0.0.6) - unicorn (= 1.1.5) + unicorn + +BUNDLED WITH + 1.11.2 diff --git a/README.md b/README.md index 0d15bbc..0bb2c08 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,19 @@ The other repos involved in ggtracker are: used by this codebase +### Running with vagrant +You can either run ggtracker in a vagrant-controlled virtualbox or on your host operating system (described after this section). +To run with vagrant run the following commands: + + * Make sure you have vagrant+virtualbox installed on your computer + * Run `vagrant up` to create the virtual box + * Run `vagrant ssh` to ssh into the vagrant box + * Run `ssh-keygen` in the vagrant box to generate ssh-keys for github + * Upload your public keys to Github + * Clone `ggtracker` project to `vagrant` user's home directory in the vagrant box + * Run the installation and updating steps below + * The app will be on the vagrant box's ip instead of localhost. + ### Requirements * Ruby 1.9+ (get RVM: https://rvm.io/) diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..6f65c9d --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,13 @@ +Vagrant.configure("2") do |config| + config.vm.box = "ubuntu/trusty64" + config.vm.network :private_network, type: "dhcp" + config.vm.hostname = "ggtracker" + + config.vm.provision "shell", path: "setup-vagrantbox.sh" + + config.vm.provider :virtualbox do |vb| + vb.memory = 1536 + vb.cpus = 2 + vb.name = "ggtracker" + end +end diff --git a/setup-vagrantbox.sh b/setup-vagrantbox.sh new file mode 100644 index 0000000..6b1e38f --- /dev/null +++ b/setup-vagrantbox.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +export DEBIAN_FRONTEND=noninteractive + +add-apt-repository ppa:chris-lea/redis-server -y + +apt-get update + +apt-get install -y ruby redis-server nodejs npm mysql-server git-core ruby-dev libcurl4-openssl-dev libmysqlclient-dev build-essential libxml2-dev libxslt-dev + +gem install bundler +npm install -g juggernaut From 1d76d0c3bd3b190a38384fabf1dcf80d33110ff8 Mon Sep 17 00:00:00 2001 From: Anders Nickelsen Date: Tue, 12 Apr 2016 05:21:26 +0000 Subject: [PATCH 2/3] Foreman is needed to run the webapp. --- Gemfile | 2 ++ Gemfile.lock | 3 +++ README.md | 13 ------------- Vagrantfile | 13 ------------- setup-vagrantbox.sh | 12 ------------ 5 files changed, 5 insertions(+), 38 deletions(-) delete mode 100644 Vagrantfile delete mode 100644 setup-vagrantbox.sh diff --git a/Gemfile b/Gemfile index 5c48fed..ee01535 100644 --- a/Gemfile +++ b/Gemfile @@ -145,3 +145,5 @@ gem 'activemerchant' gem 'rack-attack' gem 'unf_ext', '0.0.6' + +gem 'foreman' diff --git a/Gemfile.lock b/Gemfile.lock index cdc043e..31759a0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -136,6 +136,8 @@ GEM faraday (0.9.0) multipart-post (>= 1.2, < 3) ffi (1.9.0) + foreman (0.78.0) + thor (~> 0.19.1) formtastic (2.2.1) actionpack (>= 3.0) gon (4.1.1) @@ -313,6 +315,7 @@ DEPENDENCIES ey_config factory_girl_rails (~> 4.0) faker + foreman formtastic gg! gon diff --git a/README.md b/README.md index 0bb2c08..0d15bbc 100644 --- a/README.md +++ b/README.md @@ -14,19 +14,6 @@ The other repos involved in ggtracker are: used by this codebase -### Running with vagrant -You can either run ggtracker in a vagrant-controlled virtualbox or on your host operating system (described after this section). -To run with vagrant run the following commands: - - * Make sure you have vagrant+virtualbox installed on your computer - * Run `vagrant up` to create the virtual box - * Run `vagrant ssh` to ssh into the vagrant box - * Run `ssh-keygen` in the vagrant box to generate ssh-keys for github - * Upload your public keys to Github - * Clone `ggtracker` project to `vagrant` user's home directory in the vagrant box - * Run the installation and updating steps below - * The app will be on the vagrant box's ip instead of localhost. - ### Requirements * Ruby 1.9+ (get RVM: https://rvm.io/) diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 6f65c9d..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,13 +0,0 @@ -Vagrant.configure("2") do |config| - config.vm.box = "ubuntu/trusty64" - config.vm.network :private_network, type: "dhcp" - config.vm.hostname = "ggtracker" - - config.vm.provision "shell", path: "setup-vagrantbox.sh" - - config.vm.provider :virtualbox do |vb| - vb.memory = 1536 - vb.cpus = 2 - vb.name = "ggtracker" - end -end diff --git a/setup-vagrantbox.sh b/setup-vagrantbox.sh deleted file mode 100644 index 6b1e38f..0000000 --- a/setup-vagrantbox.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -export DEBIAN_FRONTEND=noninteractive - -add-apt-repository ppa:chris-lea/redis-server -y - -apt-get update - -apt-get install -y ruby redis-server nodejs npm mysql-server git-core ruby-dev libcurl4-openssl-dev libmysqlclient-dev build-essential libxml2-dev libxslt-dev - -gem install bundler -npm install -g juggernaut From 2a6661b7ed6f1bdea05ae5c40c3f2d53f33955ed Mon Sep 17 00:00:00 2001 From: Anders Nickelsen Date: Wed, 13 Apr 2016 14:09:10 +0200 Subject: [PATCH 3/3] Buckets are permanently redirected to specific endpoints. --- app/views/matches/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index eb31482..8024f89 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -19,7 +19,7 @@ <% if @match.map_url.present? || @match.map["s2ma_hash"].present? %>
<% if !@match.map_url || @match.map_url.blank? %> - _100.png" /> + _100.png" /> <% else %> <% end %> @@ -62,7 +62,7 @@
<%= render 'shared/sidebarad' %> - _100.png" data-match="match"> + _100.png" data-match="match"> army strength, minerals + gas