Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UNL Resource Scheduler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jeff Sturek
UNL Resource Scheduler
Commits
e811354c
Commit
e811354c
authored
8 years ago
by
Tyler Lemburg
Browse files
Options
Downloads
Patches
Plain Diff
Server up, app file
parent
fd00b922
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app.rb
+42
-0
42 additions, 0 deletions
app.rb
config.ru
+21
-0
21 additions, 0 deletions
config.ru
with
63 additions
and
0 deletions
app.rb
0 → 100644
+
42
−
0
View file @
e811354c
require
'sinatra'
use
Rack
::
Session
::
Cookie
,
:key
=>
'rack.session'
,
:path
=>
'/'
,
:domain
=>
(
ENV
[
'RACK_ENV'
]
==
'development'
?
nil
:
'resource.unl.edu'
),
:secret
=>
'420terrace12qmemorialpinnaclehawks'
,
:old_secret
=>
'420terrace12qmemorialpinnaclehawks'
Time
.
zone
=
"America/Chicago"
# this gives the user messages
def
flash
(
type
,
header
,
message
)
session
[
"notice"
]
||=
[]
session
[
"notice"
]
<<
{
:type
=>
type
,
:header
=>
header
,
:message
=>
message
}
end
before
do
# site defaults
@title
=
'UNL Resource Scheduler'
@breadcrumbs
=
[
{
:href
=>
'http://www.unl.edu/'
,
:text
=>
'UNL'
,
:title
=>
'University of Nebraska–Lincoln'
},
{
:href
=>
'/'
,
:text
=>
'UNL Resource Scheduler'
}
]
session
[
:init
]
=
true
end
get
'/'
do
@breadcrumbs
<<
{
:text
=>
'Home'
}
'Home'
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
config.ru
0 → 100644
+
21
−
0
View file @
e811354c
require
'./utils/language'
ENV
[
'RACK_ENV'
]
||=
'development'
# load the config file
require
'./utils/config_loader'
# set up the database connection
require
'utils/database'
# get sinatra and the app
require
'sinatra'
require
'app'
if
ENV
[
'RACK_ENV'
]
==
'development'
# weird workaround for localhost cookie things
set
:cookie_options
,
:domain
=>
nil
else
set
:cookie_options
,
:domain
=>
'resource.unl.edu'
end
# run it
run
Sinatra
::
Application
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment