Permalink
Browse files

Added aws env variables to travis config and updated rails helper con…

…fig.
  • Loading branch information...
1 parent 42f6702 commit 04ae2d3ad9965b162f7b8b3d4f055b9df4fda255 @Jellyfishboy committed Oct 6, 2016
Showing with 30 additions and 26 deletions.
  1. +26 −22 .travis.yml
  2. +4 −4 spec/rails_helper.rb
View
@@ -1,30 +1,34 @@
language: ruby
sudo: false
rvm:
- - 2.3.0
+- 2.3.0
env:
- global:
- - CODACY_PROJECT_TOKEN=ca837d25b0ac46e9975430b6ac12ac9d
- matrix:
- - DB=mysql
- - DB=postgresql
+ global:
+ - CODACY_PROJECT_TOKEN=ca837d25b0ac46e9975430b6ac12ac9d
+ - secure: ECJdRs9lFU2NNDxO0gljTJcums5hOCfSzog0Jo1qoEVIow/CZ6D56+AyHheqNvD3X82SzJ9x636qWWsYPS1oahpXswxAM9sBXVUYi7UlHX1Vh+gT5thflkLMXYb9tzEpIHaP8qA/i9Wx5tdkTSn7CEQ0/qodhlStXo2XPxG3b/8=
+ - secure: M30x43XBjGpJNQF1un0wdw7ceiu6F7fkOY/HRNb1nQ4Tf4EF5YPag7ake9bVpKr3hh7P2b/sySre4J5lEfpf87Moj4FHJ8+dChMXzOUEAH3Opv/o28VU8fj8uJ+R9QOZ8vLWyGO/ou6FbVZBSt9/h9LHtLk3Gmu4uUTLAxhKMaM=
+ - secure: FRwu+3wwhHzQwViWSBB0JWgChfRiM8qZE68apbzDE2jEnXQOLePINsSeKEz4nVrJBhayaPk8bWXpR2QS3KP59pS3qEqhFQ+9HZ6QyqAHE8Fdsy/PpKtOQmR6eQYHt7bFNPHP4JwEZ/LRBdELGGJBWPxKLfnHWpE2pbS3L28H/ro=
+ - secure: F184fRa3DkbKAQ506Q0OL9pYkK71guNxsnE6ZPlJF8l/xTQNollegL6vzCvuWicDbvBqJ1M71fvGmil1q3xCnWKzxgLaTNuBcaAOkGdy/KSY/ztTVhGjUvKxqZSy8AhWJ/Q726yne4XBrUt6DBBAoAF5a4UK/jMIKMgNgmrTvuc=
+ matrix:
+ - DB=mysql
+ - DB=postgresql
branches:
- only:
- - master
+ only:
+ - master
services:
- - redis-server
- - memcached
+- redis-server
+- memcached
script:
- - RAILS_ENV=test bundle exec rake db:schema:load --trace
- - bundle exec rake db:test:prepare
- - bundle exec rspec spec/
+- RAILS_ENV=test bundle exec rake db:schema:load --trace
+- bundle exec rake db:test:prepare
+- bundle exec rspec spec/
before_script:
- - cp config/database.travis.yml config/database.yml
- - cp config/secrets.example.yml config/secrets.yml
- - mysql -e 'create database trado_test_db'
- - psql -c 'create database trado_test_db' -U postgres
- - npm install bower -g
- - bower install
- - export DISPLAY=:99.0
- - sh -e /etc/init.d/xvfb start
- - sleep 3
+- cp config/database.travis.yml config/database.yml
+- cp config/secrets.example.yml config/secrets.yml
+- mysql -e 'create database trado_test_db'
+- psql -c 'create database trado_test_db' -U postgres
+- npm install bower -g
+- bower install
+- export DISPLAY=:99.0
+- sh -e /etc/init.d/xvfb start
+- sleep 3
@@ -17,11 +17,11 @@
Sidekiq::Testing.fake!
Capybara::Screenshot.s3_configuration = {
s3_client_credentials: {
- access_key_id: Rails.application.secrets.aws_s3_id,
- secret_access_key: Rails.application.secrets.aws_s3_key,
- region: Rails.application.secrets.aws_s3_region
+ access_key_id: ENV['AWS_S3_ID'],
+ secret_access_key: ENV['AWS_S3_KEY'],
+ region: ENV['AWS_REGION']
},
- bucket_name: "trado-test-screenshots"
+ bucket_name: ENV['AWS_BUCKET']
}
Capybara::Screenshot.prune_strategy = :keep_last_run

0 comments on commit 04ae2d3

Please sign in to comment.