diff --git a/Gemfile b/Gemfile index ee020d8..16ef52b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,14 +1,14 @@ source 'https://rubygems.org' ruby '1.9.3' -gem 'rails', '3.2.19' +gem 'rails', '3.2.22' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'mysql2' -gem 'unicorn', '1.1.5' +gem 'unicorn' # Gems used only for assets and not required # in production environments by default. @@ -75,7 +75,7 @@ gem 'compass-rails', :git => 'git://github.com/Compass/compass-rails.git' # GG! # Don't commit the :path! -gem 'gg', :git => 'git@github.com:dsjoerg/gg.git' +gem 'gg', :git => 'git://github.com/dsjoerg/gg.git', :ref => 'b58ed5e12c2d201b368980e74090987d2050f321' # gem 'gg', :path => '/Users/mr/dev/ruby/gems/gg' #gem 'gg', :path => '/Users/david/Dropbox/Programming/gg' @@ -107,7 +107,7 @@ gem 'gon' # create our own (it's a simple Nokogiri based scraper..) # Forked it and added portraits to profile scraping -gem 'bnet_scraper', :git => 'git@github.com:ggtracker/bnet_scraper.git', :ref => 'battlenetify' +gem 'bnet_scraper', :git => 'git://github.com/ggtracker/bnet_scraper.git', :ref => 'battlenetify' #gem 'bnet_scraper', :path => '/Users/david/Dropbox/Programming/bnet_scraper/' @@ -142,3 +142,9 @@ gem 'curb' #gem 'aws-s3' gem 'activemerchant' + +gem 'rack-attack' +gem 'unf_ext', '0.0.6' + +gem 'foreman' +gem "recaptcha", :git => 'git://github.com/brendon/recaptcha.git', :ref => 'remove-ruby-restriction', require: "recaptcha/rails" diff --git a/Gemfile.lock b/Gemfile.lock index cceeea4..cfd390e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,6 +5,14 @@ GIT compass-rails (2.0.alpha.0) compass (>= 0.12.2, < 0.14) +GIT + remote: git://github.com/brendon/recaptcha.git + revision: 21473e536b93c0237ec02edcc78cf4f7a547a221 + ref: remove-ruby-restriction + specs: + recaptcha (1.3.0) + json + GIT remote: git://github.com/chriseppstein/compass.git revision: 0a74e91931e53fb798323cd8684198c38a2b76b8 @@ -16,16 +24,9 @@ GIT sass (~> 3.3.0.rc.1) GIT - remote: git://github.com/thedarkone/rails-dev-boost.git - revision: 1e0cc0e1a3f6e51820b908d7de1f3e160ec2af0d - specs: - rails-dev-boost (0.2.1) - listen (>= 0.5) - railties (>= 3.0) - -GIT - remote: git@github.com:dsjoerg/gg.git - revision: 2a14f3c91cc5778ed3fa6eb1868e441b7776e6bc + remote: git://github.com/dsjoerg/gg.git + revision: b58ed5e12c2d201b368980e74090987d2050f321 + ref: b58ed5e12c2d201b368980e74090987d2050f321 specs: gg (0.0.1) activesupport @@ -34,7 +35,7 @@ GIT yajl-ruby GIT - remote: git@github.com:ggtracker/bnet_scraper.git + remote: git://github.com/ggtracker/bnet_scraper.git revision: 624e28dddbdbafba9fc5a48693ef1aa86ae8ca9f ref: battlenetify specs: @@ -42,16 +43,24 @@ GIT faraday nokogiri +GIT + remote: git://github.com/thedarkone/rails-dev-boost.git + revision: 1e0cc0e1a3f6e51820b908d7de1f3e160ec2af0d + specs: + rails-dev-boost (0.2.1) + listen (>= 0.5) + railties (>= 3.0) + GEM remote: https://rubygems.org/ specs: aasm (3.0.23) - actionmailer (3.2.19) - actionpack (= 3.2.19) + actionmailer (3.2.22) + actionpack (= 3.2.22) mail (~> 2.5.4) - actionpack (3.2.19) - activemodel (= 3.2.19) - activesupport (= 3.2.19) + actionpack (3.2.22) + activemodel (= 3.2.22) + activesupport (= 3.2.22) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) @@ -70,18 +79,18 @@ GEM json (~> 1.7) money (< 6.0.0) nokogiri (~> 1.4) - activemodel (3.2.19) - activesupport (= 3.2.19) + activemodel (3.2.22) + activesupport (= 3.2.22) builder (~> 3.0.0) - activerecord (3.2.19) - activemodel (= 3.2.19) - activesupport (= 3.2.19) + activerecord (3.2.22) + activemodel (= 3.2.22) + activesupport (= 3.2.22) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.19) - activemodel (= 3.2.19) - activesupport (= 3.2.19) - activesupport (3.2.19) + activeresource (3.2.22) + activemodel (= 3.2.22) + activesupport (= 3.2.22) + activesupport (3.2.22) i18n (~> 0.6, >= 0.6.4) multi_json (~> 1.0) arel (3.0.3) @@ -119,6 +128,8 @@ GEM thread_safe (~> 0.1) warden (~> 1.2.3) diff-lcs (1.2.4) + domain_name (0.5.25) + unf (>= 0.0.5, < 1.0.0) ejs (1.1.1) erubis (2.7.0) execjs (2.0.2) @@ -133,15 +144,19 @@ 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) actionpack (>= 2.3.0) json - hashie (3.2.0) + hashie (3.4.2) hike (1.2.3) hirb (0.7.1) - i18n (0.6.9) + http-cookie (1.0.2) + domain_name (~> 0.5) + i18n (0.6.11) jbuilder (1.5.2) activesupport (>= 3.0.0) multi_json (>= 1.2.0) @@ -149,9 +164,10 @@ GEM jquery-rails (3.0.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - json (1.8.1) + 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) @@ -164,11 +180,11 @@ GEM money (5.1.1) i18n (~> 0.6.0) mono_logger (1.1.0) - multi_json (1.10.1) + multi_json (1.11.1) multipart-post (2.0.0) mysql2 (0.3.13) net-http-spy (0.2.1) - netrc (0.7.7) + netrc (0.10.3) newrelic_rpm (3.9.1.236) nokogiri (1.6.1) mini_portile (~> 0.5.0) @@ -182,31 +198,34 @@ GEM aws-sdk (>= 1.2.0) paperclip (>= 2.5.0) polyglot (0.3.5) - rack (1.4.5) + rack (1.4.7) + rack-attack (4.2.0) + rack rack-cache (1.2) rack (>= 0.4) rack-protection (1.5.1) rack rack-ssl (1.3.4) rack - rack-test (0.6.2) + rack-test (0.6.3) rack (>= 1.0) - rails (3.2.19) - actionmailer (= 3.2.19) - actionpack (= 3.2.19) - activerecord (= 3.2.19) - activeresource (= 3.2.19) - activesupport (= 3.2.19) + rails (3.2.22) + actionmailer (= 3.2.22) + actionpack (= 3.2.22) + activerecord (= 3.2.22) + activeresource (= 3.2.22) + activesupport (= 3.2.22) bundler (~> 1.0) - railties (= 3.2.19) - railties (3.2.19) - actionpack (= 3.2.19) - activesupport (= 3.2.19) + railties (= 3.2.22) + railties (3.2.22) + actionpack (= 3.2.22) + activesupport (= 3.2.22) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - rake (10.3.2) + raindrops (0.16.0) + rake (10.4.2) rb-fsevent (0.9.3) rb-inotify (0.9.2) ffi (>= 0.5.0) @@ -223,7 +242,8 @@ GEM redis-namespace (~> 1.2) sinatra (>= 0.9.2) vegas (~> 0.1.2) - rest-client (1.7.2) + rest-client (1.8.0) + http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) rspec (2.14.1) @@ -255,7 +275,7 @@ GEM rack (~> 1.4) rack-protection (~> 1.4) tilt (~> 1.3, >= 1.3.4) - sprockets (2.2.2) + sprockets (2.2.3) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) @@ -267,12 +287,16 @@ GEM treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.39) + tzinfo (0.3.44) uglifier (2.3.0) execjs (>= 0.3.0) json (>= 1.8.0) - unicorn (1.1.5) - rack + unf (0.1.4) + unf_ext + unf_ext (0.0.6) + unicorn (5.1.0) + kgio (~> 2.6) + raindrops (~> 0.7) uuidtools (2.1.4) vegas (0.1.11) rack (>= 1.0.0) @@ -299,6 +323,7 @@ DEPENDENCIES ey_config factory_girl_rails (~> 4.0) faker + foreman formtastic gg! gon @@ -311,12 +336,21 @@ DEPENDENCIES newrelic_rpm paperclip paperclip-aws - rails (= 3.2.19) + rack-attack + rails (= 3.2.22) rails-dev-boost! + recaptcha! resque rspec rspec-rails sass-rails (~> 3.2.3) simplecov uglifier (>= 1.0.3) - unicorn (= 1.1.5) + unf_ext (= 0.0.6) + unicorn + +RUBY VERSION + ruby 1.9.3p484 + +BUNDLED WITH + 1.15.3 diff --git a/README.md b/README.md index b0bd96a..0d15bbc 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,8 @@ On Mac OSX, you can use homebrew as package manager: http://mxcl.github.com/home * Copy and adjust database configuration (`cp config/database.yml.example config/database.yml`) * Copy secrets configuration (`cp config/secrets.yml.example config/secrets.yml`) * Copy s3 configuration (`cp config/s3.yml.example config/s3.yml`) - * Create the database ggtracker needs (`mysql -u root` and then `create database ggtracker_development;` and then `quit`) - * Run migrations (`bundle exec rake db:migrate`) + * Create the database ggtracker needs (`rake db:create`) + * Load the latest database schema (`bundle exec rake db:schema:load`) If you want to be able to upload replays, you'll need to have an Amazon S3 account. After setting that up, edit your config/s3.yml @@ -68,9 +68,7 @@ find each other correctly. #### Ruby (rspec) The first time you run tests, set up the test database with: - * `mysql -u root` - ** `create database ggtracker_test;` - ** `quit` + * `rake db:create` * `rake db:test:prepare` To run tests: `bundle exec rspec` diff --git a/app/assets/images/icons-s17aa376cc2.png b/app/assets/images/icons-s17aa376cc2.png new file mode 100644 index 0000000..3792057 Binary files /dev/null and b/app/assets/images/icons-s17aa376cc2.png differ diff --git a/app/assets/images/icons-s5d55425a81.png b/app/assets/images/icons-s5d55425a81.png deleted file mode 100644 index 45da9e5..0000000 Binary files a/app/assets/images/icons-s5d55425a81.png and /dev/null differ diff --git a/app/assets/images/sc2/images-s28b5d42756.png b/app/assets/images/sc2/images-s28b5d42756.png deleted file mode 100644 index b388ff6..0000000 Binary files a/app/assets/images/sc2/images-s28b5d42756.png and /dev/null differ diff --git a/app/assets/images/sc2/images-s98c1f910c2.png b/app/assets/images/sc2/images-s98c1f910c2.png new file mode 100644 index 0000000..16e5911 Binary files /dev/null and b/app/assets/images/sc2/images-s98c1f910c2.png differ diff --git a/app/assets/images/sc2/units/gen-s50afdcb629.png b/app/assets/images/sc2/units/gen-s50afdcb629.png deleted file mode 100644 index 5f53217..0000000 Binary files a/app/assets/images/sc2/units/gen-s50afdcb629.png and /dev/null differ diff --git a/app/assets/images/sc2/units/gen-s969c0317a0.png b/app/assets/images/sc2/units/gen-s969c0317a0.png new file mode 100644 index 0000000..5945744 Binary files /dev/null and b/app/assets/images/sc2/units/gen-s969c0317a0.png differ diff --git a/app/assets/images/sc2/units/mpq/32-sa50515a4f7.png b/app/assets/images/sc2/units/mpq/32-sa50515a4f7.png new file mode 100644 index 0000000..f7e1555 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/32-sa50515a4f7.png differ diff --git a/app/assets/images/sc2/units/mpq/32/adept.png b/app/assets/images/sc2/units/mpq/32/adept.png new file mode 100644 index 0000000..07c8af0 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/32/adept.png differ diff --git a/app/assets/images/sc2/units/mpq/32/cyclone.png b/app/assets/images/sc2/units/mpq/32/cyclone.png new file mode 100644 index 0000000..1144791 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/32/cyclone.png differ diff --git a/app/assets/images/sc2/units/mpq/32/disruptor.png b/app/assets/images/sc2/units/mpq/32/disruptor.png new file mode 100644 index 0000000..15da123 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/32/disruptor.png differ diff --git a/app/assets/images/sc2/units/mpq/32/herc.png b/app/assets/images/sc2/units/mpq/32/herc.png new file mode 100644 index 0000000..c1beeae Binary files /dev/null and b/app/assets/images/sc2/units/mpq/32/herc.png differ diff --git a/app/assets/images/sc2/units/mpq/32/liberator.png b/app/assets/images/sc2/units/mpq/32/liberator.png new file mode 100644 index 0000000..cb2dd25 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/32/liberator.png differ diff --git a/app/assets/images/sc2/units/mpq/32/ravager.png b/app/assets/images/sc2/units/mpq/32/ravager.png new file mode 100644 index 0000000..017ee8b Binary files /dev/null and b/app/assets/images/sc2/units/mpq/32/ravager.png differ diff --git a/app/assets/images/sc2/units/mpq/32/vikingfighter.png b/app/assets/images/sc2/units/mpq/32/vikingfighter.png new file mode 100644 index 0000000..26a5adb Binary files /dev/null and b/app/assets/images/sc2/units/mpq/32/vikingfighter.png differ diff --git a/app/assets/images/sc2/units/mpq/48-s49d2c075eb.png b/app/assets/images/sc2/units/mpq/48-s49d2c075eb.png new file mode 100644 index 0000000..b766c89 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48-s49d2c075eb.png differ diff --git a/app/assets/images/sc2/units/mpq/48-sbaf4d41858.png b/app/assets/images/sc2/units/mpq/48-sbaf4d41858.png deleted file mode 100644 index 2070617..0000000 Binary files a/app/assets/images/sc2/units/mpq/48-sbaf4d41858.png and /dev/null differ diff --git a/app/assets/images/sc2/units/mpq/48/adept.png b/app/assets/images/sc2/units/mpq/48/adept.png new file mode 100644 index 0000000..2e2f265 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/adept.png differ diff --git a/app/assets/images/sc2/units/mpq/48/cyclone.png b/app/assets/images/sc2/units/mpq/48/cyclone.png new file mode 100644 index 0000000..1c2536b Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/cyclone.png differ diff --git a/app/assets/images/sc2/units/mpq/48/disruptor.png b/app/assets/images/sc2/units/mpq/48/disruptor.png new file mode 100644 index 0000000..094b4a6 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/disruptor.png differ diff --git a/app/assets/images/sc2/units/mpq/48/hellionbattlemode.png b/app/assets/images/sc2/units/mpq/48/hellionbattlemode.png new file mode 100644 index 0000000..7b9beb6 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/hellionbattlemode.png differ diff --git a/app/assets/images/sc2/units/mpq/48/herc.png b/app/assets/images/sc2/units/mpq/48/herc.png new file mode 100644 index 0000000..326d9fc Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/herc.png differ diff --git a/app/assets/images/sc2/units/mpq/48/infestedmarineegg.png b/app/assets/images/sc2/units/mpq/48/infestedmarineegg.png new file mode 100644 index 0000000..1dd06e0 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/infestedmarineegg.png differ diff --git a/app/assets/images/sc2/units/mpq/48/liberator.png b/app/assets/images/sc2/units/mpq/48/liberator.png new file mode 100644 index 0000000..bf8aeae Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/liberator.png differ diff --git a/app/assets/images/sc2/units/mpq/48/locust.png b/app/assets/images/sc2/units/mpq/48/locust.png new file mode 100644 index 0000000..90c6b1f Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/locust.png differ diff --git a/app/assets/images/sc2/units/mpq/48/locustflyer.png b/app/assets/images/sc2/units/mpq/48/locustflyer.png new file mode 100644 index 0000000..1813ee0 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/locustflyer.png differ diff --git a/app/assets/images/sc2/units/mpq/48/mothershipcore.png b/app/assets/images/sc2/units/mpq/48/mothershipcore.png new file mode 100644 index 0000000..47f7b6c Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/mothershipcore.png differ diff --git a/app/assets/images/sc2/units/mpq/48/mutalisk-viper.png b/app/assets/images/sc2/units/mpq/48/mutalisk-viper.png new file mode 100644 index 0000000..7f73352 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/mutalisk-viper.png differ diff --git a/app/assets/images/sc2/units/mpq/48/nyduscreeptower.png b/app/assets/images/sc2/units/mpq/48/nyduscreeptower.png new file mode 100644 index 0000000..72bd864 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/nyduscreeptower.png differ diff --git a/app/assets/images/sc2/units/mpq/48/nydusdestroyer.png b/app/assets/images/sc2/units/mpq/48/nydusdestroyer.png new file mode 100644 index 0000000..90fb03a Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/nydusdestroyer.png differ diff --git a/app/assets/images/sc2/units/mpq/48/oracle.png b/app/assets/images/sc2/units/mpq/48/oracle.png new file mode 100644 index 0000000..4d6ca1f Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/oracle.png differ diff --git a/app/assets/images/sc2/units/mpq/48/ravager.png b/app/assets/images/sc2/units/mpq/48/ravager.png new file mode 100644 index 0000000..b143c02 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/ravager.png differ diff --git a/app/assets/images/sc2/units/mpq/48/reapermercenary.png b/app/assets/images/sc2/units/mpq/48/reapermercenary.png new file mode 100644 index 0000000..eb33fea Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/reapermercenary.png differ diff --git a/app/assets/images/sc2/units/mpq/48/swarmhost-carrion.png b/app/assets/images/sc2/units/mpq/48/swarmhost-carrion.png new file mode 100644 index 0000000..dbd04f4 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/swarmhost-carrion.png differ diff --git a/app/assets/images/sc2/units/mpq/48/swarmhost-creeper.png b/app/assets/images/sc2/units/mpq/48/swarmhost-creeper.png new file mode 100644 index 0000000..7d410bb Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/swarmhost-creeper.png differ diff --git a/app/assets/images/sc2/units/mpq/48/swarmhost.png b/app/assets/images/sc2/units/mpq/48/swarmhost.png new file mode 100644 index 0000000..0abebe4 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/swarmhost.png differ diff --git a/app/assets/images/sc2/units/mpq/48/tempest.png b/app/assets/images/sc2/units/mpq/48/tempest.png new file mode 100644 index 0000000..998f347 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/tempest.png differ diff --git a/app/assets/images/sc2/units/mpq/48/vikingfighter.png b/app/assets/images/sc2/units/mpq/48/vikingfighter.png new file mode 100644 index 0000000..5bcf61d Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/vikingfighter.png differ diff --git a/app/assets/images/sc2/units/mpq/48/viper.png b/app/assets/images/sc2/units/mpq/48/viper.png new file mode 100644 index 0000000..ee82628 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/viper.png differ diff --git a/app/assets/images/sc2/units/mpq/48/warhound.png b/app/assets/images/sc2/units/mpq/48/warhound.png new file mode 100644 index 0000000..3a9b22c Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/warhound.png differ diff --git a/app/assets/images/sc2/units/mpq/48/widowmine.png b/app/assets/images/sc2/units/mpq/48/widowmine.png new file mode 100644 index 0000000..13fef31 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/48/widowmine.png differ diff --git a/app/assets/images/sc2/units/mpq/76-s92229b0476.png b/app/assets/images/sc2/units/mpq/76-s92229b0476.png new file mode 100644 index 0000000..ce37e50 Binary files /dev/null and b/app/assets/images/sc2/units/mpq/76-s92229b0476.png differ diff --git a/app/assets/images/sc2/units/mpq/76-sbb4b347493.png b/app/assets/images/sc2/units/mpq/76-sbb4b347493.png deleted file mode 100644 index 5b5dcdb..0000000 Binary files a/app/assets/images/sc2/units/mpq/76-sbb4b347493.png and /dev/null differ diff --git a/app/assets/javascripts/angular/controllers/match.js b/app/assets/javascripts/angular/controllers/match.js index fbc359a..e3737d2 100644 --- a/app/assets/javascripts/angular/controllers/match.js +++ b/app/assets/javascripts/angular/controllers/match.js @@ -44,7 +44,7 @@ function($scope, $window, $route, $location, $element, Match) { // console.log("matchscope", $scope); $scope.$watch('current_frame', function(v) { if(v) { - $scope.current_time = Sc2.frameToTime(v); + $scope.current_time = Sc2.frameToTime(v, $scope.match.expansion); $scope.time_has_been_set = true } }); diff --git a/app/assets/javascripts/angular/directives/account.js b/app/assets/javascripts/angular/directives/account.js index cff13b8..80fd849 100644 --- a/app/assets/javascripts/angular/directives/account.js +++ b/app/assets/javascripts/angular/directives/account.js @@ -38,6 +38,14 @@ gg.directive('uaccount', ['Account', function(Account) { error: function() { alert("Sorry, your matches could not be deleted for some reason. Please contact hello@ggtracker.com and we will beat the person responsible."); } + + // next steps through the code: + // + // ggtracker: app/controllers/accounts_controller.rb destroy_all_matches + // gg: lib/esdb/identity.rb destroy_all_matches + // esdb: esdb/api/identities.rb post ':id/destroy_all_matches' + // esdb: esdb/jobs/sc2/identity/delete_all_matches.rb + // esdb: esdb/games/sc2/identity.rb destroy_all_matches! }); } } @@ -55,7 +63,7 @@ gg.directive('uaccount', ['Account', function(Account) { // instantiation should also be moved away..) account = new Account({id: scope.account.id, account: scope.account}); - // Note: there was a way to bind this in the resource, but @id doesn#t + // Note: there was a way to bind this in the resource, but @id doesnt // work anymore.. figure out what they changed it to. account.$save({id: account.id}); diff --git a/app/assets/javascripts/angular/directives/armychart.js b/app/assets/javascripts/angular/directives/armychart.js index ea790bd..fc01823 100644 --- a/app/assets/javascripts/angular/directives/armychart.js +++ b/app/assets/javascripts/angular/directives/armychart.js @@ -115,7 +115,7 @@ gg.directive('armychart', ['$location', '$timeout', function($location, $timeout scope.freeze = function(frame, updateURL) { switch(typeof frame) { case "number": frame = frame; break; - case "string": frame = Sc2.timeToFrame(frame); break; + case "string": frame = Sc2.timeToFrame(frame, scope.match.expansion); break; default: return false; } @@ -162,7 +162,7 @@ gg.directive('armychart', ['$location', '$timeout', function($location, $timeout if(typeof e == "number") { frame = e; } else if(typeof e == "string") { - frame = Sc2.timeToFrame(e); + frame = Sc2.timeToFrame(e, scope.match.expansion); } else { // If clicked on the background, we have xAxis on the event, if clicked // on a series, we'll have the point. diff --git a/app/assets/javascripts/angular/directives/chart.js b/app/assets/javascripts/angular/directives/chart.js index 2fdcec4..20b1f16 100644 --- a/app/assets/javascripts/angular/directives/chart.js +++ b/app/assets/javascripts/angular/directives/chart.js @@ -125,11 +125,15 @@ gg.directive('chart', ['$compile', function($compile) { if (scope.$parent.match.engagements) { options.xAxis.plotBands = []; + speed_multiplier = 1; + if (scope.$parent.match.expansion_tag == 'LotV') { + speed_multiplier = Sc2.LOTV_SPEEDUP; + } _.each(scope.$parent.match.engagements, function(engagement) { options.xAxis.plotBands.push({ color: 'rgba(150, 50, 50, 0.10)', - from: engagement[0] / 960.0, - to: engagement[1] / 960.0, + from: engagement[0] / 960.0 / speed_multiplier, + to: engagement[1] / 960.0 / speed_multiplier, zIndex: 10 }); }); diff --git a/app/assets/javascripts/angular/directives/macrochart.js b/app/assets/javascripts/angular/directives/macrochart.js index a4168f8..3e4397c 100644 --- a/app/assets/javascripts/angular/directives/macrochart.js +++ b/app/assets/javascripts/angular/directives/macrochart.js @@ -73,13 +73,18 @@ gg.directive('macrochart', [function() { }; + speed_multiplier = 1; + if (scope.$parent.match.expansion_tag == 'LotV') { + speed_multiplier = Sc2.LOTV_SPEEDUP; + } + if (scope.$parent.match.engagements) { options.yAxis.plotBands = []; _.each(scope.$parent.match.engagements, function(engagement) { options.yAxis.plotBands.push({ color: 'rgba(150, 50, 50, 0.1)', - from: engagement[0] / 960.0, - to: engagement[1] / 960.0, + from: engagement[0] / 960.0 / speed_multiplier, + to: engagement[1] / 960.0 / speed_multiplier, zIndex: 10 }); }); @@ -105,7 +110,7 @@ gg.directive('macrochart', [function() { for (i=0; i= 2) { + fps *= Sc2.LOTV_SPEEDUP; + } + minute = Math.floor(frame / (60 * fps)); + second = Math.floor((frame / fps) % 60).toString(); if (second.length < 2) { second = "0" + second; } @@ -212,7 +275,11 @@ Sc2.timeToFrame = function(time) { parts = time.split(':'); seconds = parseInt(parts[parts.length-1]); minutes = parseInt(parts[parts.length-2]); - frame = ((minutes*60) + seconds) * 16; + fps = 16; + if (expansion >= 2) { + fps *= Sc2.LOTV_SPEEDUP; + } + frame = ((minutes*60) + seconds) * fps; return frame; } @@ -221,5 +288,6 @@ Sc2.armyInfo = function(expansion_tag, unitname, infonum) { } Sc2.isArmyUnit = function(unitname) { - return (unitname in Sc2.armyUnits['HotS']); + return (unitname in Sc2.armyUnits['LotV']); } + diff --git a/app/assets/javascripts/angular/resources/match.js b/app/assets/javascripts/angular/resources/match.js index 7d51600..bfa5047 100644 --- a/app/assets/javascripts/angular/resources/match.js +++ b/app/assets/javascripts/angular/resources/match.js @@ -103,20 +103,20 @@ Entity.prototype.race_macro_pretty = function() { Entity.prototype.mdelta2 = function() { if (this.stats == null || - this.stats.mineral_saturation_2 == null || - this.stats.miningbase_2 == null) { + this.stats.mineral_saturation_2_adjusted == null || + this.stats.miningbase_2_adjusted == null) { return null; } - return Math.max(0, this.stats.mineral_saturation_2 - this.stats.miningbase_2); + return Math.max(0, this.stats.mineral_saturation_2_adjusted - this.stats.miningbase_2_adjusted); } Entity.prototype.mdelta3 = function() { if (this.stats == null || - this.stats.mineral_saturation_3 == null || - this.stats.miningbase_3 == null) { + this.stats.mineral_saturation_3_adjusted == null || + this.stats.miningbase_3_adjusted == null) { return null; } - return Math.max(0, this.stats.mineral_saturation_3 - this.stats.miningbase_3); + return Math.max(0, this.stats.mineral_saturation_3_adjusted - this.stats.miningbase_3_adjusted); } Entity.prototype.color_style = function() { @@ -180,9 +180,13 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc var Match = $ggResource('http://' + gg.settings.api_host + '/api/v1/matches'); Object.defineProperty(Match.prototype, 'expansion_tag', { - get: function() { - return this.expansion == 0 ? 'WoL' : 'HotS'; - } + get: function() { + switch (this.expansion) { + case 0: return 'WoL'; + case 1: return 'HotS'; + case 2: return 'LotV'; + } + } }); @@ -245,6 +249,8 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc this.entityIds = []; this.teams = {}; + var twoPlayerMatch = this.playerCount === 2; + for(var ei in this.entities) { // console.log("ei", ei, this.armies_by_frame, this.entities, this.entities[ei].identity.name); if (this.armies_by_frame && this.entities[ei].identity) { @@ -255,6 +261,8 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc } else if (this.entities[ei].identity.id in this.armies_by_frame) { entityArmy = this.armies_by_frame[this.entities[ei].identity.id]; // console.log("got abf for ei by id", ei, entityArmy); + } else if (this.entities[ei].identity.name.match(/A.I./) && twoPlayerMatch) { + entityArmy = this.armies_by_frame[0]; } this.entities[ei].armies_by_frame = entityArmy; } @@ -546,7 +554,11 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc // don't graph the last base-time; its y-value is zero by definition _bases_x.pop(); - _bases_x_minutes = _.map(_bases_x, function(_frame_x) { return _frame_x / 960.0 }); + speed_multiplier = 1.0; + if (this.expansion_tag == 'LotV') { + speed_multiplier = Sc2.LOTV_SPEEDUP; + } + _bases_x_minutes = _.map(_bases_x, function(_frame_x) { return _frame_x / 960.0 / speed_multiplier }); _series_y = []; _.each(_bases_x, function(_x) { @@ -558,12 +570,40 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc return _.zip(_bases_x_minutes, _series_y); }; + // Rescale series to a point per game minute + statxminutes = function(statarray) { + // Don't rescale the series if it is all zeros, since it will show up even as zero when rescaled + var sum = 0; + $.each(statarray, function(){ + sum += this + }); + if (sum == 0) { + return statarray; + } + + result = []; + seconds_between_stat_updates = 60.0 + if (this.expansion_tag == 'LotV') { + seconds_between_stat_updates /= Sc2.LOTV_SPEEDUP; + } + now_seconds = seconds_between_stat_updates; + _.each(statarray, function(stat) { + result.push([now_seconds / 60.0, stat]); + now_seconds = now_seconds + seconds_between_stat_updates; + }); + return result; + } + statx = function(statarray) { result = []; + seconds_between_stat_updates = 10.0; + if (this.expansion_tag == 'LotV') { + seconds_between_stat_updates /= Sc2.LOTV_SPEEDUP; + } now_seconds = 0; _.each(statarray, function(stat) { result.push([now_seconds / 60.0, stat]); - now_seconds = now_seconds + 10.0; + now_seconds = now_seconds + seconds_between_stat_updates; }); // console.log("statarray", result); return result; @@ -582,6 +622,11 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc is_team: false } + speed_multiplier = 1 + if (this.expansion_tag == 'LotV') { + speed_multiplier = Sc2.LOTV_SPEEDUP + } + // Income and army graphs from summary // Graph data is already prepared currently, so we just have to add it if(entity.summary) { @@ -593,11 +638,32 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc if (entity.summary.upgradespendinggraph) { this._series.summary_upgradespending.entities[_entity] = $.extend({data: entity.summary.upgradespendinggraph}, base_series); } + + entity.summary.resource_collection_rate_adjusted = Math.round(entity.summary.resource_collection_rate*speed_multiplier) + if (entity.stats.mineral_saturation_1 != null) { + entity.stats.mineral_saturation_1_adjusted = Math.round(entity.stats.mineral_saturation_1/speed_multiplier) + } + if (entity.stats.mineral_saturation_2 != null) { + entity.stats.mineral_saturation_2_adjusted = Math.round(entity.stats.mineral_saturation_2/speed_multiplier) + } + if (entity.stats.mineral_saturation_3 != null) { + entity.stats.mineral_saturation_3_adjusted = Math.round(entity.stats.mineral_saturation_3/speed_multiplier) + } + + if (entity.stats.miningbase_2 != null) { + entity.stats.miningbase_2_adjusted = Math.round(entity.stats.miningbase_2/speed_multiplier) + } + if (entity.stats.miningbase_3 != null) { + entity.stats.miningbase_3_adjusted = Math.round(entity.stats.miningbase_3/speed_multiplier) + } } - if(this.MineralsCurrent) { - this._series.replayincome.entities[_entity] = $.extend({data: statx(this.MineralsCollectionRate[entity.identity.id])}, base_series); - this._series.replaygasincome.entities[_entity] = $.extend({data: statx(this.VespeneCollectionRate[entity.identity.id])}, base_series); + if(this.MineralsCurrent && this.MineralsCurrent[entity.identity.id]) { + function getResourceCollectionRate(x) { + return x*speed_multiplier + } + this._series.replayincome.entities[_entity] = $.extend({data: statx(this.MineralsCollectionRate[entity.identity.id].map(getResourceCollectionRate))}, base_series); + this._series.replaygasincome.entities[_entity] = $.extend({data: statx(this.VespeneCollectionRate[entity.identity.id].map(getResourceCollectionRate))}, base_series); this._series.replaylost.entities[_entity] = $.extend({data: statx(this.Lost[entity.identity.id])}, base_series); this._series.replayminerals.entities[_entity] = $.extend({data: statx(this.MineralsCurrent[entity.identity.id])}, base_series); this._series.replaygas.entities[_entity] = $.extend({data: statx(this.VespeneCurrent[entity.identity.id])}, base_series); @@ -614,9 +680,9 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc } if(entity.data) { - this._series.apm.entities[_entity] = $.extend({data: entity.data.apm, pointStart: 1}, base_series); - this._series.wpm.entities[_entity] = $.extend({data: entity.data.wpm, pointStart: 1}, base_series); - this._series.creep_spread.entities[_entity] = $.extend({data: entity.data.creep_spread, pointStart: 1}, base_series); + this._series.apm.entities[_entity] = $.extend({data: statxminutes(entity.data.apm), pointStart: 1}, base_series); + this._series.wpm.entities[_entity] = $.extend({data: statxminutes(entity.data.wpm), pointStart: 1}, base_series); + this._series.creep_spread.entities[_entity] = $.extend({data: statxminutes(entity.data.creep_spread), pointStart: 1}, base_series); } if (this.num_bases) { diff --git a/app/assets/javascripts/gg.js b/app/assets/javascripts/gg.js index 28ab5f7..e5e63e4 100644 --- a/app/assets/javascripts/gg.js +++ b/app/assets/javascripts/gg.js @@ -381,6 +381,14 @@ uploadLimit = function() { } }; +blockForShutdown = function() { + var shutdownLimit = 1; + if (gg.limits) { + shutdownLimit = gg.limits[3]; + } + return (Math.random() * 100 < shutdownLimit); +} + notifyAboutUploadLimit = _.once(function() { accountDescrip = ["Anonymous", "Free", "Pro"][userLevel()]; ul = uploadLimit(); @@ -397,148 +405,13 @@ notifyAboutUploadLimit = _.once(function() { alert(apology + accountDescrip + " accounts are limited to " + uploadLimit() + " replay" + plural + " per upload. You can upload more any time you want."); }); -$(function() { - - fuconfig = { - url: 'https://' + gon.global.replays_bucket + '.s3.amazonaws.com', - type: 'POST', - autoUpload: true, - dataType: 'xml', - add: function(e, data) { -// console.log("add!", data.files.length); - - if (gg.state.iecompat) { - alert("Our apologies, but this browser can't upload replays to GGTracker. To upload replays, you can use Internet Explorer 10, Google Chrome, Firefox or Safari."); - return false; - } - - uploadScope = angular.element($('.uploads')).scope(); - - if (_.isUndefined(rootScope.creplays) || rootScope.creplays.length == 0) { - // creplays are the replays that are still being uploaded/processed. - // allreplays has all of the replays that were uploaded for this upload, regardless of their state - uploadScope.creplays = [] - uploadScope.allreplays = [] - // console.log("clearing arrays!"); - - $('#uploads') - .dialog({ - modal: true, - draggable: false, - resizable: false, - dialogClass: 'dialog-uploads', - width: 'auto', - position: { my: 'top', at: 'top+75' }, - collision: 'none', - show: 'slide' - }). - addClass('uploads-expanded'); - - $(window).bind('beforeunload', function () { - // console.log("beforeunload!", $('.button-upload input'), $('.button-upload input').data('fileupload'), uploadScope); - // return 'Foo!'; - if ($('.button-upload input').data('fileupload')._active > 0 && - uploadScope.creplays.length > 0) { - - // console.log("Not leaving yet", $('#upload input').data('fileupload'), $('#upload input').data('fileupload')._active); - return 'Leaving now will cancel your uploads in progress.'; - } - }); - } - - if (uploadScope.allreplays.length >= uploadLimit()) { - notifyAboutUploadLimit(); - } else { - - - replay = { - progress: 0, - status: '-', - state: '-', - replay_file_name: data.files[0].name - }; - uploadScope.creplays.push(replay); - uploadScope.allreplays.push(replay); - throttledUploadDigest(); - - $.ajax({ - url: "/signed_urls", - type: 'GET', - dataType: 'json', - data: {doc: {title: data.files[0].name}}, // send the file name to the server so it can generate the key param - async: false, - success: function(ajaxdata) { - data.formData = { - key: ajaxdata.key, - AWSAccessKeyId: gon.global.replays_access_key, - acl: 'public-read', - policy: ajaxdata.policy, - signature: ajaxdata.signature, - success_action_status: '201' - }; - data.submit(); - } - }); - } - }, - - send: function(e, data) { - uploadScope = angular.element($('.uploads')).scope(); - $.each(data.files, function(i, file) { - replay = _.find(uploadScope.creplays, function(rep) { return rep.replay_file_name == file.name }) - if (! _.isUndefined(replay)) { - replay.status = 'Uploading'; - setState(replay, 'Uploading'); - } - }); - throttledUploadDigest(); - }, - - drop: function(e, data) { - }, - - change: function(e, data) { - }, - - progress: function (e, data) { - // console.log("progress"); - - var progress = parseInt(data.loaded / data.total * 100, 10); - - uploadScope = angular.element($('.uploads')).scope(); - replay = _.find(uploadScope.creplays, function(rep) { return rep.replay_file_name == data.files[0].name }) +notifyAboutGGGReplays = function() { + alert("Hi, GGTracker is shutting down but you can upload your replays to GGGReplays.com (a GGTracker clone; note three Gs in the name), or to SC2ReplayStats.com or Drop.sc."); +}; - if(! _.isUndefined(replay)) { - replay.progress = progress; - if(progress == 100) { - replay.status = 'Waiting to be processed'; - setState(replay, 'processing'); - } - } else { - // console.log('NNAYITS1238', data.files[0].name, rootScope.creplays, replay); - } - - throttledUploadDigest(); - }, - - done: function(e, data) { - // console.log("done! ", $(data.result.getElementsByTagName("Location")[0]).text(), data.files[0].name); - - $.ajax({ - url: '/replays/s3_drop', - type: 'POST', - data: { - file_name: data.files[0].name, - s3_key: $(data.result.getElementsByTagName("Key")[0]).text(), - channel: gg.settings.replay_channel - }, - async: true, - }); - } - }; // fuconfig +$(function() { - $('.button-upload input[name="file"]').fileupload(fuconfig); - $('.button-upload input[name="differentname"]').fileupload(fuconfig); + $('.button-upload').click(notifyAboutGGGReplays); join = function(which_one) { diff --git a/app/assets/javascripts/setdocdomain.js b/app/assets/javascripts/setdocdomain.js index 388db33..e192408 100644 --- a/app/assets/javascripts/setdocdomain.js +++ b/app/assets/javascripts/setdocdomain.js @@ -1,4 +1,8 @@ // Proxino.log("gg.js domain was " + document.domain); // weird, was ggtracker.com even though script was served via CDN -document.domain = /(\w+)(.\w+)?$/.exec(location.hostname)[0]; +if (location.hostname.match(/^[0-9.]*$/) == null) { + // only set document.domain if our location is a hostname like ggtracker.com or + // ggtracker.test. But if it's an IP address, dont bother. + document.domain = /(\w+)(.\w+)?$/.exec(location.hostname)[0]; +} // Proxino.log("now gg.js domain is " + document.domain); diff --git a/app/assets/stylesheets/controllers/players.css.scss b/app/assets/stylesheets/controllers/players.css.scss index 410a48c..b8847dd 100644 --- a/app/assets/stylesheets/controllers/players.css.scss +++ b/app/assets/stylesheets/controllers/players.css.scss @@ -162,6 +162,7 @@ tr th, tr td { padding: 4px 4px; } + .racemacro, .creep_spread { display: none; } } #player .matches table.staircase { diff --git a/app/assets/stylesheets/sc2/units.css.scss b/app/assets/stylesheets/sc2/units.css.scss index 00fb93e..228338c 100644 --- a/app/assets/stylesheets/sc2/units.css.scss +++ b/app/assets/stylesheets/sc2/units.css.scss @@ -1,6 +1,5 @@ // Hint: spritemap regeneration is a little fickle. // to get it to regenerate just modify and save this file. - // Directly from the MPQ diff --git a/app/assets/stylesheets/ui/dialogs.css.scss b/app/assets/stylesheets/ui/dialogs.css.scss index 8d25a7d..7ea8ad2 100644 --- a/app/assets/stylesheets/ui/dialogs.css.scss +++ b/app/assets/stylesheets/ui/dialogs.css.scss @@ -146,9 +146,16 @@ $dialog-inner-width: $dialog-width - $dialog-padding * 2; } } + #remember { + font-size: 12px; + display: inline-block; + word-spacing: 0px; + vertical-align: bottom; + } + li.action { // width: ($dialog-inner-width * 0.30); - width: 30%; + // width: 20px; button { @include button2(lighten(desaturate(green, 15%), 35%), black); diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 27d6d17..0c12b86 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -60,6 +60,12 @@ def not_found(exception = nil) # The idea here is to not remove the user from the website entirely just # because esdb has failed. def esdb_exception(exception = nil) + if exception + Rails.logger.error "YO ITS AN ESDB EXCEPTION" + Rails.logger.error exception.message + st = exception.backtrace.join("\n") + Rails.logger.error st + end object_name = case self when PlayersController then 'player' when MatchesController then 'match' @@ -72,6 +78,12 @@ def esdb_exception(exception = nil) # The exception template has a minimal layout for itself to avoid triggering # the exception it was rendered for again. def exception(exception = nil) + if exception + Rails.logger.error "YO ITS AN EXCEPTION" + Rails.logger.error exception.message + st = exception.backtrace.join("\n") + Rails.logger.error st + end render 'exception', locals: {exception: exception}, status: 500, layout: false end diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index 3833be7..4fc6db9 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -8,6 +8,10 @@ def show begin blob_response = Curl.get(blob_url) rescue Exception => e + Rails.logger.error "YO EXCEPTION WHILE HITTING S3" + Rails.logger.error e.message + st = e.backtrace.join("\n") + Rails.logger.error st # sometimes there are random problems retrieving from S3. we # dont need to hear about each one. # TODO complain if there are too many consecutive failures @@ -49,8 +53,8 @@ def show gon.match = @match.to_hash if blob_response && blob_response.status[0] == '2' gon.matchblob = blob_response.body_str -# else -# Rails.logger.warn("Got blob response status #{blob_response.status} for match #{@match.id}") + else + Rails.logger.warn("Got blob response status #{blob_response.status} for match #{@match.id}") end end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index fa9844b..e8b2b46 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,5 +1,6 @@ class UsersController < Devise::RegistrationsController before_filter :authenticate_user!, :except => [:auth] + prepend_before_filter :check_captcha, only: [:create] # Change this to be any actions you want to protect. respond_to :html, :json, :xml # Overriding devise helpers @@ -38,4 +39,13 @@ def update current_user.update_attributes(params[:user]) render :text => "OK" end + + private + def check_captcha + unless verify_recaptcha + self.resource = resource_class.new sign_up_params + respond_with_navigational(resource) { render :new } + else + end + end end diff --git a/app/models/account.rb b/app/models/account.rb index 35928d3..baced81 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -252,14 +252,6 @@ def url esdb_id.present? ? "/players/#{esdb_id}/#{name}" : '' end - def destroy_all_matches! - ident = ESDB::Identity.find(params[:id]) - not_found and return if !ident - - response = @match.userdelete(current_user.id) - - end - # Return Jbuilder for serialization def to_builder(builder = nil) builder ||= Jbuilder.new diff --git a/app/views/application/esdb_exception.html.erb b/app/views/application/esdb_exception.html.erb index 8a02f0f..4742f4a 100644 --- a/app/views/application/esdb_exception.html.erb +++ b/app/views/application/esdb_exception.html.erb @@ -1,5 +1,5 @@

