Commit ba869eb36522034b60d819fb4d83bd0b0a751033
Committed by
Daniela Feitosa
1 parent
c5ec52ba
Exists in
master
and in
29 other branches
Fix cucumber installation and tests
Now cucumber gems should install fine with RAILS_ENV=cucumber gems:install in Debian Lenny and its task start/stop solr
Showing
6 changed files
with
22 additions
and
16 deletions
Show diff stats
app/helpers/application_helper.rb
config/environments/cucumber.rb
... | ... | @@ -21,9 +21,8 @@ config.action_mailer.delivery_method = :test |
21 | 21 | |
22 | 22 | config.gem 'cucumber', :lib => false, :version => '0.4.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber')) |
23 | 23 | config.gem 'webrat', :lib => false, :version => '0.5.1' unless File.directory?(File.join(Rails.root, 'vendor/plugins/webrat')) |
24 | -config.gem 'rspec', :lib => 'spec', :version => '>=1.2.8' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec')) | |
25 | -config.gem 'rspec-rails', :lib => 'spec/rails', :version => '>=1.2.7.1' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails')) | |
26 | -config.gem 'Selenium', :lib => 'selenium', :version => '>= 1.1.14' unless File.directory?(File.join(Rails.root, 'vendor/plugins/selenium')) | |
27 | -config.gem 'selenium-client', :lib => 'selenium/client', :version => '>= 1.2.17' unless File.directory?(File.join(Rails.root, 'vendor/plugins/selenium-client')) | |
24 | +config.gem 'rspec', :lib => 'spec', :version => '=1.2.8' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec')) | |
25 | +config.gem 'rspec-rails', :lib => 'spec/rails', :version => '1.2.7.1' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails')) | |
26 | +config.gem 'Selenium', :lib => 'selenium', :version => '1.1.14' unless File.directory?(File.join(Rails.root, 'vendor/plugins/selenium')) | |
27 | +config.gem 'selenium-client', :lib => 'selenium/client', :version => '1.2.17' unless File.directory?(File.join(Rails.root, 'vendor/plugins/selenium-client')) | |
28 | 28 | config.gem 'database_cleaner', :lib => 'database_cleaner' |
29 | - | ... | ... |
config/solr.yml.dist
... | ... | @@ -3,15 +3,18 @@ |
3 | 3 | # If you change the host or port number here, make sure you update |
4 | 4 | # them in your Solr config file |
5 | 5 | |
6 | -development: | |
7 | - url: http://0.0.0.0:8982/solr | |
8 | - jvm_options: -server -Xmx64M -Xms16M | |
9 | - | |
10 | 6 | production: |
11 | 7 | url: http://127.0.0.1:8983/solr |
12 | 8 | jvm_options: -server -Xmx512M -Xms64M |
13 | 9 | |
10 | +development: | |
11 | + url: http://0.0.0.0:8982/solr | |
12 | + jvm_options: -server -Xmx64M -Xms16M | |
13 | + | |
14 | 14 | test: |
15 | 15 | url: http://0.0.0.0:8981/solr |
16 | 16 | jvm_options: -server -Xmx32M -Xms16M |
17 | 17 | |
18 | +cucumber: | |
19 | + url: http://0.0.0.0:8980/solr | |
20 | + jvm_options: -server -Xmx32M -Xms16M | ... | ... |
lib/tasks/cucumber.rake
... | ... | @@ -11,9 +11,11 @@ begin |
11 | 11 | vendored_cucumber_binary = Dir["#{RAILS_ROOT}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first |
12 | 12 | |
13 | 13 | namespace :cucumber do |
14 | - Cucumber::Rake::Task.new({:solr_start => 'solr:start'}, 'Run solr before') do |t| | |
14 | + task :solr_start do | |
15 | + ENV['RAILS_ENV'] = 'cucumber' | |
16 | + Rake::Task['solr:stop'].invoke | |
17 | + Rake::Task['solr:download'].invoke | |
15 | 18 | Rake::Task['solr:start'].invoke |
16 | -# ENV['RAILS_ENV'] = 'cucumber' | |
17 | 19 | end |
18 | 20 | |
19 | 21 | Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t| |
... | ... | @@ -34,7 +36,9 @@ begin |
34 | 36 | t.cucumber_opts = "--color -p selenium --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}" |
35 | 37 | end |
36 | 38 | |
37 | - Cucumber::Rake::Task.new({:solr_stop => 'solr:stop'}, 'Run solr after') do |t| | |
39 | + task :solr_stop do | |
40 | + ENV['RAILS_ENV'] = 'cucumber' | |
41 | + Rake::Task['solr:stop'].invoke | |
38 | 42 | end |
39 | 43 | |
40 | 44 | desc 'Run all features' |
... | ... | @@ -42,7 +46,7 @@ begin |
42 | 46 | end |
43 | 47 | end |
44 | 48 | desc 'Alias for cucumber:ok' |
45 | - task :cucumber => 'cucumber:ok' | |
49 | + task :cucumber => ['cucumber:solr_start', 'cucumber:ok', 'cucumber:solr_stop'] | |
46 | 50 | |
47 | 51 | task :features => :cucumber do |
48 | 52 | STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***" | ... | ... |
vendor/plugins/access_control/init.rb
vendor/plugins/access_control/lib/permission_name_helper.rb