blacklight 3.0.0pre6 → 3.0.0pre7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. data/Rakefile +1 -0
  2. data/VERSION +1 -1
  3. data/app/controllers/bookmarks_controller.rb +1 -0
  4. data/app/controllers/feedback_controller.rb +1 -0
  5. data/app/controllers/folder_controller.rb +11 -10
  6. data/app/controllers/saved_searches_controller.rb +1 -0
  7. data/app/controllers/search_history_controller.rb +1 -0
  8. data/app/helpers/blacklight_helper.rb +1 -0
  9. data/app/helpers/bookmarks_helper.rb +2 -1
  10. data/app/helpers/catalog_helper.rb +23 -10
  11. data/app/helpers/feedback_helper.rb +1 -0
  12. data/app/helpers/hash_as_hidden_fields.rb +1 -0
  13. data/app/helpers/render_constraints_helper.rb +1 -0
  14. data/app/helpers/saved_searches_helper.rb +1 -0
  15. data/app/helpers/search_history_helper.rb +2 -1
  16. data/app/models/bookmark.rb +2 -1
  17. data/app/models/record_mailer.rb +1 -0
  18. data/app/models/search.rb +2 -1
  19. data/app/views/catalog/_opensearch_response_metadata.html.erb +3 -2
  20. data/app/views/catalog/_results_pagination.html.erb +3 -3
  21. data/app/views/kaminari/blacklight/_page.html.erb +1 -1
  22. data/blacklight.gemspec +2 -20
  23. data/config/routes.rb +1 -0
  24. data/db/seeds.rb +1 -0
  25. data/install.rb +1 -0
  26. data/lib/blacklight.rb +1 -0
  27. data/lib/blacklight/catalog.rb +1 -0
  28. data/lib/blacklight/comma_link_renderer.rb +1 -0
  29. data/lib/blacklight/configurable.rb +1 -0
  30. data/lib/blacklight/controller.rb +1 -0
  31. data/lib/blacklight/engine.rb +1 -0
  32. data/lib/blacklight/exceptions.rb +1 -0
  33. data/lib/blacklight/routes.rb +1 -0
  34. data/lib/blacklight/search_fields.rb +1 -0
  35. data/lib/blacklight/solr.rb +1 -0
  36. data/lib/blacklight/solr/document.rb +1 -0
  37. data/lib/blacklight/solr/document/dublin_core.rb +1 -0
  38. data/lib/blacklight/solr/document/email.rb +1 -0
  39. data/lib/blacklight/solr/document/marc.rb +1 -0
  40. data/lib/blacklight/solr/document/marc_export.rb +1 -0
  41. data/lib/blacklight/solr/document/sms.rb +1 -0
  42. data/lib/blacklight/solr/facet_paginator.rb +2 -1
  43. data/lib/blacklight/solr_helper.rb +32 -11
  44. data/lib/blacklight/user.rb +1 -0
  45. data/lib/blacklight/version.rb +1 -0
  46. data/lib/colorize.rb +1 -0
  47. data/lib/generators/blacklight/assets_generator.rb +1 -0
  48. data/lib/generators/blacklight/blacklight_generator.rb +10 -0
  49. data/lib/generators/blacklight/jetty_generator.rb +3 -0
  50. data/lib/generators/blacklight/solr_conf_generator.rb +1 -0
  51. data/lib/generators/blacklight/templates/catalog_controller.rb +1 -0
  52. data/lib/generators/blacklight/templates/config/blacklight_config.rb +1 -0
  53. data/lib/generators/blacklight/templates/migrations/add_user_types_to_bookmarks_searches.rb +7 -0
  54. data/lib/generators/blacklight/templates/migrations/create_bookmarks.rb +2 -1
  55. data/lib/generators/blacklight/templates/migrations/create_searches.rb +1 -0
  56. data/lib/generators/blacklight/templates/migrations/remove_editable_fields_from_bookmarks.rb +1 -0
  57. data/lib/generators/blacklight/templates/public/javascripts/blacklight/blacklight.js +1 -0
  58. data/lib/generators/blacklight/templates/public/stylesheets/blacklight/blacklight.css +1 -1
  59. data/lib/generators/blacklight/templates/solr_document.rb +1 -0
  60. data/lib/railties/blacklight_cucumber.rake +3 -2
  61. data/lib/railties/jetty_solr_server.rb +1 -0
  62. data/test_support/bin/test.sh +121 -0
  63. data/test_support/features/search_results.feature +1 -1
  64. data/test_support/features/step_definitions/bookmarks_steps.rb +1 -0
  65. data/test_support/features/step_definitions/error_steps.rb +1 -0
  66. data/test_support/features/step_definitions/folder_steps.rb +1 -0
  67. data/test_support/features/step_definitions/general_steps.rb +1 -0
  68. data/test_support/features/step_definitions/record_view_steps.rb +1 -0
  69. data/test_support/features/step_definitions/saved_searches_steps.rb +1 -0
  70. data/test_support/features/step_definitions/search_facets_steps.rb +1 -0
  71. data/test_support/features/step_definitions/search_history_steps.rb +1 -0
  72. data/test_support/features/step_definitions/search_result_steps.rb +1 -0
  73. data/test_support/features/step_definitions/search_steps.rb +1 -0
  74. data/test_support/features/step_definitions/user_steps.rb +2 -1
  75. data/test_support/features/step_definitions/web_steps.rb +1 -0
  76. data/test_support/features/support/env.rb +5 -0
  77. data/test_support/features/support/paths.rb +1 -0
  78. data/test_support/features/support/selectors.rb +1 -0
  79. data/test_support/spec/controllers/application_controller_spec.rb +1 -0
  80. data/test_support/spec/controllers/catalog_controller_spec.rb +1 -0
  81. data/test_support/spec/controllers/folder_controller_spec.rb +1 -0
  82. data/test_support/spec/controllers/search_history_controller_spec.rb +1 -0
  83. data/test_support/spec/data/sample_docs.yml +1 -1
  84. data/test_support/spec/helpers/blacklight_helper_spec.rb +1 -0
  85. data/test_support/spec/helpers/catalog_helper_spec.rb +1 -0
  86. data/test_support/spec/helpers/hash_as_hidden_fields_spec.rb +1 -0
  87. data/test_support/spec/helpers/render_constraints_helper_spec.rb +1 -0
  88. data/test_support/spec/helpers/search_history_helper_spec.rb +1 -0
  89. data/test_support/spec/helpers/solr_helper_spec.rb +33 -5
  90. data/test_support/spec/lib/blacklight_email_spec.rb +1 -0
  91. data/test_support/spec/lib/blacklight_sms_spec.rb +1 -0
  92. data/test_support/spec/lib/blacklight_solr_document_dublin_core_spec.rb +1 -0
  93. data/test_support/spec/lib/blacklight_solr_document_marc_spec.rb +1 -0
  94. data/test_support/spec/lib/blacklight_solr_document_spec.rb +1 -0
  95. data/test_support/spec/lib/blacklight_spec.rb +1 -0
  96. data/test_support/spec/lib/blacklight_user_spec.rb +1 -0
  97. data/test_support/spec/lib/configurable_spec.rb +1 -0
  98. data/test_support/spec/lib/facet_paginator_spec.rb +1 -0
  99. data/test_support/spec/lib/marc_export_spec.rb +1 -0
  100. data/test_support/spec/lib/search_fields_spec.rb +1 -0
  101. data/test_support/spec/lib/tasks/blacklight_task_spec.rb +1 -0
  102. data/test_support/spec/lib/tasks/solr_marc_task_spec.rb +1 -0
  103. data/test_support/spec/models/bookmark_spec.rb +1 -0
  104. data/test_support/spec/models/record_mailer_spec.rb +1 -1
  105. data/test_support/spec/models/search_spec.rb +1 -0
  106. data/test_support/spec/models/solr_docment_spec.rb +1 -1
  107. data/test_support/spec/spec_helper.rb +1 -0
  108. data/test_support/spec/support/action_controller.rb +1 -0
  109. data/test_support/spec/support/assert_difference.rb +1 -0
  110. data/test_support/spec/support/include_text.rb +1 -0
  111. data/test_support/spec/views/catalog/_constraints_element.html.erb_spec.rb +1 -0
  112. data/test_support/spec/views/catalog/_document_list.html.erb_spec.rb +1 -0
  113. data/test_support/spec/views/catalog/_facets.html.erb_spec.rb +1 -0
  114. data/test_support/spec/views/catalog/_index_partials/_default.erb_spec.rb +1 -0
  115. data/test_support/spec/views/catalog/_show_partials/_default.html.erb_spec.rb +1 -0
  116. data/test_support/spec/views/catalog/index.atom.builder_spec.rb +3 -5
  117. data/test_support/spec/views/catalog/show.html.erb_spec.rb +1 -0
  118. data/test_support/spec/views/catalog/unapi.xml.builder_spec.rb +1 -0
  119. data/uninstall.rb +1 -0
  120. metadata +29 -44
  121. data/features/default_setup.feature +0 -52
  122. data/features/generators.feature +0 -58
  123. data/features/support/aruba.rb +0 -9
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Blacklight::User
2
3
 