Oops.

-

Something is wrong with this <%= object_name %>. We're on it.

+

Something is wrong with this <%= object_name %>.

(500)

diff --git a/app/views/application/exception.html.erb b/app/views/application/exception.html.erb index 19a5322..f1a61f0 100644 --- a/app/views/application/exception.html.erb +++ b/app/views/application/exception.html.erb @@ -21,7 +21,7 @@ _\%_____/\%_____/\%_____/\%_/ /\%___fx/\%_____/\__/ /\%_____/\__/ /.com_

Uh oh.





-

Something has gone wrong. We have been notified about it.

+

Something has gone wrong. Badly wrong.



















diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 66879f5..bf6bba4 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -1 +1,3 @@ -<%= render 'devise/aio' %> \ No newline at end of file +

Sign up

+ +Actually no, don't sign up. Go to gggreplays.com instead. diff --git a/app/views/devise/shared/_links.erb b/app/views/devise/shared/_links.erb index eab783a..cd883af 100644 --- a/app/views/devise/shared/_links.erb +++ b/app/views/devise/shared/_links.erb @@ -2,10 +2,6 @@ <%= link_to "Sign in", new_session_path(resource_name) %>
<% end -%> -<%- if devise_mapping.registerable? && controller_name != 'registrations' %> - <%= link_to "Sign up", new_registration_path(resource_name) %>
-<% end -%> - <%- if devise_mapping.recoverable? && controller_name != 'passwords' %> <%= link_to "Forgot your password?", new_password_path(resource_name) %>
<% end -%> diff --git a/app/views/dialogs/_join_aio.html.erb b/app/views/dialogs/_join_aio.html.erb index d566f88..284215b 100644 --- a/app/views/dialogs/_join_aio.html.erb +++ b/app/views/dialogs/_join_aio.html.erb @@ -1,14 +1,6 @@
- <%= semantic_form_for(resource, :method => 'post', :url => registration_path(:user)) do |f| %> - <%= f.inputs do %> - <%= f.input :email, :label => false, :input_html => {:placeholder => 'E-Mail Address'} %> - <%= f.input :password, :label => false, :input_html => {:placeholder => 'Password'} %> - <%= f.action :submit, :as => :button, :label => 'sign up' %> - <% end %> - <% end %> - login forgot password?
@@ -23,7 +15,11 @@ <% end %> <%= f.inputs do %> - <%= f.input :password, :label => false, :input_html => {:placeholder => 'Password'} %> + <%= f.input :password, :label => false, :input_html => {:placeholder => 'Password'} %> +
+ <%= f.check_box :remember_me, :label => :remember_me %> + Remember me +
<%= f.action :submit, :as => :button, :label => 'login' %> <% end %> <% end %> diff --git a/app/views/home/developers.html b/app/views/home/developers.html index f919cc8..c7abd02 100644 --- a/app/views/home/developers.html +++ b/app/views/home/developers.html @@ -9,7 +9,7 @@

