mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
fixed travis issues
This commit is contained in:
parent
945b4aac60
commit
1255088ff0
7 changed files with 13 additions and 19 deletions
|
|
@ -25,4 +25,5 @@ before_script:
|
||||||
- RAILS_ENV=test bundle exec rake db:migrate --trace
|
- RAILS_ENV=test bundle exec rake db:migrate --trace
|
||||||
script:
|
script:
|
||||||
- 'bundle exec rubocop -Dc .rubocop.yml'
|
- 'bundle exec rubocop -Dc .rubocop.yml'
|
||||||
|
- "bundle exec rake factory_girl:lint RAILS_ENV='test'"
|
||||||
- 'bundle exec rspec --color --format documentation'
|
- 'bundle exec rspec --color --format documentation'
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ There are a couple of environment variables you can set to configure OSEM.
|
||||||
| OSEM_TRANSIFEX_APIKEY | *string* | Use this api key for [transifex](https://www.transifex.com/). See TRANSLATION.md for details. |
|
| OSEM_TRANSIFEX_APIKEY | *string* | Use this api key for [transifex](https://www.transifex.com/). See TRANSLATION.md for details. |
|
||||||
| OSEM_ERRBIT_HOST | errbit.opensuse.org | The [errbit](https://github.com/errbit/errbit) host to post exceptions to |
|
| OSEM_ERRBIT_HOST | errbit.opensuse.org | The [errbit](https://github.com/errbit/errbit) host to post exceptions to |
|
||||||
| OSEM_ERRBIT_APIKEY | *string* | The api key for the errbit host |
|
| OSEM_ERRBIT_APIKEY | *string* | The api key for the errbit host |
|
||||||
| OSEM_FACTORY_LINT | *boolean* (true/false) | Setting this to false will disable linting of factories before running spec
|
|
||||||
| OSEM_GOOGLE_KEY | *string* | OMNIAUTH Developer Key for GOOGLE
|
| OSEM_GOOGLE_KEY | *string* | OMNIAUTH Developer Key for GOOGLE
|
||||||
| OSEM_GOOGLE_SECRET | *string* | OMNIAUTH Developer Secret for GOOGLE
|
| OSEM_GOOGLE_SECRET | *string* | OMNIAUTH Developer Secret for GOOGLE
|
||||||
| OSEM_FACEBOOK_KEY | *string* | OMNIAUTH Developer Key for Facebook
|
| OSEM_FACEBOOK_KEY | *string* | OMNIAUTH Developer Key for Facebook
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,6 @@ OSEM_GITHUB_SECRET=''
|
||||||
STRIPE_PUBLISHABLE_KEY=''
|
STRIPE_PUBLISHABLE_KEY=''
|
||||||
STRIPE_SECRET_KEY=''
|
STRIPE_SECRET_KEY=''
|
||||||
|
|
||||||
# Disable linting of factories in the test suite.
|
|
||||||
# Speeds up turn around times of tests
|
|
||||||
OSEM_FACTORY_LINT="false"
|
|
||||||
|
|
||||||
# The smtp configuration. See the rails guides for more
|
# The smtp configuration. See the rails guides for more
|
||||||
# http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
|
# http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
|
||||||
OSEM_SMTP_ADDRESS=""
|
OSEM_SMTP_ADDRESS=""
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
require_relative '../../spec/support/external_request'
|
||||||
namespace :factory_girl do
|
namespace :factory_girl do
|
||||||
desc "Verify that all FactoryGirl factories are valid"
|
desc "Verify that all FactoryGirl factories are valid"
|
||||||
task lint: :environment do
|
task lint: :environment do
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ namespace :data do
|
||||||
dot_env.puts "OSEM_ICHAIN_ENABLED=\"#{CONFIG['authentication']['ichain']['enabled']}\"" if CONFIG.has_key?(:authentication)
|
dot_env.puts "OSEM_ICHAIN_ENABLED=\"#{CONFIG['authentication']['ichain']['enabled']}\"" if CONFIG.has_key?(:authentication)
|
||||||
dot_env.puts "OSEM_TRANSIFEX_APIKEY=\"#{CONFIG['transifex_live_api_key']}\""
|
dot_env.puts "OSEM_TRANSIFEX_APIKEY=\"#{CONFIG['transifex_live_api_key']}\""
|
||||||
dot_env.puts "OSEM_ERRBIT_HOST=\"#{CONFIG['errbit_host']}\""
|
dot_env.puts "OSEM_ERRBIT_HOST=\"#{CONFIG['errbit_host']}\""
|
||||||
dot_env.puts "OSEM_FACTORY_LINT=\"#{CONFIG['factory_girl_lint']}\""
|
|
||||||
dot_env.puts "OSEM_SMTP_ADDRESS=\"#{CONFIG['mail_address']}\""
|
dot_env.puts "OSEM_SMTP_ADDRESS=\"#{CONFIG['mail_address']}\""
|
||||||
dot_env.puts "OSEM_SMTP_PORT=\"#{CONFIG['mail_port']}\""
|
dot_env.puts "OSEM_SMTP_PORT=\"#{CONFIG['mail_port']}\""
|
||||||
dot_env.puts "OSEM_SMTP_USERNAME=\"#{CONFIG['mail_username']}\""
|
dot_env.puts "OSEM_SMTP_USERNAME=\"#{CONFIG['mail_username']}\""
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
RSpec.configure do |config|
|
RSpec.configure do |config|
|
||||||
config.before(:each) do
|
config.before(:suite) do
|
||||||
DatabaseCleaner.clean_with(:truncation)
|
DatabaseCleaner.clean_with(:truncation)
|
||||||
Rails.application.load_seed
|
Rails.application.load_seed
|
||||||
end
|
end
|
||||||
|
|
||||||
|
config.before(:each) do |example|
|
||||||
|
DatabaseCleaner.strategy = (example.metadata[:js] == true) ? :truncation : :transaction
|
||||||
|
DatabaseCleaner.start
|
||||||
|
end
|
||||||
|
|
||||||
|
config.after(:each) do |example|
|
||||||
|
DatabaseCleaner.clean
|
||||||
|
Rails.application.load_seed if example.metadata[:js] == true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
require_relative 'external_request'
|
|
||||||
|
|
||||||
RSpec.configure do |config|
|
|
||||||
|
|
||||||
config.before(:suite) do
|
|
||||||
if ENV['OSEM_FACTORY_LINT'] != 'false'
|
|
||||||
mock_commercial_request
|
|
||||||
FactoryGirl.lint
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue