Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dc82201
fixed linked to extreme startup servers
Mar 23, 2012
56e452d
fixed failing specs for squares/cubes due to rounding errors
Apr 17, 2012
6494418
added more questions, just in case...
Apr 17, 2012
a32a8cf
Merge remote-tracking branch 'rchatley/master'
Dec 7, 2012
09d4921
updated away from .rvmrc
qwan-labs Jun 4, 2013
fee9cc1
increase timeout on cucumber features
Jun 5, 2013
1fc27a2
added questions about the weather
Jun 5, 2013
07b41c8
updated .gitignore with IDEA project files
Jun 5, 2013
20f9f14
some notes to prepare geocoding questions
Jun 9, 2013
7d33025
introduced an event log which records all events in a game
Jun 9, 2013
dc23c05
ensure correct penalty for questions providing variable number of points
Jun 11, 2013
07e764f
move views following upgrade to dependencies
Jun 9, 2013
f2b87c7
introduced fixed timeout of 10 seconds
Jun 11, 2013
40ebb5b
replace smoothie with flot for graphing on /graph page
Jun 12, 2013
c6a9ae3
improve layout of more screens using bootstrap
Jun 13, 2013
e83efbf
bind server to all available interfaces
Jun 13, 2013
e08d947
provide the ability to save/load the list of questions to ask at startup
Jun 19, 2013
33cd4ae
merge rchatley/master
Jun 26, 2013
5569c69
remove yahoo-weather version from gemfile
Jun 26, 2013
86c4374
added question using minus symbol
abailly Oct 1, 2013
87458d8
added plus with symbol question
abailly Oct 1, 2013
7f149f5
added mult question with symbol
abailly Oct 1, 2013
2aa3b0b
added generalized arithmetic questions
abailly Oct 1, 2013
251acf1
name displayed in personal page had bad layout
abailly Oct 2, 2013
253988f
include general arithmetic in questions list
abailly Oct 2, 2013
41249e2
fix general arithmetic questions
abailly Oct 15, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*.swp
.project
.buildpath
.idea
*.iml
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extreme_startup
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.9.2
1 change: 0 additions & 1 deletion .rvmrc

This file was deleted.

5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source :rubygems

gem 'rake'
gem 'eventmachine', '1.0.0.beta.3'
gem 'thin'
gem 'sinatra'
Expand All @@ -10,5 +11,9 @@ gem 'rspec'
gem 'cucumber'
gem 'rack-test'
gem 'capybara'
gem 'launchy'
gem 'json'

# needed for weather questions
gem 'yahoo-weather'

107 changes: 58 additions & 49 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,70 +1,76 @@
GEM
remote: http://rubygems.org/
specs:
builder (3.0.0)
capybara (1.0.0)
addressable (2.3.4)
builder (3.2.2)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 0.2.0)
xpath (~> 0.1.4)
childprocess (0.1.9)
ffi (~> 1.0.6)
crack (0.1.8)
cucumber (0.10.6)
xpath (~> 2.0)
cucumber (1.3.2)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
gherkin (~> 2.4.0)
json (>= 1.4.6)
term-ansicolor (>= 1.0.5)
daemons (1.1.3)
diff-lcs (1.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.12.0)
multi_json (~> 1.3)
daemons (1.1.9)
diff-lcs (1.2.4)
eventmachine (1.0.0.beta.3)
ffi (1.0.9)
gherkin (2.4.0)
json (>= 1.4.6)
haml (3.1.2)
httparty (0.7.8)
crack (= 0.1.8)
json (1.5.2)
json_pure (1.5.2)
macaddr (1.0.0)
mime-types (1.16)
nokogiri (1.4.5)
rack (1.3.0)
rack-test (0.6.0)
eventmachine (1.0.0.beta.3-x86-mingw32)
gherkin (2.12.0)
multi_json (~> 1.3)
gherkin (2.12.0-x86-mingw32)
multi_json (~> 1.3)
haml (4.0.3)
tilt
httparty (0.11.0)
multi_json (~> 1.0)
multi_xml (>= 0.5.2)
json (1.8.0)
launchy (2.3.0)
addressable (~> 2.3)
macaddr (1.6.1)
systemu (~> 2.5.0)
mime-types (1.23)
multi_json (1.7.6)
multi_xml (0.5.4)
nokogiri (1.5.9)
nokogiri (1.5.9-x86-mingw32)
rack (1.5.2)
rack-protection (1.5.0)
rack
rack-test (0.6.2)
rack (>= 1.0)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
rubyzip (0.9.4)
selenium-webdriver (0.2.1)
childprocess (>= 0.1.7)
ffi (>= 1.0.7)
json_pure
rubyzip
sinatra (1.2.6)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
term-ansicolor (1.0.5)
thin (1.2.11)
rake (10.0.4)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
sinatra (1.4.2)
rack (~> 1.5, >= 1.5.2)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
systemu (2.5.2)
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
tilt (1.3.2)
uuid (2.3.2)
tilt (1.4.1)
uuid (2.3.7)
macaddr (~> 1.0)
xpath (0.1.4)
xpath (2.0.0)
nokogiri (~> 1.3)
yahoo-weather (1.2.1)
nokogiri (>= 1.4.1)

