vibes-rubycas-client 2.3.0.alpha4 → 2.3.0.alpha5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,67 +0,0 @@
1
- # run very flat apps with merb -I <app file>.
2
-
3
- # Uncomment for DataMapper ORM
4
- # use_orm :datamapper
5
-
6
- # Uncomment for ActiveRecord ORM
7
- # use_orm :activerecord
8
-
9
- # Uncomment for Sequel ORM
10
- # use_orm :sequel
11
-
12
- $:.unshift(File.dirname(__FILE__) / ".." / ".." / "lib")
13
- require "casclient"
14
- require 'casclient/frameworks/merb/filter'
15
- #
16
- # ==== Pick what you test with
17
- #
18
-
19
- # This defines which test framework the generators will use.
20
- # RSpec is turned on by default.
21
- #
22
- # To use Test::Unit, you need to install the merb_test_unit gem.
23
- # To use RSpec, you don't have to install any additional gems, since
24
- # merb-core provides support for RSpec.
25
- #
26
- # use_test :test_unit
27
- use_test :rspec
28
-
29
- #
30
- # ==== Choose which template engine to use by default
31
- #
32
-
33
- # Merb can generate views for different template engines, choose your favourite as the default.
34
-
35
- use_template_engine :erb
36
- # use_template_engine :haml
37
-
38
- Merb::Config.use { |c|
39
- c[:framework] = { :public => [Merb.root / "public", nil] }
40
- c[:session_store] = 'cookie'
41
- c[:exception_details] = true
42
- c[:log_level] = :debug # or error, warn, info or fatal
43
- c[:log_stream] = STDOUT
44
- c[:session_secret_key] = '9f30c015f2132d217bfb81e31668a74fadbdf672'
45
- c[:log_file] = Merb.root / "log" / "merb.log"
46
-
47
- c[:reload_classes] = true
48
- c[:reload_templates] = true
49
- }
50
-
51
-
52
- Merb::Plugins.config[:"rubycas-client"] = {
53
- :cas_base_url => "http://localhost:7777"
54
- }
55
-
56
- Merb::Router.prepare do
57
- match('/').to(:controller => 'merb_auth_cas', :action =>'index').name(:default)
58
- end
59
-
60
- class MerbAuthCas < Merb::Controller
61
- include CASClient::Frameworks::Merb::Filter
62
- before :cas_filter
63
-
64
- def index
65
- "Hi, #{session[:cas_user]}"
66
- end
67
- end
@@ -1,24 +0,0 @@
1
- require "rubygems"
2
-
3
- # Add the local gems dir if found within the app root; any dependencies loaded
4
- # hereafter will try to load from the local gems before loading system gems.
5
- if (local_gem_dir = File.join(File.dirname(__FILE__), '..', 'gems')) && $BUNDLE.nil?
6
- $BUNDLE = true; Gem.clear_paths; Gem.path.unshift(local_gem_dir)
7
- end
8
-
9
- require "spec"
10
- require "merb-core"
11
-
12
- Merb::Config.use do |c|
13
- c[:session_store] = "memory"
14
- end
15
-
16
- Merb.start_environment(:testing => true,
17
- :adapter => 'runner',
18
- :environment => ENV['MERB_ENV'] || 'test')
19
-
20
- Spec::Runner.configure do |config|
21
- config.include(Merb::Test::ViewHelper)
22
- config.include(Merb::Test::RouteHelper)
23
- config.include(Merb::Test::ControllerHelper)
24
- end