Hello fellow developer!

-

Source code is available. Contributions welcome.

+

Source code is available. Contributions welcome.

Also there is an API.

diff --git a/app/views/home/econ_staircase.html b/app/views/home/econ_staircase.html index d2c5d6a..317ae81 100644 --- a/app/views/home/econ_staircase.html +++ b/app/views/home/econ_staircase.html @@ -22,13 +22,13 @@ Saturation Speed - - 1 Base Mineral Income (640){{ es[league + key + '_mineral_saturation_1'][metric()] | minutes_seconds }} + + 1 Base Mineral Income (870){{ es[league + key + '_mineral_saturation_1'][metric()] | minutes_seconds }} - Time from 2nd Base Complete to 2 Base Mineral Income (1280) +completed, to when 2x870 = 1740 minerals per minute income is achieved." data-gravity="s"> + Time from 2nd Base Complete to 2 Base Mineral Income (1740) {{ es[league + key + '_mdelta2'][metric()] | minutes_seconds }} @@ -36,8 +36,8 @@ - Time from 3rd Base Complete to 3 Base Mineral Income (1920) +completed to when 3x870 = 2610 minerals per minute income is achieved." data-gravity="s"> + Time from 3rd Base Complete to 3 Base Mineral Income (2610) {{ es[league + key + '_mdelta3'][metric()] | minutes_seconds }} @@ -51,7 +51,7 @@

