├── .rspec
├── lib
├── tasks
│ ├── .gitkeep
│ ├── open_conference_ware_tasks.rake
│ └── snippets.rake
├── open_conference_ware
│ ├── version.rb
│ ├── omni_auth_builder.rb
│ ├── dependencies.rb
│ └── engine.rb
├── ext
│ ├── string_possessiveize.rb
│ ├── color_rgb_serializer_fix.rb
│ └── vpim_icalendar_extra_properties.rb
└── generators
│ └── open_conference_ware
│ ├── install
│ ├── USAGE
│ ├── templates
│ │ ├── secret_token.rb.erb
│ │ ├── secrets.yml.erb
│ │ └── omniauth_initializer.rb
│ └── install_generator.rb
│ └── views
│ └── views_generator.rb
├── spec
├── dummy
│ ├── log
│ │ └── .keep
│ ├── app
│ │ ├── mailers
│ │ │ └── .keep
│ │ ├── models
│ │ │ ├── .keep
│ │ │ └── concerns
│ │ │ │ └── .keep
│ │ ├── assets
│ │ │ ├── images
│ │ │ │ └── .keep
│ │ │ ├── stylesheets
│ │ │ │ └── application.css
│ │ │ └── javascripts
│ │ │ │ └── application.js
│ │ ├── controllers
│ │ │ ├── concerns
│ │ │ │ └── .keep
│ │ │ └── application_controller.rb
│ │ ├── helpers
│ │ │ └── application_helper.rb
│ │ └── views
│ │ │ └── layouts
│ │ │ └── application.html.erb
│ ├── lib
│ │ └── assets
│ │ │ └── .keep
│ ├── public
│ │ ├── favicon.ico
│ │ └── 500.html
│ ├── bin
│ │ ├── rake
│ │ ├── bundle
│ │ └── rails
│ ├── config
│ │ ├── routes.rb
│ │ ├── initializers
│ │ │ ├── session_store.rb
│ │ │ ├── filter_parameter_logging.rb
│ │ │ ├── mime_types.rb
│ │ │ ├── backtrace_silencers.rb
│ │ │ ├── wrap_parameters.rb
│ │ │ ├── secret_token.rb
│ │ │ ├── 02_omniauth.rb
│ │ │ └── inflections.rb
│ │ ├── environment.rb
│ │ ├── boot.rb
│ │ ├── database.yml
│ │ ├── locales
│ │ │ └── en.yml
│ │ ├── secrets.yml
│ │ ├── application.rb
│ │ └── environments
│ │ │ └── development.rb
│ ├── config.ru
│ ├── Rakefile
│ ├── db
│ │ └── seeds.rb
│ └── README.rdoc
├── rcov.opts
├── spec.opts
├── factories
│ ├── common_factory.rb
│ ├── proposal_user_factory.rb
│ ├── user_favorite_factory.rb
│ ├── snippet_factory.rb
│ ├── room_factory.rb
│ ├── session_types_factory.rb
│ ├── track_factory.rb
│ ├── schedule_item_factory.rb
│ ├── authentication_factory.rb
│ ├── user_factory.rb
│ └── event_factory.rb
├── fixtures
│ ├── open_conference_ware_user_favorites.yml
│ ├── open_conference_ware_rooms.yml
│ ├── open_conference_ware_session_types.yml
│ ├── open_conference_ware_schedule_items.yml
│ └── open_conference_ware_comments.yml
├── features
│ ├── sign_in_spec.rb
│ └── snippets_spec.rb
├── models
│ └── open_conference_ware
│ │ ├── schedule_item_spec.rb
│ │ ├── room_spec.rb
│ │ ├── selector_vote_spec.rb
│ │ ├── snippet_spec.rb
│ │ ├── session_type_spec.rb
│ │ ├── track_spec.rb
│ │ └── user_favorite_spec.rb
├── helpers
│ └── open_conference_ware
│ │ ├── rooms_helper_spec.rb
│ │ ├── tracks_helper_spec.rb
│ │ ├── user_favorites_helper_spec.rb
│ │ ├── session_types_helper_spec.rb
│ │ ├── authentications_helper_spec.rb
│ │ └── proposals_helper_spec.rb
├── support
│ ├── valid_params_extraction.rb
│ ├── fixture_shortcuts.rb
│ ├── authenticated_test_helper.rb
│ ├── add_all_helpers_to_view.rb
│ └── omniauth.rb
├── views
│ └── open_conference_ware
│ │ ├── rooms
│ │ ├── show.html.erb_spec.rb
│ │ └── index.html.erb_spec.rb
│ │ ├── session_types
│ │ ├── index.html.erb_spec.rb
│ │ ├── show.html.erb_spec.rb
│ │ ├── new.html.erb_spec.rb
│ │ └── edit.html.erb_spec.rb
│ │ ├── tracks
│ │ ├── show.html.erb_spec.rb
│ │ ├── edit.html.erb_spec.rb
│ │ ├── new.html.erb_spec.rb
│ │ └── index.html.erb_spec.rb
│ │ ├── users
│ │ └── index_spec.rb
│ │ ├── proposals
│ │ ├── _transition_control.html.erb_spec.rb
│ │ └── _room_control.html.erb_spec.rb
│ │ ├── user_favorites
│ │ └── index.html.erb_spec.rb
│ │ └── selector_votes
│ │ └── index.html.erb_spec.rb
└── controllers
│ └── open_conference_ware
│ └── sessions_routing_spec.rb
├── .coveralls.yml
├── app
├── views
│ ├── open_conference_ware
│ │ ├── events
│ │ │ ├── show.html.erb
│ │ │ ├── index.html.erb
│ │ │ └── speakers.html.erb
│ │ ├── rooms
│ │ │ ├── new.html.erb
│ │ │ ├── edit.html.erb
│ │ │ ├── index.html.erb
│ │ │ ├── show.html.erb
│ │ │ └── _form.html.erb
│ │ ├── manage
│ │ │ ├── events
│ │ │ │ ├── new.html.erb
│ │ │ │ ├── edit.html.erb
│ │ │ │ └── index.html.erb
│ │ │ └── snippets
│ │ │ │ ├── new.html.erb
│ │ │ │ ├── edit.html.erb
│ │ │ │ ├── show.html.erb
│ │ │ │ ├── index.html.erb
│ │ │ │ └── _form.html.erb
│ │ ├── tracks
│ │ │ ├── edit.html.erb
│ │ │ ├── new.html.erb
│ │ │ ├── _colors.css.erb
│ │ │ ├── show.html.erb
│ │ │ ├── index.html.erb
│ │ │ └── _form.html.erb
│ │ ├── proposals
│ │ │ ├── new.html.erb
│ │ │ ├── edit.html.erb
│ │ │ ├── create.html.erb
│ │ │ ├── _schedule_block.html.erb
│ │ │ ├── _search_speakers.html.erb
│ │ │ ├── sessions_index_terse.html.erb
│ │ │ ├── _transition_control.html.erb
│ │ │ ├── _room_control.html.erb
│ │ │ ├── _schedule_control.html.erb
│ │ │ ├── _manage_speakers.html.erb
│ │ │ └── _admin_controls.html.erb
│ │ ├── schedule_items
│ │ │ ├── new.html.erb
│ │ │ ├── edit.html.erb
│ │ │ ├── index.html.erb
│ │ │ ├── show.html.erb
│ │ │ └── _form.html.erb
│ │ ├── session_types
│ │ │ ├── new.html.erb
│ │ │ ├── edit.html.erb
│ │ │ ├── show.html.erb
│ │ │ ├── index.html.erb
│ │ │ └── _form.html.erb
│ │ ├── comments
│ │ │ ├── index.html.erb
│ │ │ ├── index.atom.builder
│ │ │ └── _list.html.erb
│ │ ├── users
│ │ │ ├── new.html.erb
│ │ │ ├── show.html.erb
│ │ │ ├── _account_box.html.erb
│ │ │ ├── _list.html.erb
│ │ │ ├── index.html.erb
│ │ │ └── proposals.html.erb
│ │ ├── authentications
│ │ │ ├── _developer.html.erb
│ │ │ ├── sign_in.html.erb
│ │ │ ├── _persona.html.erb
│ │ │ └── _openid.html.erb
│ │ ├── 404.html.erb
│ │ ├── _google_analytics.html.erb
│ │ ├── 500.html.erb
│ │ ├── user_favorites
│ │ │ └── index.html.erb
│ │ ├── 422.html.erb
│ │ ├── speaker_mailer
│ │ │ └── speaker_email.text.erb
│ │ └── _email_link.html.erb
│ └── layouts
│ │ └── open_conference_ware
│ │ ├── application.atom.erb
│ │ └── scaffold.html.erb
├── assets
│ ├── javascripts
│ │ └── open_conference_ware
│ │ │ ├── ie.js
│ │ │ ├── persona.js.erb
│ │ │ ├── base.js
│ │ │ ├── spinner.js
│ │ │ ├── util.js
│ │ │ ├── schedule.js
│ │ │ └── application.js
│ ├── images
│ │ └── open_conference_ware
│ │ │ ├── disk.png
│ │ │ ├── edit.png
│ │ │ ├── feed.png
│ │ │ ├── lock.png
│ │ │ ├── plus.png
│ │ │ ├── redx.png
│ │ │ ├── star.png
│ │ │ ├── time.png
│ │ │ ├── accept.png
│ │ │ ├── comment.png
│ │ │ ├── delete.png
│ │ │ ├── heart.png
│ │ │ ├── house.png
│ │ │ ├── pencil.png
│ │ │ ├── quote.png
│ │ │ ├── rails.png
│ │ │ ├── spinner.gif
│ │ │ ├── arrow-out.png
│ │ │ ├── arrow-up.png
│ │ │ ├── document.png
│ │ │ ├── extras
│ │ │ ├── 01.png
│ │ │ ├── 05.png
│ │ │ ├── 06.png
│ │ │ ├── 1.png
│ │ │ ├── 14.png
│ │ │ ├── 16.png
│ │ │ ├── 2.png
│ │ │ ├── 21.png
│ │ │ ├── 28.png
│ │ │ ├── 3.png
│ │ │ ├── 31.png
│ │ │ ├── 32.png
│ │ │ ├── 35.png
│ │ │ ├── 36.png
│ │ │ ├── 4.png
│ │ │ ├── 44.png
│ │ │ ├── 45.png
│ │ │ ├── 46.png
│ │ │ ├── 001_01.png
│ │ │ ├── 001_05.png
│ │ │ ├── 001_21.png
│ │ │ ├── 001_23.png
│ │ │ ├── 001_24.png
│ │ │ ├── 001_29.png
│ │ │ ├── cancel.png
│ │ │ ├── 001_05x16.png
│ │ │ ├── cancelx16.png
│ │ │ └── icon.trashcan.gif
│ │ │ ├── favorite.png
│ │ │ ├── reset-fff.png
│ │ │ ├── tag_blue.png
│ │ │ ├── arrow-left.png
│ │ │ ├── arrow-right.png
│ │ │ ├── comment_edit.png
│ │ │ ├── new_window.gif
│ │ │ ├── openid-icon.gif
│ │ │ ├── spinner-big.gif
│ │ │ ├── arrow_refresh.png
│ │ │ ├── document-blank.png
│ │ │ ├── jquery.wysiwyg.gif
│ │ │ ├── ignite_portland_header3_clear.png
│ │ │ └── ignite_portland_header3_clear_cropped.png
│ └── stylesheets
│ │ └── open_conference_ware
│ │ ├── application.css
│ │ └── scaffold.css
├── helpers
│ └── open_conference_ware
│ │ ├── rooms_helper.rb
│ │ ├── session_types_helper.rb
│ │ ├── tracks_helper.rb
│ │ ├── selector_votes_helper.rb
│ │ ├── field_annotation_helper.rb
│ │ ├── cache_if_helper.rb
│ │ ├── display_textile_for_helper.rb
│ │ ├── focus_helper.rb
│ │ ├── localcss_helper.rb
│ │ ├── scroll_to_helper.rb
│ │ ├── page_title_helper.rb
│ │ ├── user_favorites_helper.rb
│ │ ├── authentications_helper.rb
│ │ ├── display_link_to_helper.rb
│ │ └── snippets_helper.rb
├── models
│ └── open_conference_ware
│ │ ├── base.rb
│ │ ├── selector_vote.rb
│ │ ├── comment.rb
│ │ ├── session_type.rb
│ │ ├── user_favorite.rb
│ │ ├── track.rb
│ │ ├── schedule_item.rb
│ │ └── room.rb
├── mixins
│ └── open_conference_ware
│ │ ├── schedule_overlaps_mixin.rb
│ │ ├── simple_slug_mixin.rb
│ │ ├── normalize_url_mixin.rb
│ │ └── settings_checkers_mixin.rb
├── controllers
│ └── open_conference_ware
│ │ ├── events_controller.rb
│ │ └── authentications_controller.rb
└── observers
│ └── open_conference_ware
│ └── cache_watcher.rb
├── ci
├── database.postgresql.yml
├── database.sqlite.yml
├── database.mysql.yml
├── copy_database_config.rb
└── Gemfile.ci
├── original_graphics
└── favorite.psd
├── vendor
└── assets
│ ├── images
│ ├── farbtastic
│ │ ├── mask.png
│ │ ├── marker.png
│ │ └── wheel.png
│ └── openid-selector
│ │ └── openid-providers-en.png
│ ├── javascripts
│ ├── audiojs
│ │ ├── audiojs.swf
│ │ └── player-graphics.gif
│ └── openid-selector
│ │ └── openid-en.js
│ ├── fonts
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.ttf
│ └── glyphicons-halflings-regular.woff
│ └── stylesheets
│ ├── farbtastic.css.scss
│ └── openid-selector
│ └── openid.css.scss
├── features
├── step_definitions
│ ├── notification_steps.rb
│ ├── comment_create_steps.rb
│ ├── comment_destroy_steps.rb
│ ├── authentication_steps.rb
│ └── comment_new_steps.rb
├── comment_create.feature
├── support
│ ├── helpers.rb
│ └── paths.rb
├── comment_destroy.feature
└── comment_new.feature
├── config
└── initializers
│ ├── acts_as_taggable_on.rb
│ └── date_time_formats.rb
├── db
├── migrate
│ ├── 20131204000129_create_open_conference_ware_tags.rb
│ ├── 20131204000230_create_open_conference_ware_user_favorites.rb
│ ├── 20131203235910_create_open_conference_ware_selector_votes.rb
│ ├── 20131204000355_create_proposals_users_join_table.rb
│ ├── 20131203235216_create_open_conference_ware_comments.rb
│ ├── 20131203235128_create_open_conference_ware_authentications.rb
│ ├── 20131203235934_create_open_conference_ware_session_types.rb
│ ├── 20131204000147_create_open_conference_ware_tracks.rb
│ ├── 20131204000008_create_open_conference_ware_snippets.rb
│ ├── 20131204000048_create_open_conference_ware_taggings.rb
│ ├── 20131203235831_create_open_conference_ware_schedule_items.rb
│ ├── 20131203235723_create_open_conference_ware_rooms.rb
│ ├── 20131204000251_create_open_conference_ware_users.rb
│ ├── 20131203235418_create_open_conference_ware_events.rb
│ └── 20131203235524_create_open_conference_ware_proposals.rb
└── seeds.rb
├── util
├── README.md
├── user_favorites_contention_report.sh
├── update_proposal_status_from_voting_spreadsheet.rb
├── transfer_schedule_items.rb
└── assign_rooms.rb
├── bin
└── rails
├── .gitignore
├── .autotest
├── .travis.yml
├── CONTRIBUTORS.md
├── Rakefile
├── Gemfile
├── TODO.txt
├── LICENSE.txt
├── Guardfile
└── gem-public_cert.pem
/.rspec:
--------------------------------------------------------------------------------
1 | --color
2 |
--------------------------------------------------------------------------------
/lib/tasks/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/log/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/app/mailers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/app/models/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/lib/assets/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/app/assets/images/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/dummy/app/models/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.coveralls.yml:
--------------------------------------------------------------------------------
1 | service_name: travis-ci
2 |
--------------------------------------------------------------------------------
/spec/dummy/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/events/show.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/rcov.opts:
--------------------------------------------------------------------------------
1 | --exclude "spec/*,gems/*"
2 | --rails
--------------------------------------------------------------------------------
/spec/spec.opts:
--------------------------------------------------------------------------------
1 | --colour
2 | --format progress
3 | --reverse
4 |
--------------------------------------------------------------------------------
/app/views/layouts/open_conference_ware/application.atom.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
--------------------------------------------------------------------------------
/spec/dummy/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/open_conference_ware/ie.js:
--------------------------------------------------------------------------------
1 | //= require html5shiv
2 | //= require respond.min
3 |
--------------------------------------------------------------------------------
/lib/open_conference_ware/version.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | VERSION = "1.0.0.pre4"
3 | end
4 |
--------------------------------------------------------------------------------
/ci/database.postgresql.yml:
--------------------------------------------------------------------------------
1 | test:
2 | adapter: postgresql
3 | database: ocw_test
4 | username: postgres
5 |
--------------------------------------------------------------------------------
/ci/database.sqlite.yml:
--------------------------------------------------------------------------------
1 | test:
2 | adapter: sqlite3
3 | database: db/test.sqlite3
4 | timeout: 500
5 |
6 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/rooms/new.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "New Room" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/ci/database.mysql.yml:
--------------------------------------------------------------------------------
1 | test:
2 | adapter: mysql2
3 | database: ocw_test
4 | username: travis
5 | encoding: utf8
6 |
--------------------------------------------------------------------------------
/original_graphics/favorite.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/original_graphics/favorite.psd
--------------------------------------------------------------------------------
/app/views/open_conference_ware/rooms/edit.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Editing room" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/spec/dummy/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative '../config/boot'
3 | require 'rake'
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/manage/events/new.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "New event" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/tracks/edit.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Editing track" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/manage/snippets/new.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "New snippet" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/proposals/new.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Create a proposal" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/spec/dummy/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 | mount OpenConferenceWare::Engine => "/open_conference_ware"
3 | end
4 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/schedule_items/new.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "New Schedule Item" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/session_types/new.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "New Session Type" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/vendor/assets/images/farbtastic/mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/vendor/assets/images/farbtastic/mask.png
--------------------------------------------------------------------------------
/app/views/open_conference_ware/schedule_items/edit.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Editing schedule item" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/session_types/edit.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Editing session types" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/tracks/new.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "New track for #{@event.title}" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/vendor/assets/images/farbtastic/marker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/vendor/assets/images/farbtastic/marker.png
--------------------------------------------------------------------------------
/vendor/assets/images/farbtastic/wheel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/vendor/assets/images/farbtastic/wheel.png
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/rooms_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module RoomsHelper
3 | include FauxRoutesMixin
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/audiojs/audiojs.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/vendor/assets/javascripts/audiojs/audiojs.swf
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/disk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/disk.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/edit.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/feed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/feed.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/lock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/lock.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/plus.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/redx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/redx.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/star.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/time.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/time.png
--------------------------------------------------------------------------------
/app/views/open_conference_ware/manage/events/edit.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Editing event: #{@event.title}" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/manage/snippets/edit.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Edit snippet: #{h @snippet.slug}" %>
2 |
3 | <%= render :partial => "form" %>
4 |
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/accept.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/accept.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/comment.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/delete.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/heart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/heart.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/house.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/house.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/pencil.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/pencil.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/quote.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/quote.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/rails.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/rails.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/spinner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/spinner.gif
--------------------------------------------------------------------------------
/spec/dummy/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/arrow-out.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/arrow-out.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/arrow-up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/arrow-up.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/document.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/document.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/01.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/05.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/06.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/1.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/14.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/16.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/2.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/21.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/28.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/3.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/31.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/31.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/32.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/35.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/36.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/4.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/44.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/44.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/45.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/45.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/46.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/46.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/favorite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/favorite.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/reset-fff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/reset-fff.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/tag_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/tag_blue.png
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/session_types_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module SessionTypesHelper
3 | include FauxRoutesMixin
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/features/step_definitions/notification_steps.rb:
--------------------------------------------------------------------------------
1 | Then /^I should get a "([^\"]*)" notification$/ do |kind|
2 | page.should have_selector(".alert-#{kind}")
3 | end
4 |
--------------------------------------------------------------------------------
/vendor/assets/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/vendor/assets/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/vendor/assets/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/vendor/assets/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/arrow-left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/arrow-left.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/arrow-right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/arrow-right.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/comment_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/comment_edit.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/new_window.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/new_window.gif
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/openid-icon.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/openid-icon.gif
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/spinner-big.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/spinner-big.gif
--------------------------------------------------------------------------------
/vendor/assets/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/vendor/assets/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/vendor/assets/javascripts/audiojs/player-graphics.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/vendor/assets/javascripts/audiojs/player-graphics.gif
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/arrow_refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/arrow_refresh.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/document-blank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/document-blank.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/001_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/001_01.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/001_05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/001_05.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/001_21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/001_21.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/001_23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/001_23.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/001_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/001_24.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/001_29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/001_29.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/cancel.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/jquery.wysiwyg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/jquery.wysiwyg.gif
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/001_05x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/001_05x16.png
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/cancelx16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/cancelx16.png
--------------------------------------------------------------------------------
/spec/dummy/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path('../../config/application', __FILE__)
3 | require_relative '../config/boot'
4 | require 'rails/commands'
5 |
--------------------------------------------------------------------------------
/vendor/assets/images/openid-selector/openid-providers-en.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/vendor/assets/images/openid-selector/openid-providers-en.png
--------------------------------------------------------------------------------
/config/initializers/acts_as_taggable_on.rb:
--------------------------------------------------------------------------------
1 | ActsAsTaggableOn::Tagging.table_name = 'open_conference_ware_taggings'
2 | ActsAsTaggableOn::Tag.table_name = 'open_conference_ware_tags'
3 |
--------------------------------------------------------------------------------
/spec/factories/common_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | sequence(:email) { |n| "user#{n}@provider.com" }
3 | sequence(:website) { |n| "http://provider.com/~user#{n}" }
4 | end
5 |
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/extras/icon.trashcan.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/extras/icon.trashcan.gif
--------------------------------------------------------------------------------
/spec/dummy/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Rails.application
5 |
--------------------------------------------------------------------------------
/spec/factories/proposal_user_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :proposal_user do
3 | # :belongs_to associations:
4 | # * :proposal
5 | # * :user
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4 |
--------------------------------------------------------------------------------
/app/models/open_conference_ware/base.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | class Base < ActiveRecord::Base
3 | self.abstract_class = true
4 | self.include_root_in_json = true
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/lib/ext/string_possessiveize.rb:
--------------------------------------------------------------------------------
1 | class String
2 |
3 | # Returns the posessive form of a string.
4 | def possessiveize
5 | self + "'" + ([115,83].include?(self[-1]) ? '' : 's')
6 | end
7 | end
--------------------------------------------------------------------------------
/spec/dummy/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the Rails application.
5 | Dummy::Application.initialize!
6 |
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/ignite_portland_header3_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/ignite_portland_header3_clear.png
--------------------------------------------------------------------------------
/spec/fixtures/open_conference_ware_user_favorites.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # one:
4 | # column: value
5 | #
6 | # two:
7 | # column: value
8 |
--------------------------------------------------------------------------------
/app/assets/images/open_conference_ware/ignite_portland_header3_clear_cropped.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/osbridge/openconferenceware/HEAD/app/assets/images/open_conference_ware/ignite_portland_header3_clear_cropped.png
--------------------------------------------------------------------------------
/app/views/open_conference_ware/comments/index.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Comments" %>
2 |
3 | <%= render :partial => 'open_conference_ware/comments/list', :locals => { :comments => @comments, :proposal_links => true }%>
4 |
--------------------------------------------------------------------------------
/spec/factories/user_favorite_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :user_favorite, class: OpenConferenceWare::UserFavorite do
3 | # :belongs_to associations:
4 | # * :user
5 | # * :proposal
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/features/step_definitions/comment_create_steps.rb:
--------------------------------------------------------------------------------
1 | When /^I create a comment$/ do
2 | step 'I fill in "comment_email" with "my@address.com"'
3 | step 'I fill in "comment_message" with "Yay"'
4 | step 'I press "Create comment"'
5 | end
6 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/tracks_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module TracksHelper
3 | include FauxRoutesMixin
4 |
5 | def track_css_class(track)
6 | "track-#{track.id}"
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/ci/copy_database_config.rb:
--------------------------------------------------------------------------------
1 | require 'fileutils'
2 |
3 | which_config = "ci/database.#{ENV['DB'] || 'sqlite'}.yml"
4 |
5 | puts "Copying database configuration for CI: #{which_config}"
6 | FileUtils.cp which_config, 'spec/dummy/config/database.yml'
7 |
--------------------------------------------------------------------------------
/db/migrate/20131204000129_create_open_conference_ware_tags.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareTags < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_tags do |t|
4 | t.string "name"
5 | end
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/lib/open_conference_ware/omni_auth_builder.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | class OmniAuthBuilder < ::OmniAuth::Builder
3 | def provider(*args)
4 | OpenConferenceWare.auth_providers << args.first
5 | super
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/events/index.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Events" %>
2 |
3 |
4 | <% for event in @events %>
5 |
6 | <%= link_to h(event.title), event_proposals_path(event.slug) %>
7 |
8 | <% end %>
9 |
10 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/spec/factories/snippet_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :snippet, class: OpenConferenceWare::Snippet do
3 | sequence(:slug){|n| "test-snippet-#{n}"}
4 | description "A testing snippet"
5 | content "This is only a test."
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/spec/features/sign_in_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "mocking OmniAuth for testing" do
4 | before do
5 | mock_sign_in(:admin)
6 | end
7 |
8 | it "signs me in" do
9 | page.should have_content("Sign Out")
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 | # Mime::Type.register_alias "text/html", :iphone
6 |
--------------------------------------------------------------------------------
/spec/dummy/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | # Prevent CSRF attacks by raising an exception.
3 | # For APIs, you may want to use :null_session instead.
4 | protect_from_forgery with: :exception
5 | end
6 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/open_conference_ware/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | *= require bootstrap
3 | *= require bootstrap-theme
4 | *= require persona-buttons
5 | *= require farbtastic
6 | *= require openid-selector/openid
7 | *= require open_conference_ware/custom
8 | */
9 |
10 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/users/new.html.erb:
--------------------------------------------------------------------------------
1 | <%= error_messages_for :user %>
2 | <%= form_for :user, :url => users_path do |f| -%>
3 | Email
4 | <%= f.text_field :email %>
5 |
6 | <%= submit_tag 'Sign up' %>
7 | <% end -%>
8 |
--------------------------------------------------------------------------------
/spec/dummy/config/boot.rb:
--------------------------------------------------------------------------------
1 | # Set up gems listed in the Gemfile.
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3 |
4 | require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
5 | $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
6 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/users/show.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title @user.label %>
2 |
3 | <% cache "user_#{@user.id},edit_#{can_edit?(@user)}" do %>
4 | <%= render :partial => 'open_conference_ware/users/block', :locals => { :user => @user, :display_sub_list => true } %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/spec/dummy/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require File.expand_path('../config/application', __FILE__)
5 |
6 | Dummy::Application.load_tasks
7 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/selector_votes_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module SelectorVotesHelper
3 | def user_votes_count(user, event)
4 | user.selector_votes.joins(:proposal).where('open_conference_ware_proposals.event_id = ?', event.id).count
5 | end
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/util/README.md:
--------------------------------------------------------------------------------
1 | # /util
2 |
3 | This directory contains useful scripts that we've written to automate bits and peices of things that came up while running [Open Source Bridge](http://opensourcebridge.org). It would be nice to wrap some of the more common things up into rake tasks, but for now, they live here.
--------------------------------------------------------------------------------
/util/user_favorites_contention_report.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | cd `dirname $0`
4 | script=$PWD/`basename $0 .sh`.rb
5 | base=/var/www/bridgepdx_ocw
6 | report=$base/`basename $0 .sh`.txt
7 | cd $base/current
8 | ./script/runner -e production $script | tee $report
9 | echo "# Saved report to: $report"
10 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/proposals/edit.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Edit proposal" %>
2 |
3 | <% content_for :form_controls do %>
4 | <%= link_to "Destroy", @proposal, :data => { :confirm => "Are you sure?" }, :method => :delete, :class => "deletable" %>
5 | <% end %>
6 |
7 | <%= render :partial => "form" %>
8 |
--------------------------------------------------------------------------------
/features/comment_create.feature:
--------------------------------------------------------------------------------
1 | Feature: Comment create
2 | In order to create a comment
3 | As someone
4 | I want to create a comment
5 |
6 | Scenario: Create a comment
7 | Given I am on a proposal accepting comments
8 | When I create a comment
9 | Then I should get a "success" notification
10 |
--------------------------------------------------------------------------------
/spec/factories/room_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :room, class: OpenConferenceWare::Room do
3 | sequence(:name) { |n| "Room #{n}" }
4 | capacity 40
5 | size "12 x 20 feet"
6 | seating_configuration "Theater"
7 |
8 | # :belongs_to association
9 | # * :event
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/lib/ext/color_rgb_serializer_fix.rb:
--------------------------------------------------------------------------------
1 | require 'color'
2 |
3 | # Make colors serializable.
4 | module Color
5 | class RGB
6 | def to_s
7 | self.html.to_s
8 | end
9 |
10 | def to_json(*args)
11 | self.to_s
12 | end
13 |
14 | def to_xml(*args)
15 | self.to_s
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/proposals/create.html.erb:
--------------------------------------------------------------------------------
1 | Thank you for submitting <%= link_to "your proposal", proposal_path(@proposal) %> to <%= @event.title %>!
2 |
3 | Next Steps
4 |
5 | You'll hear back from us after <%= @event.deadline.to_date.to_s(:long) %>, when proposal submissions close.
6 |
7 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/field_annotation_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module FieldAnnotationHelper
3 | def required_field
4 | content_tag :span, "*", class: "required-field"
5 | end
6 |
7 | def private_field
8 | content_tag :span, "%", class: "private-field"
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/spec/models/open_conference_ware/schedule_item_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::ScheduleItem do
4 | before(:each) do
5 | @valid_attributes = {
6 | }
7 | end
8 |
9 | it "should create a new instance given valid attributes" do
10 | ScheduleItem.create!(@valid_attributes)
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/config/initializers/date_time_formats.rb:
--------------------------------------------------------------------------------
1 | date_time_formats = {
2 | ocw_default: '%m/%d/%Y %I:%M%p',
3 | ocw_date_time12: "%m/%d/%Y %I:%M%p",
4 | ocw_date_time24: "%m/%d/%Y %H:%M",
5 | ocw_date_time_long: "%A, %B %d, %Y %I:%M%p",
6 | }
7 |
8 | Time::DATE_FORMATS.merge!(date_time_formats)
9 | Date::DATE_FORMATS.merge!(date_time_formats)
10 |
--------------------------------------------------------------------------------
/spec/factories/session_types_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :session_type, class: OpenConferenceWare::SessionType do
3 | sequence(:title) { |n| "Session Type #{n}" }
4 | description { |record| "#{record.title} description" }
5 | duration "45"
6 |
7 | # :belongs_to association
8 | # * :event
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
3 |
4 | ENGINE_ROOT = File.expand_path('../..', __FILE__)
5 | ENGINE_PATH = File.expand_path('../../lib/open_conference_ware/engine', __FILE__)
6 |
7 | require 'rails/all'
8 | require 'rails/engine/commands'
9 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.bak
2 | *.diff
3 | *.rcov
4 | *.swp
5 | *.tmp
6 | *~
7 | /*.sql
8 | /coverage.*
9 | /coverage/*
10 | .cadre
11 | /tags
12 | /tmp/*
13 | .ruby-version
14 | .ruby-gemset
15 | .bundle
16 | .sass-cache/
17 | spec/dummy/db/*.sqlite3
18 | spec/dummy/db/*.sqlite3-journal
19 | spec/dummy/log/*.log
20 | spec/dummy/tmp/
21 | spec/dummy/.sass-cache
22 | Gemfile.lock
23 |
--------------------------------------------------------------------------------
/spec/factories/track_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :track, class: OpenConferenceWare::Track do
3 | sequence(:title) { |n| "Track #{n}" }
4 | description { |record| "#{record.title} description" }
5 | color "#000000"
6 | excerpt "A track"
7 | association :event
8 |
9 | # :belongs_to association
10 | # * :event
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20131204000230_create_open_conference_ware_user_favorites.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareUserFavorites < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_user_favorites do |t|
4 | t.integer "user_id"
5 | t.integer "proposal_id"
6 | t.datetime "created_at"
7 | t.datetime "updated_at"
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/spec/fixtures/open_conference_ware_rooms.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | ballroom:
4 | name: "Ballroom"
5 | description: "It's a room, for balls"
6 |
7 | burnside:
8 | name: "Burnside"
9 | description: "It's a room, under construction"
10 |
11 | morrison:
12 | name: "Morrison"
13 | description: "It's a room with a funny walkway"
14 |
--------------------------------------------------------------------------------
/spec/dummy/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Dummy
5 | <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6 | <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7 | <%= csrf_meta_tags %>
8 |
9 |
10 |
11 | <%= yield %>
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/assets/javascripts/open_conference_ware/persona.js.erb:
--------------------------------------------------------------------------------
1 | function personaLogin() {
2 | navigator.id.get(function(assertion) {
3 | if (assertion) {
4 | $('#persona_form input[name=assertion]').val(assertion);
5 | $('#persona_form').submit();
6 | } else {
7 | window.location = "<%= OpenConferenceWare::Engine.routes.url_helpers.auth_failure_path %>"
8 | }
9 | });
10 | }
11 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/events/speakers.html.erb:
--------------------------------------------------------------------------------
1 | <% include_user_favorites_javascript %>
2 | <% run_when_dom_is_ready('bind_calendar_items();' )%>
3 | <% page_title 'Speakers' %>
4 |
5 | <% cache "speakers,event_#{@event.id},admin_#{admin?}" do %>
6 | <%= render :partial => 'open_conference_ware/users/list', :locals => { :users => @speakers, :hide_rooms => true, :only_for_event => @event } %>
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/spec/models/open_conference_ware/room_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::Room do
4 | before(:each) do
5 | @valid_attributes = {
6 | name: "The Living Room",
7 | event: stub_model(Event)
8 | }
9 | end
10 |
11 | it "should build a valid new instance given valid attributes" do
12 | build(:room, @valid_attributes).should be_valid
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/ci/Gemfile.ci:
--------------------------------------------------------------------------------
1 | case ENV['DB']
2 | when "mysql"; gem "mysql2"
3 | when "sqlite"; gem "sqlite3"
4 | when "postgresql"; gem "pg"
5 | end
6 |
7 | def gem(*args)
8 | # Override 'gem' method to block any other database gems in the 'real' Gemfile
9 | super unless %w(pg sqlite3 mysql2).include?(args.first)
10 | end
11 |
12 | # Eval Gemfile
13 | eval(IO.read(File.join(File.dirname(__FILE__), 'Gemfile')), binding)
14 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/proposals/_schedule_block.html.erb:
--------------------------------------------------------------------------------
1 | <%
2 | # Display a schedule block's time and the calendar items within it.
3 | #
4 | # Locals:
5 | # * block => A ScheduleBlock to display Proposal and ScheduleItems for.
6 | %>
7 | <%= normalize_time(block, :context => block.start_time.to_date) %>
8 | <%= render :partial => 'open_conference_ware/proposals/list_concise', :locals => { :items => block.items }%>
9 |
--------------------------------------------------------------------------------
/db/migrate/20131203235910_create_open_conference_ware_selector_votes.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareSelectorVotes < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_selector_votes do |t|
4 | t.integer "user_id", null: false
5 | t.integer "proposal_id", null: false
6 | t.integer "rating", null: false
7 | t.text "comment"
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/assets/javascripts/open_conference_ware/base.js:
--------------------------------------------------------------------------------
1 | // Set up jQuery ajax request to include the CSRF token
2 | $.ajaxSetup({
3 | headers: {
4 | 'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
5 | }
6 | });
7 |
8 | // app object used to expose rails variables to javascript
9 | var app = new Object;
10 |
11 | // Is a user logged in?
12 | function logged_in() {
13 | return !app.current_user == false;
14 | }
15 |
--------------------------------------------------------------------------------
/spec/factories/schedule_item_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :schedule_item, class: OpenConferenceWare::ScheduleItem do
3 | sequence(:title) { |n| "ScheduleItem #{n}" }
4 | excerpt "My schedule item description"
5 | description "My schedule item description"
6 | start_time { Time.now }
7 | duration 45
8 |
9 | # :belongs_to associations:
10 | # * :event
11 | # * :room
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/cache_if_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module CacheIfHelper
3 | # Caches +block+ in view only if the +condition+ is true.
4 | # http://skionrails.wordpress.com/2008/05/22/conditional-fragment-caching/
5 | def cache_if(condition, name={}, &block)
6 | if condition
7 | cache(name, &block)
8 | else
9 | block.call
10 | end
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/spec/models/open_conference_ware/selector_vote_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::SelectorVote do
4 | it "should build a valid record if given valid attributes" do
5 | event = create(:populated_event)
6 | proposal = proposal_for_event(event)
7 |
8 | vote = proposal.selector_votes.new(rating: 1, comment: "meh")
9 | vote.user = build(:user)
10 | vote.should be_valid
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/helpers/open_conference_ware/rooms_helper_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::RoomsHelper do
4 |
5 | #Delete this example and add some real ones or delete this file
6 | it "should be included in the object returned by #helper" do
7 | included_modules = (class << helper; self; end).send :included_modules
8 | included_modules.should include(OpenConferenceWare::RoomsHelper)
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/display_textile_for_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module DisplayTextileForHelper
3 | def display_textile_for(text)
4 | return auto_link(textilize(sanitize(text || "")).html_safe, :all, rel: 'nofollow').html_safe
5 | end
6 |
7 | def display_textile_help_link
8 | return link_to('Formatting', 'http://redcloth.org/hobix.com/textile/', target: "_blank")
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/spec/helpers/open_conference_ware/tracks_helper_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::TracksHelper do
4 |
5 | #Delete this example and add some real ones or delete this file
6 | it "should be included in the object returned by #helper" do
7 | included_modules = (class << helper; self; end).send :included_modules
8 | included_modules.should include(OpenConferenceWare::TracksHelper)
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/spec/helpers/open_conference_ware/user_favorites_helper_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::UserFavoritesHelper do
4 |
5 | #Delete this example and add some real ones or delete this file
6 | it "is included in the helper object" do
7 | included_modules = (class << helper; self; end).send :included_modules
8 | included_modules.should include(OpenConferenceWare::UserFavoritesHelper)
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/authentications/_developer.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
Developer
3 |
7 |
8 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/authentications/sign_in.html.erb:
--------------------------------------------------------------------------------
1 | <% auth_providers_with_partials.each do |provider| %>
2 | <%= render provider.to_s %>
3 | <% end %>
4 |
5 | <% if auth_providers_without_partials.present? %>
6 | Other Providers
7 |
8 | <% auth_providers_without_partials.each do |provider| %>
9 | <%= link_to provider.to_s.titleize, auth_path(provider) %>
10 | <% end %>
11 |
12 | <% end %>
13 |
--------------------------------------------------------------------------------
/db/migrate/20131204000355_create_proposals_users_join_table.rb:
--------------------------------------------------------------------------------
1 | class CreateProposalsUsersJoinTable < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_proposals_users, :id => false do |t|
4 | t.integer :proposal_id
5 | t.integer :user_id
6 | end
7 |
8 | add_index "open_conference_ware_proposals_users", ["proposal_id"]
9 | add_index "open_conference_ware_proposals_users", ["user_id"]
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/spec/support/valid_params_extraction.rb:
--------------------------------------------------------------------------------
1 | module ValidParamsExtraction
2 | def extract_valid_params(model)
3 | string_value_hash = Hash[model.attributes.map{|k,v| [k,v.to_s]}]
4 | comparable_attributes = string_value_hash.reject{|k,v|
5 | %w(created_at updated_at id event_id).include?(k.to_s)
6 | }
7 |
8 | return comparable_attributes
9 | end
10 | end
11 |
12 | RSpec.configure do |c|
13 | c.include ValidParamsExtraction
14 | end
15 |
16 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/rooms/show.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/rooms/show.html.erb" do
4 | include OpenConferenceWare::RoomsHelper
5 | before(:each) do
6 | stub_settings_accessors_on(view)
7 | assign(:room, stub_model(Room))
8 | @event = stub_current_event!
9 | view.stub(:admin?).and_return(false)
10 | end
11 |
12 | it "should render a room" do
13 | render
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/lib/generators/open_conference_ware/install/USAGE:
--------------------------------------------------------------------------------
1 | Description:
2 | Installs initializers to configure OpenConferenceWare
3 |
4 | Example:
5 | rails generate open_conference_ware:install /ocw
6 |
7 | This will:
8 | - create config/initializers/01_open_conference_ware.rb
9 | - create config/initializers/02_omniauth.rb
10 | - mount OpenConferenceWare at the given mount point (/ocw)
11 | - set up OpenConferenceWare's seed data
12 |
13 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/focus_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module FocusHelper
3 |
4 | # Focus the form input on the +target+ id element.
5 | def focus(target)
6 | # # Plain JavaScript
7 | # content_for :javascript, <<-HERE
8 | # document.getElementById('#{target}').focus();
9 | # HERE
10 |
11 | # jQuery
12 | run_when_dom_is_ready "$('##{h target.to_s}').focus();"
13 | end
14 |
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/localcss_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module LocalcssHelper
3 | # Use local CSS files? These are used if the server is running the
4 | # "development" environment, or if there is a "localcss.flag" file, or the
5 | # LOCALCSS environmental variable is set.
6 | def localcss?
7 | return Rails.env == "development" || ENV['LOCALCSS'] || File.exist?(File.join(Rails.root, "localcss.flag"))
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/spec/dummy/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # This file should contain all the record creation needed to seed the database with its default values.
2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3 | #
4 | # Examples:
5 | #
6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7 | # Mayor.create(name: 'Emanuel', city: cities.first)
8 |
9 | # Include OpenConferenceWare's seed data
10 | OpenConferenceWare::Engine.load_seed
11 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/404.html.erb:
--------------------------------------------------------------------------------
1 |
2 | Sorry, the record you were looking for does not exist. It may have been deleted or you entered an incorrect URL.
3 |
4 |
5 |
6 | If you believe this is an error, <%= mail_to(OpenConferenceWare.administrator_email, "contact the developers", :subject => "404 Not Found 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") %>.
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/tracks/_colors.css.erb:
--------------------------------------------------------------------------------
1 | <% for track in tracks %>
2 | /* <%= track.title %> */
3 | .<%= track_css_class(track) %> { color: <%= track.color.html %>; }
4 | .<%= track_css_class(track) %>.block { background: <%= track.color.html %>; color: #fff; }
5 | .<%= track_css_class(track) %>.light { background: <%= track.color.adjust_brightness(60).html %>; }
6 | .<%= track_css_class(track) %>.light:hover { background: <%= track.color.adjust_brightness(40).html %>; }
7 | <% end %>
--------------------------------------------------------------------------------
/db/migrate/20131203235216_create_open_conference_ware_comments.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareComments < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_comments do |t|
4 | t.string "name"
5 | t.string "email"
6 | t.text "message"
7 | t.integer "proposal_id"
8 | t.datetime "created_at"
9 | t.datetime "updated_at"
10 | end
11 |
12 | add_index "open_conference_ware_comments", ["proposal_id"]
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/features/step_definitions/comment_destroy_steps.rb:
--------------------------------------------------------------------------------
1 | Then /^I should be able to destroy (\d+) comments$/ do |count|
2 | count = count.to_i
3 | if count > 0
4 | page.should have_selector(".proposal-comments a[href]", text: 'Destroy', count: count.to_i)
5 | else
6 | page.should_not have_selector(".proposal-comments a[href]", text: 'Destroy')
7 | end
8 | end
9 |
10 | When /^I destroy a comment$/ do
11 | @comment = @proposal.comments.first
12 | delete comment_path(@comment)
13 | end
14 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/_google_analytics.html.erb:
--------------------------------------------------------------------------------
1 |
5 |
10 |
--------------------------------------------------------------------------------
/db/migrate/20131203235128_create_open_conference_ware_authentications.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareAuthentications < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_authentications do |t|
4 | t.integer "user_id"
5 | t.string "provider"
6 | t.string "uid"
7 | t.string "name"
8 | t.string "email"
9 | t.text "info"
10 | t.datetime "created_at"
11 | t.datetime "updated_at"
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/rooms/index.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Rooms" %>
2 |
3 |
4 | <% for room in @rooms.sort_by(&:name) %>
5 | <%= link_to h(room.name), room_path(room) %>
6 | <%= display_textile_for textilize room.description %>
7 | <% end %>
8 |
9 |
10 |
11 | <%= link_to 'New room', new_room_path, :class => "addable" if admin? %>
12 | <%= link_to 'Back to proposals', event_proposals_path(@event), :class => "cancelable" %>
13 |
14 |
--------------------------------------------------------------------------------
/spec/controllers/open_conference_ware/sessions_routing_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::ProposalsController do
4 | routes { OpenConferenceWare::Engine.routes }
5 |
6 | describe "route recognition" do
7 |
8 | it "should generate params { controller: 'proposals', action => 'sessions_index' } from GET /sessions" do
9 | {get: "/sessions"}.should route_to(controller: "open_conference_ware/proposals", action: "sessions_index")
10 | end
11 |
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/spec/models/open_conference_ware/snippet_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::Snippet do
4 |
5 | it "should find the content for the slug" do
6 | snippet = create(:snippet, slug: 'fireplace',
7 | description: 'the metal box',
8 | content: 'things on fire')
9 |
10 | Snippet.content_for('fireplace').should == 'things on fire'
11 | Snippet['fireplace'].should == 'things on fire'
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/users/_account_box.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= link_to( image_tag( current_user.photo.url(:avatar), :class => 'user-photo photo' ), current_user ) if current_user.photo.file? %>
3 |
<%= link_to current_user.label, current_user %>
4 |
5 | <% if user_profiles? %>
6 | <%= link_to "Edit profile", edit_user_path(current_user) %> |
7 | <% end -%>
8 | <%= link_to "Sign out", sign_out_path %>
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.autotest:
--------------------------------------------------------------------------------
1 | require 'autotest/redgreen'
2 |
3 | Autotest.add_hook :run do |autotest|
4 | autotest.add_exception(/\.git/)
5 | autotest.add_exception(/\.hg/)
6 | autotest.add_exception(/\.svn/)
7 | autotest.add_exception(/^\.\/config/)
8 | autotest.add_exception(/^\.\/coverage/)
9 | autotest.add_exception(/^\.\/db/)
10 | autotest.add_exception(/^\.\/log/)
11 | autotest.add_exception(/^\.\/public/)
12 | autotest.add_exception(/^\.\/tmp/)
13 | autotest.add_exception(/^\.\/vendor/)
14 | end
15 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/scroll_to_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module ScrollToHelper
3 | # Scroll the window with jQuery to the target selection.
4 | #
5 | # To an id:
6 | #
7 | # <% scroll_to '#event_open_text' %>
8 | #
9 | # To a query:
10 | # <% scroll_to 'label[for=event_open_text]' %>
11 | def scroll_to(target)
12 | run_when_dom_is_ready "$('html,body').animate({scrollTop: $('#{h target.to_s}').offset().top},'slow');"
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/db/migrate/20131203235934_create_open_conference_ware_session_types.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareSessionTypes < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_session_types do |t|
4 | t.string "title"
5 | t.text "description"
6 | t.integer "duration"
7 | t.integer "event_id"
8 | t.datetime "created_at"
9 | t.datetime "updated_at"
10 | end
11 |
12 | add_index "open_conference_ware_session_types", ["event_id"]
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/db/migrate/20131204000147_create_open_conference_ware_tracks.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareTracks < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_tracks do |t|
4 | t.string "title"
5 | t.text "description"
6 | t.string "color"
7 | t.integer "event_id"
8 | t.datetime "created_at"
9 | t.datetime "updated_at"
10 | t.text "excerpt"
11 | end
12 |
13 | add_index "open_conference_ware_tracks", ["event_id"]
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/features/step_definitions/authentication_steps.rb:
--------------------------------------------------------------------------------
1 | def login_as(login)
2 | if login.blank?
3 | logout
4 | else
5 | @user = User.find(ActiveRecord::FixtureSet.identify(login))
6 | post browser_session_path, login_as: @user.login
7 | end
8 | end
9 |
10 | def logout
11 | @user = nil
12 | delete sign_out_path
13 | session[:user].should == nil
14 | end
15 |
16 | Given /^I am logged in as "([^\"]*)"$/ do |login|
17 | login_as(login)
18 | end
19 |
20 | Given /^I am not logged in$/ do
21 | logout
22 | end
23 |
--------------------------------------------------------------------------------
/app/assets/javascripts/open_conference_ware/spinner.js:
--------------------------------------------------------------------------------
1 | /*---[ page_spinner ]-------------------------------------------------*/
2 |
3 | // Display a big spinner in the middle of the page.
4 | function page_spinner_start() {
5 | $(document.createElement("div")).attr('id','page_spinner').text('Working...').prependTo('body').show(100);
6 | }
7 |
8 | // Hide the big spinner displayed in the middle of the page by`page_spinner_start`.
9 | function page_spinner_stop() {
10 | $('#page_spinner').hide(100, function(){ $(this).remove() });
11 | }
12 |
--------------------------------------------------------------------------------
/spec/helpers/open_conference_ware/session_types_helper_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::SessionTypesHelper do
4 |
5 | before(:each) do
6 | @event = stub_current_event!
7 | end
8 |
9 | #Delete this example and add some real ones or delete this file
10 | it "should be included in the object returned by #helper" do
11 | included_modules = (class << helper; self; end).send :included_modules
12 | included_modules.should include(OpenConferenceWare::SessionTypesHelper)
13 | end
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/rooms/index.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/rooms/index.html.erb" do
4 | include OpenConferenceWare::RoomsHelper
5 |
6 | before(:each) do
7 | @event = stub_current_event!
8 | assign(:rooms, [
9 | stub_model(Room, name: "Foo room", event: @event),
10 | stub_model(Room, name: "Bar room", event: @event),
11 | ])
12 | view.stub(:admin?).and_return(false)
13 | end
14 |
15 | it "should render list of rooms" do
16 | render
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/models/open_conference_ware/session_type_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::SessionType do
4 | fixtures :all
5 |
6 | it "should sort alphabetically by title" do
7 | things = [ build(:session_type, title: 'I love cats'),
8 | build(:session_type, title: 'A really big dog'),
9 | nil ]
10 | sorted_things = things.sort
11 | sorted_things[0].should be_nil
12 | sorted_things[1].title.should == 'A really big dog'
13 | sorted_things[2].title.should == 'I love cats'
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/session_types/index.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/session_types/index.html.erb" do
4 | include OpenConferenceWare::SessionTypesHelper
5 |
6 | before(:each) do
7 | @event = stub_current_event!
8 | assign(:session_types, [
9 | stub_model(SessionType, event: @event),
10 | stub_model(SessionType, event: @event)
11 | ])
12 | view.stub(:admin?).and_return(false)
13 | end
14 |
15 | it "should render list of session_types" do
16 | render
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/helpers/open_conference_ware/authentications_helper_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | # Specs in this file have access to a helper object that includes
4 | # the AuthenticationsHelper. For example:
5 | #
6 | # describe AuthenticationsHelper do
7 | # describe "string concat" do
8 | # it "concats two strings with spaces" do
9 | # expect(helper.concat_strings("this","that")).to eq("this that")
10 | # end
11 | # end
12 | # end
13 | describe OpenConferenceWare::AuthenticationsHelper do
14 | pending "add some examples to (or delete) #{__FILE__}"
15 | end
16 |
--------------------------------------------------------------------------------
/features/support/helpers.rb:
--------------------------------------------------------------------------------
1 | # From http://wiki.github.com/aslakhellesoy/cucumber/fixtures
2 | Before do
3 | ActiveRecord::FixtureSet.reset_cache
4 | fixtures_folder = Rails.root.join('spec', 'fixtures')
5 | fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') }
6 | ActiveRecord::FixtureSet.create_fixtures(fixtures_folder, fixtures)
7 | end
8 |
9 | # Return the boolean for the given string, e.g., "y" is true.
10 | def boolean_for(truth)
11 | case truth
12 | when true, /^y/i, /^t/i
13 | true
14 | else
15 | false
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/500.html.erb:
--------------------------------------------------------------------------------
1 |
2 | Sorry, you found a bug.
3 |
4 |
5 |
6 | A complete log of everything that just happened been sent to the developers and will be fixed soon.
7 |
8 |
9 |
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 |
12 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/session_types/show.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/session_types/show.html.erb" do
4 | include OpenConferenceWare::SessionTypesHelper
5 | before(:each) do
6 | stub_settings_accessors_on(view)
7 | assign(:session_type, stub_model(SessionType))
8 | view.stub(:admin?).and_return(false)
9 |
10 | @event = stub_current_event!(controller: view)
11 |
12 | view.stub(:schedule_visible?).and_return(true)
13 | end
14 |
15 | it "should render attributes in " do
16 | render
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/support/fixture_shortcuts.rb:
--------------------------------------------------------------------------------
1 | # Sets up unprefixed shortcuts for namespaced open_conference_ware_*
2 | # fixtures, so that specs can still call users(:quentin) instead of
3 | # open_conference_ware_users(:quentin)
4 |
5 | module FixtureShortcuts
6 | Dir.glob(OpenConferenceWare::Engine.root.join('spec', 'fixtures', 'open_conference_ware_*.yml')).each do |f|
7 | f = File.basename(f, '.yml')
8 |
9 | define_method f.sub('open_conference_ware_','') do |*args|
10 | send(f, *args)
11 | end
12 | end
13 | end
14 |
15 | RSpec.configure do |c|
16 | c.include FixtureShortcuts
17 | end
18 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9 | end
10 |
11 | # To enable root element in JSON for ActiveRecord objects.
12 | # ActiveSupport.on_load(:active_record) do
13 | # self.include_root_in_json = true
14 | # end
15 |
--------------------------------------------------------------------------------
/db/migrate/20131204000008_create_open_conference_ware_snippets.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareSnippets < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_snippets do |t|
4 | t.string "slug", null: false
5 | t.text "description", null: false
6 | t.text "content"
7 | t.integer "value"
8 | t.boolean "public", default: true
9 | t.datetime "created_at"
10 | t.datetime "updated_at"
11 | end
12 |
13 | add_index "open_conference_ware_snippets", ["slug"], unique: true
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/spec/dummy/README.rdoc:
--------------------------------------------------------------------------------
1 | == README
2 |
3 | This README would normally document whatever steps are necessary to get the
4 | application up and running.
5 |
6 | Things you may want to cover:
7 |
8 | * Ruby version
9 |
10 | * System dependencies
11 |
12 | * Configuration
13 |
14 | * Database creation
15 |
16 | * Database initialization
17 |
18 | * How to run the test suite
19 |
20 | * Services (job queues, cache servers, search engines, etc.)
21 |
22 | * Deployment instructions
23 |
24 | * ...
25 |
26 |
27 | Please feel free to use a different markup language if you do not plan to run
28 | rake doc:app .
29 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/authentications/_persona.html.erb:
--------------------------------------------------------------------------------
1 | <%
2 | add_javascript(javascript_include_tag "https://login.persona.org/include.js")
3 | run_when_dom_is_ready <<-JS
4 | $('#persona_form .persona-button').click(function() {
5 | personaLogin();
6 | return false;
7 | });
8 | JS
9 | %>
10 |
11 |
Persona
12 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/app/mixins/open_conference_ware/schedule_overlaps_mixin.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module ScheduleOverlapsMixin
3 | def overlaps?(object)
4 | raise ArgumentError unless object.respond_to?(:start_time) && object.respond_to?(:end_time)
5 | if self.start_time != self.end_time && object.start_time != object.end_time
6 | (self.start_time.to_i..self.end_time.to_i).overlaps?(object.start_time.to_i..object.end_time.to_i) && (self.end_time != object.start_time && self.start_time != object.end_time)
7 | else
8 | self.start_time == object.start_time
9 | end
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/dummy/app/assets/stylesheets/application.css:
--------------------------------------------------------------------------------
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_tree .
13 | */
14 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: ruby
2 | before_install:
3 | - cp ci/Gemfile.ci Gemfile.ci
4 | - export BUNDLE_GEMFILE=$PWD/Gemfile.ci
5 | bundler_args: --without debug
6 | rvm:
7 | - 1.9.3
8 | - 2.0.0
9 | - 2.1.5
10 | - 2.2.0
11 | matrix:
12 | allow_failures:
13 | - rvm: 2.2.0
14 | env:
15 | - DB=mysql
16 | - DB=postgresql
17 | - DB=sqlite
18 | cache: bundler
19 | before_script:
20 | - sqlite3 --version
21 | - mysql --version
22 | - mysql -e 'create database ocw_test;'
23 | - psql --version
24 | - psql -c 'create database ocw_test;' -U postgres
25 | - ruby ci/copy_database_config.rb
26 | - bundle exec rake db:migrate
27 |
--------------------------------------------------------------------------------
/lib/tasks/open_conference_ware_tasks.rake:
--------------------------------------------------------------------------------
1 | namespace :open_conference_ware do
2 | desc %{Setup application's database and seed data}
3 | task :setup => ['db:migrate', 'db:seed'] do
4 | puts <<-HERE
5 |
6 | TO FINISH SETUP
7 | 1. See README.md for information about configuration and customization
8 | 2. Edit config/initializers/01_open_conference_ware.rb and config/secrets.yml
9 | 2. Start the server: bin/rails server
10 | 3. Sign in as an admin in development mode
11 | 4. Use the web-based admin interface to create and configure an event
12 | HERE
13 | end
14 | end
15 |
16 | Rake::Task["open_conference_ware:install:migrations"].clear
17 |
--------------------------------------------------------------------------------
/spec/factories/authentication_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :authentication, class: OpenConferenceWare::Authentication do
3 | provider "test_provider"
4 | sequence(:uid) { |n| "penguin#{n}" }
5 | name "Nils Olav"
6 | email
7 | info( {
8 | "first_name" => "Nils",
9 | "last_name" => "Olav",
10 | "description" => "Colonel-in-Chief Sir Nils Olav is a King Penguin living in Edinburgh Zoo, Scotland. He is the mascot and Colonel-in-Chief of the Norwegian Royal Guard.",
11 | "urls" => {
12 | "wikipedia" => "http://en.wikipedia.org/wiki/Nils_Olav"
13 | }
14 | } )
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/app/models/open_conference_ware/selector_vote.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 |
3 | # == Schema Information
4 | #
5 | # Table name: selector_votes
6 | #
7 | # id :integer not null, primary key
8 | # user_id :integer not null
9 | # proposal_id :integer not null
10 | # rating :integer not null
11 | # comment :text
12 | #
13 |
14 | class SelectorVote < OpenConferenceWare::Base
15 | belongs_to :user
16 | belongs_to :proposal
17 |
18 | validates_presence_of :user
19 | validates_presence_of :proposal
20 | validates_presence_of :rating
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/user_favorites/index.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "#{@user.label.possessiveize} favorites" %>
2 |
3 | <% if schedule_visible? %>
4 |
5 | <%= link_to "Download favorites", user_favorites_path(@user, :format => 'ics') %> /
6 | <%= link_to "Subscribe to favorites", user_favorites_url(@user, :format => 'ics', :protocol => 'webcal') %>
7 |
8 | <% end -%>
9 |
10 |
11 | <%= render :partial => "open_conference_ware/proposals/sub_list", :locals => {:container => @user, :records => @user_favorites, :header_prefix => "Favorite", :header_tag => "h4"} %>
12 |
13 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/secret_token.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key is used for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 |
6 | # Make sure the secret is at least 30 characters and all random,
7 | # no regular words or you'll be exposed to dictionary attacks.
8 | # You can use `rake secret` to generate a secure secret key.
9 |
10 | # Make sure your secret_key_base is kept private
11 | # if you're sharing your code publicly.
12 | Dummy::Application.config.secret_key_base = OpenConferenceWare.secret_key_base
13 |
14 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/02_omniauth.rb:
--------------------------------------------------------------------------------
1 | OmniAuth.config.path_prefix = OpenConferenceWare.mounted_path("auth")
2 |
3 | Rails.application.config.middleware.use OpenConferenceWare::OmniAuthBuilder do
4 | provider :developer if %w[development preview].include?(Rails.env)
5 |
6 | # OpenID
7 | # add 'omniauth-openid' to Gemfile and uncomment to enable OpenID
8 | #
9 | require 'omniauth-openid'
10 | require 'openid/store/filesystem'
11 | provider :openid, store: OpenID::Store::Filesystem.new(Rails.root.join('tmp'))
12 |
13 | # Persona
14 | # add 'omniauth-persona' to Gemfile and uncomment to enable Persona
15 | #
16 | #provider :persona
17 | end
18 |
--------------------------------------------------------------------------------
/app/mixins/open_conference_ware/simple_slug_mixin.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module SimpleSlugMixin
3 | def self.included(base)
4 | base.extend ClassMethods
5 | base.class_eval do
6 | class << self
7 | alias_method_chain :find, :slug
8 | end
9 | end
10 | end
11 |
12 | def to_param
13 | slug
14 | end
15 |
16 | module ClassMethods
17 | def find_with_slug(id, options = {})
18 | if id.is_a?(Symbol) || id.to_s =~ /\A\d+\Z/
19 | find_without_slug(id, options)
20 | else
21 | find_by_slug(id, options)
22 | end
23 | end
24 | end
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/db/migrate/20131204000048_create_open_conference_ware_taggings.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareTaggings < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_taggings do |t|
4 | t.integer "tag_id"
5 | t.integer "taggable_id"
6 | t.integer "tagger_id"
7 | t.string "tagger_type"
8 | t.string "taggable_type"
9 | t.string "context"
10 | t.datetime "created_at"
11 | end
12 |
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 | end
16 | end
17 |
--------------------------------------------------------------------------------
/db/migrate/20131203235831_create_open_conference_ware_schedule_items.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareScheduleItems < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_schedule_items do |t|
4 | t.string "title"
5 | t.text "excerpt"
6 | t.text "description"
7 | t.datetime "start_time"
8 | t.integer "duration"
9 | t.integer "event_id"
10 | t.integer "room_id"
11 | t.datetime "created_at"
12 | t.datetime "updated_at"
13 | end
14 |
15 | add_index "open_conference_ware_schedule_items", ["event_id"]
16 | add_index "open_conference_ware_schedule_items", ["room_id"]
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/dummy/app/assets/javascripts/application.js:
--------------------------------------------------------------------------------
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 | // compiled file.
9 | //
10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11 | // about supported directives.
12 | //
13 | //= require_tree .
14 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/proposals/_search_speakers.html.erb:
--------------------------------------------------------------------------------
1 | <% if params[:search] %>
2 | <% @matches ||= [] %>
3 |
4 | <% if @matches.empty? %>
5 |
6 | <%= params[:search] %> was not found.
7 |
8 | <% else %>
9 | <% for user in @matches %>
10 | <% unless user.fullname.blank? %>
11 |
12 | <%= link_to 'Add', '#', :class => 'addable add-speaker', :speaker_id => user.id %>
13 | <%= user.fullname %>
14 | <%= user.affiliation %>
15 |
16 | <% end %>
17 | <% end %>
18 | <% end %>
19 |
20 | <% end %>
21 |
--------------------------------------------------------------------------------
/CONTRIBUTORS.md:
--------------------------------------------------------------------------------
1 | Contributors
2 | ============
3 |
4 | * Igal Koshevoy: http://pragmaticraft.com/
5 | * Reid Beels: http://reidbeels.com/
6 | * Todd Kenefsky: http://connectinteractivemedia.com/
7 | * Audrey Eschright: http://lifeofaudrey.com/
8 | * Selena Deckelmann: http://www.chesnok.com/daily/
9 | * Kirsten Comandich: http://comandich.com/
10 | * Brandon Philips: http://ifup.org/
11 | * Scott Becker: http://synthesis.sbecker.net/
12 | * Don Park: http://donpark.org/
13 | * Sam Goldstein: http://twitter.com/sam_goldstein/
14 | * James Murty: http://www.jamesmurty.com/
15 | * David Cato: http://crunchyfrog.net/
16 | * Drew Kalina: http://drewkalina.org/
17 | * Jason LaPier: http://offtheline.net/
18 |
--------------------------------------------------------------------------------
/lib/generators/open_conference_ware/install/templates/secret_token.rb.erb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key is used for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 |
6 | # Make sure the secret is at least 30 characters and all random,
7 | # no regular words or you'll be exposed to dictionary attacks.
8 | # You can use `rake secret` to generate a secure secret key.
9 |
10 | # Make sure your secret_key_base is kept private
11 | # if you're sharing your code publicly.
12 | <%= Rails.application.class.to_s %>.config.secret_key_base = OpenConferenceWare.secret_key_base
13 |
14 |
--------------------------------------------------------------------------------
/spec/factories/user_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :user, class: OpenConferenceWare::User do
3 | sequence(:first_name) {|n| "user_first_name-#{n}" }
4 | sequence(:last_name) {|n| "user_last_name-#{n}" }
5 | affiliation "My affiliation"
6 | email
7 | website
8 | blog_url { generate(:website) }
9 | biography "My biography"
10 | complete_profile true
11 | identica { |record| record.fullname.gsub(/[^\w]/, '_').downcase }
12 | twitter { |record| record.fullname.gsub(/[^\w]/, '_').downcase }
13 |
14 | factory :admin do
15 | admin true
16 | end
17 |
18 | factory :selector do
19 | selector true
20 | end
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/spec/support/authenticated_test_helper.rb:
--------------------------------------------------------------------------------
1 | module AuthenticatedTestHelper
2 | # Sets the current user in the session from the user fixtures.
3 | def login_as(user)
4 | identity = \
5 | case user
6 | when User
7 | user.id
8 | when String
9 | users(user.to_sym).id
10 | when Symbol
11 | users(user).id
12 | when Fixnum
13 | user
14 | when NilClass
15 | nil
16 | else
17 | raise TypeError, "Can't login as type: #{user.class}"
18 | end
19 | request.session[:user_id] = identity
20 | end
21 |
22 | def logout
23 | if request
24 | request.session[:user_id] = nil
25 | end
26 | end
27 | end
28 |
--------------------------------------------------------------------------------
/spec/dummy/config/database.yml:
--------------------------------------------------------------------------------
1 | # SQLite version 3.x
2 | # gem install sqlite3
3 | #
4 | # Ensure the SQLite 3 gem is defined in your Gemfile
5 | # gem 'sqlite3'
6 | development:
7 | adapter: sqlite3
8 | database: db/development.sqlite3
9 | pool: 5
10 | timeout: 5000
11 |
12 | # Warning: The database defined as "test" will be erased and
13 | # re-generated from your development database when you run "rake".
14 | # Do not set this db to the same as development or production.
15 | test:
16 | adapter: sqlite3
17 | database: db/test.sqlite3
18 | pool: 5
19 | timeout: 5000
20 |
21 | production:
22 | adapter: sqlite3
23 | database: db/production.sqlite3
24 | pool: 5
25 | timeout: 5000
26 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/session_types/show.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "#{@session_type.title}" %>
2 |
3 | <% cache "session_type_#{@session_type.id},admin_#{admin?}" do %>
4 |
5 |
<%= display_textile_for @session_type.description %>
6 |
7 |
8 | <%= link_to 'Edit', edit_session_type_path(@session_type), :class => "editable" if admin? %>
9 | <%= link_to 'Session types for this event', session_types_path, :class => "cancelable" %>
10 |
11 |
12 | <%= render :partial => "open_conference_ware/proposals/sub_list", :locals => {:container => @session_type} %>
13 |
14 | <% end %>
15 |
--------------------------------------------------------------------------------
/app/assets/javascripts/open_conference_ware/util.js:
--------------------------------------------------------------------------------
1 | /*---[ data structure conveniences ]----------------------------------*/
2 |
3 | // Return an array of keys in +hash+. Example:
4 | // hash_keys({'foo': 'bar', 'baz': 'qux'}); // ['foo', 'baz']
5 | function hash_keys(hash) {
6 | array = new Array();
7 | for (key in hash) {
8 | if (key) {
9 | array.push(key);
10 | }
11 | }
12 | return array;
13 | }
14 |
15 | // Return hash where each key is an element of the +array+. Example:
16 | // array_to_hash(['foo', 'bar']); // {'foo': true, 'bar': true}
17 | function array_to_hash(array) {
18 | hash = new Array();
19 | for (i in array) {
20 | hash[array[i]] = true;
21 | }
22 | return hash;
23 | }
24 |
--------------------------------------------------------------------------------
/lib/ext/vpim_icalendar_extra_properties.rb:
--------------------------------------------------------------------------------
1 | module Vpim
2 | class Icalendar
3 |
4 | # The title of the calendar.
5 | def title
6 | @properties['X-WR-CALNAME']
7 | end
8 |
9 | # Sets the title of the calendar, displayed by some clients.
10 | def title=(value)
11 | @properties.push_unique DirectoryInfo::Field.create('X-WR-CALNAME', value)
12 | end
13 |
14 | # The time zone of the calendar
15 | def time_zone
16 | @properties['X-WR-TIMEZONE']
17 | end
18 |
19 | # Sets the time zone for entries of this calendar. (e.g. America/Los Angeles)
20 | def time_zone=(value)
21 | @properties.push_unique DirectoryInfo::Field.create('X-WR-TIMEZONE', value)
22 | end
23 | end
24 | end
25 |
26 |
--------------------------------------------------------------------------------
/spec/dummy/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, '\1en'
8 | # inflect.singular /^(ox)en/i, '\1'
9 | # inflect.irregular 'person', 'people'
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym 'RESTful'
16 | # end
17 |
--------------------------------------------------------------------------------
/db/migrate/20131203235723_create_open_conference_ware_rooms.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareRooms < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_rooms do |t|
4 | t.string "name", null: false
5 | t.integer "capacity"
6 | t.string "size"
7 | t.string "seating_configuration"
8 | t.text "description"
9 | t.integer "event_id"
10 | t.datetime "created_at"
11 | t.datetime "updated_at"
12 | t.string "image_file_name"
13 | t.string "image_content_type"
14 | t.integer "image_file_size"
15 | t.datetime "image_updated_at"
16 | end
17 |
18 | add_index "open_conference_ware_rooms", ["event_id"]
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/tracks/show.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/tracks/show.html.erb" do
4 | include OpenConferenceWare::TracksHelper
5 | before(:each) do
6 | stub_settings_accessors_on(view)
7 | @event = stub_current_event!(controller: view)
8 | @track = stub_model(Track,
9 | title: "value for title",
10 | event_id: 1,
11 | description: "value for description"
12 | )
13 | assign(:track, @track)
14 |
15 | view.stub(:schedule_visible?).and_return(true)
16 | view.stub(:admin?).and_return(false)
17 | end
18 |
19 | it "should render attributes in " do
20 | render
21 | rendered.should match(/value for description/)
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/page_title_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | # = PageTitleHelper
3 | #
4 | # This mixin provides a #page_title helper for easily getting/setting the
5 | # page's title, and providing a reasonable title if none was set.
6 | module PageTitleHelper
7 |
8 | # Return string to be used as a page title (e.g., for HTML's TITLE and H1).
9 | # If +value+ provided, also sets page title. If no page title was set,
10 | # provides a reasonable simulation based on the controller's name and action.
11 | def page_title(value=nil)
12 | @_page_title = value if value
13 | return(@_page_title || "#{controller.controller_name.humanize}: #{action_name.humanize}")
14 | end
15 |
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/users/_list.html.erb:
--------------------------------------------------------------------------------
1 | <%
2 | # Display a list of users and their sessions.
3 | #
4 | # Locals:
5 | # * users => Array of users to display. REQUIRED.
6 | # * hide_rooms => Should the rooms be hidden in the list of sessions displayed for each user? Defaults to false.
7 | # * only_for_event => Only display entries associated with this event record or its children. Optional.
8 |
9 | hide_rooms ||= false
10 | only_for_event = local_assigns[:only_for_event]
11 | %>
12 |
13 |
14 | <% users.each do |user| %>
15 | <%= render :partial => 'open_conference_ware/users/block', :locals => { :user => user, :wrapper_tag => :li, :hide_rooms => hide_rooms, :only_for_event => only_for_event } %>
16 | <% end -%>
17 |
18 |
--------------------------------------------------------------------------------
/spec/dummy/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization
2 | # and are automatically loaded by Rails. If you want to use locales other
3 | # than English, add the necessary files in this directory.
4 | #
5 | # To use the locales, use `I18n.t`:
6 | #
7 | # I18n.t 'hello'
8 | #
9 | # In views, this is aliased to just `t`:
10 | #
11 | # <%= t('hello') %>
12 | #
13 | # To use a different locale, set it with `I18n.locale`:
14 | #
15 | # I18n.locale = :es
16 | #
17 | # This would use the information in config/locales/es.yml.
18 | #
19 | # To learn more, please read the Rails Internationalization guide
20 | # available at http://guides.rubyonrails.org/i18n.html.
21 |
22 | en:
23 | hello: "Hello world"
24 |
--------------------------------------------------------------------------------
/spec/fixtures/open_conference_ware_session_types.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | short_form:
4 | event_id: 2009
5 | title: "Short-Form - 45 minutes"
6 | duration: 45
7 | description: "A set of lightning talks, a one-or-more person presentation, a panel, or something else covering specific, concise material."
8 |
9 | long_form:
10 | event_id: 2009
11 | title: "Long-Form - 1 hour, 45 minutes"
12 | duration: 105
13 | description: "We're especially interested in seeing interactive approaches: tutorials, guided discussions, or other hands-on explorations."
14 |
15 | shorter_form:
16 | event_id: 2009
17 | title: "Shorter-Form - 15 minutes"
18 | duration: 15
19 | description: "It's short. Really short."
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/users/index_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/users/index.html.erb" do
4 | fixtures :open_conference_ware_users, :open_conference_ware_events
5 |
6 | before do
7 | stub_settings_accessors_on(view)
8 | end
9 |
10 | it "should not include admin column by default" do
11 | assign(:users, [users(:aaron), users(:quentin)])
12 | render
13 |
14 | rendered.should_not have_selector(".admin", text: "admin")
15 | end
16 |
17 | it "should include admin column when admin is logged in" do
18 | view.stub(:admin?).and_return(true)
19 | assign(:users, [users(:aaron), users(:quentin)])
20 | render
21 |
22 | rendered.should have_selector(".admin", text: "admin")
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/spec/fixtures/open_conference_ware_schedule_items.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | opening:
4 | event_id: 2009
5 | title: 'Opening'
6 | excerpt: 'Yay, welcome!'
7 | description: 'Is there tea?'
8 | start_time: <%= Time.zone.parse('2009-06-17 09:00am').to_s(:db) %>
9 | # Note that this has no :duration
10 |
11 | coffee_break:
12 | event_id: 2009
13 | title: 'Coffee Break'
14 | excerpt: 'Yay, coffee!'
15 | description: 'Is there tea?'
16 | start_time: <%= Time.zone.parse('2009-06-17 09:45am').to_s(:db) %>
17 | duration: 15
18 |
19 | unscheduled:
20 | event_id: 2009
21 | title: 'Unschedule schedule item'
22 | excerpt: 'When do I start? No one knows.'
23 | description: 'When do I end? No one knows.'
24 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/proposals/sessions_index_terse.html.erb:
--------------------------------------------------------------------------------
1 | <%
2 | # VARIABLES:
3 | # * @event => Event these proposals are for
4 | # * @proposals => Array of proposal objects
5 |
6 | page_title "#{@event.title} sessions"
7 |
8 | cache_key = "#{@kind}_index_terse,event_#{@event.id}"
9 | %>
10 |
11 | <%- cache cache_key do -%>
12 | <%- for track in @event.tracks.sort_by(&:title) -%>
13 | <%- proposals = track.proposals.confirmed.sort_by(&:title) -%>
14 | <%- next unless proposals.size > 0 -%>
15 | <%= track.title %>
16 |
17 | <%- for proposal in proposals -%>
18 | <%= link_to proposal.title, session_path(proposal) -%> by <%= proposal.users.map(&:fullname).to_sentence %>
19 | <%- end -%>
20 |
21 | <%- end -%>
22 | <%- end -%>
23 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/tracks/show.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "#{@track.title} track" %>
2 |
3 | <% cache "track_#{@track.id},admin_#{admin?}" do %>
4 |
5 |
<%= display_textile_for @track.description %>
6 |
7 | <% if admin? %>
8 |
Excerpt
9 |
<%= @track.excerpt %>
10 | <% end %>
11 |
12 |
13 | <%= link_to 'Edit this track', edit_track_path(@track), :class => "editable" if admin? %>
14 | <%= link_to 'All tracks for this event', tracks_path, :class => "cancelable" %>
15 |
16 |
17 | <%= render :partial => "open_conference_ware/proposals/sub_list", :locals => {:container => @track} %>
18 |
19 | <% end %>
20 |
--------------------------------------------------------------------------------
/app/assets/javascripts/open_conference_ware/schedule.js:
--------------------------------------------------------------------------------
1 | /*---[ schedule hover ]----------------------------------------------*/
2 |
3 | function bind_calendar_items() {
4 | $('ul.calendar_items li.vevent').hover(
5 | function() {
6 | $(this).addClass('hover');
7 | box = $(this).children('.session_info');
8 |
9 | bottom = $(document).scrollTop() + $(window).height();
10 | box_bottom = box.offset().top + box.outerHeight();
11 |
12 | if ( box_bottom > bottom ) box.css('top',-(box_bottom - bottom + 10));
13 | if( !$(this).hasClass('generic_item')) box.css('border-color',$(this).css('background-color'));
14 | },
15 | function() {
16 | $(this).removeClass('hover');
17 | $(this).children('.session_info').css('top',0);
18 | }
19 | )
20 | }
21 |
--------------------------------------------------------------------------------
/app/models/open_conference_ware/comment.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 |
3 | # == Schema Information
4 | #
5 | # Table name: comments
6 | #
7 | # id :integer not null, primary key
8 | # name :string(255)
9 | # email :string(255)
10 | # message :text
11 | # proposal_id :integer
12 | # created_at :datetime
13 | # updated_at :datetime
14 | #
15 |
16 | class Comment < OpenConferenceWare::Base
17 | belongs_to :proposal
18 |
19 | validates_presence_of :email, :message, :proposal_id
20 |
21 | # Make sure there's a legitimate proposal attached?!
22 | validates_presence_of :proposal, message: "must be present"
23 |
24 | scope :listable, lambda { order("created_at desc").where("created_at IS NOT NULL") }
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/spec/fixtures/open_conference_ware_comments.yml:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: comments
4 | #
5 | # id :integer not null, primary key
6 | # name :string(255)
7 | # email :string(255)
8 | # message :text
9 | # proposal_id :integer
10 | # created_at :datetime
11 | # updated_at :datetime
12 | #
13 |
14 | aaron_aardvarks_suck:
15 | email: i@hate.you
16 | message: "I find aardvarks morally offensive."
17 | proposal: aaron_aardvarks
18 |
19 | clio_chupacabras_fbi:
20 | email: big_brother@fbi.gov
21 | message: "Pay no attention, everything is under control."
22 | proposal: clio_chupacabras
23 |
24 | clio_chupacabras_cia:
25 | email: the_man@cia.gov
26 | message: "Please get in touch. We are here to help."
27 | proposal: clio_chupacabras
28 |
--------------------------------------------------------------------------------
/spec/support/add_all_helpers_to_view.rb:
--------------------------------------------------------------------------------
1 | module AddAllHelpersToView
2 | HELPER_PATH = OpenConferenceWare::Engine.root.join('app', 'helpers', 'open_conference_ware', '*.rb')
3 | def _all_helper_modules
4 | @@_all_helper_modules ||= [
5 | Dir.glob(HELPER_PATH).map {|f| "OpenConferenceWare::#{File.basename(f, '.rb').camelize}".constantize },
6 | OpenConferenceWare::Engine.routes.url_helpers
7 | ].flatten
8 | end
9 |
10 | def add_all_helpers_to(view)
11 | _all_helper_modules.each do |helper_module|
12 | view.extend(helper_module)
13 | self.class.send(:include, helper_module)
14 | end
15 | end
16 | end
17 |
18 | RSpec.configure do |c|
19 | c.include AddAllHelpersToView
20 |
21 | c.before :each, type: :view do
22 | add_all_helpers_to(view)
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/util/update_proposal_status_from_voting_spreadsheet.rb:
--------------------------------------------------------------------------------
1 | # Accept and reject talks based on IDs from the scheduling spreadsheet
2 | #
3 | def accept_and_reject_from_spreadsheet
4 | # Paste IDs from spreadsheet, separated by spaces
5 | # ↓↓↓
6 | reject = %w( ).map(&:to_i)
7 | accept = %w( ).map(&:to_i)
8 | waitlist = %w( ).map(&:to_i)
9 |
10 | reject.each do |id|
11 | p = OpenConferenceWare::Proposal.find(id)
12 | p.reject! unless p.rejected?
13 | end
14 |
15 | accept.each do |id|
16 | p = OpenConferenceWare::Proposal.find(id)
17 | p.accept! unless p.accepted?
18 | end
19 |
20 | waitlist.each do |id|
21 | p = OpenConferenceWare::Proposal.find(id)
22 | p.waitlist! unless p.waitlisted?
23 | end
24 | end
25 |
26 | accept_and_reject_from_spreadsheet
27 |
--------------------------------------------------------------------------------
/app/assets/javascripts/open_conference_ware/application.js:
--------------------------------------------------------------------------------
1 | //= require jquery
2 | //= require jquery_ujs
3 | //= require jquery-migrate-1.2.1
4 | //= require jquery.scrollTo
5 | //= require jquery.localScroll
6 | //= require farbtastic
7 | //= require audiojs/audio.min
8 | //= require openid-selector/openid-jquery
9 | //= require openid-selector/openid-en
10 | //= require bootstrap
11 | //= require open_conference_ware/base
12 | //= require open_conference_ware/util
13 | //= require open_conference_ware/favorites
14 | //= require open_conference_ware/menu
15 | //= require open_conference_ware/persona
16 | //= require open_conference_ware/proposals
17 | //= require open_conference_ware/schedule
18 | //= require open_conference_ware/spinner
19 |
20 | /*===[ fin ]==========================================================*/
21 |
--------------------------------------------------------------------------------
/features/comment_destroy.feature:
--------------------------------------------------------------------------------
1 | Feature: Comment destroy
2 | In order to destroy a comment
3 | As someone
4 | I want to destroy it when allowed
5 |
6 | @wip
7 | Scenario: Destroy a comment as an admin
8 | Given I am logged in as "aaron"
9 | When I am on a proposal with comments
10 | Then I should be able to destroy 2 comments
11 | And I destroy a comment
12 | And I should get a "success" notification
13 | And I am on a proposal with comments
14 | And I should be able to destroy 1 comments
15 |
16 | @wip
17 | Scenario: Cannot destroy a comment as non-admin
18 | Given I am logged in as "quentin"
19 | When I am on a proposal with comments
20 | Then I should be able to destroy 0 comments
21 | And I destroy a comment
22 | And I should get a "failure" notification
23 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/proposals/_transition_control.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/proposals/_transition_control.html.erb" do
4 | it "should render a state changing select menu with valid events and destination label" do
5 | aasm = double("aasm", events: [:accept, :reject], current_state: :proposed)
6 | proposal = stub_model(Proposal, aasm: aasm)
7 | assign(:proposal, proposal)
8 | render
9 | rendered.should have_selector("select[name='proposal[transition]']") do |node|
10 | node.should have_selector("option[value='']", text: "(currently 'Proposed')")
11 | node.should have_selector("option[value='accept']", text: "Accept")
12 | node.should have_selector("option[value='reject']", text: "Reject")
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/tracks/edit.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/tracks/edit.html.erb" do
4 | include OpenConferenceWare::TracksHelper
5 |
6 | before(:each) do
7 | @event = stub_current_event!
8 | @track = stub_model(Track,
9 | title: "value for title",
10 | event: @event
11 | )
12 | assign(:track, @track)
13 | end
14 |
15 | it "should render edit form" do
16 | render
17 |
18 | rendered.should have_selector("form[action='#{OpenConferenceWare.mounted_path(event_track_path(@event, @track))}'][method='post']") do |node|
19 | node.should have_selector("input#track_title[name='track[title]']")
20 | node.should have_selector("textarea#track_description[name='track[description]']")
21 | end
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | begin
2 | require 'bundler/setup'
3 | rescue LoadError
4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5 | end
6 |
7 | require 'rdoc/task'
8 |
9 | RDoc::Task.new(:rdoc) do |rdoc|
10 | rdoc.rdoc_dir = 'rdoc'
11 | rdoc.title = 'OpenConferenceWare'
12 | rdoc.options << '--line-numbers'
13 | rdoc.rdoc_files.include('README.rdoc')
14 | rdoc.rdoc_files.include('lib/**/*.rb')
15 | end
16 |
17 | APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
18 | load 'rails/tasks/engine.rake'
19 |
20 | Bundler::GemHelper.install_tasks
21 |
22 | require 'rspec/core'
23 | require 'rspec/core/rake_task'
24 | desc "Run all specs in spec directory (excluding plugin specs)"
25 | RSpec::Core::RakeTask.new(:spec => 'app:db:test:prepare')
26 |
27 | task :default => [:spec]
28 |
--------------------------------------------------------------------------------
/app/views/layouts/open_conference_ware/scaffold.html.erb:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | <%= page_title %>
8 | <%= stylesheet_link_tag 'k2', 'rollingarchives', 'igniteportland' %>
9 | <%#= stylesheet_link_tag 'application' %>
10 | <%#= stylesheet_link_tag 'scaffold' %>
11 |
12 |
13 |
14 |
15 |
<%= flash[:notice] %>
16 |
17 | <%= yield %>
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/lib/generators/open_conference_ware/install/templates/secrets.yml.erb:
--------------------------------------------------------------------------------
1 | #===[ Secrets ]=========================================================
2 | #
3 | # This file is meant for storing secret information that is never
4 | # published or committed to a revision control system.
5 | #
6 | #---[ Values ]----------------------------------------------------------
7 |
8 | # Email address of administrator that will get requests for assistance from users:
9 | administrator_email: 'your@email.addr'
10 |
11 | # Secret key for getting an ATOM feed of private comments:
12 | comments_secret: <%= SecureRandom.hex(64) %>
13 |
14 | # The Rails secret_key_base
15 | # Used by config/initializers/secret_token.rb
16 | secret_key_base: <%= SecureRandom.hex(64) %>
17 |
18 | #===[ fin ]=============================================================
19 |
--------------------------------------------------------------------------------
/lib/open_conference_ware/dependencies.rb:
--------------------------------------------------------------------------------
1 | # Gems
2 |
3 | require "rails"
4 | require "rails-observers"
5 |
6 | require "omniauth"
7 |
8 | require "hashery/dictionary"
9 |
10 | require 'RedCloth'
11 | require 'aasm'
12 | require 'acts-as-taggable-on'
13 | require 'color'
14 | require 'comma'
15 | require 'google_chart'
16 | require 'paperclip'
17 | require 'vpim/icalendar'
18 | require 'nokogiri'
19 | require 'prawn'
20 | require "dynamic_form"
21 | require 'rails_rinku'
22 | require 'randumb'
23 |
24 | require 'jquery-rails'
25 | require 'sass-rails'
26 | require 'uglifier'
27 |
28 | # Standard Library
29 |
30 | require 'csv'
31 |
32 | # Libraries in 'lib'
33 |
34 | require 'defer_proxy'
35 | require 'ext/string_possessiveize'
36 | require 'ext/vpim_icalendar_extra_properties'
37 | require 'ext/color_rgb_serializer_fix'
38 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/tracks/new.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/tracks/new.html.erb" do
4 | include OpenConferenceWare::TracksHelper
5 |
6 | before(:each) do
7 | @event = stub_current_event!
8 |
9 | @track = stub_model(Track,
10 | title: "value for title",
11 | event_id: 1
12 | ).as_new_record
13 | assign(:track, @track)
14 | end
15 |
16 | it "should render new form" do
17 | render
18 |
19 | rendered.should have_selector("form[action='#{OpenConferenceWare.mounted_path(event_tracks_path(@event))}'][method=post]") do |node|
20 | node.should have_selector("input#track_title[name='track[title]']")
21 | node.should have_selector("textarea#track_description[name='track[description]']")
22 | end
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | # Declare your gem's dependencies in open_conference_ware.gemspec.
4 | # Bundler will treat runtime dependencies like base dependencies, and
5 | # development dependencies will be added by default to the :development group.
6 | gemspec
7 |
8 | # Declare any dependencies that are still in development here instead of in
9 | # your gemspec. These might include edge Rails or gems from your path or
10 | # Git. Remember to move these dependencies to your gemspec before releasing
11 | # your gem to rubygems.org.
12 | group :development do
13 | gem 'rspec-rails', git: 'https://github.com/rspec/rspec-rails.git', branch: '2-14-maintenance'
14 | end
15 |
16 | group :debug do
17 | gem 'debugger'
18 | gem 'pry'
19 | gem 'launchy'
20 | gem 'guard-rspec'
21 | gem 'cadre'
22 | end
23 |
24 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/proposals/_transition_control.html.erb:
--------------------------------------------------------------------------------
1 | <%
2 | # SUMMARY: Display control for transitioning a proposal's status.
3 | #
4 | # Variables:
5 | # * proposal
6 |
7 | proposal ||= @proposal
8 | %>
9 |
10 |
11 | <% if proposal.aasm.events(proposal.aasm.current_state).empty? %>
12 | No valid transitions available from status <%= proposal.aasm.current_state %>
13 | <% else %>
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 | <% end %>
16 |
17 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/user_favorites_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module UserFavoritesHelper
3 | # Add JavaScript to layout that populates the user's favorites and binds these controls.
4 | def include_user_favorites_javascript
5 | if user_favorites?
6 | expose_to_js :favorites_path, user_favorites_path(user_id: :me)
7 | run_when_dom_is_ready 'populate_user_favorites();'
8 | run_when_dom_is_ready 'bind_user_favorite_controls();'
9 | end
10 | end
11 |
12 | # Return link for a UserFavorite control for the given +proposal+.
13 | def user_favorite_control_for(proposal)
14 | if user_favorites?
15 | return link_to(content_tag(:span, "*"), user_favorites_path(:me), class: "favorite favorite_#{proposal.id}")
16 | end
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/422.html.erb:
--------------------------------------------------------------------------------
1 |
2 | Sorry, could not complete your request because its security token was invalid. This error may have happened because:
3 |
4 |
5 | Your browser isn't accepting cookies: please accept this site's cookies, reload the form and try again.
6 | You submitted a stale form, one loaded before you logged in or out: please reload the form and try again.
7 | Our server's security token was just updated: please reload the form and try again.
8 |
9 |
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 |
12 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/manage/snippets/show.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Snippet: #{@snippet.slug}" %>
2 |
3 |
4 | Description:
5 | <%=h @snippet.description %>
6 |
7 |
8 |
9 |
Content:
10 |
11 |
12 | <%= @snippet.content %>
13 |
14 |
15 |
16 | <% if false %>
17 |
18 | Public:
19 | <%=h @snippet.public %>
20 |
21 |
22 |
23 | Value:
24 | <%=h @snippet.value %>
25 |
26 | <% end %>
27 |
28 |
29 | <%= link_to 'Edit', edit_manage_snippet_path(@snippet), :class => :editable %>
30 | <%= link_to "Destroy", manage_snippet_path(@snippet), :data => { :confirm => "Are you sure?" }, :method => :delete, :class => "deletable" %>
31 | <%= link_to 'Back', manage_snippets_path, :class => :cancelable %>
32 |
33 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/proposals/_room_control.html.erb:
--------------------------------------------------------------------------------
1 | <%
2 | # SUMMARY: Displays a control for assigning a room to a proposal.
3 | #
4 | # Variables:
5 | # * proposal: Proposal object to create a room selector for, required.
6 | # * form: Form to include this selector in, optional.
7 |
8 | form ||= nil
9 | proposal ||= @proposal
10 | args = [:collection_select, :room_id, proposal.event.rooms_inherit, :id, :name, {:include_blank => '- None -'}, {:class => 'proposal_room_control proposal_control', :x_proposal_id => proposal.id}]
11 | %>
12 |
13 |
14 | <% if form %>
15 | <%= form.send(*args) %>
16 | <% else %>
17 | <%= form_for proposal do |f| %>
18 | <%= f.send(*args) %>
19 | <% end %>
20 | <% end %>
21 |
22 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/proposals/_schedule_control.html.erb:
--------------------------------------------------------------------------------
1 | <%
2 | proposal ||= @proposal
3 | %>
4 |
5 |
6 | <%= form_for proposal do |f| -%>
7 | <%= select_tag("start_time[date]", options_for_select( proposal.event.dates_for_select, proposal.start_time.try(:strftime, "%Y-%m-%d") ), :id => "start_time_date_#{proposal.id}", :class => 'date' ) %>
8 |
9 | <%= select_hour proposal.start_time, {:prefix => 'start_time', :include_blank => true}, :id => "start_time_hour_#{proposal.id}", :class => 'hour' %>
10 | <%= select_minute proposal.start_time, {:field_name => 'start_time', :minute_step => 5, :include_blank => true}, :id => "start_time_minute_#{proposal.id}", :class => 'minute' %>
11 |
12 | <% end -%>
13 |
14 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/authentications_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module AuthenticationsHelper
3 | def auth_path(provider)
4 | "#{OmniAuth.config.path_prefix}/#{provider}"
5 | end
6 |
7 | def auth_callback_path(provider)
8 | "#{OmniAuth.config.path_prefix}/#{provider}/callback"
9 | end
10 |
11 | def grouped_auth_providers
12 | @grouped_auth_providers ||= OpenConferenceWare.auth_providers.group_by do |provider|
13 | lookup_context.find_all("open_conference_ware/authentications/_#{provider}").any? ? :with_partials : :without_partials
14 | end
15 | end
16 |
17 | def auth_providers_with_partials
18 | grouped_auth_providers[:with_partials]
19 | end
20 |
21 | def auth_providers_without_partials
22 | grouped_auth_providers[:without_partials]
23 | end
24 | end
25 | end
26 |
--------------------------------------------------------------------------------
/app/models/open_conference_ware/session_type.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 |
3 | # == Schema Information
4 | #
5 | # Table name: session_types
6 | #
7 | # id :integer not null, primary key
8 | # title :string(255)
9 | # description :text
10 | # duration :integer
11 | # event_id :integer
12 | # created_at :datetime
13 | # updated_at :datetime
14 | #
15 |
16 | class SessionType < OpenConferenceWare::Base
17 |
18 | # Associations
19 | belongs_to :event
20 | has_many :proposals, dependent: :nullify
21 |
22 | # Validations
23 | validates_presence_of \
24 | :title,
25 | :description,
26 | :event_id
27 | validates_numericality_of :duration, if: :duration
28 |
29 | def <=>(against)
30 | self.title <=> (against.nil? ? '' : against.title)
31 | end
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/authentications/_openid.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
OpenID
3 |
4 | <%= form_tag(auth_path(:open_id), :id => "openid_form" ) do %>
5 |
6 |
7 |
Please click your account provider:
8 |
9 |
10 |
11 | <%= text_field_tag "openid_url", "http://", id: "openid_url", class: 'form-control' %>
12 | <%= submit_tag 'Log in', class: 'btn btn-default' %>
13 |
14 |
15 | <%= snippet_for :login_openid_text %>
16 |
17 |
18 | <% end %>
19 |
20 |
21 | <% run_when_dom_is_ready <<-JS
22 | openid.img_path = '/assets/openid-selector/';
23 | openid.init('openid_url');
24 | JS
25 | %>
26 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/session_types/index.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Session Types" %>
2 |
3 | <% for session_type in @session_types %>
4 | <%= link_to h(session_type.title), session_type_path(session_type) %>
5 | <%= display_textile_for session_type.description %>
6 |
7 | <% if admin? %>
8 |
9 | <%= link_to 'Edit', edit_session_type_path(session_type), :class => "editable" %>
10 | <%= link_to 'Destroy', session_type_path(session_type), :data => { :confirm => %{Destroy session_type "#{session_type.title}"?} }, :method => :delete, :class => "deletable" %>
11 |
12 | <% end %>
13 | <% end %>
14 |
15 |
16 | <%= link_to 'New session type', new_session_type_path, :class => "addable" if admin? %>
17 | <%= link_to 'Back to proposals', event_proposals_path(@event), :class => "cancelable" %>
18 |
19 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/session_types/new.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/session_types/new.html.erb" do
4 | include OpenConferenceWare::SessionTypesHelper
5 |
6 | before(:each) do
7 | @session_type = stub_model(SessionType).as_new_record
8 | assign(:session_type, @session_type)
9 |
10 | @event = stub_current_event!
11 | end
12 |
13 | it "should render new form" do
14 | render
15 |
16 | rendered.should have_selector("form[action='#{OpenConferenceWare.mounted_path(event_session_types_path(@event))}'][method=post]") do |node|
17 | node.should have_selector("input#session_type_title[name='session_type[title]']")
18 | node.should have_selector("textarea#session_type_description[name='session_type[description]']")
19 | node.should have_selector("input#session_type_duration[name='session_type[duration]']")
20 | end
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/lib/tasks/snippets.rake:
--------------------------------------------------------------------------------
1 | namespace :open_conference_ware do
2 | namespace :snippets do
3 | desc "Load initial snippets of text. Use FORCE environmental variable to avoid prompt if these are already present."
4 | task :reload => ["environment"] do
5 | replace = false
6 | perform = true
7 | if OpenConferenceWare::Snippet.count > 0 and not ENV["FORCE"]
8 | replace = true
9 | print "?? WARNING: Reset snippets back to defaults? (y/N) "
10 | STDOUT.flush
11 | response = STDIN.readline
12 | unless response.strip.match(/y/i)
13 | puts "** Not resetting snippets back to defaults"
14 | perform = false
15 | end
16 | end
17 |
18 | # TODO Merge snippets for Tickets and Proposals apps
19 | #IK# Rake::Task["snippets:load"].invoke if perform
20 | OpenConferenceWare::Snippet.reload_from_fixtures! if perform
21 | end
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/proposals/_room_control.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/proposals/_room_control.html.erb" do
4 | it "should render a selector for choosing a room" do
5 | rooms = [
6 | stub_model(Room, id: 1, name: "First Room"),
7 | stub_model(Room, id: 2, name: "Second Room"),
8 | ]
9 |
10 | event = stub_model(Event)
11 | event.stub(:rooms).and_return(rooms)
12 |
13 | proposal = stub_model(Proposal, room: rooms.first, room_id: rooms.first.id, event: event)
14 | assign(:proposal, proposal)
15 | render
16 | rendered.should have_selector("select[name='proposal[room_id]']") do |node|
17 | node.should have_selector("option[value='']", text: "- None -")
18 | node.should have_selector("option[value='1'][selected]", text: "First Room")
19 | node.should have_selector("option[value='2']", text: "Second Room")
20 | end
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/farbtastic.css.scss:
--------------------------------------------------------------------------------
1 | // ::OCW::
2 | // - Changed extension to allow for SCSS processing
3 | // - Used image-url asset helper to fix image paths
4 |
5 | .farbtastic {
6 | position: relative;
7 | }
8 | .farbtastic * {
9 | position: absolute;
10 | cursor: crosshair;
11 | }
12 | .farbtastic, .farbtastic .wheel {
13 | width: 195px;
14 | height: 195px;
15 | }
16 | .farbtastic .color, .farbtastic .overlay {
17 | top: 47px;
18 | left: 47px;
19 | width: 101px;
20 | height: 101px;
21 | }
22 | .farbtastic .wheel {
23 | background: image-url("farbtastic/wheel.png") no-repeat;
24 | width: 195px;
25 | height: 195px;
26 | }
27 | .farbtastic .overlay {
28 | background: image-url("farbtastic/mask.png") no-repeat;
29 | }
30 | .farbtastic .marker {
31 | width: 17px;
32 | height: 17px;
33 | margin: -8px 0 0 -8px;
34 | overflow: hidden;
35 | background: image-url("farbtastic/marker.png") no-repeat;
36 | }
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/speaker_mailer/speaker_email.text.erb:
--------------------------------------------------------------------------------
1 | <%
2 | text = @body_text
3 | text = text.gsub(/%PROPOSAL_URL%/i, proposal_login_url(@proposal, host: OpenConferenceWare.mailer_host))
4 | text = text.gsub(/%SPEAKER_CONFIRM_URL%/i, speaker_confirm_url(@proposal, host: OpenConferenceWare.mailer_host))
5 | text = text.gsub(/%SPEAKER_DECLINE_URL%/i, speaker_decline_url(@proposal, host: OpenConferenceWare.mailer_host))
6 | text = text.gsub(/%SPEAKER_NAMES%/i, @proposal.user_titles.join(', '))
7 | text = text.gsub(/%PROPOSAL_TITLE%/i, @proposal.title)
8 | text = text.gsub(/%TRACK%/i, @proposal.track_title)
9 | text = text.gsub(/%AUDIENCE_LEVEL%/i, @proposal.audience_level_label)
10 | text = text.gsub(/%FORMAT%/i, @proposal.session_type_title.downcase)
11 | time = @proposal.start_time.nil? ? 'Unscheduled' : @proposal.start_time.strftime("%I:%M %p on %A, %B %d")
12 | text = text.gsub(/%START_TIME%/i, time)
13 | %>
14 | <%= text %>
15 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/session_types/edit.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/session_types/edit.html.erb" do
4 | include OpenConferenceWare::SessionTypesHelper
5 |
6 | before(:each) do
7 | @event = stub_current_event!
8 | @session_type = stub_model(SessionType,
9 | event: @event
10 | )
11 | assign(:session_type, @session_type)
12 | end
13 |
14 | it "should render edit form" do
15 | render
16 |
17 | rendered.should have_selector("form[action='#{OpenConferenceWare.mounted_path(event_session_type_path(@event, @session_type))}'][method='post']") do |node|
18 | node.should have_selector("input#session_type_title[name='session_type[title]']")
19 | node.should have_selector("textarea#session_type_description[name='session_type[description]']")
20 | node.should have_selector("input#session_type_duration[name='session_type[duration]']")
21 | end
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/db/migrate/20131204000251_create_open_conference_ware_users.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareUsers < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_users do |t|
4 | t.string "email"
5 | t.string "salt", limit: 40
6 | t.boolean "admin", default: false
7 | t.datetime "created_at"
8 | t.datetime "updated_at"
9 | t.string "affiliation", limit: 128
10 | t.text "biography"
11 | t.string "website", limit: 1024
12 | t.boolean "complete_profile"
13 | t.string "photo_file_name"
14 | t.string "photo_content_type"
15 | t.integer "photo_file_size"
16 | t.string "first_name"
17 | t.string "last_name"
18 | t.string "blog_url"
19 | t.string "identica"
20 | t.string "twitter"
21 | t.boolean "selector", default: false
22 | end
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/spec/dummy/config/secrets.yml:
--------------------------------------------------------------------------------
1 | #===[ Secrets ]=========================================================
2 | #
3 | # This file is meant for storing secret information that is never
4 | # published or committed to a revision control system.
5 | #
6 | #---[ Values ]----------------------------------------------------------
7 |
8 | # Email address of administrator that will get requests for assistance from users:
9 | administrator_email: 'your@email.addr'
10 |
11 | # Secret key for getting an ATOM feed of private comments:
12 | comments_secret: e7ed7cc63ae64f10fcb1dd9c7ba34656242dca9642222dcdaa8bd63a074913d9edbe300b0bef6bdc24e9a4cf7ad3f3177c6a762a8b62ad5ca482570d3969b19b
13 |
14 | # The Rails secret_key_base
15 | # Used by config/initializers/secret_token.rb
16 | secret_key_base: 1f5085ba0fbf858fa957a9ea1406898266b8685a51da9b2127afcd8d2e54ba454a51cd59d39265e1819144da15594874dcb5a8bbfd2a5f3bcc7d30960619bb94
17 |
18 | #===[ fin ]=============================================================
19 |
--------------------------------------------------------------------------------
/TODO.txt:
--------------------------------------------------------------------------------
1 | #===[ TODOs ]===========================================================
2 |
3 | NOW
4 | o can_edit?, should have setting to determine if allowed to edit after deadline
5 | o proposal_statuses?, should have setting to determine if these can be set/published
6 |
7 | SOON
8 | o proposals#_form: hide speaker manager behind toggle, replacing search with "Add another speaker..."
9 | o proposals#_form: "more" links need popup icon
10 |
11 | LATER
12 | o Public comments, add
13 | o record-controls, add them at top in addition to bottom of page
14 | o autoresize textareas, us it for snippets, events and proposals
15 |
16 | MAYBE
17 | o state_change_select: rework it so that it's "Status|Change this proposal's status from 'Accepted' to [- no change-]". rework it as a partial?
18 | o Snippets, extract into plugin?
19 | o cache-money, replace the LookupMixin?
20 | o sluggable_finder, replace custom slugging?
21 |
22 | #===[ fin ]=============================================================
23 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/comments/index.atom.builder:
--------------------------------------------------------------------------------
1 | atom_feed() do |feed|
2 | feed.title("#{OpenConferenceWare.organization}: Presentation Proposal Comments")
3 | feed.updated(@comments.blank? ? Time.at(0) : @comments.first.created_at)
4 | feed.subtitle("Administrator-only feed of comments on Ignite proposals.")
5 |
6 | @comments.each do |comment|
7 | proposal = comment.proposal
8 | next unless comment.created_at
9 | next unless proposal
10 | feed.entry(comment, :created => comment.created_at, :updated => comment.created_at, :url => proposal_url(proposal)) do |entry|
11 | entry.title(h("Re: #{proposal.title} by #{proposal.presenter}"))
12 | entry.author do |author|
13 | author.name(h(comment.email))
14 | end
15 | entry.content(<<-HERE, :type => 'html')
16 |
17 |
#{h(comment.email)} :
18 |
19 | #{preserve_formatting_of(comment.message)}
20 |
21 |
22 | HERE
23 | end
24 | end
25 | end
26 |
--------------------------------------------------------------------------------
/util/transfer_schedule_items.rb:
--------------------------------------------------------------------------------
1 | # Transfer schedule_items from previous year
2 |
3 | def transfer_schedule_items
4 | current = OpenConferenceWare::Event.current
5 | past = OpenConferenceWare::Event.find_by_slug('2014')
6 |
7 | OpenConferenceWare::Event.current.dates.each_with_index do |day, i|
8 | past_date = past.dates[i]
9 | offset = (day - past_date).days
10 |
11 | past.schedule_items.select{|s| s.start_time.to_date == past_date}.each do |past_schedule_item|
12 | new_attributes = past_schedule_item.attributes
13 | new_attributes.delete("created_at")
14 | new_attributes.delete("updated_at")
15 | new_attributes.delete("id")
16 | new_attributes.delete("room_id")
17 | new_attributes["start_time"] += offset
18 | new_schedule_item = current.schedule_items.new(new_attributes)
19 | puts "#{new_schedule_item.start_time}: #{new_schedule_item.title}"
20 | new_schedule_item.save
21 | end
22 | end
23 | end
24 |
25 | transfer_schedule_items()
26 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/_email_link.html.erb:
--------------------------------------------------------------------------------
1 | Sorry, you need Javascript on to email us.
25 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/session_types/_form.html.erb:
--------------------------------------------------------------------------------
1 | <% focus :session_type_title %>
2 |
3 | <%= form_for([@event, @session_type]) do |f| %>
4 | <%= f.error_messages %>
5 |
6 |
7 | <%= f.label :title %>
8 | <%= f.text_field :title, :class => "form-control" %>
9 |
10 |
11 | <%= f.label :description %> (<%= display_textile_help_link %>)
12 | <%= f.text_area :description, :class => "form-control" %>
13 |
14 |
15 | <%= f.label :duration, "Duration (minutes)" %>
16 | <%= f.text_field :duration, :class => "form-control" %>
17 |
18 |
19 | <%= f.submit @session_type.new_record? ? "Create" : "Update", :class => "btn btn-primary" %>
20 | <%= link_to 'Cancel', @session_type, :class => "btn btn-default" %>
21 | <%= link_to 'Destroy', session_type_path(@session_type), :method => :delete, :data => { :confirm => %{Destroy session type "#{@session_type.title}"?} }, :class => "btn btn-danger pull-right" unless @session_type.new_record? %>
22 |
23 | <% end %>
24 |
--------------------------------------------------------------------------------
/features/comment_new.feature:
--------------------------------------------------------------------------------
1 | Feature: Comment new
2 | In order to display the new comment form
3 | As someone
4 | I want to see the comments form at appropriate times
5 |
6 | @wip
7 | Scenario Outline: Display comments form
8 | Given I am interested in a proposal for a "" event
9 | And the settings allow comments after the deadline: ""
10 | And the event is accepting comments if after the deadline: ""
11 | When I visit the proposal
12 | Then the comments form is displayed: ""
13 |
14 | Examples:
15 | | kind | accept_after_deadline | accepting | displayed |
16 | | open | N | | Y |
17 | | open | Y | N | Y |
18 | | open | Y | Y | Y |
19 | | closed | N | | N |
20 | | closed | Y | N | N |
21 | | closed | Y | Y | Y |
22 |
23 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/user_favorites/index.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/user_favorites/index.html.erb" do
4 | include OpenConferenceWare::UserFavoritesHelper
5 | fixtures :all
6 |
7 | before(:each) do
8 | stub_settings_accessors_on(view)
9 | allow(view).to receive(:current_user).and_return(nil)
10 |
11 | @proposals = proposals(:couchdb_session, :bigtable_session)
12 | @user = users(:quentin)
13 | #@user.stub(favorites: @proposals)
14 | @event = stub_current_event!(controller: view)
15 | @event.stub(:proposal_status_published? => false)
16 | @event.stub(:schedule_visible? => false)
17 |
18 | assign(:user, @user)
19 | assign(:user_favorites, @proposals)
20 | end
21 |
22 | it "renders a list of user_favorites" do
23 | render
24 |
25 | rendered.should have_selector(".proposal_row", count: 2)
26 | rendered.should have_selector("#proposal_row_#{@proposals[0].id}")
27 | rendered.should have_selector("#proposal_row_#{@proposals[1].id}")
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/spec/support/omniauth.rb:
--------------------------------------------------------------------------------
1 | OmniAuth.config.test_mode = true
2 |
3 | module OmniAuthSpecHelper
4 | %w(user admin selector).each do |factory|
5 | define_method("#{factory}_auth_hash") do
6 | OmniAuth::AuthHash.new({
7 | provider: 'open_id',
8 | uid: "http://openconferenceware.org/factory/#{factory}",
9 | info: { name: factory }
10 | })
11 | end
12 | end
13 |
14 | def mock_sign_in(factory)
15 | create_mock_user(factory)
16 | OmniAuth.config.mock_auth[:open_id] = send("#{factory}_auth_hash")
17 | visit OpenConferenceWare.mounted_path("/auth/open_id")
18 | end
19 |
20 | def create_mock_user(factory)
21 | auth_params = {provider: "open_id", uid: "http://openconferenceware.org/factory/#{factory}"}
22 | user = Authentication.where(auth_params).first
23 | unless user.present?
24 | user = create(factory)
25 | auth = create(:authentication, auth_params.merge(user: user))
26 | end
27 |
28 | return user
29 | end
30 | end
31 |
32 | RSpec.configure do |c|
33 | c.include OmniAuthSpecHelper
34 | end
35 |
--------------------------------------------------------------------------------
/features/support/paths.rb:
--------------------------------------------------------------------------------
1 | module NavigationHelpers
2 | # Maps a name to a path. Used by the
3 | #
4 | # When /^I go to (.+)$/ do |page_name|
5 | #
6 | # step definition in web_steps.rb
7 | #
8 | def path_to(page_name)
9 | case page_name
10 |
11 | when /the home\s?page/
12 | root_path
13 |
14 | when /a proposal with comments/
15 | @proposal = Proposal.find(ActiveRecord::FixtureSet.identify(:clio_chupacabras))
16 | proposal_path(@proposal)
17 |
18 | when /a proposal accepting comments/
19 | @proposal = Proposal.find(ActiveRecord::FixtureSet.identify(:aaron_aardvarks))
20 | proposal_path(@proposal)
21 |
22 | # Add more mappings here.
23 | # Here is an example that pulls values out of the Regexp:
24 | #
25 | # when /^(.*)'s profile page$/i
26 | # user_profile_path(User.find_by_login($1))
27 |
28 | else
29 | raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
30 | "Now, go and add a mapping in #{__FILE__}"
31 | end
32 | end
33 | end
34 |
35 | World(NavigationHelpers)
36 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/display_link_to_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module DisplayLinkToHelper
3 |
4 | # Return a #link_to for a +url+ that's been sanitized by #h, had its text
5 | # truncated, and optionally has the 'rel="nofollow"' flag set.
6 | #
7 | # Options:
8 | # * maxlength: Maximum length of the displayed URL. Defaults to 64.
9 | # * nofollow: Include a 'rel="nofollow"' in link to discourage spammers. Defaults to true.
10 | # * mailto: The URL is an email address and should be rendered as a mailto link.
11 | # * title: Title to give link, else URL.
12 | def display_link_to(url, opts={})
13 | opts.symbolize_keys!.reverse_merge!({
14 | maxlength: 64,
15 | nofollow: true,
16 | mailto: false
17 | })
18 | link_to_opts = {}
19 | link_to_opts[:rel] = "nofollow" if opts[:nofollow]
20 | truncated_url = truncate(url, length: opts[:maxlength])
21 | url = "mailto:#{url}" if opts[:mailto];
22 | return link_to(h(opts[:title] || truncated_url), h(url), link_to_opts)
23 | end
24 | end
25 | end
26 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/manage/snippets/index.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Snippets" %>
2 | <% show_manage = false %>
3 |
4 |
5 |
6 | Slug
7 | Description
8 | <% if show_manage %>
9 | Manage
10 | <% end %>
11 |
12 |
13 | <% for snippet in @snippets %>
14 | ">
15 |
16 | <%= link_to h(snippet.slug), [:manage, snippet] %>
17 |
18 |
19 | <%= link_to h(snippet.description), [:manage, snippet] %>
20 |
21 | <% if show_manage %>
22 |
23 | <%= link_to 'Show', [:manage, snippet], :class => :showable %>
24 | <%= link_to 'Edit', edit_manage_snippet_path(snippet), :class => :editable %>
25 | <%= link_to 'Destroy', [:manage, snippet], :data => { :confirm => 'Are you sure?' }, :method => :delete, :class => :deletable %>
26 |
27 | <% end %>
28 |
29 | <% end %>
30 |
31 |
32 |
33 |
34 | <%= link_to 'New snippet', new_manage_snippet_path, :class => :addable %>
35 |
--------------------------------------------------------------------------------
/spec/models/open_conference_ware/track_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::Track do
4 | fixtures :all
5 |
6 | before(:each) do
7 | @valid_attributes = {
8 | title: "value for title",
9 | description: "value for description",
10 | excerpt: "value for excerpt",
11 | color: "#00CC00",
12 | event_id: 1
13 | }
14 | end
15 |
16 | it "should build a new instance given valid attributes" do
17 | build(:track, @valid_attributes).should be_valid
18 | end
19 |
20 | it "should not be valid without an event" do
21 | build(:track, event: nil).should_not be_valid
22 | end
23 |
24 | it "should sort alphabetically by title" do
25 | tracks = [ build(:track, title: 'Blues'),
26 | build(:track, title: 'Punk'),
27 | build(:track, title: 'Folk'),
28 | nil ]
29 |
30 | sorted_tracks = tracks.sort
31 | sorted_tracks[0].should be_nil
32 | sorted_tracks[1].title.should == 'Blues'
33 | sorted_tracks[2].title.should == 'Folk'
34 | sorted_tracks[3].title.should == 'Punk'
35 | end
36 | end
37 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/rooms/show.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "#{@room.name}" %>
2 |
3 | <% cache "room_#{@room.id},admin_#{admin?}" do %>
4 | <%= image_tag( @room.image.url(:large), :class => 'room-image' ) if @room.image.file? %>
5 |
6 | <% if @room.capacity %>
7 |
Capacity: <%= @room.capacity %>
8 | <% end %>
9 |
10 | <% unless @room.size.blank? %>
11 |
Size: <%= @room.size %>
12 | <% end %>
13 |
14 | <% unless @room.seating_configuration.blank? %>
15 |
Seating Configuration: <%= @room.seating_configuration %>
16 | <% end %>
17 |
18 |
<%= display_textile_for @room.description %>
19 |
20 |
21 | <%= link_to 'Edit', edit_room_path(@room), :class => "editable" if admin? %>
22 | <%= link_to 'Rooms for this event', rooms_path, :class => "cancelable" %>
23 |
24 |
25 | <%= render :partial => "open_conference_ware/proposals/sub_list", :locals => {:container => @room} %>
26 |
27 | <% end %>
28 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/tracks/index.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Tracks" %>
2 |
3 | <% cache "tracks,event_#{@event.id},admin_#{admin?}" do %>
4 |
5 | <%= simple_format @event.tracks_text.try(:html_safe) %>
6 | <%= link_to "Edit", edit_manage_event_path(@event, :jump_to => :tracks_text), :class => "editable" if admin? %>
7 |
8 |
9 | <% for track in @tracks %>
10 | <%= link_to h(track.title), track_path(track) %>
11 | <%= display_textile_for track.description %>
12 |
13 | <% if admin? %>
14 |
15 | <%= link_to 'Edit', edit_track_path(track), :class => "editable" %>
16 | <%= link_to 'Destroy', track_path(track), :data => { :confirm => %{Destroy track "#{track.title}"?} }, :method => :delete, :class => "deletable" %>
17 |
18 | <% end %>
19 | <% end %>
20 |
21 |
22 | <%= link_to 'New track', new_track_path, :class => "addable" if admin? %>
23 | <%= link_to 'Back to proposals', event_proposals_path(@event), :class => "cancelable" %>
24 |
25 | <% end %>
26 |
--------------------------------------------------------------------------------
/spec/factories/event_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :event, class: OpenConferenceWare::Event do
3 | sequence(:title) { |n| "Event #{n}" }
4 | deadline { Date.today.to_time + 1.day }
5 | open_text "We're accepting proposals"
6 | closed_text "We're not accepting proposals"
7 | proposal_status_published false
8 | session_text "We have sessions"
9 | tracks_text "We have tracks"
10 | start_date { Date.today.to_time + 2.days }
11 | end_date { Date.today.to_time + 3.days }
12 | accept_proposal_comments_after_deadline false
13 | slug { |record| record.title.downcase.gsub(/[^\w]/, '') }
14 | schedule_published false
15 | parent_id nil
16 | proposal_titles_locked false
17 |
18 | factory :populated_event do
19 | after(:create) do |record, evaluator|
20 | record.rooms << create(:room, event: record) if record.rooms.empty?
21 | record.tracks << create(:track, event: record) if record.tracks.empty?
22 | record.session_types << create(:session_type, event: record) if record.session_types.empty?
23 | end
24 | end
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/db/migrate/20131203235418_create_open_conference_ware_events.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareEvents < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_events do |t|
4 | t.string "title"
5 | t.datetime "deadline"
6 | t.text "open_text"
7 | t.text "closed_text"
8 | t.datetime "created_at"
9 | t.datetime "updated_at"
10 | t.boolean "proposal_status_published", default: false, null: false
11 | t.text "session_text"
12 | t.text "tracks_text"
13 | t.datetime "start_date"
14 | t.datetime "end_date"
15 | t.boolean "accept_proposal_comments_after_deadline", default: false
16 | t.string "slug"
17 | t.boolean "schedule_published", default: false
18 | t.integer "parent_id"
19 | t.boolean "proposal_titles_locked", default: false
20 | t.boolean "accept_selector_votes", default: false
21 | t.boolean "show_proposal_confirmation_controls", default: false
22 | end
23 |
24 | add_index "open_conference_ware_events", ["slug"]
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/open_conference_ware/scaffold.css:
--------------------------------------------------------------------------------
1 | body { background-color: #fff; color: #333; }
2 |
3 | body, p, ol, ul, td {
4 | font-family: verdana, arial, helvetica, sans-serif;
5 | font-size: 13px;
6 | line-height: 18px;
7 | }
8 |
9 | pre {
10 | background-color: #eee;
11 | padding: 10px;
12 | font-size: 11px;
13 | }
14 |
15 | a { color: #000; }
16 | a:visited { color: #666; }
17 | a:hover { color: #fff; background-color:#000; }
18 |
19 | .fieldWithErrors {
20 | padding: 2px;
21 | background-color: red;
22 | display: table;
23 | }
24 |
25 | #errorExplanation {
26 | width: 400px;
27 | border: 2px solid red;
28 | padding: 7px;
29 | padding-bottom: 12px;
30 | margin-bottom: 20px;
31 | background-color: #f0f0f0;
32 | }
33 |
34 | #errorExplanation h2 {
35 | text-align: left;
36 | font-weight: bold;
37 | padding: 5px 5px 5px 15px;
38 | font-size: 12px;
39 | margin: -7px;
40 | background-color: #c00;
41 | color: #fff;
42 | }
43 |
44 | #errorExplanation p {
45 | color: #333;
46 | margin-bottom: 0;
47 | padding: 5px;
48 | }
49 |
50 | #errorExplanation ul li {
51 | font-size: 12px;
52 | list-style: square;
53 | }
54 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/users/index.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Users" %>
2 |
3 |
4 |
5 |
6 | Name
7 | <% if admin? %>
8 | Actions
9 | <% end %>
10 |
11 | <% @users.each do |user| -%>
12 |
13 |
14 | <% if admin? %>
15 | <% if user.admin? %>
16 | (admin )
17 | <% end %>
18 | <% if user.selector? %>
19 | (selector )
20 | <% end %>
21 | <% end %>
22 | <%= link_to(user.label, user_path(user)) %><%= (", " + user.affiliation) unless user.affiliation.blank? %>
23 |
24 | <% if admin? %>
25 |
26 | <%= link_to "Edit", edit_user_path(user), :class => "editable" %>
27 | <%= link_to "Delete...", user, :method => :delete, :data => { :confirm => "Delete user #{h user.label}?" }, :class => "deletable" %>
28 |
29 | <% end %>
30 |
31 | <% end -%>
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/schedule_items/index.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Schedule Items" %>
2 |
3 |
4 |
5 | Title
6 | Start Time
7 | Duration
8 | <% if admin? %>Controls <% end -%>
9 |
10 |
11 | <% for schedule_item in @schedule_items %>
12 |
13 | <%= link_to h(schedule_item.title), schedule_item_path(schedule_item) %>
14 | <%= schedule_item.start_time.localtime.to_s(:db) %>
15 | <%= schedule_item.duration %>
16 |
17 | <% if admin? %>
18 |
19 | <%= link_to 'Edit', edit_schedule_item_path(schedule_item), :class => "editable" %>
20 | <%= link_to 'Destroy', schedule_item_path(schedule_item), :data => { :confirm => %{Destroy schedule item "#{schedule_item.title}"?} }, :method => :delete, :class => "deletable" %>
21 |
22 | <% end %>
23 |
24 | <% end %>
25 |
26 |
27 |
28 |
29 | <%= link_to 'New schedule item', new_schedule_item_path, :class => "addable" if admin? %>
30 | <%= link_to 'Back to proposals', event_proposals_path(@event), :class => "cancelable" %>
31 |
32 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/schedule_items/show.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "#{@schedule_item.title}" %>
2 |
3 | <% cache "schedule_item_#{@schedule_item.id},admin_#{admin?}" do %>
4 |
5 |
Excerpt
6 | <%= preserve_formatting_of @schedule_item.excerpt %>
7 |
8 | <% unless @schedule_item.description.blank? %>
9 |
Description
10 | <%= display_textile_for @schedule_item.description %>
11 | <% end -%>
12 |
13 | <% if @schedule_item.room %>
14 |
Room
15 |
<%= link_to h(@schedule_item.room.name), @schedule_item.room %>
16 | <% end -%>
17 |
18 |
Start Time
19 |
<%= @schedule_item.start_time.to_s(:db) %>
20 |
21 |
Duration
22 |
<%= @schedule_item.duration %>
23 |
24 |
25 | <%= link_to 'Edit', edit_schedule_item_path(@schedule_item), :class => "editable" if admin? %>
26 | <%= link_to 'New schedule item', new_schedule_item_path, :class => "addable" if admin? %>
27 | <%= link_to 'Schedule items for this event', schedule_items_path, :class => "cancelable" %>
28 |
29 |
30 | <% end %>
31 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | http://www.opensource.org/licenses/mit-license.php
2 |
3 | The MIT License
4 |
5 | Copyright (c) 2007-2008 Igal Koshevoy, Reid Beels, et al
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in
15 | all copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | THE SOFTWARE.
24 |
--------------------------------------------------------------------------------
/Guardfile:
--------------------------------------------------------------------------------
1 | # A sample Guardfile
2 | # More info at https://github.com/guard/guard#readme
3 |
4 | guard :rspec do
5 | watch(%r{^spec/.+_spec\.rb$})
6 | watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
7 | watch('spec/spec_helper.rb') { "spec" }
8 |
9 | # Rails example
10 | watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
11 | watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
12 | watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
13 | watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
14 | watch('config/routes.rb') { "spec/routing" }
15 | watch('app/controllers/application_controller.rb') { "spec/controllers" }
16 |
17 | # Capybara features specs
18 | watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
19 |
20 | # Turnip features and steps
21 | watch(%r{^spec/acceptance/(.+)\.feature$})
22 | watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
23 | end
24 |
25 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/proposals/_manage_speakers.html.erb:
--------------------------------------------------------------------------------
1 | <% can_remove = @proposal.users.size > 1 %>
2 |
3 | <% @proposal.users.each do |user| %>
4 |
5 |
6 | <% if can_remove %>
7 | <% message = user == current_user ?
8 | "You will no longer be able to edit this proposal. Are you sure you want to remove yourself?" :
9 | "#{h user.fullname} will no longer be able to edit this proposal. Are you sure you want to remove them?" %>
10 | <%= link_to "", "#", :class => "remove-speaker deletable", :speaker_id => user.id, :speaker_fullname => user.fullname %>
11 | <% else %>
12 |
13 | <% end %>
14 |
15 |
16 | <%= h user.fullname %>
17 | <%= hidden_field_tag "speaker_ids[#{user.id}]", user.id, :class => "speaker_id" %>
18 |
19 |
20 | <% end %>
21 | <% if can_remove %>
22 |
23 |
24 |
25 | Remove speakers by clicking the red X next to the name of the speaker you want to remove.
26 |
27 |
28 |
29 | <% end %>
30 |
31 |
--------------------------------------------------------------------------------
/spec/models/open_conference_ware/user_favorite_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::UserFavorite do
4 | fixtures :all
5 |
6 | before(:each) do
7 | @user = users(:quentin)
8 | @proposal = proposals(:clio_chupacabras)
9 | end
10 |
11 | def add_favorite
12 | return UserFavorite.add(@user.id, @proposal.id)
13 | end
14 |
15 | def remove_favorite
16 | return UserFavorite.remove(@user.id, @proposal.id)
17 | end
18 |
19 | it "should add and create new record" do
20 | proc { add_favorite }.should change(UserFavorite, :count).by(1)
21 | end
22 |
23 | it "should add and accept existing record" do
24 | add_favorite
25 | proc { add_favorite }.should_not change(UserFavorite, :count)
26 | end
27 |
28 | it "should remove and destroy existing record" do
29 | add_favorite
30 | proc { remove_favorite }.should change(UserFavorite, :count).by(-1)
31 | end
32 |
33 | it "should remove and do nothing if no existing record" do
34 | proc { remove_favorite }.should_not change(UserFavorite, :count)
35 | end
36 |
37 | it "should return ids of user's favorite proposals" do
38 | add_favorite
39 | UserFavorite.proposal_ids_for(@user).should == [@proposal.id]
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/spec/dummy/config/application.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../boot', __FILE__)
2 |
3 | # Pick the frameworks you want:
4 | require "active_record/railtie"
5 | require "action_controller/railtie"
6 | require "action_mailer/railtie"
7 | require "sprockets/railtie"
8 | # require "rails/test_unit/railtie"
9 |
10 | Bundler.require(*Rails.groups)
11 | require "open_conference_ware"
12 |
13 | module Dummy
14 | class Application < Rails::Application
15 | # Settings in config/environments/* take precedence over those specified here.
16 | # Application configuration should go into files in config/initializers
17 | # -- all .rb files in that directory are automatically loaded.
18 |
19 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
20 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
21 | # config.time_zone = 'Central Time (US & Canada)'
22 |
23 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
24 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
25 | # config.i18n.default_locale = :de
26 |
27 | config.i18n.enforce_available_locales = true
28 | end
29 | end
30 |
31 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/manage/snippets/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= error_messages_for :snippet %>
2 |
3 | <%= form_for([:manage, @snippet], :html => {:class => "snippet_form"}) do |f| %>
4 | <%= hidden_field_tag :return_to, @return_to %>
5 |
6 |
14 |
15 |
16 | <%= f.label :description %>
17 | <%= f.text_field :description, :class => "form-control" %>
18 |
19 |
20 |
21 | <%= f.label :content %>
22 | <%= f.text_area :content, :id => :snippet_content, :class => "form-control" %>
23 |
24 |
25 |
26 | <%= f.submit @snippet.new_record? ? "Create" : "Update", :class => "btn btn-primary" %>
27 | <%= link_to "Cancel", manage_snippets_path, :class => "btn btn-default" %>
28 | <%= link_to 'Destroy', manage_snippet_path(@snippet), :method => :delete, :data => { :confirm => %{Destroy snippet "#{@snippet.slug}"?} }, :class => "btn btn-danger pull-right" unless @snippet.new_record? %>
29 |
30 | <% end %>
31 |
--------------------------------------------------------------------------------
/spec/dummy/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Dummy::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Do not eager load code on boot.
10 | config.eager_load = false
11 |
12 | # Show full error reports and disable caching.
13 | config.consider_all_requests_local = true
14 | config.action_controller.perform_caching = false
15 |
16 | # Don't care if the mailer can't send.
17 | config.action_mailer.raise_delivery_errors = false
18 |
19 | # Print deprecation notices to the Rails logger.
20 | config.active_support.deprecation = :log
21 |
22 | # Raise an error on page load if there are pending migrations
23 | config.active_record.migration_error = :page_load
24 |
25 | # Debug mode disables concatenation and preprocessing of assets.
26 | # This option may cause significant delays in view rendering with a large
27 | # number of complex assets.
28 | config.assets.debug = true
29 | end
30 |
--------------------------------------------------------------------------------
/spec/features/snippets_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | feature "managing snippets", type: :feature do
4 | background do
5 | mock_sign_in(:admin)
6 | end
7 |
8 | scenario "Adding a new snippet" do
9 | visit OpenConferenceWare.mounted_path("/manage/snippets")
10 | click_link "New snippet"
11 | fill_in "Slug", with: "testing_snippet"
12 | fill_in "Description", with: "This is a snippet to test snippet editing"
13 | fill_in "Content", with: "lorem ipsum"
14 | click_button "Create"
15 |
16 | page.should have_content "Snippet was successfully created."
17 | end
18 |
19 | scenario "Editing a snippet" do
20 | snippet = create(:snippet)
21 | new_content = "!!snippet content!!"
22 | visit OpenConferenceWare.mounted_path("/manage/snippets")
23 | click_link snippet.slug
24 | click_link "Edit"
25 | fill_in "Content", with: new_content
26 | click_button "Update"
27 |
28 | page.should have_content "Snippet was successfully updated."
29 | page.should have_content new_content
30 | end
31 |
32 | scenario "Deleting a snippet" do
33 | snippet = create(:snippet)
34 | visit manage_snippet_path(snippet)
35 | click_link "Destroy"
36 | page.should have_content "Snippet was deleted."
37 | end
38 | end
39 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/proposals/_admin_controls.html.erb:
--------------------------------------------------------------------------------
1 | <%
2 | # Variables:
3 | # * proposal or @proposal: Proposal to create UI for.
4 |
5 | proposal ||= @proposal
6 | %>
7 |
8 | <% if admin? && ! proposal.new_record? %>
9 | <% expose_to_js :proposals_path, proposals_path %>
10 | <% run_when_dom_is_ready "bind_all_proposal_controls();" %>
11 |
12 |
13 | <%= form_for(proposal) do |f| %>
14 |
ADMIN:
15 | <% if proposal_statuses? %>
16 | Status
17 | <%= render :partial => 'open_conference_ware/proposals/transition_control', :locals => {:proposal => proposal} %>
18 | <% end %>
19 |
20 | <% if event_rooms? %>
21 | Room
22 | <%= render :partial => 'open_conference_ware/proposals/room_control', :locals => {:proposal => proposal, :form => f} %>
23 | <% end %>
24 |
25 | <% if proposal_start_times? && proposal.event %>
26 | Start
27 | <%= render :partial => 'open_conference_ware/proposals/schedule_control', :locals => {:proposal => proposal, :form => f} %>
28 | <% end %>
29 |
30 | <%= link_to("Email speaker(s)...", proposal.mailto_link) %>
31 | <% end %>
32 |
33 | <% end %>
34 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/comments/_list.html.erb:
--------------------------------------------------------------------------------
1 | <%
2 | # SUMMARY: Displays a list of comments
3 | #
4 | # Variables
5 | ## Comments to display. REQUIRED.
6 | comments = local_assigns[:comments]
7 | ## Display links to comments proposals'? Optional, defaults to false.
8 | proposal_links = local_assigns[:proposal_links]
9 | %>
10 |
11 | <% if comments.blank? %>
12 | — No comments —
13 | <% else %>
14 |
31 | <% end %>
32 |
--------------------------------------------------------------------------------
/app/controllers/open_conference_ware/events_controller.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | class EventsController < ApplicationController
3 | include BreadcrumbsMixin
4 | add_breadcrumb "Events", "/events"
5 |
6 | before_filter :assert_current_event_or_redirect
7 | before_filter :normalize_event_path_or_redirect
8 | before_filter :assert_proposal_status_published, only: :speakers
9 | before_filter :require_admin, only: [:selector_votes]
10 |
11 | def index
12 | @events = Event.order("deadline asc")
13 |
14 | respond_to do |format|
15 | format.html
16 | format.json { render json: @events }
17 | format.xml { render xml: @events }
18 | end
19 | end
20 |
21 | def show
22 | respond_to do |format|
23 | format.html { redirect_to event_proposals_path(@event) }
24 | format.json { render json: @event }
25 | format.xml { render xml: @event }
26 | end
27 | end
28 |
29 | def speakers
30 | assign_prefetched_hashes
31 |
32 | respond_to do |format|
33 | format.html
34 | format.json { render json: @speakers }
35 | format.xml { render xml: @speakers }
36 | format.csv { render csv: @speakers, style: admin? ? :full : :public }
37 | end
38 | end
39 | end
40 | end
41 |
--------------------------------------------------------------------------------
/lib/open_conference_ware/engine.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | class Engine < ::Rails::Engine
3 | isolate_namespace OpenConferenceWare
4 |
5 | config.autoload_paths += [
6 | root.join('app','mixins').to_s,
7 | root.join('app','observers').to_s,
8 | root.join('lib').to_s
9 | ]
10 |
11 | # Activate observers that should always be running.
12 | config.active_record.observers = "OpenConferenceWare::CacheWatcher"
13 |
14 | initializer "open_conference_ware.assets.precompile" do |app|
15 | # Precompile IE-only assets
16 | app.config.assets.precompile += ['ie.js']
17 |
18 | # Include vendored image, font, and flash assets when precompiling
19 | app.config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.eot *.svg *.ttf *.woff *.swf)
20 | end
21 |
22 | config.generators do |g|
23 | g.test_framework :rspec, :fixture => false
24 | g.fixture_replacement :factory_girl, :dir => 'spec/factories'
25 | g.assets false
26 | g.helper false
27 | end
28 |
29 | initializer :append_migrations do |app|
30 | unless app.root.to_s.match root.to_s
31 | config.paths["db/migrate"].expanded.each do |expanded_path|
32 | app.config.paths["db/migrate"] << expanded_path
33 | end
34 | end
35 | end
36 |
37 | end
38 | end
39 |
--------------------------------------------------------------------------------
/app/models/open_conference_ware/user_favorite.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 |
3 | # == Schema Information
4 | #
5 | # Table name: user_favorites
6 | #
7 | # id :integer not null, primary key
8 | # user_id :integer
9 | # proposal_id :integer
10 | # created_at :datetime
11 | # updated_at :datetime
12 | #
13 |
14 | class UserFavorite < OpenConferenceWare::Base
15 | # Associations
16 | belongs_to :user
17 | belongs_to :proposal
18 |
19 | # Validations
20 | validates_presence_of :user_id
21 | validates_presence_of :proposal_id
22 |
23 | # Add a favorite. Creates record if needed, else leaves as-is.
24 | def self.add(user_id, proposal_id)
25 | return self.find_or_create_by(user_id: user_id, proposal_id: proposal_id)
26 | end
27 |
28 | # Remove a favorite. Removes record if needed, else does nothing.
29 | def self.remove(user_id, proposal_id)
30 | if record = self.find_by_user_id_and_proposal_id(user_id, proposal_id)
31 | return record.destroy
32 | else
33 | return false
34 | end
35 | end
36 |
37 | # Return the ids of this +user+'s favorite proposals.
38 | def self.proposal_ids_for(user)
39 | return self.where(user_id: user.id).select('proposal_id').map(&:proposal_id)
40 | end
41 | end
42 | end
43 |
--------------------------------------------------------------------------------
/lib/generators/open_conference_ware/install/templates/omniauth_initializer.rb:
--------------------------------------------------------------------------------
1 | OmniAuth.config.path_prefix = OpenConferenceWare.mounted_path("auth")
2 |
3 | Rails.application.config.middleware.use OpenConferenceWare::OmniAuthBuilder do
4 | # Configure authentication providers for OpenConferenceWare
5 |
6 | # The providers below are supported with built-in sign in forms.
7 | #
8 | # Additional providers can be found at:
9 | # https://github.com/intridea/omniauth/wiki/List-of-Strategies
10 | #
11 | # When adding a new provider, it will be linked to from the sign in page.
12 | #
13 | # If you want to display a nicer form, just add a partial at
14 | # /app/views/open_conference_ware/authentications/_.html.erb
15 | #
16 | # Providers will be shown on the sign in page in the order they are added.
17 |
18 | # OpenID
19 | # add 'omniauth-openid' to Gemfile and uncomment to enable OpenID
20 | #
21 | #require 'openid/store/filesystem'
22 | #provider :openid, store: OpenID::Store::Filesystem.new(Rails.root.join('tmp'))
23 |
24 | # Persona
25 | # add 'omniauth-persona' to Gemfile and uncomment to enable Persona
26 | #
27 | #provider :persona
28 |
29 | # Developer
30 | # Used to provide easy authentication during development
31 | provider :developer if %w[development preview].include?(Rails.env)
32 | end
33 |
--------------------------------------------------------------------------------
/lib/generators/open_conference_ware/install/install_generator.rb:
--------------------------------------------------------------------------------
1 | require 'securerandom'
2 |
3 | class OpenConferenceWare::InstallGenerator < Rails::Generators::Base
4 | source_root File.expand_path('../templates', __FILE__)
5 |
6 | argument :mount_point,
7 | type: :string,
8 | default: "/",
9 | desc: "The path where OpenConferenceWare should be mounted",
10 | banner: "MOUNT_POINT (Default: /)"
11 |
12 | def copy_config_initializer
13 | template "config_initializer.rb", "config/initializers/01_open_conference_ware.rb"
14 | end
15 |
16 | def copy_omniauth_initializer
17 | copy_file "omniauth_initializer.rb", "config/initializers/02_omniauth.rb"
18 | end
19 |
20 | def generate_secrets_yml
21 | template "secrets.yml.erb", "config/secrets.yml"
22 | end
23 |
24 | def mount_engine
25 | route %Q{mount OpenConferenceWare::Engine => "#{mount_point}"}
26 | end
27 |
28 | def replace_secret_token_initializer
29 | template "secret_token.rb.erb", "config/initializers/secret_token.rb"
30 | end
31 |
32 | def include_engine_seeds
33 | append_to_file "db/seeds.rb" do
34 | <<-SEED
35 |
36 | # Include OpenConferenceWare's seed data
37 | OpenConferenceWare::Engine.load_seed
38 | SEED
39 | end
40 | end
41 |
42 | def run_setup_rake_task
43 | rake "open_conference_ware:setup"
44 | end
45 | end
46 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/tracks/_form.html.erb:
--------------------------------------------------------------------------------
1 | <% content_for :scripts do %>
2 |
7 | <% end %>
8 |
9 | <% focus :track_title %>
10 |
11 | <%= form_for([@event, @track]) do |f| %>
12 | <%= f.error_messages %>
13 |
14 |
15 | <%= f.label :title %>
16 | <%= f.text_field :title, :class => "form-control" %>
17 |
18 |
19 | <%= f.label :excerpt %> (one line description, used in track selector)
20 | <%= f.text_area :excerpt, :class => "form-control" %>
21 |
22 |
23 | <%= f.label :description %> (<%= display_textile_help_link %>)
24 | <%= f.text_area :description, :rows => 8, :class => "form-control" %>
25 |
26 |
27 | <%= f.label :color %>
28 | <%= f.text_field :color, :class => "form-control" %>
29 |
30 |
31 |
32 | <%= f.submit @track.new_record? ? "Create" : "Update", :class => "btn btn-primary" %>
33 | <%= link_to 'Cancel', @track, :class => "btn btn-default" %>
34 | <%= link_to 'Destroy', track_path(@track), :method => :delete, :data => { :confirm => %{Destroy track "#{@track.title}"?} }, :class => "btn btn-danger pull-right" unless @track.new_record? %>
35 |
36 | <% end %>
37 |
--------------------------------------------------------------------------------
/app/observers/open_conference_ware/cache_watcher.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 |
3 | # = CacheWatcher
4 | #
5 | # Watches for changes in models and expires the cache.
6 | class CacheWatcher < ActiveRecord::Observer
7 | # Watch for changes in these classes:
8 | observe \
9 | Comment,
10 | Event,
11 | Proposal,
12 | Room,
13 | ScheduleItem,
14 | SessionType,
15 | Snippet,
16 | Track,
17 | User,
18 | UserFavorite,
19 | SelectorVote
20 |
21 | # Expire the cache
22 | def self.expire(*args)
23 | Rails.logger.info("CacheWatcher: expiring cache")
24 | case Rails.cache.class.name
25 | when "ActiveSupport::Cache::MemCacheStore"
26 | Rails.cache.instance_variable_get(:@data).flush_all
27 | when "ActiveSupport::Cache::FileStore", "ActiveSupport::Cache::MemoryStore"
28 | Rails.cache.delete_matched(//) rescue nil
29 | else
30 | raise NotImplementedError, "Don't know how to expire cache: #{Rails.cache.class.name}"
31 | end
32 | end
33 |
34 | def expire(*args)
35 | self.class.expire(*args)
36 | end
37 |
38 | # Expire the cache when these triggers are called on a record
39 | alias_method :after_save, :expire
40 | alias_method :after_destroy, :expire
41 | alias_method :after_rollback, :expire
42 | end
43 | end
44 |
--------------------------------------------------------------------------------
/gem-public_cert.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDjjCCAnagAwIBAgIBATANBgkqhkiG9w0BAQUFADBGMQ0wCwYDVQQDDARyZWlk
3 | MSAwHgYKCZImiZPyLGQBGRYQb3BlbnNvdXJjZWJyaWRnZTETMBEGCgmSJomT8ixk
4 | ARkWA29yZzAeFw0xNTAxMjkwMTE4NDRaFw0xNjAxMjkwMTE4NDRaMEYxDTALBgNV
5 | BAMMBHJlaWQxIDAeBgoJkiaJk/IsZAEZFhBvcGVuc291cmNlYnJpZGdlMRMwEQYK
6 | CZImiZPyLGQBGRYDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
7 | 51Xh9NhctWQz/eJXjKhQmA/scWjQTCpG0V/oSnDE6iEkFZolIv0WNdjVSA97kTgr
8 | +T6hcpU/uHYtaMfsv4NyubImDFvtUERhOtkneWsjZrzrandjpPpLYc9IjyfLRDFU
9 | 6McIB7tWKkPXXjyU0OxS66mUvNXsmPCdSXY84RUczsF4PqhXxBiPHh4wUlCP2Q+s
10 | X1XMRZwR3P/Uhv6BzEC0/qYxnCYVzTYWo2odhcRbVg0N63FZFlR2zCZVjeIEw5li
11 | LoWCvYObGJzYPF+GBPU21v36ByEcijU2oKPhmwhtDM1fuq1Jshm4yuPlJwcrwJor
12 | 7Ur26IEau+Wylzfs4O+wYQIDAQABo4GGMIGDMAkGA1UdEwQCMAAwCwYDVR0PBAQD
13 | AgSwMB0GA1UdDgQWBBS0lQCdLQL6ya9Tp1WTNzmKT+82wDAkBgNVHREEHTAbgRly
14 | ZWlkQG9wZW5zb3VyY2VicmlkZ2Uub3JnMCQGA1UdEgQdMBuBGXJlaWRAb3BlbnNv
15 | dXJjZWJyaWRnZS5vcmcwDQYJKoZIhvcNAQEFBQADggEBAEXQXaFmotiA5nRbvzF8
16 | AB2jTenrMg2Z9zxqqdI8F4kkzc9UykIGX2qcyijVHRSNpZKWPviyXw3/YmTLcXIm
17 | pvbxLx3VSJav9VVOMFOR0+WG65m3rxMGSWpr5D9gQqYLbEjH/lRkHcLevXL6iyXS
18 | 5teh3QVQemlzV7CTzjsZ1AUvn4S5YrCyy2Nra4X1WzfYzEvd6VC1I/a4mDwt8EX3
19 | 7fP9XGEnkWNQOgWY6n51zywzS/IpRkSVzQAScCRAe2yDIFrrkxcn8ohH88bNHxSX
20 | Je2AWbjtuEcurXHnvRkTkekvY3Gn/YOhKEA0gIRUzjucOz//jddTehBWOfzIwYlA
21 | AFg=
22 | -----END CERTIFICATE-----
23 |
--------------------------------------------------------------------------------
/features/step_definitions/comment_new_steps.rb:
--------------------------------------------------------------------------------
1 | Given /^I am interested in a proposal for a "([^\"]*)" event$/ do |kind|
2 | # TODO rework fixtures to use automatic identities
3 | #@event = Event.find(Fixtures.identify(kind))
4 | event_id = \
5 | case kind
6 | when "open" then 2009
7 | when "closed" then 1975
8 | else raise ArgumentError, "Unknown event_id: #{kind}"
9 | end
10 |
11 | # Set flags on event to prevent redirections
12 | @event = Event.find(event_id)
13 | @event.proposal_status_published = false
14 | @event.schedule_published = false
15 | @event.save!
16 |
17 | @proposal = @event.proposals.first
18 | end
19 |
20 | Given /^the settings allow comments after the deadline: "([^\"]*)"$/ do |truth|
21 | unless truth.blank?
22 | SETTINGS.have_event_proposal_comments_after_deadline = boolean_for(truth)
23 | end
24 | end
25 |
26 | Given /^the event is accepting comments if after the deadline: "([^\"]*)"$/ do |truth|
27 | unless truth.blank?
28 | @event.accept_proposal_comments_after_deadline = boolean_for(truth)
29 | @event.save!
30 | end
31 | end
32 |
33 | When /^I visit the proposal$/ do
34 | get proposal_path(@proposal)
35 | end
36 |
37 | Then /^the comments form is displayed: "([^\"]*)"$/ do |truth|
38 | method = boolean_for(truth) ? :should : :should_not
39 | page.send(method, have_selector("#comment-form"))
40 | end
41 |
42 |
--------------------------------------------------------------------------------
/spec/helpers/open_conference_ware/proposals_helper_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe OpenConferenceWare::ProposalsHelper do
4 | describe "traversal" do
5 | before :each do
6 | allow(view).to receive(:selector?).and_return(false)
7 | add_all_helpers_to(view)
8 | @event = create :populated_event
9 | @proposal1 = proposal_for_event(@event)
10 | @proposal2 = proposal_for_event(@event)
11 | end
12 |
13 | describe "#next_proposal_path_from" do
14 | context "as a mortal" do
15 | it "should return a link to the next proposal when it exists" do
16 | helper.next_proposal_path_from(@proposal1).should == view.proposal_path(@proposal2)
17 | end
18 |
19 | it "should return nil when this is the last proposal" do
20 | helper.next_proposal_path_from(@proposal2).should be_nil
21 | end
22 | end
23 | end
24 |
25 | describe "#previous_proposal_path_from" do
26 | context "as a mortal" do
27 | it "should return a link to the previous proposal when it exists" do
28 | helper.previous_proposal_path_from(@proposal2).should == view.proposal_path(@proposal1)
29 | end
30 |
31 | it "should return nil when this is the first proposal" do
32 | helper.previous_proposal_path_from(@proposal1).should be_nil
33 | end
34 | end
35 | end
36 | end
37 | end
38 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/manage/events/index.html.erb:
--------------------------------------------------------------------------------
1 | <% page_title "Events" %>
2 |
3 |
4 |
5 |
6 | Slug
7 | Title
8 | Accepting?
9 | Deadline
10 | Manage
11 |
12 |
13 | <% if @events.blank? %>
14 |
15 |
16 | — No events —
17 |
18 |
19 | <% end %>
20 | <% for event in @events %>
21 | ">
22 | <%=h event.slug %>
23 |
24 | <%= link_to h(event.title), [:manage, event] %>
25 |
26 | <%=h event.accepting_proposals?.inspect %>
27 | <%=h event.deadline %>
28 |
29 | <%= link_to 'Show', manage_event_path(event), :class => "showable" %>
30 | <%= link_to 'Proposals', event_proposals_path(event), :class => "showable" %>
31 | <%= link_to 'Edit', edit_manage_event_path(event), :class => "editable" %>
32 | <%= link_to 'Destroy', manage_event_path(event), :data => { :confirm => 'Are you sure?' }, :method => :delete, :class => "deletable" %>
33 |
34 |
35 | <% end %>
36 |
37 |
38 |
39 |
40 |
41 | <%= link_to 'New event', new_manage_event_path, :class => "addable" %>
42 |
--------------------------------------------------------------------------------
/util/assign_rooms.rb:
--------------------------------------------------------------------------------
1 | # Assigns rooms, based on user_favorite popularily
2 | #
3 | # Usage: rails runner assign_rooms.rb
4 |
5 | class RoomAllocator
6 | LARGE_ROOMS = ["B202/203", "B302/303"]
7 | SMALL_ROOMS = ["B201", "B204", "B301", "B304"]
8 |
9 | def initialize
10 | @current_event = OpenConferenceWare::Event.current
11 | @sessions = @current_event.proposals.confirmed.scheduled.sort_by{|s| s.user_favorites.count }.reverse
12 | @rooms = (LARGE_ROOMS + SMALL_ROOMS).map{|rn| @current_event.rooms.find_by_name(rn) }
13 | end
14 |
15 | def room_available_at?(room, start_time)
16 | @sessions.select{|s| s.start_time == start_time}.all?{|s| s.room != room}
17 | end
18 |
19 | def allocate_rooms
20 | @sessions.each do |session|
21 | next if session.room.present?
22 | first_available_room = @rooms.find{|room| room_available_at?(room, session.start_time)}
23 | if first_available_room.present?
24 | puts "[#{session.user_favorites.count}] Assigned #{session.title} to #{first_available_room.name}"
25 | session.room = first_available_room
26 | else
27 | puts "[!!] Could not find a room assignment for #{session.title}"
28 | end
29 | end
30 |
31 | puts "---"
32 | puts "Accept room assignments? (y/n)"
33 | if gets.chomp == "y"
34 | @sessions.each{|s| s.save!}
35 | end
36 | end
37 | end
38 |
39 |
40 | RoomAllocator.new.allocate_rooms
41 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/rooms/_form.html.erb:
--------------------------------------------------------------------------------
1 | <% focus :room_name %>
2 |
3 | <%= form_for(@room, :html => { :multipart => true }) do |f| %>
4 | <%= f.error_messages %>
5 |
6 |
7 | <%= f.label :name %>
8 | <%= f.text_field :name, :class => "form-control" %>
9 |
10 |
11 | <%= f.label :capacity, "Capacity (number of people)" %>
12 | <%= f.text_field :capacity, :class => "form-control" %>
13 |
14 |
15 | <%= f.label :size %>
16 | <%= f.text_field :size, :class => "form-control" %>
17 |
18 |
19 | <%= f.label :seating_configuration %>
20 | <%= f.text_field :seating_configuration, :class => "form-control" %>
21 |
22 |
23 | <%= f.label :description %> (<%= display_textile_help_link %>)
24 | <%= f.text_area :description, :class => "form-control" %>
25 |
26 |
27 | <%= f.label :image, "Image" %>
28 | <%= image_tag @room.image.url(:small) if @room.image.file? %>
29 | <%= f.file_field :image %>
30 |
31 |
32 | <%= f.submit @room.new_record? ? "Create" : "Update", :class => "btn btn-primary" %>
33 | <%= link_to 'Cancel', @room, :class => "btn btn-default" %>
34 | <%= link_to 'Destroy', room_path(@room), :method => :delete, :data => { :confirm => %{Destroy room "#{@room.name}"?} }, :class => "btn btn-danger pull-right" unless @room.new_record? %>
35 |
36 | <% end %>
37 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/selector_votes/index.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/selector_votes/index.html.erb" do
4 | before(:each) do
5 | @user1 = build :selector
6 | @user2 = build :selector
7 |
8 | @event = create :populated_event
9 |
10 | @proposal1 = proposal_for_event(@event)
11 | @proposal2 = proposal_for_event(@event)
12 |
13 | @selector_vote1 = @proposal1.selector_votes.build user: @user1, rating: 1, comment: "Meh."
14 | @selector_vote2 = @proposal1.selector_votes.build user: @user2, rating: 5, comment: "Yay!"
15 |
16 | @comment1 = @proposal1.comments.build email: "foo@.bar.com", message: "Hi!"
17 |
18 | assign(:event, @event)
19 | assign(:proposals, [@proposal1, @proposal2])
20 |
21 | render
22 | end
23 |
24 | describe "result" do
25 | it "should include proposal with selector votes" do
26 | have_selector ".proposal_#{@proposal1.id}"
27 | end
28 |
29 | it "should include proposal without selector votes" do
30 | have_selector ".proposal_#{@proposal2.id}"
31 | end
32 |
33 | it "should include selector vote for a proposal" do
34 | have_selector ".proposal_#{@proposal1.id} .selector_vote_#{@selector_vote1}"
35 | end
36 |
37 | it "should include comment for a proposal" do
38 | have_selector ".proposal_#{@proposal1.id} .comment_#{@comment1}"
39 | end
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/app/models/open_conference_ware/track.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 |
3 | # == Schema Information
4 | #
5 | # Table name: tracks
6 | #
7 | # id :integer not null, primary key
8 | # title :string(255)
9 | # description :text
10 | # color :string(255)
11 | # event_id :integer
12 | # created_at :datetime
13 | # updated_at :datetime
14 | # excerpt :text
15 | #
16 |
17 | class Track < OpenConferenceWare::Base
18 |
19 | # Associations
20 | belongs_to :event
21 | has_many :proposals, dependent: :nullify
22 |
23 | # Validations
24 | validates_presence_of \
25 | :color,
26 | :description,
27 | :excerpt,
28 | :event_id,
29 | :title
30 |
31 | def <=>(against)
32 | self.title <=> (against.nil? ? '' : against.title)
33 | end
34 |
35 | def color
36 | (stored_color = read_attribute(:color)).nil? ? nil : Color::RGB.from_html(stored_color)
37 | end
38 |
39 | def color=(value)
40 | case value
41 | when Color::RGB
42 | new_color = value
43 | when String
44 | new_color = Color::RGB.from_html(value)
45 | else
46 | raise TypeError
47 | end
48 | write_attribute(:color,new_color.html)
49 | rescue ArgumentError
50 | write_attribute(:color, nil)
51 | errors.add(:color, "is not a recognized HTML color")
52 | end
53 | end
54 | end
55 |
--------------------------------------------------------------------------------
/db/migrate/20131203235524_create_open_conference_ware_proposals.rb:
--------------------------------------------------------------------------------
1 | class CreateOpenConferenceWareProposals < ActiveRecord::Migration
2 | def change
3 | create_table :open_conference_ware_proposals do |t|
4 | t.integer "user_id"
5 | t.string "presenter"
6 | t.string "affiliation"
7 | t.string "email"
8 | t.string "website"
9 | t.text "biography"
10 | t.string "title"
11 | t.text "description"
12 | t.boolean "agreement", default: true
13 | t.datetime "created_at"
14 | t.datetime "updated_at"
15 | t.integer "event_id"
16 | t.datetime "submitted_at"
17 | t.text "note_to_organizers"
18 | t.text "excerpt"
19 | t.integer "track_id"
20 | t.integer "session_type_id"
21 | t.string "status", default: "proposed", null: false
22 | t.integer "room_id"
23 | t.datetime "start_time"
24 | t.string "audio_url"
25 | t.text "speaking_experience"
26 | t.string "audience_level"
27 | t.datetime "notified_at"
28 | end
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"]
35 | end
36 | end
37 |
--------------------------------------------------------------------------------
/db/seeds.rb:
--------------------------------------------------------------------------------
1 | puts "[OCW] Running OpenConferenceWare seeds"
2 | puts "[OCW] Creating snippets, if they don't exist"
3 | OpenConferenceWare::Snippet.load_from_fixtures
4 |
5 | if %w[development preview].include?(Rails.env)
6 | if ActiveRecord::Base.connection.table_exists?('open_conference_ware_authentications')
7 | puts "[OCW] Creating sample users for development"
8 | admin_auth = OpenConferenceWare::Authentication.find_or_initialize_by(provider: :developer, uid: 'admin@ocw.local')
9 | admin_auth.name = "Development Admin"
10 | admin_auth.email = "admin@ocw.local"
11 |
12 | unless admin_auth.user
13 | admin_user = OpenConferenceWare::User.create_from_authentication(admin_auth)
14 | admin_user.update_attributes(admin: true, biography: "I am mighty.")
15 | end
16 |
17 | mortal_auth = OpenConferenceWare::Authentication.find_or_initialize_by(provider: :developer, uid: 'mortal@ocw.local')
18 | mortal_auth.name = "Development User"
19 | mortal_auth.email = "mortal@ocw.local"
20 |
21 | unless mortal_auth.user
22 | mortal_user = OpenConferenceWare::User.create_from_authentication(mortal_auth)
23 | mortal_user.biography = "I'm ordinary."
24 | mortal_user.save!
25 | end
26 | else
27 | puts "[OCW] The open_conference_ware_authentications table does not exist, please run `rake db:migrate`"
28 | end
29 | else
30 | puts "[OCW] Not creating development users in the #{Rails.env} environment"
31 | end
32 |
--------------------------------------------------------------------------------
/spec/views/open_conference_ware/tracks/index.html.erb_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "open_conference_ware/tracks/index.html.erb" do
4 | include OpenConferenceWare::TracksHelper
5 |
6 | before(:each) do
7 | @event = stub_current_event!
8 |
9 | @tracks = [
10 | stub_model(Track,
11 | id: 2,
12 | title: "value for title",
13 | event: @event
14 | ),
15 | stub_model(Track,
16 | id: 3,
17 | title: "value for title",
18 | event: @event
19 | )
20 | ]
21 | assign(:tracks, @tracks)
22 | end
23 |
24 | describe "anonymous" do
25 | before do
26 | view.stub(:admin?).and_return(false)
27 | end
28 |
29 | it "should render list" do
30 | render
31 | rendered.should have_selector("h3", text: "value for title".to_s, count: 2)
32 | end
33 | end
34 |
35 | describe "admin" do
36 | fixtures :all
37 |
38 | before(:each) do
39 | view.stub(:admin?).and_return(true)
40 | render
41 | end
42 |
43 | it "should render list" do
44 | rendered.should have_selector("h3", text: "value for title".to_s, count: 2)
45 | end
46 |
47 | it "should render new link" do
48 | rendered.should have_selector("a[href='#{new_track_path}']")
49 | end
50 |
51 | it "should render edit links" do
52 | rendered.should have_selector("a[href='#{edit_track_path(@tracks.first)}']")
53 | end
54 | end
55 | end
56 |
--------------------------------------------------------------------------------
/lib/generators/open_conference_ware/views/views_generator.rb:
--------------------------------------------------------------------------------
1 | class OpenConferenceWare::ViewsGenerator < Rails::Generators::Base
2 | VIEWS_DIR = OpenConferenceWare::Engine.root.join('app','views')
3 | OCW_VIEW_DIRS = Pathname.glob(VIEWS_DIR.join("open_conference_ware","*/")).map{|d| d.basename.to_s } + ["layouts"]
4 |
5 | source_root VIEWS_DIR
6 | desc <<-DESC
7 | Copies OCW's views into your application. By default, all views will be copied.
8 |
9 | Optionally, you can pass specific view directories as arguments.
10 |
11 | Available directories:
12 | - #{OCW_VIEW_DIRS.join("\n- ")}
13 |
14 | DESC
15 | argument :which_views,
16 | type: :array,
17 | default: ["all"],
18 | desc: "Which view directories to copy. One or more of: #{OCW_VIEW_DIRS.join(' ')}",
19 | banner: "VIEWS TO COPY"
20 |
21 | def copy_views
22 | directories_to_copy = if which_views.any?{|d| d == "all"}
23 | OCW_VIEW_DIRS
24 | else
25 | which_views.select{|d| OCW_VIEW_DIRS.include?(d) }
26 | end
27 |
28 | directories_to_copy.each do |dir|
29 | view_directory dir
30 | end
31 | end
32 |
33 | protected
34 |
35 | def view_directory(name)
36 | path = if name == "layouts"
37 | "layouts/open_conference_ware"
38 | else
39 | "open_conference_ware/#{name}"
40 | end
41 |
42 | directory path, "app/views/#{path}"
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/app/helpers/open_conference_ware/snippets_helper.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | # SnippetsHelper retrieves Snippet records and contents for views.
3 | module SnippetsHelper
4 | # Return the Snippet record matching the +slug+, else raise a
5 | # ActiveRecord::RecordNotFound.
6 | def snippet_record_for(slug)
7 | if record = Snippet.find_by_slug(slug.to_s)
8 | return record
9 | else
10 | raise ActiveRecord::RecordNotFound, "Can't find snippet: #{slug}"
11 | end
12 | end
13 |
14 | # Return the raw snippet content for a +slug+, else raises a
15 | # ActiveRecord::RecordNotFound.
16 | def raw_snippet_for(slug)
17 | snippet_record_for(slug).content
18 | end
19 |
20 | # Returns the snippet content adorned with an "Edit" link if the user is an
21 | # admin, the raw content if the user is a mortal, else raises a
22 | # ActiveRecord::RecordNotFound.
23 | def snippet_for(slug, use_simple_format=true)
24 | record = snippet_record_for(slug)
25 | string = record.content
26 | if admin?
27 | if matcher = string.match(%r{(.+)((?:div|p)>)\s*$}s)
28 | string = matcher[1] + link_to("Edit", edit_manage_snippet_path(record), class: :snippet_edit_link) + matcher[2]
29 | else
30 | string = string + link_to("Edit", edit_manage_snippet_path(record), class: :snippet_edit_link)
31 | end
32 | end
33 | return use_simple_format ? simple_format(string) : string
34 | end
35 | end
36 | end
37 |
--------------------------------------------------------------------------------
/app/mixins/open_conference_ware/normalize_url_mixin.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | module NormalizeUrlMixin
3 | def self.included(mixee)
4 | mixee.send(:extend, ClassMethods)
5 | mixee.send(:include, ClassMethods)
6 | end
7 |
8 | module ClassMethods
9 | # Return a normalized URL, with the scheme prefix added, or raise an
10 | # URI::InvalidURIError if invalid.
11 | def normalize_url!(url)
12 | uri = URI.parse(url.strip)
13 | uri.scheme = 'http' unless ['http','ftp'].include?(uri.scheme) || uri.scheme.nil?
14 | return URI.parse(uri.scheme.nil? ? 'http://'+url.strip : uri.to_s).normalize.to_s
15 | end
16 |
17 | # Validate that +attributes+ each contain a valid URL or are blank. If any
18 | # are invalid, returns false. Invalid attributes will be marked with an
19 | # ActiveRecord validation error.
20 | def validate_url_attribute(*attributes)
21 | valid = true
22 | for attribute in [attributes].flatten
23 | value = self.read_attribute(attribute)
24 | next if value.blank?
25 | begin
26 | url = self.normalize_url!(value)
27 | self.send("#{attribute}=", url)
28 | rescue URI::InvalidURIError => e
29 | self.errors.add(attribute, 'is invalid')
30 | valid = false
31 | end
32 | end
33 | return valid
34 | end
35 | end
36 |
37 | include ClassMethods
38 | extend ClassMethods
39 | end
40 | end
41 |
--------------------------------------------------------------------------------
/spec/dummy/public/500.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | We're sorry, but something went wrong (500)
5 |
48 |
49 |
50 |
51 |
52 |
53 |
We're sorry, but something went wrong.
54 |
55 | If you are the application owner check the logs for more information.
56 |
57 |
58 |
--------------------------------------------------------------------------------
/app/controllers/open_conference_ware/authentications_controller.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 | class AuthenticationsController < ApplicationController
3 | before_filter :require_auth_hash, only: [:create]
4 |
5 | # We need to accept a raw POST from an OmniAuth provider with no authenticity token.
6 | skip_before_filter :verify_authenticity_token, :only => :create
7 |
8 | def sign_in
9 | page_title "Sign In"
10 | end
11 |
12 | def sign_out
13 | cookies.delete :auth_token
14 | reset_session
15 | flash[:notice] = "You have been logged out."
16 |
17 | redirect_back_or_default
18 | end
19 |
20 | def create
21 | Rails.logger.debug(auth_hash.to_hash.inspect)
22 | @authentication = Authentication.find_and_update_or_create_from_auth_hash(auth_hash)
23 |
24 | if @authentication.user
25 | self.current_user = @authentication.user
26 | elsif logged_in?
27 | @authentication.user = current_user
28 | @authentication.save
29 | else
30 | self.current_user = User.create_from_authentication(@authentication)
31 | end
32 |
33 | redirect_back_or_default
34 | end
35 |
36 | def failure
37 | flash[:error] = params[:message]
38 | redirect_to sign_in_path
39 | end
40 |
41 | protected
42 |
43 | def auth_hash
44 | request.env['omniauth.auth']
45 | end
46 |
47 | def require_auth_hash
48 | redirect_to(sign_in_path) and return unless auth_hash
49 | end
50 | end
51 | end
52 |
--------------------------------------------------------------------------------
/app/models/open_conference_ware/schedule_item.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 |
3 | # == Schema Information
4 | #
5 | # Table name: schedule_items
6 | #
7 | # id :integer not null, primary key
8 | # title :string(255)
9 | # excerpt :text
10 | # description :text
11 | # start_time :datetime
12 | # duration :integer
13 | # event_id :integer
14 | # room_id :integer
15 | # created_at :datetime
16 | # updated_at :datetime
17 | #
18 |
19 | class ScheduleItem < OpenConferenceWare::Base
20 |
21 | # Associations
22 | belongs_to :event
23 | belongs_to :room
24 |
25 | # Provides #overlaps?
26 | include ScheduleOverlapsMixin
27 |
28 | # Public attributes for export
29 | include PublicAttributesMixin
30 | set_public_attributes :id, :title, :excerpt, :description, :start_time, :end_time, :duration,
31 | :event_id, :event_title,
32 | :room_id, :room_title,
33 | :created_at, :updated_at
34 |
35 | # Return the time this session ends.
36 | def end_time
37 | if self.start_time
38 | self.start_time + (self.duration || 0).minutes
39 | else
40 | nil
41 | end
42 | end
43 |
44 | #---[ Accessors for getting the titles of related objects ]-------------
45 |
46 | def room_title
47 | return self.room.try(:name)
48 | end
49 |
50 | def event_title
51 | return self.event.try(:slug)
52 | end
53 | alias_method :event_slug, :event_title
54 | end
55 | end
56 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/schedule_items/_form.html.erb:
--------------------------------------------------------------------------------
1 | <% focus :schedule_item_title %>
2 |
3 | <%= form_for(@schedule_item) do |f| %>
4 | <%= f.error_messages %>
5 |
6 |
7 | <%= f.label :title %>
8 | <%= f.text_field :title, :class => "form-control" %>
9 |
10 |
11 | <%= f.label :excerpt %> (<%= display_textile_help_link %>)
12 | <%= f.text_area :excerpt, :class => "form-control" %>
13 |
14 |
15 | <%= f.label :description %> (<%= display_textile_help_link %>)
16 | <%= f.text_area :description, :class => "form-control" %>
17 |
18 |
19 | <%= f.label :start_time %>
20 | <%= f.datetime_select :start_time, :class => "form-control" %>
21 |
22 |
23 | <%= f.label :duration, "Duration (minutes)" %>
24 | <%= f.text_field :duration, :class => "form-control" %>
25 |
26 |
27 | <%= f.label :room_id, "Room" %>
28 | <%= f.collection_select :room_id, @event.rooms, :id, :name, {:include_blank => true}, :class => "form-control" %>
29 |
30 |
31 | <%= f.submit @schedule_item.new_record? ? "Create" : "Update", :class => "btn btn-primary" %>
32 | <%= link_to 'Cancel', @schedule_item, :class => "showable", :class => "btn btn-default" %>
33 | <%= link_to 'Destroy', schedule_item_path(@schedule_item), :method => :delete, :data => { :confirm => %{Destroy schedule item "#{@schedule_item.title}"?} }, :class => "btn btn-danger pull-right" unless @schedule_item.new_record? %>
34 |
35 | <% end %>
36 |
--------------------------------------------------------------------------------
/app/views/open_conference_ware/users/proposals.html.erb:
--------------------------------------------------------------------------------
1 | <% is_for_current_user = (current_user == @user) %>
2 | <% cache "my_proposals,user_#{@user.id},is_me_#{is_for_current_user}" do %>
3 | <% page_title "#{@user.label.possessiveize} Proposals"%>
4 | <% unless @proposals.blank? %>
5 | <% @proposals.group_by(&:event).sort_by{|group| group[0].start_date || 0}.reverse.each do |event, proposals| %>
6 | <% if event.proposal_status_published? %>
7 | <% unless ( sessions = proposals.select{|proposal| proposal.confirmed?} ).empty? %>
8 | Sessions accepted for <%= event.title %>
9 | <%= render :partial => "open_conference_ware/proposals/list", :locals => {:kind => :sessions, :records => sessions, :sorter => false} %>
10 | <% end -%>
11 |
12 | <% unless ( unaccepted_proposals = proposals.reject{|proposal| proposal.confirmed? } ).empty? %>
13 | Sessions proposed for <%= event.title%>
14 | <%= render :partial => "open_conference_ware/proposals/list", :locals => {:kind => :proposals, :records => unaccepted_proposals, :sorter => false} %>
15 | <% end -%>
16 | <% else -%>
17 | Sessions proposed for <%= event.title%>
18 | <%= render :partial => "open_conference_ware/proposals/list", :locals => {:kind => :proposals, :records => proposals, :sorter => false} %>
19 | <% end -%>
20 | <% end -%>
21 | <% else -%>
22 | <%= is_for_current_user ? 'You have' : "#{@user.label} has" %> not submitted any proposals
23 | <% end -%>
24 | <% end -%>
25 |
--------------------------------------------------------------------------------
/app/models/open_conference_ware/room.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 |
3 | # == Schema Information
4 | #
5 | # Table name: rooms
6 | #
7 | # id :integer not null, primary key
8 | # name :string(255) not null
9 | # capacity :integer
10 | # size :string(255)
11 | # seating_configuration :string(255)
12 | # description :text
13 | # event_id :integer
14 | # created_at :datetime
15 | # updated_at :datetime
16 | # image_file_name :string(255)
17 | # image_content_type :string(255)
18 | # image_file_size :integer
19 | # image_updated_at :datetime
20 | #
21 |
22 | class Room < OpenConferenceWare::Base
23 | # Associations
24 | belongs_to :event
25 | has_many :proposals, dependent: :nullify
26 | has_many :schedule_items, dependent: :nullify
27 |
28 | # Validations
29 | validates_presence_of :name, :event
30 | validates_numericality_of :capacity, unless: lambda{|obj| obj.capacity.blank? }
31 |
32 | # Image Attachment
33 | has_attached_file :image,
34 | path: ":rails_root/public/system/:attachment/:id/:style/:filename",
35 | url: "/system/:attachment/:id/:style/:filename",
36 | styles: {
37 | large: "650>",
38 | medium: "350>",
39 | small: "150>"
40 | }
41 |
42 | validates_attachment_content_type :image,
43 | :content_type => /\Aimage\/.*\Z/,
44 | :unless => Proc.new{|r| r.image_content_type.blank? }
45 | end
46 | end
47 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/openid-selector/openid-en.js:
--------------------------------------------------------------------------------
1 | /*
2 | Simple OpenID Plugin
3 | http://code.google.com/p/openid-selector/
4 |
5 | This code is licensed under the New BSD License.
6 | */
7 |
8 | var providers_large = {
9 | yahoo : {
10 | name : 'Yahoo',
11 | url : 'http://me.yahoo.com/'
12 | },
13 | openid : {
14 | name : 'OpenID',
15 | label : 'Enter your OpenID.',
16 | url : null
17 | }
18 | };
19 |
20 | var providers_small = {
21 | livejournal : {
22 | name : 'LiveJournal',
23 | label : 'Enter your Livejournal username.',
24 | url : 'http://{username}.livejournal.com/'
25 | },
26 | flickr : {
27 | name: 'Flickr',
28 | label: 'Enter your Flickr username.',
29 | url: 'http://flickr.com/{username}/'
30 | },
31 | wordpress: {
32 | name : 'Wordpress',
33 | label : 'Enter your Wordpress.com username.',
34 | url : 'http://{username}.wordpress.com/'
35 | },
36 | blogger : {
37 | name : 'Blogger',
38 | label : 'Your Blogger account',
39 | url : 'http://{username}.blogspot.com/'
40 | },
41 | launchpad : {
42 | name: 'Launchpad',
43 | label: 'Your Launchpad username',
44 | url: 'https://launchpad.net/~{username}'
45 | },
46 | aol : {
47 | name : 'AOL',
48 | label : 'Enter your AOL screenname.',
49 | url : 'http://openid.aol.com/{username}'
50 | },
51 | };
52 |
53 | openid.locale = 'en';
54 | openid.sprite = 'en'; // reused in german& japan localization
55 | openid.demo_text = 'In client demo mode. Normally would have submitted OpenID:';
56 | openid.signin_text = 'Sign In';
57 | openid.image_title = 'log in with {provider}';
58 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/openid-selector/openid.css.scss:
--------------------------------------------------------------------------------
1 | /*
2 | Simple OpenID Plugin
3 | http://code.google.com/p/openid-selector/
4 |
5 | This code is licensed under the New BSD License.
6 | */
7 |
8 | #openid_form {
9 | width: 580px;
10 | }
11 |
12 | #openid_form legend {
13 | font-weight: bold;
14 | }
15 |
16 | #openid_choice {
17 | display: none;
18 | }
19 |
20 | #openid_input_area {
21 | clear: both;
22 | padding: 10px;
23 | }
24 |
25 | #openid_btns, #openid_btns br {
26 | clear: both;
27 | }
28 |
29 | #openid_highlight {
30 | padding: 3px;
31 | background-color: #FFFCC9;
32 | float: left;
33 | }
34 |
35 | .openid_btn {
36 | background-image: image-url('openid-selector/openid-providers-en.png') !important;
37 | }
38 |
39 | .openid_large_btn {
40 | width: 100px;
41 | height: 60px;
42 | /* fix for IE 6 only: http://en.wikipedia.org/wiki/CSS_filter#Underscore_hack */
43 | _width: 102px;
44 | _height: 62px;
45 |
46 | border: 1px solid #DDD;
47 | margin: 3px;
48 | float: left;
49 | }
50 |
51 | .openid_small_btn {
52 | width: 24px;
53 | height: 24px;
54 | /* fix for IE 6 only: http://en.wikipedia.org/wiki/CSS_filter#Underscore_hack */
55 | _width: 26px;
56 | _height: 26px;
57 |
58 | border: 1px solid #DDD;
59 | margin: 3px;
60 | float: left;
61 | }
62 |
63 | a.openid_large_btn:focus {
64 | outline: none;
65 | }
66 |
67 | a.openid_large_btn:focus {
68 | -moz-outline-style: none;
69 | }
70 |
71 | .openid_selected {
72 | border: 4px solid #DDD;
73 | }
74 |
75 | .openid-input {
76 | width: 300px;
77 | display: inline;
78 | margin-right: .5em;
79 | }
80 |
--------------------------------------------------------------------------------
/app/mixins/open_conference_ware/settings_checkers_mixin.rb:
--------------------------------------------------------------------------------
1 | module OpenConferenceWare
2 |
3 | # = SettingsCheckersMixin
4 | #
5 | # The SettingsCheckersMixin provides methods for checking the status of the
6 | # settings, setup via the SettingsReader. These let you write code like
7 | # +#user_profiles?+ rather than +SETTINGS.has_user_profiles+.
8 | module SettingsCheckersMixin
9 |
10 | def self.included(mixee)
11 | mixee.extend(Methods)
12 |
13 | # Add view helper methods to controllers
14 | if mixee.ancestors.include?(ActionController::Base)
15 | mixee.class_eval do
16 | Methods.instance_methods.each do |name|
17 | helper_method(name)
18 | end
19 | end
20 | end
21 | end
22 |
23 | module Methods
24 | # Create methods like +#event_tracks?+ as wrappers for +OpenConferenceWare.have_event_tracks+.
25 | %w[
26 | anonymous_proposals
27 | event_proposal_comments_after_deadline
28 | event_tracks
29 | event_session_types
30 | events_picker
31 | event_rooms
32 | multiple_presenters
33 | proposal_excerpts
34 | proposal_speaking_experience
35 | proposal_start_times
36 | proposal_statuses
37 | user_pictures
38 | user_profiles
39 | user_favorites
40 | ].each do |name|
41 | define_method("#{name}?") do
42 | return OpenConferenceWare.send("have_#{name}")
43 | end
44 | end
45 | end
46 |
47 | include Methods
48 | extend Methods
49 |
50 | end
51 | end
52 |
--------------------------------------------------------------------------------