Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongoid #27

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
275e48a
Switch devise to Mongoid
kynan May 26, 2013
781ae58
Mongoid 3.1 required for geo_near (requires rails 3.2)
kynan May 26, 2013
5bfd5b5
Switch models to Mongoid
kynan May 26, 2013
7e11a21
Update hospitals controller: max distance in km
kynan May 26, 2013
744941d
Update javascript location handler
kynan May 26, 2013
9f06241
Fall by to postcode if browser doesn't support geolocation
kynan May 26, 2013
b22a5e5
Update bootstrap task
kynan May 26, 2013
d2b78da
Add taks to create roles to boostrap
kynan May 26, 2013
c0c8704
Update Makefile
kynan May 26, 2013
eecdd7b
Add Geocoder to Gemfile
kynan May 26, 2013
43b0534
Add MONGOHQ configuration for production
kynan May 26, 2013
910b5a3
Support searching by postcode
kynan May 26, 2013
7d06573
Move sqlite3 dependency to development
kynan May 26, 2013
fc7d7dd
Heroku requires specifying rails version in Gemfile
kynan May 26, 2013
c5e1761
Heroku needs postgres in production
kynan May 26, 2013
f1c605a
Fix for users controller
kynan May 26, 2013
9174829
No longer use ActiveRecord transaction to add delays
kynan May 26, 2013
fa50966
Sensibly round distance and delay
kynan May 26, 2013
5f46ba1
Create delays with right arguments the first time round
kynan May 26, 2013
76df8c9
Change tag line
kynan May 26, 2013
53df643
Fix delays controller
kynan May 26, 2013
1e33f40
UI fixes for lower screen resolutions (should use media queries)
kynan May 26, 2013
1dd061d
Protocol-agnostic google maps include
kynan May 26, 2013
8aa0997
Embed a link to the delay graph in the infotangle
kynan May 26, 2013
26a09e8
Close facebox if we found the location
kynan May 26, 2013
422f158
Fix sorting by wait time and agony
kynan May 26, 2013
1a51ba0
Rename Agony to Combined
kynan May 26, 2013
90126a4
Support km (default) or mi for radius in hospitals query
kynan May 27, 2013
bed2144
Add disclaimer
kynan May 27, 2013
095927e
Some CSS tweaking in header
kynan May 27, 2013
4aa7ee3
Excorcise ActiveRecord
kynan May 28, 2013
8b89166
Adapt resizeContentToWindow to changed header size
kynan May 28, 2013
e904b79
Some more CSS tweaks
kynan May 28, 2013
423a406
Add longitude and latitude properties to Hospital
kynan Jun 5, 2013
202b7e0
Add factory girl
kynan Jun 5, 2013
aa52834
Replace ruby-debug by debugger
kynan Jun 8, 2013
7b2b3f2
Remove unnecessary test helper
kynan Jun 8, 2013
494eb04
Fix location access in Hospital.compute_distance
kynan Jun 8, 2013
5d332c8
More rigurous location validation in Hospital model
kynan Jun 8, 2013
baa2efd
Stub out a db:test:prepare Rake task
kynan Jun 8, 2013
9e5fc50
Remove test fixtures and add factories
kynan Jun 8, 2013
a9378e0
Remove loading fixtures
kynan Jun 8, 2013
f26145c
Add setup method to create factories
kynan Jun 8, 2013
48e383c
Setup method also empties collections other than system.indexes
kynan Jun 8, 2013
e6ce9ef
Fix delay unit tests
kynan Jun 8, 2013
871c7b9
Fix hospital unit tests
kynan Jun 8, 2013
35561bf
Pre-compile assets style.css, modernizr.min.js, respond.min.js
kynan Jun 8, 2013
0279ecd
Include jquery.min via javascript_include_tag
kynan Jun 8, 2013
c516e03
Update heroku gem
kynan Jun 12, 2013
ba10b5c
Add MIT license
kynan Jun 12, 2013
8e02bf6
Add license note and link to source
kynan Jun 12, 2013
97eb11c
Some CSS cleanup
kynan Jun 12, 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
19 changes: 12 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
source 'https://rubygems.org'