See more about TheStaircase and Saturation Speed.

-

Games are 1v1 HotS Ladder, vs-AI excluded, from May 8, 2013 to {{ es['now'] | date:'MMM d, y'}}.

+

Games are 1v1 LotV Ladder, vs-AI excluded, over the past 180 days.

Benchmarks are set by calculating the median time for the given matchup and league. The times are then adjusted to the best-fit line from Silver to Masters using a standard least-squares regression. (In the rare case when the best-fit line slopes the wrong way, we use the Masters time for all leagues)

Stats are updated once per day.

diff --git a/app/views/home/economy_stats.html b/app/views/home/economy_stats.html index 5ef4c3a..61560ab 100644 --- a/app/views/home/economy_stats.html +++ b/app/views/home/economy_stats.html @@ -38,13 +38,13 @@ {{ es[key][league].miningbase_3 | minutes_seconds}} Saturation Speed - - 1 Base Mineral Income (640){{ es[key][league].mineral_saturation_1 | minutes_seconds }} + + 1 Base Mineral Income (870){{ es[key][league].mineral_saturation_1 | minutes_seconds }} - Time from 2nd Base Complete to 2 Base Mineral Income (1280) +completed, to when 2x870 = 1740 minerals per minute income is achieved." data-gravity="s"> + Time from 2nd Base Complete to 2 Base Mineral Income (1740) {{ es[key][league].mdelta2 | minutes_seconds }} @@ -52,8 +52,8 @@ - Time from 3rd Base Complete to 3 Base Mineral Income (1920) +completed to when 3x870 = 2610 minerals per minute income is achieved." data-gravity="s"> + Time from 3rd Base Complete to 3 Base Mineral Income (2610) {{ es[key][league].mdelta3 | minutes_seconds }} @@ -67,7 +67,7 @@

See more about Saturation Speed here.

-

All games are 1v1 HotS Ladder, vs-AI excluded, from May 8, 2013 to {{ es['PvP'][1].retrieval_time | date:'MMM d, y'}}.

+

All games are 1v1 LotV Ladder, vs-AI excluded, from Nov 9, 2015 to {{ es['PvP'][1].retrieval_time | date:'MMM d, y'}}.

Stats are updated once per day.

Alternate view: all matchups, one league

diff --git a/app/views/home/economy_stats2.html b/app/views/home/economy_stats2.html index 40a25bc..2a95679 100644 --- a/app/views/home/economy_stats2.html +++ b/app/views/home/economy_stats2.html @@ -37,13 +37,13 @@ {{ es[matchup][league].miningbase_3 | minutes_seconds}} Saturation Speed - - 1 Base Mineral Income (640){{ es[matchup][league].mineral_saturation_1 | minutes_seconds }} + + 1 Base Mineral Income (870){{ es[matchup][league].mineral_saturation_1 | minutes_seconds }} - Time from 2nd Base Complete to 2 Base Mineral Income (1280) +completed, to when 2x870 = 1740 minerals per minute income is achieved." data-gravity="s"> + Time from 2nd Base Complete to 2 Base Mineral Income (1740) {{ es[matchup][league].mdelta2 | minutes_seconds }} @@ -51,8 +51,8 @@ - Time from 3rd Base Complete to 3 Base Mineral Income (1920) +completed to when 3x870 = 2610 minerals per minute income is achieved." data-gravity="s"> + Time from 3rd Base Complete to 3 Base Mineral Income (2610) {{ es[matchup][league].mdelta3 | minutes_seconds }} @@ -66,7 +66,7 @@

See more about Saturation Speed here.

-

All games are 1v1 HotS Ladder, vs-AI excluded, from May 8, 2013 to {{ es['PvP'][1].retrieval_time | date:'MMM d, y'}}.

+

All games are 1v1 LotV Ladder, vs-AI excluded, from Nov 9, 2015 to {{ es['PvP'][1].retrieval_time | date:'MMM d, y'}}.

Stats are updated once per day.

Alternate view: one matchup, all leagues

diff --git a/app/views/home/faq.html b/app/views/home/faq.html index 49ce775..f6bb65e 100644 --- a/app/views/home/faq.html +++ b/app/views/home/faq.html @@ -51,6 +51,7 @@

Frequently Asked Questions

  • Bernat Fortet design
  • Marian Rudzynski developer and mad scientist
  • AndrĂ¡s Belicza created the auto-uploader and the incredible sc2gears
  • +
  • Anders Nickelsen built ggtrackerstack and initiated active development for the LotV era, with additional contributions from Jonathan Gravel (@gravelweb on github)
  • Doug Copestake built the SC2Gears auto-uploader plugin
  • Jonathan Chung built the creep spread calculations
  • Leafs apologist William "Grandmaster Wannabee" Lang
  • diff --git a/app/views/home/replay_problems.html.erb b/app/views/home/replay_problems.html.erb index ac8aed1..1ee3ae2 100644 --- a/app/views/home/replay_problems.html.erb +++ b/app/views/home/replay_problems.html.erb @@ -8,7 +8,8 @@

    Sorry, we had trouble reading the replays you uploaded.

    -

    If these were ordinary Starcraft 2 replay files, please let me know and I'll take a closer look.

    +

    If these were ordinary ladder Starcraft 2 replay files, please let me know and I'll take a closer look.

    +

    (Note that Archon mode is not supported TT)
















    dont click hereor here
    diff --git a/app/views/home/saturation_speed.html b/app/views/home/saturation_speed.html index be4654c..b71995d 100644 --- a/app/views/home/saturation_speed.html +++ b/app/views/home/saturation_speed.html @@ -8,9 +8,9 @@

    What is Saturation Speed?

    Saturation Speed measures how quickly you can ramp up your economy. Higher-league players tend to be faster than lower-league players. Although there are strategic reasons in particular games why you might delay your economy, on average higher-league players do get their economy up faster. You can use Saturation Speed to keep tabs on the economic side of your game.

    -

    Your 1st Base Saturation Speed measures how quickly you can get to 640 mineral income. That's the income you get from 16 workers mining minerals. After the 16th worker, any additional workers do not mine as quickly.

    -

    Your 2nd Base Saturation Speed measures how quickly you can go from having your 2nd base complete, and in mining position, to having 1280 (2x640) mineral income.

    -

    Your 3rd Base Saturation Speed measures how quickly you can go from having your 3rd base complete, and in mining position, to having 1920 (3x640) mineral income.

    +

    Your 1st Base Saturation Speed measures how quickly you can get to 870 mineral income. That's the income you get from 16 workers mining minerals. After the 16th worker, any additional workers do not mine as quickly.

    +

    Your 2nd Base Saturation Speed measures how quickly you can go from having your 2nd base complete, and in mining position, to having 1740 (2x870) mineral income.

    +

    Your 3rd Base Saturation Speed measures how quickly you can go from having your 3rd base complete, and in mining position, to having 2610 (3x870) mineral income.


    How Can I See My Saturation Speed?

    On any match page, click on the Economy button:

    diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 2c40ee3..9afc1d9 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -135,16 +135,12 @@ _\%_____/\%_____/\%_____/\%_/ /\%___fx/\%_____/\__/ /\%_____/\__/ /.com_
  • Spending Skill Stats
  • Economy Stats
  • TheStaircase Benchmarks
  • -
  •  Gold Speed Ahead with desRow
  • -
  • WCS matches
  •  
  • Frequently Asked Questions
  • Spending Skill
  • Saturation Speed
  • Auto Uploader
  • -
  • Race-Specific Macro
  • -
  • All About Larva Injects
  • FAQ in Deutsch
  •  
  • @@ -153,11 +149,7 @@ _\%_____/\%_____/\%_____/\%_/ /\%___fx/\%_____/\__/ /\%_____/\__/ /.com_
  • Scelight
  • - <% if signed_in? && !current_user.pro? %> -
  • go pro
  • - <% else %> -
  • tour
  • - <% end %> +
  • tour
  • @@ -168,17 +160,15 @@ _\%_____/\%_____/\%_____/\%_/ /\%___fx/\%_____/\__/ /\%_____/\__/ /.com_