PLATFORMS
ruby
x86-mingw32

DEPENDENCIES
capybara
Expand All @@ -73,8 +79,11 @@ DEPENDENCIES
haml
httparty
json
launchy
rack-test
rake
rspec
sinatra
thin
uuid
yahoo-weather
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ Getting started
* ruby dk.rb init
* Edit the file config.yml (Add the locations where ruby is installed e.g. c:\Ruby192)
* ruby dk.rb install
* (For Ubuntu 12.04 onwards)
* Remove existing installation of Ruby and ruby related packages (do not use sudo or Ubuntu Software centre or any other Ubuntu package manager to install Ruby or any of its components)
* Remove rvm and related package from Ubuntu
* Install RVM using the instructions on https://rvm.io/
* In case RVM is broken it can be fixed by going to http://stackoverflow.com/questions/9056008/installed-ruby-1-9-3-with-rvm-but-command-line-doesnt-show-ruby-v/9056395#9056395
* Install Ruby and Rubygems using RVM only (for Rubygems use: 'rvm rubygems current' or 'rvm rubygems latest')

* Install dependencies:

````
cd ../<exstreme startup dir>
gem install bundler
bundle
bundle install
````

* Start the game server
Expand Down
6 changes: 3 additions & 3 deletions features/basic_scoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: Basic Scoring
"""
And the correct answer to every question is '4' worth 10 points
When the player is entered
And the game is played for 1 second
And the game is played for 2 second
Then the scores should be:
| player | score |
| bob | 10 |
Expand All @@ -23,7 +23,7 @@ Feature: Basic Scoring
"""
And the correct answer to every question is '4' worth 10 points
When the player is entered
And the game is played for 1 second
And the game is played for 2 second
Then the scores should be:
| player | score |
| charlie | -10 |
Expand All @@ -37,7 +37,7 @@ Feature: Basic Scoring
"""
And the correct answer to every question is '4'
When the player is entered
And the game is played for 1 second
And the game is played for 2 second
Then the scores should be:
| player | score |
| ernie | -50 |
2 changes: 1 addition & 1 deletion features/penalty_rules.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Feature: Penalty Rules
"""
And the correct answer to every question is '0' worth 10 points
When the players are entered
And the game is played for 1 second
And the game is played for 2 second
Then the scores should be:
| player | score |
| always-right | 10 |
Expand Down
6 changes: 3 additions & 3 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ def app
$silence_logging = true

Before do
app.players = Hash.new
app.players_threads = Hash.new
app.scoreboard = ExtremeStartup::Scoreboard.new(false)
end

After do
app.players_threads.each do |uuid, thread|
thread.exit
end
app.players.clear
app.players_threads.clear
app.scoreboard = ExtremeStartup::Scoreboard.new(false, ExtremeStartup::Events.new($stdout))
app.question_factory = ExtremeStartup::QuestionFactory.new
end
4 changes: 2 additions & 2 deletions features/warm_up.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: Warm up
end
"""
When the player is entered
And the game is played for 1 second
And the game is played for 2 second
Then the scores should be:
| player | score |
| bob | 10 |
Expand All @@ -26,7 +26,7 @@ Feature: Warm up
end
"""
When the player is entered
And the game is played for 1 second
And the game is played for 2 second
Then the scores should be:
| player | score |
| Sébastian | 10 |
Expand Down
37 changes: 23 additions & 14 deletions lib/extreme_startup/anagrams.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
---
-
anagram: listen
correct: inlets
correct:
- inlets
- silent
incorrect:
- enlists
- google
- banana
-
anagram: listen
correct: silent
anagram: war
correct: raw
incorrect:
- enlists
- google
- banana
- wharf
- wary
- rave
-
anagram: admirer
correct: married
incorrect:
- mirror
- admiter
-
anagram: master
correct:
- stream
- tamers
incorrect:
- raster
- sternum
-
anagram: dictionary
correct: indicatory
incorrect:
- abdication
- incendiary
- butterfly
-
anagram: admirer
correct: married
incorrect:
- dairy
- random
- border
- forgot

Loading