gem 'rails', '~> 3.1'
ruby '1.9.3'

gem 'rails', '~> 3.2'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

# Use unicorn as the web server
# gem 'unicorn'

Expand All @@ -28,30 +28,35 @@ gem 'sqlite3'
# and rake tasks are available in development mode:
group :development, :test do
# RSpec
gem "rspec", "~> 2.6"
gem "rspec-rails", "~> 2.6"
gem "rspec"
gem "rspec-rails"

# Cucmber
gem "cucumber", "~> 1.0"
gem "cucumber-rails", "~> 1.0", :require => false
gem "database_cleaner"

gem "factory_girl_rails", ">= 4.1"
gem "jasmine", "~> 1"
gem "ruby-debug19"
gem "debugger"

gem "heroku"

gem "guard"
gem "guard-coffeescript"
end

# Mogoid
gem 'mongoid', ">= 3.1"

gem 'geocoder'
gem 'googlecharts'

# Use JQuery not prototype
gem 'jquery-rails'

# Gems required for user authentication
gem 'devise'
gem 'devise', ">= 2.2"
gem 'cancan'
gem 'css3buttons'

Expand Down
220 changes: 118 additions & 102 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.1.1)
actionpack (= 3.1.1)
mail (~> 2.3.0)
actionpack (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
actionmailer (3.2.13)
actionpack (= 3.2.13)
mail (~> 2.5.3)
actionpack (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
rack-cache (~> 1.1)
rack-mount (~> 0.8.2)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.2)
activemodel (3.1.1)
activesupport (= 3.1.1)
sprockets (~> 2.2.1)
activemodel (3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
arel (~> 2.2.1)
activerecord (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
activesupport (3.1.1)
activeresource (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
addressable (2.2.6)
archive-tar-minitar (0.5.2)
arel (2.2.1)
addressable (2.3.4)
arel (3.0.2)
bcrypt-ruby (3.0.1)
builder (3.0.0)
builder (3.0.4)
cancan (1.6.7)
capybara (1.1.1)
mime-types (>= 1.16)
Expand All @@ -48,7 +46,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.1.2)
columnize (0.3.4)
columnize (0.3.6)
css3buttons (1.0.1)
actionpack (>= 3.0.0)
cucumber (1.1.1)
Expand All @@ -62,15 +60,29 @@ GEM
cucumber (>= 1.1.1)
nokogiri (>= 1.5.0)
database_cleaner (0.6.7)
devise (1.4.9)
debugger (1.6.0)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.2.1)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.2.2)
devise (2.2.4)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
diff-lcs (1.1.3)
orm_adapter (~> 0.1)
railties (~> 3.1)
warden (~> 1.2.1)
diff-lcs (1.2.4)
erubis (2.7.0)
excon (0.23.0)
execjs (1.2.9)
multi_json (~> 1.0)
factory_girl (4.1.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.1.0)
factory_girl (~> 4.1.0)
railties (>= 3.0.0)
ffi (1.0.9)
geocoder (1.1.8)
gherkin (2.6.2)
json (>= 1.4.6)
googlecharts (1.6.8)
Expand All @@ -79,114 +91,116 @@ GEM
guard-coffeescript (0.5.2)
coffee-script (>= 2.2.0)
guard (>= 0.8.3)
haml (3.1.3)
heroku (2.11.1)
haml (4.0.3)
tilt
heroku (2.39.4)
heroku-api (~> 0.3.7)
launchy (>= 0.3.2)
netrc (~> 0.7.7)
rest-client (~> 1.6.1)
rubyzip
term-ansicolor (~> 1.0.5)
hike (1.2.1)
i18n (0.6.0)
heroku-api (0.3.12)
excon (~> 0.23.0)
hike (1.2.2)
i18n (0.6.1)
jasmine (1.1.2)
jasmine-core (>= 1.1.0)
rack (>= 1.1)
rspec (>= 1.3.1)
selenium-webdriver (>= 0.1.3)
jasmine-core (1.1.0)
journey (1.0.4)
jquery-rails (1.0.16)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.1)
json (1.8.0)
json_pure (1.6.1)
launchy (2.0.5)
addressable (~> 2.2.6)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
mail (2.3.0)
i18n (>= 0.4.0)
launchy (2.3.0)
addressable (~> 2.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.3)
mime-types (1.23)
mongoid (3.1.4)
activemodel (~> 3.2)
moped (~> 1.4)
origin (~> 1.0)
tzinfo (~> 0.3.22)
moped (1.5.0)
multi_json (1.7.3)
netrc (0.7.7)
nokogiri (1.5.0)
orm_adapter (0.0.5)
origin (1.1.0)
orm_adapter (0.4.0)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.1)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack-ssl (1.3.3)
rack
rack-test (0.6.1)
rack-test (0.6.2)
rack (>= 1.0)
rails (3.1.1)
actionmailer (= 3.1.1)
actionpack (= 3.1.1)
activerecord (= 3.1.1)
activeresource (= 3.1.1)
activesupport (= 3.1.1)
rails (3.2.13)
actionmailer (= 3.2.13)
actionpack (= 3.2.13)
activerecord (= 3.2.13)
activeresource (= 3.2.13)
activesupport (= 3.2.13)
bundler (~> 1.0)
railties (= 3.1.1)
railties (3.1.1)
actionpack (= 3.1.1)
activesupport (= 3.1.1)
railties (= 3.2.13)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.11)
thor (>= 0.14.6, < 2.0)
rake (10.0.4)
rdoc (3.12.2)
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.7.0)
rspec-core (~> 2.7.0)
rspec-expectations (~> 2.7.0)
rspec-mocks (~> 2.7.0)
rspec-core (2.7.1)
rspec-expectations (2.7.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.7.0)
rspec-rails (2.7.0)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.7.0)
ruby-debug-base19 (0.11.25)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby_core_source (>= 0.1.4)
ruby-debug19 (0.11.6)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby-debug-base19 (>= 0.11.19)
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
rubyzip (0.9.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)
rspec-rails (2.13.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rubyzip (0.9.9)
sass (3.1.10)
selenium-webdriver (2.10.0)
childprocess (>= 0.2.1)
ffi (= 1.0.9)
json_pure
rubyzip
sprockets (2.0.3)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.4)
term-ansicolor (1.0.7)
term-ansicolor (1.2.2)
tins (~> 0.8)
therubyracer-heroku (0.8.1.pre3)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tilt (1.4.1)
tins (0.8.0)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.30)
tzinfo (0.3.37)
uglifier (1.0.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
warden (1.0.6)
warden (1.2.1)
rack (>= 1.0)
xpath (0.1.4)
nokogiri (~> 1.3)
Expand All @@ -201,19 +215,21 @@ DEPENDENCIES
cucumber (~> 1.0)
cucumber-rails (~> 1.0)
database_cleaner
devise
debugger
devise (>= 2.2)
factory_girl_rails (>= 4.1)
geocoder
googlecharts
guard
guard-coffeescript
haml
heroku
jasmine (~> 1)
jquery-rails
rails (~> 3.1)
rspec (~> 2.6)
rspec-rails (~> 2.6)
ruby-debug19
mongoid (>= 3.1)
rails (~> 3.2)
rspec
rspec-rails
sass
sqlite3
therubyracer-heroku (= 0.8.1.pre3)
uglifier
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2011-2013 Simon Funke, Peter Hamilton, Kushal Pisavadia and
Florian Rathgeber

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading