Merge branch 'master' of https://github.com/openSUSE/osem into feature_tests2
This commit is contained in:
commit
147310b8b7
12 changed files with 59 additions and 44 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,5 +1,6 @@
|
||||||
config/application.rb
|
config/application.rb
|
||||||
config/config.yml
|
config/config.yml
|
||||||
|
config/secrets.yml
|
||||||
config/database.yml
|
config/database.yml
|
||||||
/vendor/cache
|
/vendor/cache
|
||||||
/vendor/cache-old
|
/vendor/cache-old
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ before_install:
|
||||||
before_script:
|
before_script:
|
||||||
- cp config/database.yml.example config/database.yml
|
- cp config/database.yml.example config/database.yml
|
||||||
- cp config/config.yml.example config/config.yml
|
- cp config/config.yml.example config/config.yml
|
||||||
|
- cp config/secrets.yml.example config/secrets.yml
|
||||||
- RAILS_ENV=test bundle exec rake db:migrate --trace
|
- RAILS_ENV=test bundle exec rake db:migrate --trace
|
||||||
script:
|
script:
|
||||||
- bundle exec rspec --color --format documentation
|
- bundle exec rspec --color --format documentation
|
||||||
|
|
|
||||||
|
|
@ -113,12 +113,10 @@ class Admin::EventsController < ApplicationController
|
||||||
flash[:notice] = "Update not successful."
|
flash[:notice] = "Update not successful."
|
||||||
end
|
end
|
||||||
|
|
||||||
expire_page :controller => '/schedule', :action => :index
|
|
||||||
redirect_back_or_to(admin_conference_event_path(@conference.short_title, @event))
|
redirect_back_or_to(admin_conference_event_path(@conference.short_title, @event))
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
expire_page :controller => '/schedule', :action => :index
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_state
|
def update_state
|
||||||
|
|
@ -127,7 +125,6 @@ class Admin::EventsController < ApplicationController
|
||||||
redirect_to(admin_conference_events_path(:conference_id => @conference.short_title), :notice => "Update Email Template before Sending Mails") and return
|
redirect_to(admin_conference_events_path(:conference_id => @conference.short_title), :notice => "Update Email Template before Sending Mails") and return
|
||||||
end
|
end
|
||||||
event.send(:"#{params[:transition]}!", :send_mail => params[:send_mail])
|
event.send(:"#{params[:transition]}!", :send_mail => params[:send_mail])
|
||||||
expire_page :controller => '/schedule', :action => :index
|
|
||||||
redirect_to(admin_conference_events_path(:conference_id => @conference.short_title), :notice => "Updated state")
|
redirect_to(admin_conference_events_path(:conference_id => @conference.short_title), :notice => "Updated state")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ class Admin::ScheduleController < ApplicationController
|
||||||
startTime = DateTime.strptime(time, "%Y-%m-%d %k:%M")
|
startTime = DateTime.strptime(time, "%Y-%m-%d %k:%M")
|
||||||
event.start_time = startTime
|
event.start_time = startTime
|
||||||
event.save!
|
event.save!
|
||||||
expire_page :controller => '/schedule', :action => :index
|
|
||||||
render :json => {"status" => "ok"}
|
render :json => {"status" => "ok"}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,26 +106,35 @@
|
||||||
<b class="caret"></b>
|
<b class="caret"></b>
|
||||||
%ul.dropdown-menu
|
%ul.dropdown-menu
|
||||||
- if event.transition_possible? :accept
|
- if event.transition_possible? :accept
|
||||||
%li= link_to "Accept event (no email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :accept, :send_mail => false),
|
%li= link_to 'Accept event (no email)',
|
||||||
:method => :put, :hint => "Accept this event without sending an automated email."
|
update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept, send_mail: false),
|
||||||
%li= link_to "Accept event (WITH email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :accept, :send_mail => true),
|
method: :patch, hint: 'Accept this event without sending an automated email.'
|
||||||
:method => :put, :hint => "Accept this event and send an automated email."
|
%li= link_to 'Accept event (WITH email)',
|
||||||
|
update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept, send_mail: true),
|
||||||
|
method: :patch, hint: 'Accept this event and send an automated email.'
|
||||||
- if event.transition_possible? :reject
|
- if event.transition_possible? :reject
|
||||||
%li= link_to "Reject event (no email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :reject, :send_mail => false),
|
%li= link_to 'Reject event (no email)',
|
||||||
:method => :put, :confirm => "Are you sure?",
|
update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject, send_mail: false),
|
||||||
:hint => "Reject this event without sending an automated email."
|
method: :patch, confirm: 'Are you sure?',
|
||||||
%li= link_to "Reject event (WITH email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :reject, :send_mail => true),
|
hint: 'Reject this event without sending an automated email.'
|
||||||
:method => :put, :confirm => "Are you sure?",
|
%li= link_to 'Reject event (WITH email)',
|
||||||
:hint => "Reject this event and send an automated email."
|
update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject, send_mail: true),
|
||||||
|
method: :patch, confirm: 'Are you sure?',
|
||||||
|
hint: 'Reject this event and send an automated email.'
|
||||||
- if event.transition_possible? :start_review
|
- if event.transition_possible? :start_review
|
||||||
%li= link_to "Start review", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :start_review),
|
%li= link_to 'Start review',
|
||||||
:method => :put
|
update_state_admin_conference_event_path(@conference.short_title, event, transition: :start_review),
|
||||||
|
method: :patch
|
||||||
- if event.transition_possible? :confirm
|
- if event.transition_possible? :confirm
|
||||||
%li= link_to "Confirm event", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :confirm),
|
%li= link_to 'Confirm event',
|
||||||
:method => :put, :hint => "Confirm that the speaker(s) will be present and that the event will actually take place."
|
update_state_admin_conference_event_path(@conference.short_title, event, transition: :confirm),
|
||||||
|
method: :patch,
|
||||||
|
hint: 'Confirm that the speaker(s) will be present and that the event will actually take place.'
|
||||||
- if event.transition_possible? :cancel
|
- if event.transition_possible? :cancel
|
||||||
%li= link_to "Cancel event", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :cancel),
|
%li= link_to 'Cancel event',
|
||||||
:method => :put, :hint => "Mark this event as cancelled. Usually this means that the speakers had to cancel their appearance."
|
update_state_admin_conference_event_path(@conference.short_title, event, :transition => :cancel),
|
||||||
|
method: :patch,
|
||||||
|
hint: 'Mark this event as cancelled. Usually this means that the speakers had to cancel their appearance.'
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@
|
||||||
%td
|
%td
|
||||||
.pull-right
|
.pull-right
|
||||||
- if event.transition_possible? :confirm
|
- if event.transition_possible? :confirm
|
||||||
= link_to "Confirm", conference_proposal_confirm_path(@conference.short_title, event, :send_mail=>false), :method => :put, :class => "btn btn-mini btn-success"
|
= link_to 'Confirm',
|
||||||
= link_to "Edit", edit_conference_proposal_path(@conference.short_title, event.id), :class => "btn btn-mini btn-primary"
|
conference_proposal_confirm_path(@conference.short_title, event, send_mail: false), method: :patch, class: 'btn btn-mini btn-success'
|
||||||
= link_to "Withdraw", conference_proposal_path(@conference.short_title, event.id), :method => :delete,
|
= link_to 'Edit', edit_conference_proposal_path(@conference.short_title, event.id), class: 'btn btn-mini btn-primary'
|
||||||
:confirm => "Are you sure you want to withdraw this proposal?", :class => "btn btn-mini btn-danger"
|
= link_to 'Withdraw', conference_proposal_path(@conference.short_title, event.id), method: :delete,
|
||||||
|
confirm: 'Are you sure you want to withdraw this proposal?', class: 'btn btn-mini btn-danger'
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,9 @@ defaults: &defaults
|
||||||
devise_mail_sender: "no-reply@localhost"
|
devise_mail_sender: "no-reply@localhost"
|
||||||
# The hostname to be used when building the URL in the emails
|
# The hostname to be used when building the URL in the emails
|
||||||
url_for_emails: "localhost:3000"
|
url_for_emails: "localhost:3000"
|
||||||
# A secret key for your rails app. You can generate one with 'rake secret'
|
|
||||||
secret_key: 12345
|
|
||||||
# A secret key. You can generate one with 'rake secret'
|
|
||||||
devise_secret_key: '12345'
|
|
||||||
# errbit configuration, get your own instance: https://github.com/errbit/errbit
|
# errbit configuration, get your own instance: https://github.com/errbit/errbit
|
||||||
#errbit_key: 123456789101112131415
|
#errbit_key: See config/secrets.yml
|
||||||
#errbit_host: errbit.exmaple.com
|
#errbit_host: errbit.exmaple.com
|
||||||
cookies_secret_token: 'secretstringwhichshouldbechanged'
|
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,3 @@ end
|
||||||
|
|
||||||
# Initialize the rails application
|
# Initialize the rails application
|
||||||
Osem::Application.initialize!
|
Osem::Application.initialize!
|
||||||
Osem::Application.config.secret_keybase = CONFIG['secret_key']
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# Many of these configuration options can be set straight in your model.
|
# Many of these configuration options can be set straight in your model.
|
||||||
Devise.setup do |config|
|
Devise.setup do |config|
|
||||||
# ==> Secret key, generate one with `rake secret`
|
# ==> Secret key, generate one with `rake secret`
|
||||||
config.secret_key = CONFIG['devise_secret_key']
|
config.secret_key = Rails.application.secrets.devise_secret_key
|
||||||
|
|
||||||
# ==> Mailer Configuration
|
# ==> Mailer Configuration
|
||||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
HoptoadNotifier.configure do |config|
|
HoptoadNotifier.configure do |config|
|
||||||
# Change this to some sensible data for your errbit instance
|
# Change this to some sensible data for your errbit instance
|
||||||
config.api_key = CONFIG["errbit_key"] || ""
|
config.api_key = Rails.application.secrets.errbit_key || ''
|
||||||
config.host = CONFIG["errbit_host"] || ""
|
config.host = CONFIG['errbit_host'] || ''
|
||||||
if config.api_key.blank? || config.host.blank?
|
if config.api_key.blank? || config.host.blank?
|
||||||
config.development_environments = "production development test"
|
config.development_environments = 'production development test'
|
||||||
else
|
else
|
||||||
config.development_environments = "development test"
|
config.development_environments = 'development test'
|
||||||
end
|
end
|
||||||
|
|
||||||
config.ignore_only = %w{
|
config.ignore_only = %w{
|
||||||
|
|
@ -14,7 +14,7 @@ HoptoadNotifier.configure do |config|
|
||||||
|
|
||||||
config.ignore_by_filter do |exception_data|
|
config.ignore_by_filter do |exception_data|
|
||||||
ret=false
|
ret=false
|
||||||
if exception_data[:error_class] == "ActionController::RoutingError"
|
if exception_data[:error_class] == 'ActionController::RoutingError'
|
||||||
message = exception_data[:error_message]
|
message = exception_data[:error_message]
|
||||||
ret=true if message =~ %r{\[GET\]}
|
ret=true if message =~ %r{\[GET\]}
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
|
||||||
|
|
||||||
# Your secret key for verifying the integrity of signed cookies.
|
|
||||||
# If you change this key, all old signed cookies will become invalid!
|
|
||||||
# Make sure the secret is at least 30 characters and all random,
|
|
||||||
# no regular words or you'll be exposed to dictionary attacks.
|
|
||||||
Osem::Application.config.secret_token = CONFIG['cookies_secret_token']
|
|
||||||
20
config/secrets.yml.example
Normal file
20
config/secrets.yml.example
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
defaults: &defaults
|
||||||
|
# You can generate secret keys with 'rake secret'
|
||||||
|
|
||||||
|
# For rails cookies
|
||||||
|
secret_key_base: '12345'
|
||||||
|
|
||||||
|
# For devise login tokens
|
||||||
|
devise_secret_key: '12345'
|
||||||
|
|
||||||
|
# Your errbit API key
|
||||||
|
# errbit_key: '12345'
|
||||||
|
|
||||||
|
development:
|
||||||
|
<<: *defaults
|
||||||
|
|
||||||
|
test:
|
||||||
|
<<: *defaults
|
||||||
|
|
||||||
|
production:
|
||||||
|
<<: *defaults
|
||||||
Loading…
Add table
Add a link
Reference in a new issue