Skip to content

Commit

Permalink
Merge pull request #60 from sul-dlss/db
Browse files Browse the repository at this point in the history
Adds prod db config for AWS deploy
  • Loading branch information
Jessie Keck committed Aug 8, 2017
2 parents 313b9b7 + f2fe33a commit d9ef838
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ coverage
#Ignore all data files
data/*
!data/.keep

.ruby-version
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ GEM
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.0.0)
rdoc (4.2.0)
rdoc (4.3.0)
ref (2.0.0)
responders (2.3.0)
railties (>= 4.2.0, < 5.1)
Expand Down Expand Up @@ -398,4 +398,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
1.14.6
1.15.1
9 changes: 7 additions & 2 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@ test:
database: db/test.sqlite3

production:
<<: *default
database: db/production.sqlite3
adapter: mysql2
encoding: utf8
database: <%= ENV['RDS_DB_NAME'] %>
username: <%= ENV['RDS_USERNAME'] %>
password: <%= ENV['RDS_PASSWORD'] %>
host: <%= ENV['RDS_HOSTNAME'] %>
port: <%= ENV['RDS_PORT'] %>
2 changes: 1 addition & 1 deletion spec/controllers/manuscript_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
end
before do
response1 = File.open("#{::Rails.root}/spec/fixtures/iiif_manifest_records/manifest_001.json").read
stub_request(:get, 'http://dms-data.stanford.edu/data/manifests/Stanford/kq131cs7229/manifest.json')
stub_request(:get, 'https://dms-data.stanford.edu/data/manifests/Stanford/kq131cs7229/manifest.json')
.with(headers: { 'Accept' => '*/*', 'User-Agent' => 'Ruby' })
.to_return(status: 200, body: response1, headers: {})
get :show, params: { id: 'kq131cs7229' }
Expand Down
2 changes: 1 addition & 1 deletion spec/features/bookmark_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
end
it 'should add and remove bookmarks from manuscript' do
response1 = File.open("#{::Rails.root}/spec/fixtures/iiif_manifest_records/manifest_001.json").read
stub_request(:get, 'http://dms-data.stanford.edu/data/manifests/Stanford/kq131cs7229/manifest.json')
stub_request(:get, 'https://dms-data.stanford.edu/data/manifests/Stanford/kq131cs7229/manifest.json')
.with(headers: { 'Accept' => '*/*', 'User-Agent' => 'Ruby' })
.to_return(status: 200, body: response1, headers: {})
# Page isn't getting loaded
Expand Down
2 changes: 1 addition & 1 deletion spec/features/manuscript_navbar_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
describe 'Manuscript nav bar', type: :feature, js: true do
it 'should have set the active navigation element' do
response1 = File.open("#{::Rails.root}/spec/fixtures/iiif_manifest_records/manifest_002.json").read
stub_request(:get, 'http://dms-data.stanford.edu/data/manifests/BnF/jr903ng8662/manifest.json')
stub_request(:get, 'https://dms-data.stanford.edu/data/manifests/BnF/jr903ng8662/manifest.json')
.with(headers: { 'Accept' => '*/*', 'User-Agent' => 'Ruby' })
.to_return(status: 200, body: response1, headers: {})
visit '/manuscript/jr903ng8662'
Expand Down

0 comments on commit d9ef838

Please sign in to comment.