open_conference_ware 1.0.0.pre2 → 1.0.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/.travis.yml +3 -0
- data/README.md +6 -4
- data/app/assets/javascripts/open_conference_ware/{persona.js → persona.js.erb} +1 -1
- data/app/assets/stylesheets/open_conference_ware/custom.css.scss +14 -18
- data/app/controllers/open_conference_ware/application_controller.rb +2 -2
- data/app/controllers/open_conference_ware/authentications_controller.rb +8 -0
- data/app/controllers/open_conference_ware/manage/events_controller.rb +2 -2
- data/app/controllers/open_conference_ware/proposals_controller.rb +1 -1
- data/app/helpers/open_conference_ware/snippets_helper.rb +1 -1
- data/app/helpers/open_conference_ware/user_favorites_helper.rb +8 -4
- data/app/mixins/open_conference_ware/settings_checkers_mixin.rb +1 -0
- data/app/models/open_conference_ware/event.rb +1 -8
- data/app/models/open_conference_ware/proposal.rb +54 -61
- data/app/models/open_conference_ware/snippet.rb +1 -6
- data/app/observers/open_conference_ware/cache_watcher.rb +3 -3
- data/app/views/layouts/open_conference_ware/_header.html.erb +3 -1
- data/app/views/open_conference_ware/422.html.erb +1 -1
- data/app/views/open_conference_ware/500.html.erb +1 -1
- data/app/views/open_conference_ware/proposals/_form.html.erb +5 -5
- data/app/views/open_conference_ware/proposals/_list.html.erb +4 -4
- data/app/views/open_conference_ware/proposals/_list_concise.html.erb +3 -3
- data/app/views/open_conference_ware/proposals/_sub_list.html.erb +2 -2
- data/app/views/open_conference_ware/proposals/_transition_control.html.erb +2 -2
- data/app/views/open_conference_ware/proposals/show.html.erb +33 -54
- data/db/migrate/20131203235216_create_open_conference_ware_comments.rb +1 -1
- data/db/migrate/20131203235418_create_open_conference_ware_events.rb +1 -2
- data/db/migrate/20131203235524_create_open_conference_ware_proposals.rb +5 -5
- data/db/migrate/20131203235723_create_open_conference_ware_rooms.rb +1 -1
- data/db/migrate/20131203235831_create_open_conference_ware_schedule_items.rb +2 -2
- data/db/migrate/20131203235934_create_open_conference_ware_session_types.rb +1 -1
- data/db/migrate/20131204000008_create_open_conference_ware_snippets.rb +1 -1
- data/db/migrate/20131204000048_create_open_conference_ware_taggings.rb +2 -2
- data/db/migrate/20131204000147_create_open_conference_ware_tracks.rb +1 -1
- data/db/migrate/20131204000355_create_proposals_users_join_table.rb +3 -0
- data/lib/generators/open_conference_ware/install/install_generator.rb +10 -0
- data/lib/generators/open_conference_ware/install/templates/config_initializer.rb +24 -2
- data/lib/generators/open_conference_ware/install/templates/secret_token.rb.erb +13 -0
- data/lib/generators/open_conference_ware/install/templates/secrets.yml.erb +18 -0
- data/lib/open_conference_ware.rb +10 -4
- data/lib/open_conference_ware/dependencies.rb +0 -1
- data/lib/open_conference_ware/version.rb +1 -1
- data/lib/tasks/open_conference_ware_tasks.rake +3 -2
- data/open_conference_ware.gemspec +0 -1
- data/spec/controllers/open_conference_ware/proposals_controller_spec.rb +5 -5
- data/spec/dummy/config/initializers/01_open_conference_ware.rb +24 -2
- data/spec/dummy/config/initializers/02_omniauth.rb +1 -1
- data/spec/dummy/config/initializers/secret_token.rb +2 -1
- data/spec/dummy/config/secrets.yml +18 -0
- data/spec/spec_helper_customizations.rb +2 -1
- data/spec/views/open_conference_ware/proposals/_transition_control.html.erb_spec.rb +2 -1
- data/spec/views/open_conference_ware/rooms/show.html.erb_spec.rb +1 -0
- data/spec/views/open_conference_ware/session_types/show.html.erb_spec.rb +1 -0
- data/spec/views/open_conference_ware/tracks/show.html.erb_spec.rb +1 -0
- data/util/transfer_schedule_items.rb +1 -1
- data/util/user_favorites_contention_report.rb +1 -1
- metadata +7 -22
- metadata.gz.sig +0 -0
- data/app/mixins/open_conference_ware/cache_lookups_mixin.rb +0 -128
- data/spec/integration/open_conference_ware/cache_lookups_mixin_spec.rb +0 -122
@@ -15,11 +15,6 @@ module OpenConferenceWare
|
|
15
15
|
#
|
16
16
|
|
17
17
|
class Snippet < OpenConferenceWare::Base
|
18
|
-
|
19
|
-
# Provide cached Snippet.lookup(slug) method.
|
20
|
-
include CacheLookupsMixin
|
21
|
-
cache_lookups_for :slug, order: :slug
|
22
|
-
|
23
18
|
# Load the Snippets as defined in the "spec/fixtures/snippets.yml" file and
|
24
19
|
# load them into the current database, overwriting any existing records.
|
25
20
|
def self.load_from_fixtures(overwrite = false)
|
@@ -43,7 +38,7 @@ module OpenConferenceWare
|
|
43
38
|
|
44
39
|
# Returns the content for a Snippet match +slug+, else raise an ActiveRecord::RecordNotFound.
|
45
40
|
def self.content_for(slug)
|
46
|
-
if record = self.
|
41
|
+
if record = self.find_by_slug(slug.to_s)
|
47
42
|
return record.content
|
48
43
|
else
|
49
44
|
raise ActiveRecord::RecordNotFound, "Couldn't find snippet: #{slug}"
|
@@ -20,10 +20,10 @@ module OpenConferenceWare
|
|
20
20
|
# Expire the cache
|
21
21
|
def self.expire(*args)
|
22
22
|
Rails.logger.info("CacheWatcher: expiring cache")
|
23
|
-
case Rails.cache
|
24
|
-
when ActiveSupport::Cache::MemCacheStore
|
23
|
+
case Rails.cache.class.name
|
24
|
+
when "ActiveSupport::Cache::MemCacheStore"
|
25
25
|
Rails.cache.instance_variable_get(:@data).flush_all
|
26
|
-
when ActiveSupport::Cache::FileStore, ActiveSupport::Cache::MemoryStore
|
26
|
+
when "ActiveSupport::Cache::FileStore", "ActiveSupport::Cache::MemoryStore"
|
27
27
|
Rails.cache.delete_matched(//) rescue nil
|
28
28
|
else
|
29
29
|
raise NotImplementedError, "Don't know how to expire cache: #{Rails.cache.class.name}"
|
@@ -91,7 +91,9 @@
|
|
91
91
|
<% if user_profiles? %>
|
92
92
|
<li><%= link_to "Edit profile", edit_user_path(current_user) %></li>
|
93
93
|
<% end -%>
|
94
|
-
|
94
|
+
<% if user_favorites? %>
|
95
|
+
<li><%= link_to( "My favorites", user_favorites_path(current_user) ) %>
|
96
|
+
<% end -%>
|
95
97
|
<li><%= link_to( "My proposals", proposals_user_path(current_user) ) %>
|
96
98
|
<li class="divider"></li>
|
97
99
|
<li><%= link_to "Sign Out", sign_out_path %></li>
|
@@ -7,5 +7,5 @@
|
|
7
7
|
<li>Our server's security token was just updated: please reload the form and try again.</li>
|
8
8
|
</ol>
|
9
9
|
<p>
|
10
|
-
If the instructions above didn't help, please <%= mail_to(
|
10
|
+
If the instructions above didn't help, please <%= mail_to(OpenConferenceWare.administrator_email, "contact the developers", :subject => "422 Unprocessable Entity on #{Socket.gethostname}:#{File.basename(Rails.root)}", :body => "What did you do that caused the error?\n\nWhat did you expect the system to do?\n\n") %>.
|
11
11
|
</p>
|
@@ -7,5 +7,5 @@
|
|
7
7
|
</p>
|
8
8
|
|
9
9
|
<p>
|
10
|
-
If you'd like to email additional information or get notified when the problem is resolved, <%= mail_to(
|
10
|
+
If you'd like to email additional information or get notified when the problem is resolved, <%= mail_to(OpenConferenceWare.administrator_email, "contact the developers", :subject => "500 Server Error on #{Socket.gethostname}:#{File.basename(Rails.root)}", :body => "What did you do that caused the error?\n\nWhat did you expect the system to do?\n\n") %>.
|
11
11
|
</p>
|
@@ -118,7 +118,7 @@
|
|
118
118
|
<% if admin? %>
|
119
119
|
<br /><span class='admin-only'><strong>WARNING:</strong> Titles are locked because other systems are currently depending on them. (MediaWiki, printed programs, etc.)</span>
|
120
120
|
<% else -%>
|
121
|
-
If you need to change this information, please <%= mail_to
|
121
|
+
If you need to change this information, please <%= mail_to OpenConferenceWare.administrator_email, 'contact the administrator' %>.
|
122
122
|
<% end -%>
|
123
123
|
</p>
|
124
124
|
<% end -%>
|
@@ -168,14 +168,14 @@
|
|
168
168
|
</td>
|
169
169
|
</tr>
|
170
170
|
<% end %>
|
171
|
-
<% if Proposal.audience_levels %>
|
171
|
+
<% if OpenConferenceWare::Proposal.audience_levels %>
|
172
172
|
<tr>
|
173
173
|
<td class="label-cell">
|
174
174
|
<%= required_field %><%= f.label :session_type_id, "Audience level" %>
|
175
175
|
</td>
|
176
176
|
<td>
|
177
177
|
<ul class='radio-set'>
|
178
|
-
<% for audience_level in Proposal.audience_levels %>
|
178
|
+
<% for audience_level in OpenConferenceWare::Proposal.audience_levels %>
|
179
179
|
<li>
|
180
180
|
<%= f.radio_button :audience_level, audience_level['slug'], :class => :radio %>
|
181
181
|
<label for="proposal_audience_level_<%= audience_level['slug'] %>">
|
@@ -184,7 +184,7 @@
|
|
184
184
|
</li>
|
185
185
|
<% end %>
|
186
186
|
</ul>
|
187
|
-
<p class='help'><%= Proposal.audience_level_hint %></p>
|
187
|
+
<p class='help'><%= OpenConferenceWare::Proposal.audience_level_hint %></p>
|
188
188
|
</td>
|
189
189
|
</tr>
|
190
190
|
|
@@ -216,7 +216,7 @@
|
|
216
216
|
</tr>
|
217
217
|
<% end %>
|
218
218
|
<tr>
|
219
|
-
<td class="label-cell"><%= f.label :note_to_organizers, "Note to organizers<br/ >(Optional, kept private)" %></td>
|
219
|
+
<td class="label-cell"><%= f.label :note_to_organizers, "Note to organizers<br/ >(Optional, kept private)".html_safe %></td>
|
220
220
|
<td>
|
221
221
|
<%= f.text_area :note_to_organizers, :rows => 3 %>
|
222
222
|
<p class='help'>(Is there anything else we should know about the room requirements or plans for your talk? E.g. you will be tapdancing, throwing broccoli into the audience, and need to rehearse beforehand.)</p>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
# * kind => Treat these records as :sessions or :proposals. REQUIRED.
|
7
7
|
# * sorter => Display the sort toolbar? Defaults to false.
|
8
8
|
|
9
|
-
records = Proposal.sort(records, params[:sort] || "title", params[:dir] != "desc")
|
9
|
+
records = OpenConferenceWare::Proposal.sort(records, params[:sort] || "title", params[:dir] != "desc")
|
10
10
|
%>
|
11
11
|
|
12
12
|
<% if proposal_excerpts? %>
|
@@ -121,9 +121,9 @@ records = Proposal.sort(records, params[:sort] || "title", params[:dir] != "desc
|
|
121
121
|
<p class="proposal">
|
122
122
|
<% styling = proposal_excerpts? ? 'display: inline-block' : 'inline' %>
|
123
123
|
<% if multiple_presenters? %>
|
124
|
-
<%= link_to(
|
124
|
+
<%= link_to(record.title, record, :class => "title", :style => styling) %>
|
125
125
|
<% else %>
|
126
|
-
<%= link_to(
|
126
|
+
<%= link_to("#{record.presenter} — #{record.title}".html_safe, record, :class => "title", :style => styling) %>
|
127
127
|
<% end %>
|
128
128
|
|
129
129
|
<span class="excerpt">
|
@@ -146,7 +146,7 @@ records = Proposal.sort(records, params[:sort] || "title", params[:dir] != "desc
|
|
146
146
|
<% end %>
|
147
147
|
<td width="0" class="unbreakable">
|
148
148
|
<p>
|
149
|
-
<% date = record.submitted_at.localtime.
|
149
|
+
<% date = record.submitted_at.localtime.strftime("%m/%d/%Y") if record.submitted_at.present? %>
|
150
150
|
<% if date_cache[date] %>
|
151
151
|
<!--
|
152
152
|
<span class="date-seen"><%= date %></span>
|
@@ -16,11 +16,11 @@ hide_rooms ||= false
|
|
16
16
|
# Establish classs
|
17
17
|
item_class = 'vevent'
|
18
18
|
item_class << ' light ' << track_css_class(track) if track
|
19
|
-
item_class << ' generic_item' if item.is_a?(ScheduleItem)
|
19
|
+
item_class << ' generic_item' if item.is_a?(OpenConferenceWare::ScheduleItem)
|
20
20
|
%>
|
21
21
|
<li class='<%= item_class %>' id='<%= item.class.name.underscore %>-<%= item.id %>'>
|
22
22
|
<div class='concise'>
|
23
|
-
<% if item.is_a?(ScheduleItem) %>
|
23
|
+
<% if item.is_a?(OpenConferenceWare::ScheduleItem) %>
|
24
24
|
<span class='summary'><%= h item.title %></span>
|
25
25
|
<% else %>
|
26
26
|
<%= user_favorite_control_for item %>
|
@@ -33,7 +33,7 @@ hide_rooms ||= false
|
|
33
33
|
<ul class='session_info'>
|
34
34
|
<li>
|
35
35
|
<strong>Title:</strong>
|
36
|
-
<% if item.is_a?(ScheduleItem) %>
|
36
|
+
<% if item.is_a?(OpenConferenceWare::ScheduleItem) %>
|
37
37
|
<%= h item.title %>
|
38
38
|
<% else %>
|
39
39
|
<%= link_to h(item.title), session_path(item) %>
|
@@ -36,7 +36,7 @@ include_user_favorites_javascript
|
|
36
36
|
}
|
37
37
|
|
38
38
|
## Get records from variable or through an association.
|
39
|
-
records = local_assigns[:records] || Proposal.populated_proposals_for(container)
|
39
|
+
records = local_assigns[:records] || OpenConferenceWare::Proposal.populated_proposals_for(container)
|
40
40
|
|
41
41
|
## Get events to organize records.
|
42
42
|
events_to_records = records.select(&:event).group_by(&:event)
|
@@ -53,7 +53,7 @@ include_user_favorites_javascript
|
|
53
53
|
<% if event.proposal_status_published? %>
|
54
54
|
<% event_records_by_confirmation = event_records.group_by(&:confirmed?) %>
|
55
55
|
<%= displayer.call(:sessions, event_records_by_confirmation[true], false) %>
|
56
|
-
<% unless container.kind_of?(Room) %>
|
56
|
+
<% unless container.kind_of?(OpenConferenceWare::Room) %>
|
57
57
|
<%= displayer.call(:proposals, event_records_by_confirmation[false], true) %>
|
58
58
|
<% end %>
|
59
59
|
<% run_when_dom_is_ready "archive_proposals_sub_list(#{event.id})" %>
|
@@ -8,8 +8,8 @@ proposal ||= @proposal
|
|
8
8
|
%>
|
9
9
|
|
10
10
|
<div id="proposal_transition_control_container_<%= proposal.id %>" class="proposal_transition_control_container proposal_control_container">
|
11
|
-
<% if proposal.
|
12
|
-
No valid transitions available from status <%= proposal.
|
11
|
+
<% if proposal.aasm.events(proposal.aasm.current_state).empty? %>
|
12
|
+
No valid transitions available from status <%= proposal.aasm.current_state %>
|
13
13
|
<% else %>
|
14
14
|
<%= select('proposal', 'transition', proposal.titles_and_statuses[1 .. proposal.titles_and_statuses.length], {:include_blank => proposal.titles_and_statuses[0][0]}, {:class => 'proposal_transition_control proposal_control', :x_proposal_id => proposal.id}) %>
|
15
15
|
<% end %>
|
@@ -101,51 +101,6 @@ show_private_note = (can_edit?(@proposal) || selector?) && ! @proposal.note_to_o
|
|
101
101
|
<%= render :partial => "open_conference_ware/proposals/admin_controls" %>
|
102
102
|
|
103
103
|
<%= cache "#{@kind}_#{@proposal.id},edit_#{can_edit?(@proposal)},private_note_#{show_private_note}" do %>
|
104
|
-
<% unless multiple_presenters? %>
|
105
|
-
<div class="standard-form">
|
106
|
-
<table>
|
107
|
-
<tr>
|
108
|
-
<td colspan="2">
|
109
|
-
<h4>Speaker</h4>
|
110
|
-
</td>
|
111
|
-
</tr>
|
112
|
-
<tr>
|
113
|
-
<td class="label-cell"><label>Speaker</label ></td>
|
114
|
-
<td class="data-cell"><p>
|
115
|
-
<% if user_profiles? %>
|
116
|
-
<%= link_to(h(@proposal.user.fullname), user_path(@proposal.user)) %>
|
117
|
-
<% else %>
|
118
|
-
<%=h @proposal.presenter %>
|
119
|
-
<% end %>
|
120
|
-
</p></td>
|
121
|
-
</tr>
|
122
|
-
<% unless @profile.affiliation.blank? %>
|
123
|
-
<tr>
|
124
|
-
<td class="label-cell"><label>Affiliation</label ></td>
|
125
|
-
<td class="data-cell"><p><%=h @profile.affiliation %></p></td>
|
126
|
-
</tr>
|
127
|
-
<% end %>
|
128
|
-
<% if can_edit?(@proposal) %>
|
129
|
-
<tr>
|
130
|
-
<td class="label-cell"><label>Email (private)</label ></td>
|
131
|
-
<% email = @profile.email %>
|
132
|
-
<td class="data-cell"><p><%=link_to h(email), "mailto:"+h(email) %></p></td>
|
133
|
-
</tr>
|
134
|
-
<% end %>
|
135
|
-
<% unless @profile.website.blank? %>
|
136
|
-
<tr>
|
137
|
-
<td class="label-cell"><label>URL</label ></td>
|
138
|
-
<td class="data-cell"><p><%= display_link_to @profile.website %></p></td>
|
139
|
-
</tr>
|
140
|
-
<% end %>
|
141
|
-
<tr>
|
142
|
-
<td class="label-cell"><label>Biography</label ></td>
|
143
|
-
<td class="data-cell"><%= preserve_formatting_of @profile.biography %></td>
|
144
|
-
</tr>
|
145
|
-
</table>
|
146
|
-
</div>
|
147
|
-
<% end %>
|
148
|
-
|
149
104
|
<div class='show-proposal'>
|
150
105
|
|
151
106
|
<% if current_user_is_proposal_speaker? %>
|
@@ -198,9 +153,6 @@ show_private_note = (can_edit?(@proposal) || selector?) && ! @proposal.note_to_o
|
|
198
153
|
<%= @proposal.audience_level_label %>
|
199
154
|
</div>
|
200
155
|
<% end %>
|
201
|
-
<div class='proposal-slug'>
|
202
|
-
<%= @proposal.slug %>
|
203
|
-
</div>
|
204
156
|
<% if schedule_visible? && @proposal.start_time %>
|
205
157
|
<div class='proposal-scheduling'>
|
206
158
|
<b>Scheduled:</b>
|
@@ -243,6 +195,39 @@ show_private_note = (can_edit?(@proposal) || selector?) && ! @proposal.note_to_o
|
|
243
195
|
<%= preserve_formatting_of @proposal.note_to_organizers %>
|
244
196
|
<% end %>
|
245
197
|
|
198
|
+
<% if user_profiles? %>
|
199
|
+
<h3><%= @proposal.users.size <= 1 ? "Speaker" : "Speakers" %></h3>
|
200
|
+
<%= render :partial => 'open_conference_ware/users/list', :locals => { :users => @proposal.users.by_name, :hide_rooms => true, :only_for_event => @event } %>
|
201
|
+
<% else %>
|
202
|
+
<h3><%= @proposal.presenter %></h3>
|
203
|
+
<table>
|
204
|
+
<% if @proposal.affiliation.present? -%>
|
205
|
+
<tr>
|
206
|
+
<th>Affiliation</th>
|
207
|
+
<td><%= @proposal.affiliation %></td>
|
208
|
+
</tr>
|
209
|
+
<% end -%>
|
210
|
+
<% if @proposal.website.present? -%>
|
211
|
+
<tr>
|
212
|
+
<th>Website</th>
|
213
|
+
<td><%= display_link_to(@proposal.website, :nofollow => true, :class => 'url') %></td>
|
214
|
+
</tr>
|
215
|
+
<% end -%>
|
216
|
+
<% if admin? || can_edit?(@proposal) %>
|
217
|
+
<tr>
|
218
|
+
<th>Email (private)</th>
|
219
|
+
<td><%= display_link_to(@proposal.email, :mailto => true) %></td>
|
220
|
+
</tr>
|
221
|
+
<% end -%>
|
222
|
+
<% if @proposal.biography.present? %>
|
223
|
+
<tr>
|
224
|
+
<th>Biography</th>
|
225
|
+
<td><%= display_textile_for @proposal.biography %></td>
|
226
|
+
</tr>
|
227
|
+
</table>
|
228
|
+
<% end %>
|
229
|
+
<% end %>
|
230
|
+
|
246
231
|
<div class="record-controls">
|
247
232
|
<% if can_edit?(@proposal) %>
|
248
233
|
<%= link_to 'Edit proposal', edit_proposal_path(@proposal), :class => "editable" %>
|
@@ -251,12 +236,6 @@ show_private_note = (can_edit?(@proposal) || selector?) && ! @proposal.note_to_o
|
|
251
236
|
<%= link_to "Back to list of #{@kind.to_s.pluralize}", records_path, :class => "cancelable" %>
|
252
237
|
</div>
|
253
238
|
|
254
|
-
<% if multiple_presenters? %>
|
255
|
-
<h3><%= @proposal.users.size == 1 ? "Speaker" : "Speakers" %></h3>
|
256
|
-
|
257
|
-
<%= render :partial => 'open_conference_ware/users/list', :locals => { :users => @proposal.users.by_name, :hide_rooms => true, :only_for_event => @event } %>
|
258
|
-
|
259
|
-
<% end %>
|
260
239
|
|
261
240
|
<% end %>
|
262
241
|
|
@@ -9,6 +9,6 @@ class CreateOpenConferenceWareComments < ActiveRecord::Migration
|
|
9
9
|
t.datetime "updated_at"
|
10
10
|
end
|
11
11
|
|
12
|
-
add_index "open_conference_ware_comments", ["proposal_id"]
|
12
|
+
add_index "open_conference_ware_comments", ["proposal_id"]
|
13
13
|
end
|
14
14
|
end
|
@@ -21,7 +21,6 @@ class CreateOpenConferenceWareEvents < ActiveRecord::Migration
|
|
21
21
|
t.boolean "show_proposal_confirmation_controls", default: false
|
22
22
|
end
|
23
23
|
|
24
|
-
add_index "open_conference_ware_events", ["
|
25
|
-
add_index "open_conference_ware_events", ["slug"], name: "index_events_on_slug", using: :btree
|
24
|
+
add_index "open_conference_ware_events", ["slug"]
|
26
25
|
end
|
27
26
|
end
|
@@ -27,10 +27,10 @@ class CreateOpenConferenceWareProposals < ActiveRecord::Migration
|
|
27
27
|
t.datetime "notified_at"
|
28
28
|
end
|
29
29
|
|
30
|
-
add_index "open_conference_ware_proposals", ["event_id"]
|
31
|
-
add_index "open_conference_ware_proposals", ["room_id"]
|
32
|
-
add_index "open_conference_ware_proposals", ["submitted_at"]
|
33
|
-
add_index "open_conference_ware_proposals", ["track_id"]
|
34
|
-
add_index "open_conference_ware_proposals", ["user_id"]
|
30
|
+
add_index "open_conference_ware_proposals", ["event_id"]
|
31
|
+
add_index "open_conference_ware_proposals", ["room_id"]
|
32
|
+
add_index "open_conference_ware_proposals", ["submitted_at"]
|
33
|
+
add_index "open_conference_ware_proposals", ["track_id"]
|
34
|
+
add_index "open_conference_ware_proposals", ["user_id"]
|
35
35
|
end
|
36
36
|
end
|
@@ -15,6 +15,6 @@ class CreateOpenConferenceWareRooms < ActiveRecord::Migration
|
|
15
15
|
t.datetime "image_updated_at"
|
16
16
|
end
|
17
17
|
|
18
|
-
add_index "open_conference_ware_rooms", ["event_id"]
|
18
|
+
add_index "open_conference_ware_rooms", ["event_id"]
|
19
19
|
end
|
20
20
|
end
|
@@ -12,7 +12,7 @@ class CreateOpenConferenceWareScheduleItems < ActiveRecord::Migration
|
|
12
12
|
t.datetime "updated_at"
|
13
13
|
end
|
14
14
|
|
15
|
-
add_index "open_conference_ware_schedule_items", ["event_id"]
|
16
|
-
add_index "open_conference_ware_schedule_items", ["room_id"]
|
15
|
+
add_index "open_conference_ware_schedule_items", ["event_id"]
|
16
|
+
add_index "open_conference_ware_schedule_items", ["room_id"]
|
17
17
|
end
|
18
18
|
end
|
@@ -9,6 +9,6 @@ class CreateOpenConferenceWareSessionTypes < ActiveRecord::Migration
|
|
9
9
|
t.datetime "updated_at"
|
10
10
|
end
|
11
11
|
|
12
|
-
add_index "open_conference_ware_session_types", ["event_id"]
|
12
|
+
add_index "open_conference_ware_session_types", ["event_id"]
|
13
13
|
end
|
14
14
|
end
|
@@ -10,6 +10,6 @@ class CreateOpenConferenceWareSnippets < ActiveRecord::Migration
|
|
10
10
|
t.datetime "updated_at"
|
11
11
|
end
|
12
12
|
|
13
|
-
add_index "open_conference_ware_snippets", ["slug"],
|
13
|
+
add_index "open_conference_ware_snippets", ["slug"], unique: true
|
14
14
|
end
|
15
15
|
end
|
@@ -10,7 +10,7 @@ class CreateOpenConferenceWareTaggings < ActiveRecord::Migration
|
|
10
10
|
t.datetime "created_at"
|
11
11
|
end
|
12
12
|
|
13
|
-
add_index "open_conference_ware_taggings", ["tag_id"]
|
14
|
-
add_index "open_conference_ware_taggings", ["taggable_id", "taggable_type", "context"], name: "
|
13
|
+
add_index "open_conference_ware_taggings", ["tag_id"]
|
14
|
+
add_index "open_conference_ware_taggings", ["taggable_id", "taggable_type", "context"], name: "index_ocw_taggings_on_id_type_and_context"
|
15
15
|
end
|
16
16
|
end
|
@@ -10,6 +10,6 @@ class CreateOpenConferenceWareTracks < ActiveRecord::Migration
|
|
10
10
|
t.text "excerpt"
|
11
11
|
end
|
12
12
|
|
13
|
-
add_index "open_conference_ware_tracks", ["event_id"]
|
13
|
+
add_index "open_conference_ware_tracks", ["event_id"]
|
14
14
|
end
|
15
15
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'securerandom'
|
2
|
+
|
1
3
|
class OpenConferenceWare::InstallGenerator < Rails::Generators::Base
|
2
4
|
source_root File.expand_path('../templates', __FILE__)
|
3
5
|
|
@@ -15,10 +17,18 @@ class OpenConferenceWare::InstallGenerator < Rails::Generators::Base
|
|
15
17
|
copy_file "omniauth_initializer.rb", "config/initializers/02_omniauth.rb"
|
16
18
|
end
|
17
19
|
|
20
|
+
def generate_secrets_yml
|
21
|
+
template "secrets.yml.erb", "config/secrets.yml"
|
22
|
+
end
|
23
|
+
|
18
24
|
def mount_engine
|
19
25
|
route %Q{mount OpenConferenceWare::Engine => "#{mount_point}"}
|
20
26
|
end
|
21
27
|
|
28
|
+
def replace_secret_token_initializer
|
29
|
+
template "secret_token.rb.erb", "config/initializers/secret_token.rb"
|
30
|
+
end
|
31
|
+
|
22
32
|
def include_engine_seeds
|
23
33
|
append_to_file "db/seeds.rb" do
|
24
34
|
<<-SEED
|
@@ -6,6 +6,11 @@ OpenConferenceWare.configure do |config|
|
|
6
6
|
# in some cases with a string like "/open_conference_ware"
|
7
7
|
config.mount_point = '<%= mount_point %>'
|
8
8
|
|
9
|
+
# Mailer host
|
10
|
+
# The hostname to use when generating links in emails.
|
11
|
+
# This shoud be the domain where OCW is hosted.
|
12
|
+
config.mailer_host = 'ocw.local'
|
13
|
+
|
9
14
|
# Event name, or organization running events:
|
10
15
|
config.organization = 'Open Source Bridge'
|
11
16
|
|
@@ -22,6 +27,21 @@ OpenConferenceWare.configure do |config|
|
|
22
27
|
# TODO: Setting the current event here is a short-term hack and will be replaced shortly with a Site record that tracks the current event in the database and provides a way to set it through an admin web UI.
|
23
28
|
# config.current_event_slug = '2012'
|
24
29
|
|
30
|
+
##[ Secrets ]##
|
31
|
+
# Some are sensitive and should not be checked in to version control.
|
32
|
+
# These are loaded from config/secrets.yml, which should be privately copied to your
|
33
|
+
# server and linked by your deployment process.
|
34
|
+
|
35
|
+
secrets_file = Rails.root.join('config', 'secrets.yml')
|
36
|
+
if File.exists?(secrets_file)
|
37
|
+
secrets = YAML.load_file(secrets_file)
|
38
|
+
config.administrator_email = secrets["administrator_email"]
|
39
|
+
config.comments_secret = secrets["comments_secret"]
|
40
|
+
config.secret_key_base = secrets["secret_key_base"]
|
41
|
+
else
|
42
|
+
raise "Oops, config/secrets.yml could not be found."
|
43
|
+
end
|
44
|
+
|
25
45
|
##[ OCW Features ]##
|
26
46
|
# Many features of OpenConferenceWare can be toggled via these settings
|
27
47
|
|
@@ -64,13 +84,16 @@ OpenConferenceWare.configure do |config|
|
|
64
84
|
# Can users add comments until a toggle is flipped on the event?
|
65
85
|
config.have_event_proposal_comments_after_deadline = true
|
66
86
|
|
87
|
+
# Can users note their favorite sessions?
|
88
|
+
config.have_user_favorites = true
|
89
|
+
|
67
90
|
# What audience experience levels can a proposal be classified as?
|
68
91
|
# The list will be displayed on the form in the order defined below.
|
69
92
|
# The "slug" is the unique key defining the particular audience level, while
|
70
93
|
# the "label" is the human-readable value displayed.
|
71
94
|
#
|
72
95
|
# Set this to a blank array to disable audience levels
|
73
|
-
config.proposal_audience_levels
|
96
|
+
config.proposal_audience_levels = [
|
74
97
|
{slug: 'a', label: 'Beginner'},
|
75
98
|
{slug: 'b', label: 'Intermediate'},
|
76
99
|
{slug: 'c', label: 'Advanced'}
|
@@ -106,5 +129,4 @@ OpenConferenceWare.configure do |config|
|
|
106
129
|
# NOTE: The current default theme never displays any breadcrumbs, but infrastructure exists to support them.
|
107
130
|
#
|
108
131
|
# config.breadcrumbs = [['Home', 'http://openconferenceware.org']]
|
109
|
-
|
110
132
|
end
|