casino 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +23 -0
- data/.powrc +4 -0
- data/.rspec +1 -0
- data/.rvmrc +48 -0
- data/.travis.yml +3 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +129 -0
- data/LICENSE.txt +20 -0
- data/README.md +72 -0
- data/Rakefile +14 -0
- data/app/assets/images/rails.png +0 -0
- data/app/assets/javascripts/casino/index.js +15 -0
- data/app/assets/javascripts/casino/sessions.js.coffee +15 -0
- data/app/assets/stylesheets/casino/index.css.scss +28 -0
- data/app/controllers/casino/api/v1/tickets_controller.rb +48 -0
- data/app/controllers/casino/application_controller.rb +19 -0
- data/app/controllers/casino/proxy_tickets_controller.rb +9 -0
- data/app/controllers/casino/service_tickets_controller.rb +9 -0
- data/app/controllers/casino/sessions_controller.rb +23 -0
- data/app/helpers/application_helper.rb +2 -0
- data/app/helpers/casino/sessions_helper.rb +5 -0
- data/app/helpers/service_tickets_helper.rb +2 -0
- data/app/mailers/.gitkeep +0 -0
- data/app/models/.gitkeep +0 -0
- data/app/views/casino/service_tickets/validate.text.erb +2 -0
- data/app/views/casino/sessions/index.html.erb +43 -0
- data/app/views/casino/sessions/logout.html.erb +8 -0
- data/app/views/casino/sessions/new.html.erb +12 -0
- data/app/views/layouts/application.html.erb +18 -0
- data/casino.gemspec +29 -0
- data/config/.gitignore +3 -0
- data/config/initializers/inflections.rb +19 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/wrap_parameters.rb +9 -0
- data/config/initializers/yaml.rb +1 -0
- data/config/locales/en.yml +10 -0
- data/config/routes.rb +82 -0
- data/db/seeds.rb +7 -0
- data/doc/README_FOR_APP +2 -0
- data/lib/assets/.gitkeep +0 -0
- data/lib/casino.rb +6 -0
- data/lib/casino/engine.rb +7 -0
- data/lib/casino/listener.rb +25 -0
- data/lib/casino/listener/legacy_validator.rb +11 -0
- data/lib/casino/listener/login_credential_acceptor.rb +28 -0
- data/lib/casino/listener/login_credential_requestor.rb +16 -0
- data/lib/casino/listener/logout.rb +8 -0
- data/lib/casino/listener/proxy_ticket_provider.rb +11 -0
- data/lib/casino/listener/session_destroyer.rb +11 -0
- data/lib/casino/listener/session_overview.rb +11 -0
- data/lib/casino/listener/ticket_validator.rb +11 -0
- data/lib/casino/version.rb +3 -0
- data/lib/generators/casino/install_generator.rb +37 -0
- data/lib/generators/casino/templates/README +28 -0
- data/lib/generators/casino/templates/cas.yml +44 -0
- data/lib/generators/casino/templates/casino.css +3 -0
- data/lib/generators/casino/templates/casino.js +1 -0
- data/lib/generators/casino/templates/casino_core.rb +1 -0
- data/lib/generators/casino/templates/database.yml +25 -0
- data/lib/tasks/.gitkeep +0 -0
- data/lib/tasks/login_tickets.rake +7 -0
- data/lib/tasks/service_tickets.rake +9 -0
- data/log/.gitkeep +0 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +25 -0
- data/public/favicon.ico +0 -0
- data/public/robots.txt +5 -0
- data/script/rails +8 -0
- data/spec/controllers/api/v1/tickets_controller_spec.rb +100 -0
- data/spec/controllers/listener/legacy_validator_spec.rb +22 -0
- data/spec/controllers/listener/login_credential_acceptor_spec.rb +62 -0
- data/spec/controllers/listener/login_credential_requestor_spec.rb +39 -0
- data/spec/controllers/listener/logout_spec.rb +21 -0
- data/spec/controllers/listener/proxy_ticket_provider_spec.rb +22 -0
- data/spec/controllers/listener/session_destroyer_spec.rb +25 -0
- data/spec/controllers/listener/session_overview_spec.rb +26 -0
- data/spec/controllers/listener/ticket_validator_spec.rb +22 -0
- data/spec/controllers/proxy_tickets_controller_spec.rb +25 -0
- data/spec/controllers/service_tickets_controller_spec.rb +25 -0
- data/spec/controllers/sessions_controller_spec.rb +52 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +16 -0
- data/spec/dummy/app/assets/stylesheets/application.css +14 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +59 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/cas.yml +29 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/casino_core.rb +1 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/db/.gitkeep +0 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/spec_helper.rb +38 -0
- data/spec/support/.gitkeep +0 -0
- data/spec/support/sign_in.rb +11 -0
- data/vendor/assets/javascripts/.gitkeep +0 -0
- data/vendor/assets/stylesheets/.gitkeep +0 -0
- data/vendor/plugins/.gitkeep +0 -0
- metadata +351 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CASino::Listener::LegacyValidator do
|
4
|
+
let(:controller) { Object.new }
|
5
|
+
let(:listener) { described_class.new(controller) }
|
6
|
+
let(:text) { "foobar\nbla\n" }
|
7
|
+
let(:render_parameters) { { text: text, content_type: 'text/plain' } }
|
8
|
+
|
9
|
+
describe '#validation_succeeded' do
|
10
|
+
it 'tells the controller to render the response text' do
|
11
|
+
controller.should_receive(:render).with(render_parameters)
|
12
|
+
listener.validation_succeeded(text)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '#validation_failed' do
|
17
|
+
it 'tells the controller to render the response text' do
|
18
|
+
controller.should_receive(:render).with(render_parameters)
|
19
|
+
listener.validation_failed(text)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CASino::Listener::LoginCredentialAcceptor do
|
4
|
+
include CASino::Engine.routes.url_helpers
|
5
|
+
let(:controller) { Struct.new(:cookies).new(cookies: {}) }
|
6
|
+
let(:listener) { described_class.new(controller) }
|
7
|
+
|
8
|
+
before(:each) do
|
9
|
+
controller.stub(:redirect_to)
|
10
|
+
end
|
11
|
+
|
12
|
+
describe '#user_logged_in' do
|
13
|
+
let(:ticket_granting_ticket) { 'TGT-123' }
|
14
|
+
context 'with a service url' do
|
15
|
+
let(:url) { 'http://www.example.com/?ticket=ST-123' }
|
16
|
+
it 'tells the controller to redirect the client' do
|
17
|
+
controller.should_receive(:redirect_to).with(url, status: :see_other)
|
18
|
+
listener.user_logged_in(url, ticket_granting_ticket)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
context 'without a service url' do
|
23
|
+
let(:url) { nil }
|
24
|
+
it 'tells the controller to redirect to the session overview' do
|
25
|
+
controller.should_receive(:redirect_to).with(sessions_path, status: :see_other)
|
26
|
+
listener.user_logged_in(url, ticket_granting_ticket)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'creates the tgt cookie' do
|
30
|
+
listener.user_logged_in(url, ticket_granting_ticket)
|
31
|
+
controller.cookies[:tgt].should == ticket_granting_ticket
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
[:invalid_login_credentials, :invalid_login_ticket].each do |method|
|
37
|
+
context "##{method}" do
|
38
|
+
let(:login_ticket) { Object.new }
|
39
|
+
let(:flash) { ActionDispatch::Flash::FlashHash.new }
|
40
|
+
|
41
|
+
before(:each) do
|
42
|
+
controller.stub(:render)
|
43
|
+
controller.stub(:flash).and_return(flash)
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'tells the controller to render the new template' do
|
47
|
+
controller.should_receive(:render).with('new', status: 403)
|
48
|
+
listener.send(method, login_ticket)
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'assigns a new login ticket' do
|
52
|
+
listener.send(method, login_ticket)
|
53
|
+
controller.instance_variable_get(:@login_ticket).should == login_ticket
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'should add an error message' do
|
57
|
+
listener.send(method, login_ticket)
|
58
|
+
flash[:error].should == I18n.t("login_credential_acceptor.#{method}")
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CASino::Listener::LoginCredentialRequestor do
|
4
|
+
include CASino::Engine.routes.url_helpers
|
5
|
+
let(:controller) { Struct.new(:cookies).new(cookies: {}) }
|
6
|
+
let(:listener) { described_class.new(controller) }
|
7
|
+
|
8
|
+
describe '#user_not_logged_in' do
|
9
|
+
let(:login_ticket) { Object.new }
|
10
|
+
it 'assigns the login ticket' do
|
11
|
+
listener.user_not_logged_in(login_ticket)
|
12
|
+
controller.instance_variable_get(:@login_ticket).should == login_ticket
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'deletes an existing ticket-granting ticket cookie' do
|
16
|
+
controller.cookies = { tgt: 'TGT-12345' }
|
17
|
+
listener.user_not_logged_in(login_ticket)
|
18
|
+
controller.cookies[:tgt].should be_nil
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#user_logged_in' do
|
23
|
+
context 'with a service url' do
|
24
|
+
let(:url) { 'http://www.example.com/?ticket=ST-123' }
|
25
|
+
it 'tells the controller to redirect the client' do
|
26
|
+
controller.should_receive(:redirect_to).with(url, status: :see_other)
|
27
|
+
listener.user_logged_in(url)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context 'without a service url' do
|
32
|
+
let(:url) { nil }
|
33
|
+
it 'tells the controller to redirect to the session overview' do
|
34
|
+
controller.should_receive(:redirect_to).with(sessions_path)
|
35
|
+
listener.user_logged_in(url)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CASino::Listener::Logout do
|
4
|
+
include Rails.application.routes.url_helpers
|
5
|
+
let(:controller) { Struct.new(:cookies).new(cookies: {}) }
|
6
|
+
let(:listener) { described_class.new(controller) }
|
7
|
+
|
8
|
+
describe '#user_logged_out' do
|
9
|
+
let(:url) { 'http://www.example.com/test' }
|
10
|
+
it 'assigns the url' do
|
11
|
+
listener.user_logged_out(url)
|
12
|
+
controller.instance_variable_get(:@url).should == url
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'deletes an existing ticket-granting ticket cookie' do
|
16
|
+
controller.cookies = { tgt: 'TGT-12345' }
|
17
|
+
listener.user_logged_out(url)
|
18
|
+
controller.cookies[:tgt].should be_nil
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CASino::Listener::ProxyTicketProvider do
|
4
|
+
let(:controller) { Object.new }
|
5
|
+
let(:listener) { described_class.new(controller) }
|
6
|
+
let(:xml) { "<foo><bar>bla</bar></foo>" }
|
7
|
+
let(:render_parameters) { { xml: xml } }
|
8
|
+
|
9
|
+
describe '#request_succeeded' do
|
10
|
+
it 'tells the controller to render the response xml' do
|
11
|
+
controller.should_receive(:render).with(render_parameters)
|
12
|
+
listener.request_succeeded(xml)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '#request_failed' do
|
17
|
+
it 'tells the controller to render the response xml' do
|
18
|
+
controller.should_receive(:render).with(render_parameters)
|
19
|
+
listener.request_failed(xml)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CASino::Listener::SessionDestroyer do
|
4
|
+
include CASino::Engine.routes.url_helpers
|
5
|
+
let(:controller) { Struct.new(:cookies).new(cookies: {}) }
|
6
|
+
let(:listener) { described_class.new(controller) }
|
7
|
+
|
8
|
+
before(:each) do
|
9
|
+
controller.stub(:redirect_to)
|
10
|
+
end
|
11
|
+
|
12
|
+
describe '#ticket_not_found' do
|
13
|
+
it 'redirects back to the session overview' do
|
14
|
+
controller.should_receive(:redirect_to).with(sessions_path)
|
15
|
+
listener.ticket_not_found
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '#ticket_deleted' do
|
20
|
+
it 'redirects back to the session overview' do
|
21
|
+
controller.should_receive(:redirect_to).with(sessions_path)
|
22
|
+
listener.ticket_deleted
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CASino::Listener::SessionOverview do
|
4
|
+
include CASino::Engine.routes.url_helpers
|
5
|
+
let(:controller) { Object.new }
|
6
|
+
let(:listener) { described_class.new(controller) }
|
7
|
+
|
8
|
+
describe '#user_not_logged_in' do
|
9
|
+
before(:each) do
|
10
|
+
controller.stub(:redirect_to)
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'redirects to the login page' do
|
14
|
+
controller.should_receive(:redirect_to).with(login_path)
|
15
|
+
listener.user_not_logged_in
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '#ticket_granting_tickets_found' do
|
20
|
+
let(:ticket_granting_tickets) { [ Object.new, Object.new ] }
|
21
|
+
it 'assigns the ticket-granting tickets' do
|
22
|
+
listener.ticket_granting_tickets_found(ticket_granting_tickets)
|
23
|
+
controller.instance_variable_get(:@ticket_granting_tickets).should == ticket_granting_tickets
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CASino::Listener::TicketValidator do
|
4
|
+
let(:controller) { Object.new }
|
5
|
+
let(:listener) { described_class.new(controller) }
|
6
|
+
let(:xml) { "<foo><bar>bla</bar></foo>" }
|
7
|
+
let(:render_parameters) { { xml: xml } }
|
8
|
+
|
9
|
+
describe '#validation_succeeded' do
|
10
|
+
it 'tells the controller to render the response xml' do
|
11
|
+
controller.should_receive(:render).with(render_parameters)
|
12
|
+
listener.validation_succeeded(xml)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '#validation_failed' do
|
17
|
+
it 'tells the controller to render the response xml' do
|
18
|
+
controller.should_receive(:render).with(render_parameters)
|
19
|
+
listener.validation_failed(xml)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CASino::ProxyTicketsController do
|
4
|
+
describe 'GET "serviceValidate"' do
|
5
|
+
let(:params) { { service: 'https://www.example.com/' } }
|
6
|
+
it 'calls the process method of the ProxyTicketValidator' do
|
7
|
+
CASinoCore::Processor::ProxyTicketValidator.any_instance.should_receive(:process).with(kind_of(Hash)) do |params|
|
8
|
+
params.should == controller.params
|
9
|
+
controller.render nothing: true
|
10
|
+
end
|
11
|
+
get :proxy_validate, params
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe 'GET "proxy"' do
|
16
|
+
let(:params) { { service: 'https://www.example.com/' } }
|
17
|
+
it 'calls the process method of the ProxyTicketProvider' do
|
18
|
+
CASinoCore::Processor::ProxyTicketProvider.any_instance.should_receive(:process).with(kind_of(Hash)) do |params|
|
19
|
+
params.should == controller.params
|
20
|
+
controller.render nothing: true
|
21
|
+
end
|
22
|
+
get :create, params
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CASino::ServiceTicketsController do
|
4
|
+
describe 'GET "validate"' do
|
5
|
+
let(:params) { { service: 'https://www.example.com/' } }
|
6
|
+
it 'calls the process method of the LegacyValidator' do
|
7
|
+
CASinoCore::Processor::LegacyValidator.any_instance.should_receive(:process).with(kind_of(Hash)) do |params|
|
8
|
+
params.should == controller.params
|
9
|
+
controller.render nothing: true
|
10
|
+
end
|
11
|
+
get :validate, params
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe 'GET "serviceValidate"' do
|
16
|
+
let(:params) { { service: 'https://www.example.com/' } }
|
17
|
+
it 'calls the process method of the LegacyValidator' do
|
18
|
+
CASinoCore::Processor::ServiceTicketValidator.any_instance.should_receive(:process).with(kind_of(Hash)) do |params|
|
19
|
+
params.should == controller.params
|
20
|
+
controller.render nothing: true
|
21
|
+
end
|
22
|
+
get :service_validate, params
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CASino::SessionsController do
|
4
|
+
describe 'GET "new"' do
|
5
|
+
it 'calls the process method of the LoginCredentialRequestor' do
|
6
|
+
CASinoCore::Processor::LoginCredentialRequestor.any_instance.should_receive(:process)
|
7
|
+
get :new
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
describe 'POST "create"' do
|
12
|
+
it 'calls the process method of the LoginCredentialAcceptor' do
|
13
|
+
CASinoCore::Processor::LoginCredentialAcceptor.any_instance.should_receive(:process) do
|
14
|
+
@controller.render nothing: true
|
15
|
+
end
|
16
|
+
post :create
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe 'GET "logout"' do
|
21
|
+
it 'calls the process method of the Logout processor' do
|
22
|
+
CASinoCore::Processor::Logout.any_instance.should_receive(:process) do |params, cookies, user_agent|
|
23
|
+
params.should == controller.params
|
24
|
+
cookies.should == controller.cookies
|
25
|
+
user_agent.should == request.user_agent
|
26
|
+
end
|
27
|
+
get :logout
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe 'GET "index"' do
|
32
|
+
it 'calls the process method of the SessionOverview processor' do
|
33
|
+
CASinoCore::Processor::SessionOverview.any_instance.should_receive(:process)
|
34
|
+
get :index
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe 'DELETE "destroy"' do
|
39
|
+
let(:id) { '123' }
|
40
|
+
let(:tgt) { 'TGT-foobar' }
|
41
|
+
it 'calls the process method of the SessionOverview processor' do
|
42
|
+
request.cookies[:tgt] = tgt
|
43
|
+
CASinoCore::Processor::SessionDestroyer.any_instance.should_receive(:process) do |params, cookies, user_agent|
|
44
|
+
params[:id].should == id
|
45
|
+
cookies[:tgt].should == tgt
|
46
|
+
user_agent.should == request.user_agent
|
47
|
+
@controller.render nothing: true
|
48
|
+
end
|
49
|
+
delete :destroy, id: id
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/spec/dummy/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require casino
|
16
|
+
//= require_tree .
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require casino
|
13
|
+
*= require_tree .
|
14
|
+
*/
|
File without changes
|
File without changes
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require
|
6
|
+
require 'casino'
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
10
|
+
# Settings in config/environments/* take precedence over those specified here.
|
11
|
+
# Application configuration should go into files in config/initializers
|
12
|
+
# -- all .rb files in that directory are automatically loaded.
|
13
|
+
|
14
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
15
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
16
|
+
|
17
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
18
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
19
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
20
|
+
|
21
|
+
# Activate observers that should always be running.
|
22
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
23
|
+
|
24
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
25
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
26
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
27
|
+
|
28
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
29
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
30
|
+
# config.i18n.default_locale = :de
|
31
|
+
|
32
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
33
|
+
config.encoding = "utf-8"
|
34
|
+
|
35
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
36
|
+
config.filter_parameters += [:password]
|
37
|
+
|
38
|
+
# Enable escaping HTML in JSON.
|
39
|
+
config.active_support.escape_html_entities_in_json = true
|
40
|
+
|
41
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
42
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
43
|
+
# like if you have constraints or database-specific column types
|
44
|
+
# config.active_record.schema_format = :sql
|
45
|
+
|
46
|
+
# Enforce whitelist mode for mass assignment.
|
47
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
48
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
49
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
50
|
+
config.active_record.whitelist_attributes = true
|
51
|
+
|
52
|
+
# Enable the asset pipeline
|
53
|
+
config.assets.enabled = true
|
54
|
+
|
55
|
+
# Version of your assets, change this if you want to expire all your assets
|
56
|
+
config.assets.version = '1.0'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|