3
4
  # This gives us an is_blacklight_user method that can be included in
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Blacklight
2
3
  unless Blacklight.const_defined? :VERSION
3
4
  def self.version
data/lib/colorize.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  # == colorize
2
3
  # http://colorize.rubyforge.org
3
4
  # http://fazibear.prv.pl
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  # Copy Blacklight assets to public folder in current app.
2
3
  # If you want to do this on application startup, you can
3
4
  # add this next line to your one of your environment files --
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'rails/generators'
2
3
  require 'rails/generators/migration'
3
4
 
@@ -25,6 +26,7 @@ This generator makes the following changes to your application:
25
26
  12. Adds Blacklight routes to your ./config/routes.rb
26
27
  Thank you for Installing Blacklight.
27
28
  """
29
+
28
30
  # Implement the required interface for Rails::Generators::Migration.
29
31
  # taken from http://github.com/rails/rails/blob/master/activerecord/lib/generators/active_record.rb
30
32
  def self.next_migration_number(path)
@@ -36,6 +38,14 @@ Thank you for Installing Blacklight.
36
38
  @prev_migration_nr.to_s
37
39
  end
38
40
 
41
+ def check_arguments
42
+ if File.exists?("app/models/#{model_name}.rb") and options[:devise]
43
+ puts "Because you have selected \"#{model_name}\", which is an existing class, you will need to install devise manually and then run this generator without the Devise option. You can find additional information here: https://github.com/plataformatec/devise. \n Please be sure to include a to_s method in #{model_name} that returns the users name or email, as this will be used by Blacklight to provide a link to user specific information."
44
+ exit
45
+ end
46
+ end
47
+
48
+
39
49
  # Content types used by Marc Document extension, possibly among others.
40
50
  # Registering a unique content type with 'register' (rather than
41
51
  # register_alias) will allow content-negotiation for the format.
@@ -1,3 +1,5 @@
1
+ # -*- encoding : utf-8 -*-
2
+ require 'openssl'
1
3
 
2
4
  module Blacklight
3
5
  class Jetty < Rails::Generators::Base
@@ -8,6 +10,7 @@ module Blacklight
8
10
  class_option :environment, :aliases => "-e", :type=>"string", :desc => "environment to use jetty with. Will insert into solr.yml, and also offer to index test data in test environment.", :default => Rails.env
9
11
  # change this to a different download if you want to peg to a different
10
12
  # tagged version of our known-good jetty/solr.
13
+ OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE # (Required by jruby)
11
14
  class_option :download_url, :aliases => "-u", :type=>"string", :default =>"https://github.com/projectblacklight/blacklight-jetty/zipball/v1.4.1-1" , :desc=>"location of zip file including a jetty with solr setup for blacklight."
12
15
  class_option :downloaded_package, :aliases => "-d", :type=>"string", :desc => "manual download of BL-jetty zip file"
13
16
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Blacklight
2
3
  class SolrConf < Rails::Generators::Base
3
4
  source_root File.expand_path('../templates', __FILE__)
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'blacklight/catalog'
2
3
 
3
4
  class CatalogController < ApplicationController
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  # You can configure Blacklight from here.
2
3
  #
3
4
  # Blacklight.configure(:environment) do |config| end
@@ -1,7 +1,14 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  class AddUserTypesToBookmarksSearches < ActiveRecord::Migration
2
3
  def self.up
3
4
  add_column :searches, :user_type, :string
4
5
  add_column :bookmarks, :user_type, :string
6
+ execute <<-SQL
7
+ UPDATE searches set user_type="<%=model_name%>"
8
+ SQL
9
+ execute <<-SQL
10
+ UPDATE bookmarks set user_type="<%=model_name%>"
11
+ SQL
5
12
  end
6
13
 
7
14
  def self.down
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  class CreateBookmarks < ActiveRecord::Migration
2
3
  def self.up
3
4
  create_table :bookmarks do |t|
@@ -14,4 +15,4 @@ class CreateBookmarks < ActiveRecord::Migration
14
15
  drop_table :bookmarks
15
16
  end
16
17
 
17
- end
18
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  class CreateSearches < ActiveRecord::Migration
2
3
  def self.up
3
4
  create_table :searches do |t|
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  class RemoveEditableFieldsFromBookmarks < ActiveRecord::Migration
2
3
  def self.up
3
4
  remove_column :bookmarks, :notes
@@ -259,6 +259,7 @@ $(document).ready(function() {
259
259
 
260
260
  $.ajax({
261
261
  url: form.attr("action"),
262
+ dataType: 'json',
262
263
  type: form.attr("method").toUpperCase(),
263
264
  data: form.serialize(),
264
265
  error: function() {
@@ -165,7 +165,7 @@ ul.facet_extended_list li {list-style:none; margin: 0.5em 0;}
165
165
  #results_text {display: none;}
166
166
 
167
167
 
168
- .page_links a, .page_links span {
168
+ span.page a, span.page.current {
169
169
  margin-right:0.2em;
170
170
  padding:0.2em 0.5em;
171
171
  text-decoration: none;
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  class SolrDocument
2
3
 
3
4
  include Blacklight::Solr::Document
@@ -25,7 +25,7 @@ begin
25
25
  Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
26
26
  # Blacklight customization, call features from external location, pass
27
27
  # in feature location wtih cucumber_opts, yeah it's weird but that's how.
28
- t.cucumber_opts = blacklight_features
28
+ t.cucumber_opts = blacklight_features + " --format progress"
29
29
 
30
30
  t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
31
31
  t.fork = true # You may get faster startup if you set this to false
@@ -53,6 +53,7 @@ begin
53
53
  t.profile = 'rerun'
54
54
  end
55
55
 
56
+ if (RUBY_VERSION.to_f < 1.9) then
56
57
  Cucumber::Rake::Task.new({:rcov => 'db:test:prepare'}, 'Run features with rcov') do |t|
57
58
  # Blacklight customization, call features from external location, pass
58
59
  # in feature location wtih cucumber_opts, yeah it's weird but that's how.
@@ -65,7 +66,7 @@ begin
65
66
  t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,features\/ --aggregate blacklight-coverage.data}
66
67
  t.rcov_opts << %[-o "blacklight-coverage"]
67
68
  end
68
-
69
+ end
69
70
 
70
71
  desc 'Run all features'
71
72
  task :all => [:ok, :wip]
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  # The ASF licenses this file to You under the Apache License, Version 2.0
2
3
  # (the "License"); you may not use this file except in compliance with
3
4
  # the License. You may obtain a copy of the License at
@@ -0,0 +1,121 @@
1
+ #!/bin/bash
2
+ # test.sh
3
+ # Create a default rails appliaction, install blacklight, and run all the tests.
4
+
5
+ before="$(date +%s)"
6
+ benchmark()
7
+ {
8
+ after="$(date +%s)"
9
+ elapsed_seconds="$(expr $after - $before)"
10
+ echo "Total Time: ${elapsed_seconds} sec"
11
+ # as a bonus, make our script exit with the right error code.
12
+ }
13
+
14
+ check_errs()
15
+ {
16
+ # Function. Parameter 1 is the return code
17
+ # Para. 2 is text to display on failure.
18
+ if [ "${1}" -ne "0" ]; then
19
+ echo "ERROR # ${1} : ${2}"
20
+
21
+ # Attempt to shut down jetty, if set.
22
+ if [ $jetty_pid ]
23
+ then
24
+ kill $jetty_pid
25
+ fi
26
+ benchmark
27
+ exit 1
28
+ fi
29
+ }
30
+
31
+ # Make sure we are in the blacklight directory
32
+ if [ ! -f "blacklight.gemspec" ]
33
+ then
34
+ echo "You must execute test.sh from the root of your blacklight checkout."
35
+ exit 1
36
+ fi
37
+
38
+ # Clear out the tmp/ directory.
39
+ rm -rf tmp/test_app
40
+ mkdir -p tmp/test_app
41
+ cd tmp
42
+
43
+ # Make certain rvn will work correctly.
44
+ # Load RVM into a shell session *as a function*
45
+ if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
46
+ # First try to load from a user install
47
+ source "$HOME/.rvm/scripts/rvm"
48
+ elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
49
+ # Then try to load from a root install
50
+ source "/usr/local/rvm/scripts/rvm"
51
+ else
52
+ printf "ERROR: An RVM installation was not found.\n"
53
+ exit 1
54
+ fi
55
+
56
+
57
+ rvm use "$@" --create
58
+ check_errs $? "rvm failed. please run 'rvm install $@', and then re-run these tests."
59
+ gem install --no-rdoc --no-ri 'rails'
60
+ gem install --no-rdoc --no-ri 'bundler'
61
+ gem install --no-rdoc --no-ri 'devise'
62
+ rails new test_app
63
+ cd test_app
64
+ echo "
65
+ source 'http://rubygems.org'
66
+
67
+ gem 'rails', '>=3.0.4'
68
+ platforms :jruby do
69
+ gem 'jruby-openssl'
70
+ gem 'activerecord-jdbcsqlite3-adapter'
71
+ gem 'jdbc-sqlite3'
72
+ end
73
+ platforms :ruby do
74
+ gem 'sqlite3-ruby', :require => 'sqlite3'
75
+ end
76
+ gem 'blacklight', :path => '../../'
77
+
78
+ # For testing
79
+ group :development, :test do
80
+ gem 'rspec'
81
+ gem 'rspec-rails', '~>2.5.0'
82
+ gem 'generator_spec'
83
+ gem 'cucumber-rails'
84
+ gem 'database_cleaner'
85
+ gem 'capybara'
86
+ gem 'webrat'
87
+ gem 'aruba'
88
+ end
89
+ " > Gemfile
90
+
91
+ bundle install --local &> /dev/null
92
+ # If a local install fails, try a full install.
93
+ if [ "$?" -ne "0" ]
94
+ then
95
+ bundle install
96
+ fi
97
+ check_errs $? "Bundle install failed."
98
+ rails generate blacklight -d
99
+ check_errs $? "Blacklight generator failed"
100
+ rake db:migrate
101
+ check_errs $? "Rake Migration failed"
102
+ rails g cucumber:install &> /dev/null
103
+ jetty_zip="/tmp/bl_jetty.zip"
104
+ if [ ! -f $jetty_zip ]
105
+ then
106
+ curl -L https://github.com/projectblacklight/blacklight-jetty/zipball/v1.4.1-1 > $jetty_zip
107
+ check_errs $? "Jetty file does not exist, and cannot be downloaded."
108
+ fi
109
+ rails g blacklight:jetty test_jetty -e test -d $jetty_zip
110
+ check_errs $? "Jetty setup failed."
111
+ rm public/index.html
112
+ rake solr:marc:index_test_data RAILS_ENV=test
113
+ cd test_jetty
114
+ java -Djetty.port=8888 -Dsolr.solr.home=./solr -jar start.jar &> /dev/null &
115
+ jetty_pid=$!
116
+ cd ..
117
+ bundle exec rake blacklight:spec
118
+ check_errs $? "Rpec Tests failed."
119
+ bundle exec rake blacklight:cucumber
120
+ check_errs $? "Cucumber Tests failed."
121
+ benchmark
@@ -11,7 +11,7 @@ Feature: Search Results
11
11
  Then I should get at least 30 results
12
12
  And I should get exactly 30 results
13
13
  And I should get at most 30 results
14
- And I should get id "00282214" in the results
14
+ And I should get id "2007020969" in the results
15
15
  And I should have more results than a search for "korea"
16
16
 
17
17
  Scenario: "inmul" query
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  Given /^"([^\"]*)" has bookmarked an item with title "([^\"]*)"$/ do |user, title|
2
3
  user = User.find_by_email("#{user}@#{user}.com")
3
4
  user.bookmarks << Bookmark.create(:title => title, :document_id => "123456")
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  # checkout http://blog.codefront.net/2007/03/31/testing-rescue_action_in_public-with-rspec/
2
3
  Then /^I should see a flash error "([^\"]*)"$/ do |message|
3
4
  pageshould have_selector("div.notice", :content => message)
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  Then /^I should see an add to folder form$/ do
2
3
  page.should have_selector("form.addFolder")
3
4
  end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  When /^I follow "([^\"]*)" in "([^\"]*)"$/ do |link, scope|
2
3
  within(scope) do
3
4
  click_link(link)
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  Then /^I (should|should not) see an? "([^\"]*)" element containing "([^\"]*)"$/ do |bool,elem,content|
2
3
  if bool == "should"
3
4
  page.should have_xpath("//#{elem}[text()='#{content}']")
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  Given /^I am logged in as "([^\"]*)"$/ do |login|
2
3
  email = "#{login}@#{login}.com"
3
4
  user = User.create(:login => login, :email => email, :password => "password", :password_confirmation => "password")
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  # deprecated
2
3
  Then /^I should see the applied filter "([^\"]*)" with the value "([^\"]*)"$/ do |filter, text|
3
4
  page.should have_selector(".facet_limit") do |node|
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  Given /^no previous searches$/ do
2
3
  # nothing to do
3
4
  end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  #include Blacklight::SolrHelper
2
3
 
3
4
  When /^I fill in the search box with "(.*?)"$/ do |query|
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  # User added
2
3
  Then /^I should see a search field$/ do
3
4
  page.should have_selector("input#q")
@@ -1,4 +1,5 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  Given /^user with login "([^\"]*)" and email "([^\"]*)" and password "([^\"]*)"$/ do |login, email, password|
2
3
  user = User.create(:login => login, :email => email, :password => password, :password_confirmation => password)
3
4
  User.find(user.id).should_not be_nil
4
- end
5
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  # TL;DR: YOU SHOULD DELETE THIS FILE
2
3
  #
3
4
  # This file iwas generated by Cucumber-Rails and is only here to get you a head start
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  # TL;DR: YOU SHOULD DELETE THIS FILE
2
3
  #
3
4
  # This file iwas generated by Cucumber-Rails and is only here to get you a head start
@@ -47,3 +48,7 @@ ActionController::Base.allow_rescue = false
47
48
  # For some databases (like MongoDB and CouchDB) you may need to use :truncation instead.
48
49
  DatabaseCleaner.strategy = :transaction
49
50
 
51
+ # Stop endless errors like
52
+ # ~/.rvm/gems/ruby-1.9.2-p0@global/gems/rack-1.2.1/lib/rack/utils.rb:16:
53
+ # warning: regexp match /.../n against to UTF-8 string
54
+ $VERBOSE = nil
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module NavigationHelpers
2
3
  # Maps a name to a path. Used by the
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module HtmlSelectorsHelpers
2
3
  # Maps a name to a selector. Used primarily by the
3
4
  #
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
3
  describe ApplicationController do
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
3
  require 'rubygems'
3
4
  require 'marc'
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
3
  describe FolderController do
3
4
  before(:each) do
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
3
 
3
4
  describe SearchHistoryController do