Skip to content

Commit

Permalink
Travis-ci: Use root DB user, enable searchd
Browse files Browse the repository at this point in the history
  • Loading branch information
hennevogel committed Jul 21, 2017
1 parent 96f12d9 commit 5637752
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 19 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Expand Up @@ -3,16 +3,15 @@ rvm:
- 2.1.2
services:
- mysql
branches:
only:
- master
notifications:
email:
on_success: change
on_failure: change
before_install:
- "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
- 'wget -nv http://sphinxsearch.com/files/dicts/en.pak'
- 'sudo apt-get -qq update'
- 'sudo apt-get install sphinxsearch'
before_script:
- RAILS_ENV=test bundle exec rake dev:bootstrap --trace
script:
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Expand Up @@ -134,7 +134,7 @@ GEM
ruby_parser (~> 3.5)
http-cookie (1.0.2)
domain_name (~> 0.5)
i18n (0.7.0)
i18n (0.8.6)
innertube (1.1.0)
joiner (0.3.4)
activerecord (>= 4.1.0)
Expand All @@ -159,7 +159,7 @@ GEM
mime-types (2.99.3)
mimemagic (0.3.0)
mini_portile2 (2.1.0)
minitest (5.10.1)
minitest (5.10.2)
mousetrap-rails (1.4.6)
multi_json (1.12.1)
mysql2 (0.3.18)
Expand Down Expand Up @@ -230,7 +230,7 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
riddle (1.5.11)
riddle (2.2.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
Expand Down Expand Up @@ -285,19 +285,19 @@ GEM
stringex (2.7.1)
term-ansicolor (1.3.0)
tins (~> 1.0)
thinking-sphinx (3.1.3)
thinking-sphinx (3.3.0)
activerecord (>= 3.1.0)
builder (>= 2.1.2)
innertube (>= 1.0.2)
joiner (>= 0.2.0)
middleware (>= 0.1.0)
riddle (>= 1.5.11)
riddle (>= 2.0.0)
thor (0.19.4)
thread_safe (0.3.5)
thread_safe (0.3.6)
tilt (2.0.5)
timecop (0.7.3)
tins (1.3.5)
tzinfo (1.2.2)
tzinfo (1.2.3)
thread_safe (~> 0.1)
uglifier (3.0.0)
execjs (>= 0.3.0, < 3)
Expand Down
5 changes: 2 additions & 3 deletions config/database.yml.example
@@ -1,16 +1,15 @@
<%
if ENV['TRAVIS']
username = "travis"
password = ''
else
username = "root"
password = "hackweek"
end
%>

vagrant: &vagrant
adapter: mysql2
encoding: utf8
username: <%= username %>
username: root
password: <%= password %>

development:
Expand Down
4 changes: 2 additions & 2 deletions config/thinking_sphinx.yml
@@ -1,6 +1,4 @@
defaults: &defaults
morphology:
- lemmatize_en_all
min_infix_len: 3
mysql41: 9312
pid_file: sphinx/pids/searchd.pid
Expand All @@ -14,4 +12,6 @@ test:
mysql41: 9313
production:
<<: *defaults
morphology:
- lemmatize_en_all
configuration_file: "/srv/www/vhosts/suse.com/hackweek/shared/sphinx/config/production.sphinx.conf"
2 changes: 1 addition & 1 deletion lib/tasks/dev.rake
Expand Up @@ -51,7 +51,7 @@ namespace :dev do
end

desc 'bootstrap development environment'
task bootstrap: %w(copy_sample_configs bundle_install db:create db:setup db:seed require_searchd ts:regenerate ts:index) do
task bootstrap: %w(copy_sample_configs bundle_install db:create db:setup db:seed require_searchd ts:regenerate ts:rebuild) do
puts "\n\nCongrats! You should be all set.".green
puts "\nHappy Hacking!".green
end
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/projects_controller_spec.rb
Expand Up @@ -127,7 +127,7 @@
end
end

describe 'DELETE destroy' do
describe 'DELETE destroy', search: true do
it 'destroys the requested project' do
project = create(:project)
expect {
Expand Down
2 changes: 1 addition & 1 deletion spec/features/project_management_spec.rb
Expand Up @@ -42,7 +42,7 @@
expect(page).to have_text(description)
end

scenario 'User deletes a project' do
scenario 'User deletes a project', search: true do
project = create(:idea, originator: user)

visit project_path(nil, project)
Expand Down
2 changes: 1 addition & 1 deletion spec/models/project_spec.rb
Expand Up @@ -111,7 +111,7 @@
end
end

describe 'destroy' do
describe 'destroy', search: true do
it 'deletes associated comments' do
project = create :project, :with_comments
project.destroy!
Expand Down

0 comments on commit 5637752

Please sign in to comment.