mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-15 06:10:53 +00:00
Merge fixes
This commit is contained in:
commit
9f921d60e9
4 changed files with 11 additions and 10 deletions
11
.travis.yml
11
.travis.yml
|
@ -6,12 +6,13 @@ addons:
|
||||||
code_climate:
|
code_climate:
|
||||||
repo_token: b3db5b7df9a0a1d0fd3503e72d7431ffbfa172492c2840d590ccb2fafd9172d3
|
repo_token: b3db5b7df9a0a1d0fd3503e72d7431ffbfa172492c2840d590ccb2fafd9172d3
|
||||||
rvm:
|
rvm:
|
||||||
- 2.1.3
|
- 2.1.2
|
||||||
env:
|
env:
|
||||||
- MYSQL_USERNAME=travis APP_SECRET=2d3a08dfea079fe45bcb7f830b010eda
|
- MYSQL_USERNAME=travis
|
||||||
before_install:
|
- APP_SECRET=2d3a08dfea079fe45bcb7f830b010eda
|
||||||
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
|
before_script:
|
||||||
- sleep 5
|
- export DISPLAY=:99.0
|
||||||
|
- sh -e /etc/init.d/xvfb start
|
||||||
script:
|
script:
|
||||||
- RAILS_ENV=test bundle exec rake db:create db:migrate db:test:prepare
|
- RAILS_ENV=test bundle exec rake db:create db:migrate db:test:prepare
|
||||||
- RAILS_ENV=test bundle exec rspec spec
|
- RAILS_ENV=test bundle exec rspec spec
|
||||||
|
|
2
Gemfile
2
Gemfile
|
@ -1,6 +1,6 @@
|
||||||
source 'http://rubygems.org'
|
source 'http://rubygems.org'
|
||||||
|
|
||||||
ruby '2.1.3'
|
ruby '2.2.1'
|
||||||
|
|
||||||
gem 'dotenv-rails', '~> 0.10.0'
|
gem 'dotenv-rails', '~> 0.10.0'
|
||||||
gem 'rails', '~> 3.2.19'
|
gem 'rails', '~> 3.2.19'
|
||||||
|
|
|
@ -70,8 +70,8 @@ class Gather < ActiveRecord::Base
|
||||||
def self.player_count_for_game(name)
|
def self.player_count_for_game(name)
|
||||||
game = self.find_game(name)
|
game = self.find_game(name)
|
||||||
|
|
||||||
if game && players = game.gathers.ordered.first.gatherers
|
if game && (players = game.gathers.ordered.first.gatherers.count)
|
||||||
players.size
|
players
|
||||||
else
|
else
|
||||||
0
|
0
|
||||||
end
|
end
|
||||||
|
|
|
@ -98,11 +98,11 @@ class GoogleCalendar
|
||||||
end
|
end
|
||||||
|
|
||||||
def start
|
def start
|
||||||
Time.use_zone(@timezone_offset) { Time.zone.parse(@entry["start"]["dateTime"]) }
|
@entry["start"]["dateTime"].to_datetime.in_time_zone(@timezone_offset)
|
||||||
end
|
end
|
||||||
|
|
||||||
def end
|
def end
|
||||||
Time.use_zone(@timezone_offset) { Time.zone.parse(@entry["end"]["dateTime"]) }
|
@entry["end"]["dateTime"].to_datetime.in_time_zone(@timezone_offset)
|
||||||
end
|
end
|
||||||
|
|
||||||
def formatted_summary
|
def formatted_summary
|
||||||
|
|
Loading…
Reference in a new issue