Commit c2615229 by tady

環境変数を整理

parent 20408159
#!/bin/sh
# SET YOUR ENV HERE.
export GOOGLE_CLIENT_ID="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com"
export GOOGLE_CLIENT_SECRET="xxxxxxxxxxxxxxxxxxxxxxxx"
export DB_TEST_USER="user"
export DB_TEST_PASS="pass"
export DB_DEVELOPMENT_USER="user"
export DB_DEVELOPMENT_PASS="pass"
...@@ -23,6 +23,5 @@ ...@@ -23,6 +23,5 @@
/db/*.sql /db/*.sql
# secret files # secret files
.env
/config/database.yml /config/database.yml
/config/settings.yml /config/settings.yml
# SQLite version 3.x # Read Me
# gem install sqlite3 # Copy this file to `database.yml` when you run first development.
# # $ cp config/detabase.yml.example config/database.yml
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development: development:
adapter: mysql2 adapter: mysql2
encoding: utf8 encoding: utf8
...@@ -13,14 +12,6 @@ development: ...@@ -13,14 +12,6 @@ development:
password: <%= ENV['DB_DEVELOPMENT_PASS'] %> password: <%= ENV['DB_DEVELOPMENT_PASS'] %>
host: <%= ENV['DB_DEVELOPMENT_HOST'] %> host: <%= ENV['DB_DEVELOPMENT_HOST'] %>
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
# test:
# adapter: sqlite3
# database: db/test.sqlite3
# pool: 5
# timeout: 5000
test: test:
adapter: mysql2 adapter: mysql2
encoding: utf8 encoding: utf8
......
# Read Me
# Copy this file to `settings.yml` when you run first development.
# $ cp config/settings.yml.example config/settings.yml
defaults: &defaults defaults: &defaults
google_api: google_api:
client_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com" client_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com"
......
...@@ -9,23 +9,23 @@ describe RV::Mailer do ...@@ -9,23 +9,23 @@ describe RV::Mailer do
let(:post) { Post.create title: 'ruby rspec', body: 'This is first espec test: ruby' } let(:post) { Post.create title: 'ruby rspec', body: 'This is first espec test: ruby' }
it 'valid' do it 'valid' do
expect { klass.compose_mail(post, user: alice, to: 'dummy@example.com') }.not_to raise_error(ArgumentError) expect { klass.compose_mail(post, user: alice, to: 'dummy@example.com') }.not_to raise_error
end end
it 'missing post' do it 'missing post' do
expect { klass.compose_mail(nil, user: alice, to: 'dummy@example.com') }.to raise_error(ArgumentError) expect { klass.compose_mail(nil, user: alice, to: 'dummy@example.com') }.to raise_error
end end
it 'missing user' do it 'missing user' do
expect { klass.compose_mail(post, user: nil, to: 'dummy@example.com') }.to raise_error(ArgumentError) expect { klass.compose_mail(post, user: nil, to: 'dummy@example.com') }.to raise_error
end end
it 'missing to' do it 'missing to' do
expect { klass.compose_mail(post, user: alice, to: nil) }.to raise_error(ArgumentError) expect { klass.compose_mail(post, user: alice, to: nil) }.to raise_error
end end
it 'invalid to' do it 'invalid to' do
expect { klass.compose_mail(post, user: alice, to: 'invalid.email') }.to raise_error(ArgumentError) expect { klass.compose_mail(post, user: alice, to: 'invalid.email') }.to raise_error
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment