Skip to content

Commit ec61886

Browse files
committed
Merge pull request #147 from codeforamerica/postgres
Mongo to Postgres migration
2 parents 2917260 + e08b517 commit ec61886

File tree

113 files changed

+2928
-1388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+2928
-1388
lines changed

.gitignore

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
# See http://help.github.com/ignore-files/ for more about ignoring files.
1+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
22
#
33
# If you find yourself ignoring temporary files generated by your text editor
44
# or operating system, you probably want to add a global ignore instead:
5-
# git config --global core.excludesfile ~/.gitignore_global
5+
# git config --global core.excludesfile '~/.gitignore_global'
66

7-
# Ignore bundler config
7+
# Ignore bundler config.
88
/.bundle
99

1010
# Ignore the default SQLite database.
1111
/db/*.sqlite3
12+
/db/*.sqlite3-journal
1213

1314
# Ignore all logfiles and tempfiles.
1415
/log/*
@@ -46,3 +47,6 @@ dump.rdb
4647

4748
script/backup_mongo
4849
script/import_to_staging
50+
51+
# Zeus
52+
.zeus.sock

.travis.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ before_install: gem update bundler
22
bundler_args: --without assets:development:production
33
language: ruby
44
rvm:
5-
- 2.1.1
5+
- 2.1.1
6+
addons:
7+
postgresql: "9.3"
68
services:
7-
- mongodb
8-
- redis-server
9-
- elasticsearch
9+
- redis-server
10+
- elasticsearch
1011
before_script:
11-
- rake db:mongoid:create_indexes
12+
- psql -c 'create database ohana_api_test;' -U postgres
13+
- cp config/database.travis.yml config/database.yml
14+
- rake db:schema:load
15+
- rake db:test:load
1216
notifications:
1317
campfire:
1418
rooms:

Gemfile

+21-23
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
source 'https://rubygems.org'
22

33
ruby '2.1.1'
4-
gem 'rails', '3.2.17'
4+
gem 'rails', '~> 4.0.4'
55

6-
group :assets do
7-
gem 'sass-rails', '~> 3.2.3'
8-
gem 'coffee-rails', '~> 3.2.1'
9-
gem 'uglifier', '>= 1.0.3'
10-
end
6+
gem "pg"
7+
8+
gem 'sass-rails', '~> 4.0.2'
9+
gem 'coffee-rails', '~> 4.0.0'
10+
gem 'uglifier', '>= 1.3.0'
11+
gem 'bootstrap-sass'
12+
13+
# Rails 4
14+
gem 'protected_attributes'
15+
#gem 'rails-observers'
16+
#gem 'rails-perftest'
1117

1218
# Front end
1319
gem 'jquery-rails'
14-
gem 'bootstrap-sass'
15-
gem "haml-rails", ">= 0.4"
20+
gem "haml-rails", '~> 0.5.3'
1621

1722
# Server for deployment
1823
gem "passenger"
@@ -21,23 +26,18 @@ group :production, :staging do
2126
gem 'rails_12factor' # Heroku recommended
2227
end
2328

24-
# Test coverage
25-
gem 'coveralls', require: false
26-
27-
# MongoDB ORM
28-
gem "mongoid", ">= 3.1.2"
29-
3029
group :test, :development do
31-
# Testing with Rspec
32-
gem "rspec-rails", ">= 2.12.2"
30+
gem "rspec-rails", '~> 2.14.2'
3331
gem "factory_girl_rails", ">= 4.2.0"
3432
end
3533

3634
group :test do
37-
# Testing with Rspec and Mongoid
3835
gem "database_cleaner", ">= 1.0.0.RC1"
39-
gem "mongoid-rspec", ">= 1.7.0"
4036
gem "capybara"
37+
#gem "minitest"
38+
gem 'shoulda-matchers'
39+
# Test coverage
40+
gem 'coveralls', require: false
4141
end
4242

4343
group :development do
@@ -57,7 +57,7 @@ gem "geocoder", :git => "git://github.com/alexreisner/geocoder.git", :ref => "35
5757
gem "redis"
5858

5959
# Format validation for URLs, phone numbers, zipcodes
60-
gem "validates_formatting_of"
60+
gem "validates_formatting_of", '~> 0.8.1'
6161

6262
# CORS support
6363
gem 'rack-cors', :require => 'rack/cors'
@@ -98,8 +98,6 @@ gem "figaro"
9898
gem "tire", :git => "git://github.com/monfresh/tire.git", :ref => "2d174e792a"
9999

100100
# Nested categories for OpenEligibility
101-
gem "glebtv-mongoid_nested_set"
102-
103-
gem 'mongoid_time_field'
101+
gem "ancestry"
104102

105-
gem 'mongoid_slug'
103+
gem "friendly_id", "~> 5.0.3"

0 commit comments

Comments
 (0)