From 5a5e73f2fefa8e1a06f18063a6d644a6d1c2a869 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 19 Nov 2012 14:29:45 +0100 Subject: made it clear ruby 1.8.7 and 1.9.3 both work - fixes #952 --- INSTALL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 18d9c6d..1323a41 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -6,11 +6,11 @@ The webapp only depends on very basic ruby packages and installs the other requi ### Packages ### -For now we are using ruby 1.8.7. The following packages need to be installed: +The following packages need to be installed: * git -* ruby1.8 -* rubygems1.8 +* ruby (1.8.7 and 1.9.3 work) +* rubygems * couchdb ### Gems ### -- cgit v1.2.3 From ac4b60d13162c46ec72112f0ef3d315734868d1e Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 19 Nov 2012 14:46:11 +0100 Subject: require authentication for cert download w/ test --- certs/app/controllers/certs_controller.rb | 2 ++ certs/test/functional/certs_controller_test.rb | 7 +++++++ certs/test/test_helper.rb | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/certs/app/controllers/certs_controller.rb b/certs/app/controllers/certs_controller.rb index 6988a38..402bef3 100644 --- a/certs/app/controllers/certs_controller.rb +++ b/certs/app/controllers/certs_controller.rb @@ -1,5 +1,7 @@ class CertsController < ApplicationController + before_filter :authorize + # GET /cert def show @cert = Cert.pick_from_pool diff --git a/certs/test/functional/certs_controller_test.rb b/certs/test/functional/certs_controller_test.rb index 295515b..9bba8c0 100644 --- a/certs/test/functional/certs_controller_test.rb +++ b/certs/test/functional/certs_controller_test.rb @@ -4,7 +4,14 @@ class CertsControllerTest < ActionController::TestCase setup do end + test "should require login" do + get :show + assert_response :redirect + assert_redirected_to login_url + end + test "should send cert" do + login cert = stub :zipped => "adsf", :zipname => "cert_stub.zip" Cert.expects(:pick_from_pool).returns(cert) get :show diff --git a/certs/test/test_helper.rb b/certs/test/test_helper.rb index 08d4d41..f6b4eb8 100644 --- a/certs/test/test_helper.rb +++ b/certs/test/test_helper.rb @@ -1,7 +1,7 @@ ENV["RAILS_ENV"] = "test" require File.expand_path('../../../test/dummy/config/environment', __FILE__) require 'rails/test_help' -require 'mocha' +require 'mocha/setup' Rails.backtrace_cleaner.remove_silencers! -- cgit v1.2.3 From 9810d5b66ca7f81df402e9b05957466a947bdf9b Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 19 Nov 2012 14:46:40 +0100 Subject: use latest mocha version without monkey patching :) --- common_dependencies.rb | 2 +- test/test_helper.rb | 2 +- users/test/test_helper.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common_dependencies.rb b/common_dependencies.rb index 5312a80..7542b1b 100644 --- a/common_dependencies.rb +++ b/common_dependencies.rb @@ -1,6 +1,6 @@ source "http://rubygems.org" group :test do - gem 'mocha', :require => false + gem 'mocha', :require => false, :version => '~> 0.13.0' end diff --git a/test/test_helper.rb b/test/test_helper.rb index 50d5159..0016771 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,7 +2,7 @@ ENV["RAILS_ENV"] = "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' -require 'mocha' +require 'mocha/setup' # Load support files from all engines Dir["#{File.dirname(__FILE__)}/../*/test/support/**/*.rb"].each { |f| require f } diff --git a/users/test/test_helper.rb b/users/test/test_helper.rb index e8f0125..52dff53 100644 --- a/users/test/test_helper.rb +++ b/users/test/test_helper.rb @@ -1,7 +1,7 @@ ENV["RAILS_ENV"] = "test" require File.expand_path('../../../test/dummy/config/environment', __FILE__) require 'rails/test_help' -require 'mocha' +require 'mocha/setup' Rails.backtrace_cleaner.remove_silencers! -- cgit v1.2.3 From cd743d686ade50a9b23965a99c57b8105e834ec9 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 20 Nov 2012 08:11:46 +0100 Subject: fixed mocha version string --- common_dependencies.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common_dependencies.rb b/common_dependencies.rb index 7542b1b..a6691cf 100644 --- a/common_dependencies.rb +++ b/common_dependencies.rb @@ -1,6 +1,6 @@ source "http://rubygems.org" group :test do - gem 'mocha', :require => false, :version => '~> 0.13.0' + gem 'mocha', '~> 0.13.0', :require => false end -- cgit v1.2.3