Merge branch 'master' into render_show_if_one_conf

This commit is contained in:
James Mason 2018-01-05 09:20:38 -08:00 • committed by GitHub
commit 95a0986c02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
211 changed files with 1871 additions and 1137 deletions

15
.github/ISSUE_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,15 @@
**I'm submitting a ..**
- [ ] Bug Report
- [ ] Feature Request
**Current behavior:**
<!-- Describe the bug -->
**Expected correct behavior:**
<!-- Describe what should happen, without the bug. -->
**Steps to reproduce:**
<!-- If you are able to illustrate the bug or feature request with an example, please provide steps to reproduce it. -->
**Other information:**
<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. -->

19
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,19 @@
**Checklist**
- [ ] I have read the [Contribution & Best practices Guide](https://github.com/openSUSE/osem/blob/master/CONTRIBUTING.md).
- [ ] My branch is up-to-date with the upstream `master` branch.
- [ ] The tests pass locally with my changes.
- [ ] I have added tests that prove my fix is effective or that my feature works(if appropriate).
- [ ] I have added necessary documentation (if appropriate).
**Short description of what this resolves/which [issues](https://github.com/openSUSE/osem/issues) does this fix?:**
<!-- List the issue number resolved with this change; if there is no open issue, describe the problem this request solves -->
-
**Changes proposed in this pull request:**
<!-- Summarize the changes, using declarative language. -->
-

View file

@ -121,20 +121,9 @@ linters:
- "app/views/conference_registrations/_registration_info.html.haml" - "app/views/conference_registrations/_registration_info.html.haml"
- "app/views/conference_registrations/_volunteer.html.haml" - "app/views/conference_registrations/_volunteer.html.haml"
- "app/views/conference_registrations/show.html.haml" - "app/views/conference_registrations/show.html.haml"
- "app/views/conferences/_booths.html.haml"
- "app/views/conferences/_call_for_paper.html.haml"
- "app/views/conferences/_conference_details.html.haml" - "app/views/conferences/_conference_details.html.haml"
- "app/views/conferences/_gallery.html.haml" - "app/views/conferences/_gallery.html.haml"
- "app/views/conferences/_lodging.html.haml"
- "app/views/conferences/_program.html.haml"
- "app/views/conferences/_registration.html.haml"
- "app/views/conferences/_schedule_splashpage.html.haml"
- "app/views/conferences/_sponsors.html.haml"
- "app/views/conferences/_tickets.html.haml"
- "app/views/conferences/_venue.html.haml"
- "app/views/conferences/_venue_map.html.haml"
- "app/views/conferences/index.html.haml" - "app/views/conferences/index.html.haml"
- "app/views/conferences/show.html.haml"
- "app/views/devise/confirmations/new.html.haml" - "app/views/devise/confirmations/new.html.haml"
- "app/views/devise/ichain_sessions/new.html.haml" - "app/views/devise/ichain_sessions/new.html.haml"
- "app/views/devise/ichain_sessions/new_test.html.haml" - "app/views/devise/ichain_sessions/new_test.html.haml"

View file

@ -1,19 +1,11 @@
# This configuration was generated by # This configuration was generated by
# `rubocop --auto-gen-config` # `rubocop --auto-gen-config`
# on 2017-07-14 12:03:16 +0000 using RuboCop version 0.49.1. # on 2017-11-27 22:40:12 +0530 using RuboCop version 0.51.0.
# The point is for the user to remove these configuration records # The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base. # one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new # Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again. # versions of RuboCop, may require this file to be generated again.
# Offense count: 15
# Cop supports --auto-correct.
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
# Include: **/Gemfile, **/gems.rb
Bundler/OrderedGems:
Exclude:
- 'Gemfile'
# Offense count: 1 # Offense count: 1
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
@ -46,7 +38,7 @@ Layout/EmptyLineAfterMagicComment:
Exclude: Exclude:
- 'spec/models/conference_spec.rb' - 'spec/models/conference_spec.rb'
# Offense count: 104 # Offense count: 109
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles. # Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: empty_lines, no_empty_lines # SupportedStyles: empty_lines, no_empty_lines
@ -151,7 +143,7 @@ Layout/MultilineHashBraceLayout:
Layout/MultilineMethodCallBraceLayout: Layout/MultilineMethodCallBraceLayout:
Enabled: false Enabled: false
# Offense count: 55 # Offense count: 53
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: aligned, indented, indented_relative_to_receiver # SupportedStyles: aligned, indented, indented_relative_to_receiver
@ -192,10 +184,11 @@ Layout/SpaceAroundOperators:
Exclude: Exclude:
- 'lib/tasks/data.rake' - 'lib/tasks/data.rake'
# Offense count: 416 # Offense count: 463
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles. # Configuration parameters: EnforcedStyle, SupportedStyles, SupportedStylesForEmptyBraces.
# SupportedStyles: space, no_space # SupportedStyles: space, no_space
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceBeforeBlockBraces: Layout/SpaceBeforeBlockBraces:
Enabled: false Enabled: false
@ -205,20 +198,13 @@ Layout/SpaceBeforeComma:
Exclude: Exclude:
- 'lib/tasks/data_demo.rake' - 'lib/tasks/data_demo.rake'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Layout/SpaceBeforeFirstArg:
Exclude:
- 'spec/controllers/admin/roles_controller_spec.rb'
# Offense count: 1 # Offense count: 1
# Cop supports --auto-correct. # Cop supports --auto-correct.
Layout/SpaceBeforeSemicolon: Layout/SpaceBeforeSemicolon:
Exclude: Exclude:
- 'Guardfile' - 'Guardfile'
# Offense count: 51 # Offense count: 54
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters. # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters.
# SupportedStyles: space, no_space # SupportedStyles: space, no_space
@ -293,6 +279,13 @@ Lint/IneffectiveAccessModifier:
- 'app/models/conference.rb' - 'app/models/conference.rb'
# Offense count: 2 # Offense count: 2
Lint/RescueWithoutErrorClass:
Exclude:
- 'app/controllers/users/omniauth_callbacks_controller.rb'
- 'lib/tasks/migrate_config.rake'
# Offense count: 2
# Cop supports --auto-correct.
Lint/ScriptPermission: Lint/ScriptPermission:
Exclude: Exclude:
- 'Guardfile' - 'Guardfile'
@ -305,49 +298,41 @@ Lint/UnusedBlockArgument:
Exclude: Exclude:
- 'lib/tasks/user.rake' - 'lib/tasks/user.rake'
# Offense count: 114 # Offense count: 136
Metrics/AbcSize: Metrics/AbcSize:
Max: 86 Max: 86
# Offense count: 233 # Offense count: 258
# Configuration parameters: CountComments, ExcludedMethods. # Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength: Metrics/BlockLength:
Max: 471 Max: 471
# Offense count: 23 # Offense count: 28
Metrics/CyclomaticComplexity: Metrics/CyclomaticComplexity:
Max: 12 Max: 14
Exclude:
- 'app/models/track.rb'
# Offense count: 2353 # Offense count: 2774
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https # URISchemes: http, https
Metrics/LineLength: Metrics/LineLength:
Max: 619 Max: 619
# Offense count: 120 # Offense count: 133
# Configuration parameters: CountComments. # Configuration parameters: CountComments.
Metrics/MethodLength: Metrics/MethodLength:
Max: 56 Max: 56
Exclude:
- 'app/models/admin_ability.rb'
# Offense count: 3 # Offense count: 4
# Configuration parameters: CountComments. # Configuration parameters: CountComments.
Metrics/ModuleLength: Metrics/ModuleLength:
Max: 159 Max: 171
Exclude:
- 'app/helpers/format_helper.rb'
# Offense count: 15
Metrics/PerceivedComplexity:
Max: 16
Exclude:
- 'app/models/track.rb'
# Offense count: 20 # Offense count: 20
Style/AccessorMethodName: Metrics/PerceivedComplexity:
Max: 16
# Offense count: 20
Naming/AccessorMethodName:
Exclude: Exclude:
- 'app/controllers/admin/events_controller.rb' - 'app/controllers/admin/events_controller.rb'
- 'app/controllers/application_controller.rb' - 'app/controllers/application_controller.rb'
@ -356,6 +341,42 @@ Style/AccessorMethodName:
- 'app/models/target.rb' - 'app/models/target.rb'
- 'app/models/user.rb' - 'app/models/user.rb'
# Offense count: 2
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
Exclude:
- 'Gemfile'
- 'Vagrantfile'
# Offense count: 2
# Configuration parameters: Blacklist.
# Blacklist: END, (?-mix:EO[A-Z]{1})
Naming/HeredocDelimiterNaming:
Exclude:
- 'spec/factories/users.rb'
- 'spec/models/user_spec.rb'
# Offense count: 2
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
# NameWhitelist: is_a?
# MethodDefinitionMacros: define_method, define_singleton_method
Naming/PredicateName:
Exclude:
- 'spec/**/*'
- 'app/models/comment.rb'
- 'app/models/contact.rb'
# Offense count: 2
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: snake_case, normalcase, non_integer
Naming/VariableNumber:
Exclude:
- 'spec/models/ticket_purchase_spec.rb'
# Offense count: 1 # Offense count: 1
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles. # Configuration parameters: EnforcedStyle, SupportedStyles.
@ -386,7 +407,15 @@ Style/ConditionalAssignment:
- 'db/migrate/20140610165551_migrate_data_person_to_user.rb' - 'db/migrate/20140610165551_migrate_data_person_to_user.rb'
- 'db/migrate/20140820124117_undo_wrong_migration20140801080705_add_users_to_events.rb' - 'db/migrate/20140820124117_undo_wrong_migration20140801080705_add_users_to_events.rb'
# Offense count: 464 # Offense count: 9
Style/DateTime:
Exclude:
- 'app/models/conference.rb'
- 'app/models/program.rb'
- 'spec/models/conference_spec.rb'
- 'spec/models/program_spec.rb'
# Offense count: 488
Style/Documentation: Style/Documentation:
Enabled: false Enabled: false
@ -419,14 +448,13 @@ Style/EmptyMethod:
- 'db/migrate/20130216122155_set_registration_defaults_to_false.rb' - 'db/migrate/20130216122155_set_registration_defaults_to_false.rb'
# Offense count: 2 # Offense count: 2
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms. # Cop supports --auto-correct.
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS Style/Encoding:
Style/FileName:
Exclude: Exclude:
- 'Gemfile' - 'app/uploaders/picture_uploader.rb'
- 'Vagrantfile' - 'spec/models/conference_spec.rb'
# Offense count: 24 # Offense count: 32
# Configuration parameters: MinBodyLength. # Configuration parameters: MinBodyLength.
Style/GuardClause: Style/GuardClause:
Enabled: false Enabled: false
@ -445,7 +473,6 @@ Style/HashSyntax:
# Configuration parameters: MaxLineLength. # Configuration parameters: MaxLineLength.
Style/IfUnlessModifier: Style/IfUnlessModifier:
Exclude: Exclude:
- 'app/controllers/admin/booths_controller.rb'
- 'app/controllers/admin/events_controller.rb' - 'app/controllers/admin/events_controller.rb'
- 'app/controllers/api/v1/events_controller.rb' - 'app/controllers/api/v1/events_controller.rb'
- 'app/controllers/conference_registrations_controller.rb' - 'app/controllers/conference_registrations_controller.rb'
@ -454,7 +481,6 @@ Style/IfUnlessModifier:
- 'app/models/commercial.rb' - 'app/models/commercial.rb'
- 'app/models/conference.rb' - 'app/models/conference.rb'
- 'app/models/email_settings.rb' - 'app/models/email_settings.rb'
- 'app/models/ticket_purchase.rb'
- 'app/models/user.rb' - 'app/models/user.rb'
- 'db/migrate/20151031092713_change_conference_id_to_venue_id_in_rooms.rb' - 'db/migrate/20151031092713_change_conference_id_to_venue_id_in_rooms.rb'
- 'lib/tasks/events_registrations.rake' - 'lib/tasks/events_registrations.rake'
@ -469,7 +495,7 @@ Style/LineEndConcatenation:
- 'spec/features/conference_spec.rb' - 'spec/features/conference_spec.rb'
- 'spec/features/registration_periods_spec.rb' - 'spec/features/registration_periods_spec.rb'
# Offense count: 6 # Offense count: 9
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles. # Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
@ -498,12 +524,14 @@ Style/MutableConstant:
# Offense count: 4 # Offense count: 4
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: Whitelist.
# Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
Style/NestedParenthesizedCalls: Style/NestedParenthesizedCalls:
Exclude: Exclude:
- 'spec/features/conference_spec.rb' - 'spec/features/conference_spec.rb'
- 'spec/models/conference_spec.rb' - 'spec/models/conference_spec.rb'
# Offense count: 26 # Offense count: 27
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
# SupportedStyles: skip_modifier_ifs, always # SupportedStyles: skip_modifier_ifs, always
@ -548,6 +576,12 @@ Style/OptionalArguments:
Exclude: Exclude:
- 'app/models/event.rb' - 'app/models/event.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/OrAssignment:
Exclude:
- 'app/controllers/schedules_controller.rb'
# Offense count: 3 # Offense count: 3
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: AllowSafeAssignment. # Configuration parameters: AllowSafeAssignment.
@ -557,7 +591,7 @@ Style/ParenthesesAroundCondition:
- 'app/controllers/application_controller.rb' - 'app/controllers/application_controller.rb'
- 'app/helpers/format_helper.rb' - 'app/helpers/format_helper.rb'
# Offense count: 14 # Offense count: 15
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters. # Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters: Style/PercentLiteralDelimiters:
@ -571,20 +605,9 @@ Style/PercentLiteralDelimiters:
- 'app/models/contact.rb' - 'app/models/contact.rb'
- 'app/models/registration.rb' - 'app/models/registration.rb'
- 'app/models/subscription.rb' - 'app/models/subscription.rb'
- 'app/models/track.rb'
- 'app/uploaders/picture_uploader.rb' - 'app/uploaders/picture_uploader.rb'
- 'spec/models/program_spec.rb' - 'spec/models/program_spec.rb'
- 'app/models/track.rb'
# Offense count: 2
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
# NameWhitelist: is_a?
Style/PredicateName:
Exclude:
- 'spec/**/*'
- 'app/models/comment.rb'
- 'app/models/contact.rb'
# Offense count: 1 # Offense count: 1
# Cop supports --auto-correct. # Cop supports --auto-correct.
@ -607,16 +630,6 @@ Style/RedundantParentheses:
Exclude: Exclude:
- 'app/controllers/admin/base_controller.rb' - 'app/controllers/admin/base_controller.rb'
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
Exclude:
- 'app/helpers/application_helper.rb'
- 'app/helpers/format_helper.rb'
- 'app/helpers/paths_helper.rb'
- 'app/helpers/users_helper.rb'
# Offense count: 2 # Offense count: 2
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes. # Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
@ -662,7 +675,7 @@ Style/StringLiteralsInInterpolation:
Exclude: Exclude:
- 'lib/tasks/dump_db.rake' - 'lib/tasks/dump_db.rake'
# Offense count: 73 # Offense count: 79
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinSize, SupportedStyles. # Configuration parameters: EnforcedStyle, MinSize, SupportedStyles.
# SupportedStyles: percent, brackets # SupportedStyles: percent, brackets
@ -701,17 +714,3 @@ Style/TrailingCommaInLiteral:
- 'Guardfile' - 'Guardfile'
- 'db/migrate/20140701123203_add_events_per_week_to_conference.rb' - 'db/migrate/20140701123203_add_events_per_week_to_conference.rb'
- 'spec/models/conference_spec.rb' - 'spec/models/conference_spec.rb'
# Offense count: 3
# Cop supports --auto-correct.
Style/UnneededInterpolation:
Exclude:
- 'app/helpers/format_helper.rb'
- 'spec/controllers/admin/conferences_controller_spec.rb'
# Offense count: 2
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: snake_case, normalcase, non_integer
Style/VariableNumber:
Exclude:
- 'spec/models/ticket_purchase_spec.rb'

View file

@ -22,7 +22,7 @@ before_script:
- cp config/database.yml.travis config/database.yml - cp config/database.yml.travis config/database.yml
- cp config/secrets.yml.example config/secrets.yml - cp config/secrets.yml.example config/secrets.yml
- mysql -u root -e 'create database osem_test;' - mysql -u root -e 'create database osem_test;'
- RAILS_ENV=test bundle exec rake db:migrate --trace - RAILS_ENV=test bundle exec rake db:schema:load --trace
script: script:
- "./travis_script.sh $TEST_SUITE" - "./travis_script.sh $TEST_SUITE"
env: env:

View file

@ -82,7 +82,7 @@ You can read through current enabled rules in `.rubocop.yml` file. Explanations
Additionally you can read through the [ruby style-guide](https://github.com/bbatsov/ruby-style-guide) to better understand core principles. Additionally you can read through the [ruby style-guide](https://github.com/bbatsov/ruby-style-guide) to better understand core principles.
### Test Suite ### Test Suite
We are using [rspec](http://rspec.info/)+[capybara](http://jnicklas.github.io/capybara/)+[factory girl](https://github.com/thoughtbot/factory_girl) as a test suite. You can run it locally We are using [rspec](http://rspec.info/)+[capybara](http://teamcapybara.github.io/capybara/)+[factory girl](https://github.com/thoughtbot/factory_girl) as a test suite. You can run it locally
```shell ```shell
vagrant exec bundle exec rspec vagrant exec bundle exec rspec

View file

@ -38,7 +38,10 @@ RUN chown -R osem.root /osem/ && \
# data directory is used to cache the secret key in a file # data directory is used to cache the secret key in a file
ENV DATA_DIR /data ENV DATA_DIR /data
RUN install -d -m 0770 -o osem -g root $DATA_DIR RUN install -d -m 0770 -o osem -g root $DATA_DIR
VOLUME ["$DATA_DIR"] # data persistence for uploaded files (logos, other pictures, etc)
RUN mkdir 0775 -p /osem/tmp/cache /osem/tmp/uploads/ && \
chown -R osem.osem /osem/tmp/
VOLUME ["$DATA_DIR", "/osem/tmp/uploads/", "/osem/public/system/"]
USER osem USER osem
EXPOSE 9292 EXPOSE 9292

54
Gemfile
View file

@ -6,7 +6,10 @@ if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.8.4')
end end
# as web framework # as web framework
gem 'rails', '~> 4.2.8' gem 'rails', '~> 5.0.5'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# enables serving assets in production and setting your logger to standard out # enables serving assets in production and setting your logger to standard out
# both of which are required to run an application on a twelve-factor provider # both of which are required to run an application on a twelve-factor provider
@ -27,11 +30,11 @@ gem 'paper_trail'
# for upload management # for upload management
gem 'carrierwave' gem 'carrierwave'
gem 'mini_magick'
gem 'carrierwave-bombshelter' gem 'carrierwave-bombshelter'
gem 'mini_magick'
# for internationalizing # for internationalizing
gem 'rails-i18n', '~> 4.0.0' gem 'rails-i18n', '~> 5.0.0'
# as authentification framework # as authentification framework
gem 'devise' gem 'devise'
@ -40,12 +43,15 @@ gem 'devise_ichain_authenticatable'
# for openID authentication # for openID authentication
gem 'omniauth' gem 'omniauth'
gem 'omniauth-facebook' gem 'omniauth-facebook'
gem 'omniauth-openid'
gem 'omniauth-google-oauth2'
gem 'omniauth-github' gem 'omniauth-github'
gem 'omniauth-google-oauth2'
gem 'omniauth-openid'
# Bot-filtering
gem 'recaptcha', require: 'recaptcha/rails'
# as authorization framework # as authorization framework
gem 'cancancan' gem 'cancancan', '~> 2.0'
# for roles # for roles
gem 'rolify' gem 'rolify'
@ -57,8 +63,8 @@ gem 'unobtrusive_flash', '>=3'
gem 'transitions', :require => %w( transitions active_record/transitions ) gem 'transitions', :require => %w( transitions active_record/transitions )
# for comments # for comments
gem 'awesome_nested_set', '~> 3.1.3'
gem 'acts_as_commentable_with_threading' gem 'acts_as_commentable_with_threading'
gem 'awesome_nested_set', '~> 3.1.3'
# as templating language # as templating language
gem 'haml-rails' gem 'haml-rails'
@ -70,11 +76,11 @@ gem 'sass-rails', '>= 4.0.2'
gem 'uglifier', '>= 1.3.0' gem 'uglifier', '>= 1.3.0'
# as the front-end framework # as the front-end framework
gem 'bootstrap-sass', '~> 3.3.4.1'
gem 'autoprefixer-rails' gem 'autoprefixer-rails'
gem 'formtastic-bootstrap' gem 'bootstrap-sass', '~> 3.3.4.1'
gem 'formtastic', '~> 3.1.1'
gem 'cocoon' gem 'cocoon'
gem 'formtastic', '~> 3.1.5'
gem 'formtastic-bootstrap'
# as the JavaScript library # as the JavaScript library
gem 'jquery-rails' gem 'jquery-rails'
@ -105,8 +111,8 @@ source 'https://rails-assets.org' do
gem 'rails-assets-waypoints' gem 'rails-assets-waypoints'
# for markdown editors # for markdown editors
gem 'rails-assets-bootstrap-markdown' gem 'rails-assets-bootstrap-markdown'
gem 'rails-assets-to-markdown'
gem 'rails-assets-markdown' gem 'rails-assets-markdown'
gem 'rails-assets-to-markdown'
end end
# as date picker # as date picker
@ -126,9 +132,9 @@ gem 'gravtastic'
gem 'country_select' gem 'country_select'
# as PDF generator # as PDF generator
gem 'prawn-qrcode', '~> 0.2.2.1'
gem 'prawn_rails' gem 'prawn_rails'
gem 'rqrcode' gem 'rqrcode'
gem 'prawn-qrcode', '~> 0.2.2.1'
# to render XLS spreadsheets # to render XLS spreadsheets
gem 'axlsx', git: 'https://github.com/randym/axlsx.git' gem 'axlsx', git: 'https://github.com/randym/axlsx.git'
@ -154,12 +160,11 @@ gem 'rdoc-generator-fivefish'
# for visitor tracking # for visitor tracking
gem 'ahoy_matey' gem 'ahoy_matey'
gem 'activeuuid'
gem 'piwik_analytics', '~> 1.0.1' gem 'piwik_analytics', '~> 1.0.1'
# for recurring jobs # for recurring jobs
gem 'whenever', :require => false
gem 'delayed_job_active_record' gem 'delayed_job_active_record'
gem 'whenever', :require => false
# to run scripts # to run scripts
gem 'daemons' gem 'daemons'
@ -174,7 +179,7 @@ gem 'acts_as_list'
gem 'bootstrap-switch-rails', '~> 3.0.0' gem 'bootstrap-switch-rails', '~> 3.0.0'
# for parsing OEmbed data # for parsing OEmbed data
gem 'ruby-oembed' gem 'ruby-oembed', '~>0.12.0'
# for uploading images to the cloud # for uploading images to the cloud
gem 'cloudinary' gem 'cloudinary'
@ -182,6 +187,10 @@ gem 'cloudinary'
# for setting app configuration in the environment # for setting app configuration in the environment
gem 'dotenv-rails' gem 'dotenv-rails'
# configurable toggles for functionality
# https://github.com/mgsnova/feature
gem 'feature'
# For countable.js # For countable.js
gem "countable-rails", "~> 0.0.1" gem "countable-rails", "~> 0.0.1"
@ -205,14 +214,17 @@ gem 'selectize-rails'
# CVE-2017-9049, CVE-2017-9050 # CVE-2017-9049, CVE-2017-9050
gem 'nokogiri', '>= 1.8.1' gem 'nokogiri', '>= 1.8.1'
# memcached binary connector
gem 'dalli'
# Use guard and spring for testing in development # Use guard and spring for testing in development
group :development do group :development do
# to launch specs when files are modified # to launch specs when files are modified
gem 'guard-rspec' gem 'guard-rspec'
gem 'spring-commands-rspec'
gem 'haml_lint', '~> 0.24.0' gem 'haml_lint', '~> 0.24.0'
gem 'spring-commands-rspec'
# for static code analisys # for static code analisys
gem 'rubocop', '~> 0.49.0', require: false gem 'rubocop', '~> 0.51.0', require: false
# as database # as database
gem 'sqlite3' gem 'sqlite3'
# to open mails # to open mails
@ -227,11 +239,11 @@ end
group :test do group :test do
# as test framework # as test framework
gem 'rspec-rails', '~> 3.5', '>= 3.5.2'
gem 'database_cleaner'
gem 'capybara' gem 'capybara'
gem 'poltergeist' gem 'database_cleaner'
gem 'phantomjs', :require => 'phantomjs/poltergeist' gem 'phantomjs', :require => 'phantomjs/poltergeist'
gem 'poltergeist'
gem 'rspec-rails', '~> 3.5', '>= 3.5.2'
# for measuring test coverage # for measuring test coverage
gem 'coveralls', require: false gem 'coveralls', require: false
# for describing models # for describing models
@ -246,6 +258,8 @@ group :test do
gem 'stripe-ruby-mock' gem 'stripe-ruby-mock'
# For validating JSON schemas # For validating JSON schemas
gem 'json-schema' gem 'json-schema'
# For using 'assigns' in tests
gem 'rails-controller-testing'
end end
group :development, :test do group :development, :test do

View file

@ -12,62 +12,65 @@ GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
remote: https://rails-assets.org/ remote: https://rails-assets.org/
specs: specs:
actionmailer (4.2.9) actioncable (5.0.5)
actionpack (= 4.2.9) actionpack (= 5.0.5)
actionview (= 4.2.9) nio4r (>= 1.2, < 3.0)
activejob (= 4.2.9) websocket-driver (~> 0.6.1)
actionmailer (5.0.5)
actionpack (= 5.0.5)
actionview (= 5.0.5)
activejob (= 5.0.5)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 2.0)
actionpack (4.2.9) actionpack (5.0.5)
actionview (= 4.2.9) actionview (= 5.0.5)
activesupport (= 4.2.9) activesupport (= 5.0.5)
rack (~> 1.6) rack (~> 2.0)
rack-test (~> 0.6.2) rack-test (~> 0.6.3)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.9) actionview (5.0.5)
activesupport (= 4.2.9) activesupport (= 5.0.5)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3) rails-html-sanitizer (~> 1.0, >= 1.0.3)
active_model_serializers (0.9.4) active_model_serializers (0.9.4)
activemodel (>= 3.2) activemodel (>= 3.2)
activejob (4.2.9) activejob (5.0.5)
activesupport (= 4.2.9) activesupport (= 5.0.5)
globalid (>= 0.3.0) globalid (>= 0.3.6)
activemodel (4.2.9) activemodel (5.0.5)
activesupport (= 4.2.9) activesupport (= 5.0.5)
builder (~> 3.1) activerecord (5.0.5)
activerecord (4.2.9) activemodel (= 5.0.5)
activemodel (= 4.2.9) activesupport (= 5.0.5)
activesupport (= 4.2.9) arel (~> 7.0)
arel (~> 6.0) activesupport (5.0.5)
activesupport (4.2.9) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7) i18n (~> 0.7)
minitest (~> 5.1) minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1) tzinfo (~> 1.1)
activeuuid (0.6.1)
activerecord (>= 3.1)
uuidtools
acts_as_commentable_with_threading (1.2.0) acts_as_commentable_with_threading (1.2.0)
activerecord (>= 3.0) activerecord (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
awesome_nested_set (>= 2.0) awesome_nested_set (>= 2.0)
acts_as_list (0.4.0) acts_as_list (0.9.7)
activerecord (>= 3.0) activerecord (>= 3.0)
addressable (2.5.1) addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2) public_suffix (~> 2.0, >= 2.0.2)
ahoy_matey (1.0.0) ahoy_matey (1.6.0)
addressable addressable
browser (>= 0.4.0) browser (~> 2.0)
geocoder geocoder
referer-parser rack-attack (< 6)
railties
referer-parser (>= 0.3.0)
request_store request_store
safely_block (>= 0.1.1)
user_agent_parser user_agent_parser
uuidtools uuidtools
arel (6.0.4) arel (7.1.4)
ast (2.3.0) ast (2.3.0)
autoprefixer-rails (7.1.1) autoprefixer-rails (7.1.1)
execjs execjs
@ -86,10 +89,10 @@ GEM
bootstrap-switch-rails (3.0.2) bootstrap-switch-rails (3.0.2)
bootstrap3-datetimepicker-rails (3.0.3) bootstrap3-datetimepicker-rails (3.0.3)
momentjs-rails (>= 2.8.1) momentjs-rails (>= 2.8.1)
browser (0.6.0) browser (2.5.1)
builder (3.2.3) builder (3.2.3)
byebug (9.0.6) byebug (9.0.6)
cancancan (1.13.1) cancancan (2.0.0)
capybara (2.6.2) capybara (2.6.2)
addressable addressable
mime-types (>= 1.16) mime-types (>= 1.16)
@ -142,9 +145,10 @@ GEM
safe_yaml (~> 1.0.0) safe_yaml (~> 1.0.0)
currencies (0.4.2) currencies (0.4.2)
daemons (1.1.9) daemons (1.1.9)
dalli (2.7.6)
dante (0.2.0) dante (0.2.0)
database_cleaner (1.3.0) database_cleaner (1.3.0)
debug_inspector (0.0.2) debug_inspector (0.0.3)
delayed_job (4.1.3) delayed_job (4.1.3)
activesupport (>= 3.0, < 5.2) activesupport (>= 3.0, < 5.2)
delayed_job_active_record (4.1.2) delayed_job_active_record (4.1.2)
@ -166,6 +170,7 @@ GEM
dotenv-rails (2.2.1) dotenv-rails (2.2.1)
dotenv (= 2.2.1) dotenv (= 2.2.1)
railties (>= 3.2, < 5.2) railties (>= 3.2, < 5.2)
errbase (0.0.3)
erubis (2.7.0) erubis (2.7.0)
execjs (2.6.0) execjs (2.6.0)
factory_girl (4.5.0) factory_girl (4.5.0)
@ -179,15 +184,16 @@ GEM
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
fastimage (2.0.0) fastimage (2.0.0)
addressable (~> 2) addressable (~> 2)
feature (1.4.0)
ffi (1.9.18) ffi (1.9.18)
font-awesome-rails (4.7.0.2) font-awesome-rails (4.7.0.2)
railties (>= 3.2, < 5.2) railties (>= 3.2, < 5.2)
formatador (0.2.5) formatador (0.2.5)
formtastic (3.1.3) formtastic (3.1.5)
actionpack (>= 3.2.13) actionpack (>= 3.2.13)
formtastic-bootstrap (3.1.1) formtastic-bootstrap (3.1.1)
formtastic (>= 3.0) formtastic (>= 3.0)
geocoder (1.2.2) geocoder (1.4.4)
globalid (0.4.0) globalid (0.4.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
gravtastic (3.2.6) gravtastic (3.2.6)
@ -287,9 +293,10 @@ GEM
multi_json (1.12.1) multi_json (1.12.1)
multi_xml (0.5.5) multi_xml (0.5.5)
multipart-post (2.0.0) multipart-post (2.0.0)
mysql2 (0.4.9) mysql2 (0.4.10)
nenv (0.3.0) nenv (0.3.0)
netrc (0.11.0) netrc (0.11.0)
nio4r (2.1.0)
nokogiri (1.8.1) nokogiri (1.8.1)
mini_portile2 (~> 2.3.0) mini_portile2 (~> 2.3.0)
notiffany (0.1.1) notiffany (0.1.1)
@ -324,9 +331,9 @@ GEM
activerecord (>= 3.0, < 6.0) activerecord (>= 3.0, < 6.0)
activesupport (>= 3.0, < 6.0) activesupport (>= 3.0, < 6.0)
request_store (~> 1.1) request_store (~> 1.1)
parallel (1.11.2) parallel (1.12.0)
parser (2.4.0.0) parser (2.4.0.2)
ast (~> 2.2) ast (~> 2.3)
pdf-core (0.2.5) pdf-core (0.2.5)
phantomjs (2.1.1.0) phantomjs (2.1.1.0)
piwik_analytics (1.0.2) piwik_analytics (1.0.2)
@ -353,23 +360,27 @@ GEM
method_source (~> 0.8.1) method_source (~> 0.8.1)
slop (~> 3.4) slop (~> 3.4)
public_suffix (2.0.5) public_suffix (2.0.5)
rack (1.6.8) puma (3.10.0)
rack (2.0.3)
rack-attack (5.0.1)
rack
rack-openid (1.3.1) rack-openid (1.3.1)
rack (>= 1.1.0) rack (>= 1.1.0)
ruby-openid (>= 2.1.8) ruby-openid (>= 2.1.8)
rack-test (0.6.3) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
rails (4.2.9) rails (5.0.5)
actionmailer (= 4.2.9) actioncable (= 5.0.5)
actionpack (= 4.2.9) actionmailer (= 5.0.5)
actionview (= 4.2.9) actionpack (= 5.0.5)
activejob (= 4.2.9) actionview (= 5.0.5)
activemodel (= 4.2.9) activejob (= 5.0.5)
activerecord (= 4.2.9) activemodel (= 5.0.5)
activesupport (= 4.2.9) activerecord (= 5.0.5)
bundler (>= 1.3.0, < 2.0) activesupport (= 5.0.5)
railties (= 4.2.9) bundler (>= 1.3.0)
sprockets-rails railties (= 5.0.5)
sprockets-rails (>= 2.0.0)
rails-assets-bootstrap (3.3.6) rails-assets-bootstrap (3.3.6)
rails-assets-jquery (>= 1.9.1, < 3) rails-assets-jquery (>= 1.9.1, < 3)
rails-assets-bootstrap-markdown (2.10.0) rails-assets-bootstrap-markdown (2.10.0)
@ -387,30 +398,32 @@ GEM
rails-assets-to-markdown (1.3.0) rails-assets-to-markdown (1.3.0)
rails-assets-trianglify (0.4.0) rails-assets-trianglify (0.4.0)
rails-assets-waypoints (4.0.0) rails-assets-waypoints (4.0.0)
rails-deprecated_sanitizer (1.0.3) rails-controller-testing (1.0.2)
activesupport (>= 4.2.0.alpha) actionpack (~> 5.x, >= 5.0.1)
rails-dom-testing (1.0.8) actionview (~> 5.x, >= 5.0.1)
activesupport (>= 4.2.0.beta, < 5.0) activesupport (~> 5.x)
nokogiri (~> 1.6) rails-dom-testing (2.0.3)
rails-deprecated_sanitizer (>= 1.0.1) activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3) rails-html-sanitizer (1.0.3)
loofah (~> 2.0) loofah (~> 2.0)
rails-i18n (4.0.8) rails-i18n (5.0.4)
i18n (~> 0.7) i18n (~> 0.7)
railties (~> 4.0) railties (~> 5.0)
rails_12factor (0.0.3) rails_12factor (0.0.3)
rails_serve_static_assets rails_serve_static_assets
rails_stdout_logging rails_stdout_logging
rails_serve_static_assets (0.0.4) rails_serve_static_assets (0.0.4)
rails_stdout_logging (0.0.3) rails_stdout_logging (0.0.3)
railties (4.2.9) railties (5.0.5)
actionpack (= 4.2.9) actionpack (= 5.0.5)
activesupport (= 4.2.9) activesupport (= 5.0.5)
method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rainbow (2.2.2) rainbow (2.2.2)
rake rake
rake (12.0.0) rake (12.3.0)
rb-fsevent (0.10.2) rb-fsevent (0.10.2)
rb-inotify (0.9.10) rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2) ffi (>= 0.5.0, < 2)
@ -420,8 +433,10 @@ GEM
loggability (~> 0.12) loggability (~> 0.12)
rdoc (~> 5.0) rdoc (~> 5.0)
yajl-ruby (~> 1.3) yajl-ruby (~> 1.3)
recaptcha (4.6.2)
json
redcarpet (3.2.3) redcarpet (3.2.3)
referer-parser (0.2.1) referer-parser (0.3.0)
request_store (1.1.0) request_store (1.1.0)
responders (2.4.0) responders (2.4.0)
actionpack (>= 4.2.0, < 5.3) actionpack (>= 4.2.0, < 5.3)
@ -458,19 +473,21 @@ GEM
rspec-mocks (~> 3.6.0) rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0) rspec-support (~> 3.6.0)
rspec-support (3.6.0) rspec-support (3.6.0)
rubocop (0.49.1) rubocop (0.51.0)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0) parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1) powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0) rainbow (>= 2.2.2, < 3.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1) unicode-display_width (~> 1.0, >= 1.0.1)
ruby-oembed (0.8.14) ruby-oembed (0.12.0)
ruby-openid (2.5.0) ruby-openid (2.5.0)
ruby-progressbar (1.8.1) ruby-progressbar (1.9.0)
ruby_dep (1.5.0) ruby_dep (1.5.0)
rubyzip (1.2.1) rubyzip (1.2.1)
safe_yaml (1.0.4) safe_yaml (1.0.4)
safely_block (0.2.0)
errbase
sass (3.2.19) sass (3.2.19)
sass-rails (5.0.6) sass-rails (5.0.6)
railties (>= 4.0.0, < 6) railties (>= 4.0.0, < 6)
@ -497,10 +514,10 @@ GEM
sprockets (3.7.1) sprockets (3.7.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (> 1, < 3) rack (> 1, < 3)
sprockets-rails (2.3.3) sprockets-rails (3.2.1)
actionpack (>= 3.0) actionpack (>= 4.0)
activesupport (>= 3.0) activesupport (>= 4.0)
sprockets (>= 2.8, < 4.0) sprockets (>= 3.0.0)
sqlite3 (1.3.9) sqlite3 (1.3.9)
stripe (1.43.0) stripe (1.43.0)
rest-client (~> 1.4) rest-client (~> 1.4)
@ -531,11 +548,11 @@ GEM
unicode_utils (1.4.0) unicode_utils (1.4.0)
unobtrusive_flash (3.1.0) unobtrusive_flash (3.1.0)
railties railties
user_agent_parser (2.1.5) user_agent_parser (2.4.0)
uuidtools (2.1.5) uuidtools (2.1.5)
warden (1.2.4) warden (1.2.4)
rack (>= 1.0) rack (>= 1.0)
web-console (2.2.1) web-console (2.3.0)
activemodel (>= 4.0) activemodel (>= 4.0)
binding_of_caller (>= 0.7.2) binding_of_caller (>= 0.7.2)
railties (>= 4.0) railties (>= 4.0)
@ -552,14 +569,13 @@ GEM
chronic (>= 0.6.3) chronic (>= 0.6.3)
xpath (2.0.0) xpath (2.0.0)
nokogiri (~> 1.3) nokogiri (~> 1.3)
yajl-ruby (1.3.0) yajl-ruby (1.3.1)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
active_model_serializers active_model_serializers
activeuuid
acts_as_commentable_with_threading acts_as_commentable_with_threading
acts_as_list acts_as_list
ahoy_matey ahoy_matey
@ -571,7 +587,7 @@ DEPENDENCIES
bootstrap-switch-rails (~> 3.0.0) bootstrap-switch-rails (~> 3.0.0)
bootstrap3-datetimepicker-rails (~> 3.0.2) bootstrap3-datetimepicker-rails (~> 3.0.2)
byebug byebug
cancancan cancancan (~> 2.0)
capybara capybara
carrierwave carrierwave
carrierwave-bombshelter carrierwave-bombshelter
@ -582,6 +598,7 @@ DEPENDENCIES
country_select country_select
coveralls coveralls
daemons daemons
dalli
database_cleaner database_cleaner
delayed_job_active_record delayed_job_active_record
devise devise
@ -589,8 +606,9 @@ DEPENDENCIES
dotenv-rails dotenv-rails
factory_girl_rails factory_girl_rails
faker faker
feature
font-awesome-rails font-awesome-rails
formtastic (~> 3.1.1) formtastic (~> 3.1.5)
formtastic-bootstrap formtastic-bootstrap
gravtastic gravtastic
guard-rspec guard-rspec
@ -621,7 +639,8 @@ DEPENDENCIES
poltergeist poltergeist
prawn-qrcode (~> 0.2.2.1) prawn-qrcode (~> 0.2.2.1)
prawn_rails prawn_rails
rails (~> 4.2.8) puma (~> 3.0)
rails (~> 5.0.5)
rails-assets-bootstrap-markdown! rails-assets-bootstrap-markdown!
rails-assets-date.format! rails-assets-date.format!
rails-assets-holderjs! rails-assets-holderjs!
@ -633,17 +652,19 @@ DEPENDENCIES
rails-assets-to-markdown! rails-assets-to-markdown!
rails-assets-trianglify! rails-assets-trianglify!
rails-assets-waypoints! rails-assets-waypoints!
rails-i18n (~> 4.0.0) rails-controller-testing
rails-i18n (~> 5.0.0)
rails_12factor rails_12factor
rdoc-generator-fivefish rdoc-generator-fivefish
recaptcha
redcarpet redcarpet
responders (~> 2.0) responders (~> 2.0)
rolify rolify
rqrcode rqrcode
rspec-activemodel-mocks rspec-activemodel-mocks
rspec-rails (~> 3.5, >= 3.5.2) rspec-rails (~> 3.5, >= 3.5.2)
rubocop (~> 0.49.0) rubocop (~> 0.51.0)
ruby-oembed ruby-oembed (~> 0.12.0)
sass-rails (>= 4.0.2) sass-rails (>= 4.0.2)
selectize-rails selectize-rails
shoulda-matchers shoulda-matchers
@ -663,4 +684,4 @@ DEPENDENCIES
whenever whenever
BUNDLED WITH BUNDLED WITH
1.15.4 1.16.0

View file

@ -42,7 +42,7 @@ There are two configurations to deploy OSEM with Docker: *evaluation mode* and *
If you want to evaluate OSEM to see if it fits your needs, the default configuration in `docker-compose.env` will work perfectly fine for you. If you want to evaluate OSEM to see if it fits your needs, the default configuration in `docker-compose.env` will work perfectly fine for you.
For convenience reasons, `docker-compose.yml` already contains a [MailHog](https://github.com/mailhog/MailHog) service configuration. MailHog For convenience reasons, `docker-compose.yml` already contains a [MailHog](https://github.com/mailhog/MailHog) service configuration. MailHog
is going to catch every email sent by OSEM and displays them on a special web service. Thus, it eliminitates the need to set up an SMTP server just to try out OSEM. is going to catch every email sent by OSEM and displays them on a special web service. Thus, it eliminates the need to set up an SMTP server just to try out OSEM.
Just point your browser to http://localhost:8025 to get access to registration confirmation links etc. Just point your browser to http://localhost:8025 to get access to registration confirmation links etc.
Run `docker-compose up --build` to start the services. On first run, it will take a few minutes to initialize the database. Thus, wait a few minutes before you open up Run `docker-compose up --build` to start the services. On first run, it will take a few minutes to initialize the database. Thus, wait a few minutes before you open up
@ -105,6 +105,7 @@ There are a couple of environment variables you can set to configure OSEM. Check
| CLOUDINARY_URL | *string* | Configure your cloudinary.com cloud name and api key/secret | CLOUDINARY_URL | *string* | Configure your cloudinary.com cloud name and api key/secret
| STRIPE_PUBLISHABLE_KEY | *string* | Publishable Key for Stripe Gateway | STRIPE_PUBLISHABLE_KEY | *string* | Publishable Key for Stripe Gateway
| STRIPE_SECRET_KEY | *string* | Secret Key for Stripe Gateway | STRIPE_SECRET_KEY | *string* | Secret Key for Stripe Gateway
| OSEM_REDIS_URL | *string* | Redis server URL e.g. redis://localhost:6379/1
### Online Ticket Payments ### Online Ticket Payments
We use [Stripe](https://stripe.com) for accepting your ticket payments securely over the web. We use [Stripe](https://stripe.com) for accepting your ticket payments securely over the web.

View file

@ -79,13 +79,28 @@ $(function () {
$("#conference-start-datepicker").on("dp.change",function (e) { $("#conference-start-datepicker").on("dp.change",function (e) {
$('#conference-end-datepicker').data("DateTimePicker").setMinDate(e.date); $('#conference-end-datepicker').data("DateTimePicker").setMinDate(e.date);
if (!$('#conference-end-datepicker').val()) {
$('#conference-end-datepicker').data("DateTimePicker").setDate(e.date);
}
}); });
$("#conference-start-datepicker").change(function (e) {
$('#conference-start-datepicker').val()?$('#conference-end-datepicker').data("DateTimePicker").setMinDate(e.date):$('#conference-end-datepicker').data("DateTimePicker").setMinDate(null);
});
$("#conference-end-datepicker").on("dp.change",function (e) { $("#conference-end-datepicker").on("dp.change",function (e) {
$('#conference-start-datepicker').data("DateTimePicker").setMaxDate(e.date); $('#conference-start-datepicker').data("DateTimePicker").setMaxDate(e.date);
}); });
$("#conference-end-datepicker").change(function (e) {
$('#conference-end-datepicker').val()?$('#conference-start-datepicker').data("DateTimePicker").setMaxDate(e.date):$('#conference-start-datepicker').data("DateTimePicker").setMaxDate(null);
});
$("#registration-period-start-datepicker").on("dp.change",function (e) { $("#registration-period-start-datepicker").on("dp.change",function (e) {
$('#registration-period-end-datepicker').data("DateTimePicker").setMinDate(e.date); $('#registration-period-end-datepicker').data("DateTimePicker").setMinDate(e.date);
if (!$('#registration-period-end-datepicker').val()) {
$('#registration-period-end-datepicker').data("DateTimePicker").setDate(e.date);
}
}); });
$("#registration-period-end-datepicker").on("dp.change",function (e) { $("#registration-period-end-datepicker").on("dp.change",function (e) {
$('#registration-period-start-datepicker').data("DateTimePicker").setMaxDate(e.date); $('#registration-period-start-datepicker').data("DateTimePicker").setMaxDate(e.date);

View file

@ -4,11 +4,11 @@
} }
@else if $class == sm { @else if $class == sm {
@media (min-width: 750px) { @content; } @media (min-width: 768px) and (max-width: 991px) { @content; }
} }
@else if $class == md { @else if $class == md {
@media (min-width: 992px) { @content; } @media (min-width: 992px) and (max-width: 1199px) { @content; }
} }
@else if $class == lg { @else if $class == lg {

View file

@ -1,3 +1,5 @@
@import "bootstrap/mixins";
html { html {
position: relative; position: relative;
min-height: 100%; min-height: 100%;
@ -104,3 +106,12 @@ p.comment-body {
.qr-image{ .qr-image{
margin-left: 120px; margin-left: 120px;
} }
.g-recaptcha {
@include clearfix;
padding-bottom: 12px;
div {
float: right;
}
}

View file

@ -1,6 +1,6 @@
module Admin module Admin
class BaseController < ApplicationController class BaseController < ApplicationController
before_filter :verify_user_admin before_action :verify_user_admin
private private

View file

@ -49,6 +49,26 @@ module Admin
end end
end end
##
# Received a file from user
# Reads file and creates commercial for event
# File content example:
# EventID:MyURL
def mass_upload
errors = Commercial.read_file(params[:file]) if params[:file]
if errors.all? { |_k, v| v.blank? }
flash[:notice] = 'Successfully added commercials.'
else
errors_text = ''
errors_text << 'Unable to find event with ID: ' + errors[:no_event].join(', ') + '. ' if errors[:no_event].any?
errors_text << 'There were some errors: ' + errors[:validation_errors].join('. ') if errors[:validation_errors].any?
flash[:error] = errors_text
end
redirect_to :back
end
private private
def commercial_params def commercial_params

View file

@ -155,7 +155,7 @@ module Admin
# Set line color using a hash function # Set line color using a hash function
@tickets = [] @tickets = []
@tickets_data.keys.each do |title| @tickets_data.each_key do |title|
@tickets.append(short_title: title, color: "\##{Digest::MD5.hexdigest(title)[0..5]}") @tickets.append(short_title: title, color: "\##{Digest::MD5.hexdigest(title)[0..5]}")
end end

View file

@ -124,6 +124,15 @@ module Admin
def cancel def cancel
update_state(:cancel, 'Event canceled!') update_state(:cancel, 'Event canceled!')
selected_schedule = @event.program.selected_schedule
event_schedule = EventSchedule.unscoped.where(event: @event).find_by(schedule: selected_schedule) if selected_schedule
Rails.logger.debug "schedule: #{selected_schedule.inspect} and event_schedule #{event_schedule.inspect}"
if selected_schedule && event_schedule
event_schedule.enabled = false
event_schedule.save
else
@event.event_schedules.destroy_all
end
end end
def reject def reject

View file

@ -2,7 +2,7 @@ module Admin
class RegistrationsController < Admin::BaseController class RegistrationsController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title load_and_authorize_resource :conference, find_by: :short_title
load_and_authorize_resource :registration, through: :conference load_and_authorize_resource :registration, through: :conference
before_filter :set_user, except: [:index] before_action :set_user, except: [:index]
def index def index
authorize! :show, Registration.new(conference_id: @conference.id) authorize! :show, Registration.new(conference_id: @conference.id)

View file

@ -1,10 +1,10 @@
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
before_filter :set_paper_trail_whodunnit before_action :set_paper_trail_whodunnit
include ApplicationHelper include ApplicationHelper
add_flash_types :error add_flash_types :error
protect_from_forgery with: :exception protect_from_forgery with: :exception, prepend: true
before_filter :get_conferences before_action :get_conferences
before_filter :store_location before_action :store_location
# Ensure every controller authorizes resource or skips authorization (skip_authorization_check) # Ensure every controller authorizes resource or skips authorization (skip_authorization_check)
check_authorization unless: :devise_controller? check_authorization unless: :devise_controller?

View file

@ -1,5 +1,5 @@
class ConferenceRegistrationsController < ApplicationController class ConferenceRegistrationsController < ApplicationController
before_filter :authenticate_user!, except: [:new, :create] before_action :authenticate_user!, except: [:new, :create]
load_resource :conference, find_by: :short_title load_resource :conference, find_by: :short_title
authorize_resource :conference_registrations, class: Registration, except: [:new, :create] authorize_resource :conference_registrations, class: Registration, except: [:new, :create]
before_action :set_registration, only: [:edit, :update, :destroy, :show] before_action :set_registration, only: [:edit, :update, :destroy, :show]

View file

@ -9,19 +9,58 @@ class ConferencesController < ApplicationController
end end
def show def show
@conference = if params[:id] # load conference with header content
Conference.find_by_short_title(params[:id]) @conference = Conference.unscoped.eager_load(
else :splashpage,
load_conference_by_domain :program,
:registration_period,
:contact,
venue: :commercial
).find_by(conference_finder_conditions)
authorize! :show, @conference # TODO: reduce the 10 queries performed here
splashpage = @conference.splashpage
if splashpage.include_cfp
cfps = @conference.program.cfps
@call_for_events = cfps.find { |call| call.cfp_type == 'events' }
if @call_for_events.try(:open?)
@event_types = @conference.event_types.pluck(:title)
@track_names = @conference.confirmed_tracks.pluck(:name).sort
end
@call_for_tracks = cfps.find { |call| call.cfp_type == 'tracks' }
end
if splashpage.include_program
@highlights = @conference.highlighted_events.eager_load(:speakers)
if splashpage.include_tracks
@tracks = @conference.confirmed_tracks.eager_load(
:room
).order('tracks.name')
end
if splashpage.include_booths
@booths = @conference.confirmed_booths.order('title')
end
end
if splashpage.include_registrations || splashpage.include_tickets
@tickets = @conference.tickets.order('price_cents')
end
if splashpage.include_lodgings
@lodgings = @conference.lodgings.order('name')
end
if splashpage.include_sponsors
@sponsorship_levels = @conference.sponsorship_levels.eager_load(
:sponsors
).order('sponsorship_levels.position ASC', 'sponsors.name')
end end
authorize! :show, @conference
@program = @conference.program
end end
private private
def load_conference_by_domain def conference_finder_conditions
Conference.find_by(custom_domain: request.domain) if params[:id]
{ short_title: params[:id] }
else
{ custom_domain: request.domain }
end
end end
def respond_to_options def respond_to_options

View file

@ -91,6 +91,15 @@ class ProposalsController < ApplicationController
begin begin
@event.withdraw @event.withdraw
selected_schedule = @event.program.selected_schedule
event_schedule = @event.event_schedules.find_by(schedule: selected_schedule) if selected_schedule
Rails.logger.debug "schedule: #{selected_schedule.inspect} and event_schedule #{event_schedule.inspect}"
if selected_schedule && event_schedule
event_schedule.enabled = false
event_schedule.save
else
@event.event_schedules.destroy_all
end
rescue Transitions::InvalidTransition rescue Transitions::InvalidTransition
redirect_to :back, error: "Event can't be withdrawn" redirect_to :back, error: "Event can't be withdrawn"
return return

View file

@ -1,5 +1,5 @@
class RegistrationsController < Devise::RegistrationsController class RegistrationsController < Devise::RegistrationsController
before_action :configure_permitted_parameters, if: :devise_controller? prepend_before_action :check_captcha, only: [:create]
def edit def edit
@openids = Openid.where(user_id: current_user.id).order(:provider) @openids = Openid.where(user_id: current_user.id).order(:provider)
@ -21,14 +21,34 @@ class RegistrationsController < Devise::RegistrationsController
edit_user_registration_path(resource) edit_user_registration_path(resource)
end end
def configure_permitted_parameters private
devise_parameter_sanitizer.permit(:account_update) do |u|
u def sign_up_params
.permit(:email, :password, :password_confirmation, :current_password, :username, :email_public) params.require(:user).permit(
:email,
:password,
:password_confirmation,
:name,
:username
)
end end
devise_parameter_sanitizer.permit(:sign_up) do |u|
u def account_update_params
.permit(:email, :password, :password_confirmation, :name, :username) params.require(:user).permit(
:email,
:password,
:password_confirmation,
:current_password,
:username,
:email_public
)
end
def check_captcha
unless Feature.inactive?(:recaptcha) || verify_recaptcha
self.resource = resource_class.new sign_up_params
resource.validate # Look for any other validation errors besides Recaptcha
respond_with_navigational(resource) { render :new }
end end
end end
end end

View file

@ -1,5 +1,5 @@
class SubscriptionsController < ApplicationController class SubscriptionsController < ApplicationController
before_filter :authenticate_user! before_action :authenticate_user!
load_resource :conference, find_by: :short_title load_resource :conference, find_by: :short_title
load_and_authorize_resource only: [:create, :destroy], through: :conference load_and_authorize_resource only: [:create, :destroy], through: :conference

View file

@ -1,5 +1,5 @@
class TicketPurchasesController < ApplicationController class TicketPurchasesController < ApplicationController
before_filter :authenticate_user! before_action :authenticate_user!
load_resource :conference, find_by: :short_title load_resource :conference, find_by: :short_title
authorize_resource :conference_registrations, class: Registration authorize_resource :conference_registrations, class: Registration
authorize_resource authorize_resource

View file

@ -1,9 +1,9 @@
class TicketsController < ApplicationController class TicketsController < ApplicationController
before_filter :authenticate_user! before_action :authenticate_user!
load_resource :conference, find_by: :short_title load_resource :conference, find_by: :short_title
load_resource :ticket, through: :conference load_resource :ticket, through: :conference
authorize_resource :conference_registrations, class: Registration authorize_resource :conference_registrations, class: Registration
before_filter :check_load_resource, only: :index before_action :check_load_resource, only: :index
def index; end def index; end

View file

@ -11,6 +11,11 @@ module Users
def handle(provider) def handle(provider)
auth_hash = request.env['omniauth.auth'] auth_hash = request.env['omniauth.auth']
unless auth_hash.info.email.present?
flash[:error] = "Email field is missing in your #{provider} account"
redirect_to new_user_registration_path
return
end
username = auth_hash.info.email.split('@')[0] username = auth_hash.info.email.split('@')[0]
openid = Openid.find_for_oauth(auth_hash) # Get or create openid openid = Openid.find_for_oauth(auth_hash) # Get or create openid
# If openid exists and is associated with a user, sign in with associated user, # If openid exists and is associated with a user, sign in with associated user,

View file

@ -56,17 +56,7 @@ module ApplicationHelper
end end
def tracks(conference) def tracks(conference)
all = conference.program.tracks.confirmed.cfp_active.pluck(:name) conference.confirmed_tracks.collect(&:name).to_sentence
first = all[0...-1]
last = all[-1]
ts = ''
if all.length > 1
ts << first.join(', ')
ts << " and #{last}"
else
ts = all.join
end
return ts
end end
def difficulty_levels(conference) def difficulty_levels(conference)
@ -80,7 +70,7 @@ module ApplicationHelper
else else
ts = all.join ts = all.join
end end
return ts ts
end end
def unread_notifications(user) def unread_notifications(user)
@ -99,7 +89,7 @@ module ApplicationHelper
end end
def normalize_array_length(hashmap, length) def normalize_array_length(hashmap, length)
hashmap.each do |_, value| hashmap.each_value do |value|
if value.length < length if value.length < length
value.fill(value[-1], value.length...length) value.fill(value[-1], value.length...length)
end end
@ -151,8 +141,8 @@ module ApplicationHelper
hint: 'The people responsible for the booth. You can only select existing users.' hint: 'The people responsible for the booth. You can only select existing users.'
end end
def event_types(conference) def event_types_sentence(conference)
conference.program.event_types.map { |et| et.title.pluralize }.to_sentence conference.event_types.map { |et| et.title.pluralize }.to_sentence
end end
def sign_in_path def sign_in_path
@ -191,4 +181,19 @@ module ApplicationHelper
title: 'Open Source Event Manager' title: 'Open Source Event Manager'
) )
end end
# returns the url to be used for logo on basis of sponsorship level position
def get_logo(object)
if object.try(:sponsorship_level)
if object.sponsorship_level.position == 1
object.picture.first.url
elsif object.sponsorship_level.position == 2
object.picture.second.url
else
object.picture.others.url
end
else
object.picture.large.url
end
end
end end

View file

@ -0,0 +1,17 @@
module ConferenceHelper
# Return true if only call_for_papers or call_for_tracks is open
def one_call_open(*calls)
calls.one? { |call| call.try(:open?) }
end
# URL for sponsorship emails
def sponsorship_mailto(conference)
[
'mailto:',
conference.contact.sponsor_email,
'?subject=',
url_encode(conference.short_title),
'%20Sponsorship'
].join
end
end

View file

@ -101,17 +101,17 @@ module FormatHelper
def icon_for_todo(bool) def icon_for_todo(bool)
if bool if bool
return 'fa fa-check' 'fa fa-check'
else else
return 'fa fa-times' 'fa fa-times'
end end
end end
def class_for_todo(bool) def class_for_todo(bool)
if bool if bool
return 'todolist-ok' 'todolist-ok'
else else
return 'todolist-missing' 'todolist-missing'
end end
end end
@ -122,7 +122,7 @@ module FormatHelper
plural || singular.pluralize plural || singular.pluralize
end end
"#{word}" word
end end
# Returns black or white deppending on what of them contrast more with the # Returns black or white deppending on what of them contrast more with the

View file

@ -5,9 +5,9 @@ module PathsHelper
def active_nav_li(link) def active_nav_li(link)
if current_page?(link) if current_page?(link)
return 'active' 'active'
else else
return '' ''
end end
end end
end end

View file

@ -1,12 +0,0 @@
module SponsorsHelper
# returns the url to be used for logo on basis of sponsorship level position
def get_logo(sponsor)
if sponsor.sponsorship_level.position == 1
sponsor.picture.first.url
elsif sponsor.sponsorship_level.position == 2
sponsor.picture.second.url
else
sponsor.picture.others.url
end
end
end

View file

@ -18,7 +18,7 @@ module UsersHelper
providers << provider if !ENV["OSEM_#{provider.upcase}_KEY"].blank? && !ENV["OSEM_#{provider.upcase}_SECRET"].blank? providers << provider if !ENV["OSEM_#{provider.upcase}_KEY"].blank? && !ENV["OSEM_#{provider.upcase}_SECRET"].blank?
end end
return providers.uniq providers.uniq
end end
# Receives a hash, generated from User model, function get_roles # Receives a hash, generated from User model, function get_roles

View file

@ -0,0 +1,2 @@
class ApplicationJob < ActiveJob::Base
end

View file

@ -1,4 +1,4 @@
class ConferenceCfpUpdateMailJob < ActiveJob::Base class ConferenceCfpUpdateMailJob < ApplicationJob
queue_as :default queue_as :default
def perform(conference) def perform(conference)

View file

@ -1,4 +1,4 @@
class ConferenceDateUpdateMailJob < ActiveJob::Base class ConferenceDateUpdateMailJob < ApplicationJob
queue_as :default queue_as :default
def perform(conference) def perform(conference)

View file

@ -1,4 +1,4 @@
class ConferenceRegistrationDateUpdateMailJob < ActiveJob::Base class ConferenceRegistrationDateUpdateMailJob < ApplicationJob
queue_as :default queue_as :default
def perform(conference) def perform(conference)

View file

@ -1,4 +1,4 @@
class ConferenceScheduleUpdateMailJob < ActiveJob::Base class ConferenceScheduleUpdateMailJob < ApplicationJob
queue_as :default queue_as :default
def perform(conference) def perform(conference)

View file

@ -1,4 +1,4 @@
class ConferenceVenueUpdateMailJob < ActiveJob::Base class ConferenceVenueUpdateMailJob < ApplicationJob
queue_as :default queue_as :default
def perform(conference) def perform(conference)

View file

@ -1,4 +1,4 @@
class EventCommentMailJob < ActiveJob::Base class EventCommentMailJob < ApplicationJob
queue_as :default queue_as :default
def perform(comment) def perform(comment)

View file

@ -1,5 +1,5 @@
module Ahoy module Ahoy
class Event < ActiveRecord::Base class Event < ApplicationRecord
self.table_name = 'ahoy_events' self.table_name = 'ahoy_events'
belongs_to :visit belongs_to :visit

View file

@ -1,4 +1,4 @@
class Answer < ActiveRecord::Base class Answer < ApplicationRecord
has_many :qanswers has_many :qanswers
has_many :questions, through: :qanswers has_many :questions, through: :qanswers

View file

@ -0,0 +1,3 @@
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end

View file

@ -1,4 +1,4 @@
class Booth < ActiveRecord::Base class Booth < ApplicationRecord
include ActiveRecord::Transitions include ActiveRecord::Transitions
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id } has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }

View file

@ -1,4 +1,4 @@
class BoothRequest < ActiveRecord::Base class BoothRequest < ApplicationRecord
belongs_to :booth belongs_to :booth
belongs_to :user belongs_to :user

View file

@ -1,4 +1,4 @@
class Campaign < ActiveRecord::Base class Campaign < ApplicationRecord
validates :name, :utm_campaign, presence: true validates :name, :utm_campaign, presence: true
has_many :targets, dependent: :nullify has_many :targets, dependent: :nullify

View file

@ -1,6 +1,6 @@
# cannot delete program if there are events submitted # cannot delete program if there are events submitted
class Cfp < ActiveRecord::Base class Cfp < ApplicationRecord
TYPES = %w(events booths tracks).freeze TYPES = %w(events booths tracks).freeze
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id } has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }

View file

@ -1,4 +1,4 @@
class Comment < ActiveRecord::Base class Comment < ApplicationRecord
acts_as_nested_set scope: %i(commentable_id commentable_type) acts_as_nested_set scope: %i(commentable_id commentable_type)
validates :body, presence: true validates :body, presence: true
validates :user, presence: true validates :user, presence: true

View file

@ -1,11 +1,11 @@
class Commercial < ActiveRecord::Base class Commercial < ApplicationRecord
require 'oembed' require 'oembed'
belongs_to :commercialable, polymorphic: true belongs_to :commercialable, polymorphic: true
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id } has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }
validates :url, presence: true validates :url, presence: true, uniqueness: { scope: :commercialable }
validates :url, format: URI::regexp(%w(http https)) validates :url, format: URI::regexp(%w(http https))
validate :valid_url validate :valid_url
@ -20,6 +20,29 @@ class Commercial < ActiveRecord::Base
end end
end end
def self.read_file(file)
errors = {}
errors[:no_event] = []
errors[:validation_errors] = []
file.read.each_line do |line|
# Get the event id (text before :)
id = line.match(/:/).pre_match.to_i
# Get the commercial url (text after :)
url = line.match(/:/).post_match
event = Event.find_by(id: id)
# Go to next event, if the event is not found
errors[:no_event] << id && next unless event
commercial = event.commercials.new(url: url)
unless commercial.save
errors[:validation_errors] << "Could not create commercial for event with ID #{event.id} (" + commercial.errors.full_messages.to_sentence + ')'
end
end
errors
end
private private
def valid_url def valid_url

View file

@ -1,4 +1,4 @@
class Conference < ActiveRecord::Base class Conference < ApplicationRecord
include RevisionCount include RevisionCount
require 'uri' require 'uri'
serialize :events_per_week, Hash serialize :events_per_week, Hash
@ -33,6 +33,7 @@ class Conference < ActiveRecord::Base
end end
has_many :resources, dependent: :destroy has_many :resources, dependent: :destroy
has_many :booths, dependent: :destroy has_many :booths, dependent: :destroy
has_many :confirmed_booths, -> { where(state: 'confirmed') }, class_name: 'Booth'
has_many :lodgings, dependent: :destroy has_many :lodgings, dependent: :destroy
has_many :registrations, dependent: :destroy has_many :registrations, dependent: :destroy
@ -45,7 +46,15 @@ class Conference < ActiveRecord::Base
has_many :campaigns, dependent: :destroy has_many :campaigns, dependent: :destroy
has_many :commercials, as: :commercialable, dependent: :destroy has_many :commercials, as: :commercialable, dependent: :destroy
has_many :subscriptions, dependent: :destroy has_many :subscriptions, dependent: :destroy
has_one :call_for_events, -> { where(cfp_type: 'events') }, through: :program, source: :cfps
has_one :call_for_booths, -> { where(cfp_type: 'booths') }, through: :program, source: :cfps
has_one :call_for_tracks, -> { where(cfp_type: 'tracks') }, through: :program, source: :cfps
has_many :confirmed_tracks, -> { where(state: 'confirmed') }, through: :program, source: :tracks
has_many :highlighted_events,
-> { where(state: :confirmed, is_highlight: true) },
through: :program,
source: :events
has_many :event_types, through: :program
accepts_nested_attributes_for :venue accepts_nested_attributes_for :venue
accepts_nested_attributes_for :tickets, allow_destroy: true accepts_nested_attributes_for :tickets, allow_destroy: true
accepts_nested_attributes_for :sponsorship_levels, allow_destroy: true accepts_nested_attributes_for :sponsorship_levels, allow_destroy: true
@ -710,7 +719,7 @@ class Conference < ActiveRecord::Base
# * +True+ -> If the registration limit has been reached or exceeded # * +True+ -> If the registration limit has been reached or exceeded
# * +False+ -> If the registration limit hasn't been exceeded # * +False+ -> If the registration limit hasn't been exceeded
def registration_limit_exceeded? def registration_limit_exceeded?
registration_limit > 0 && registrations.count + program.speakers.confirmed.count - program.speakers.confirmed.registered(program.conference).count >= registration_limit registration_limit > 0 && registrations.count + program.speakers.confirmed.unregistered(program.conference).count >= registration_limit
end end
# Returns an hexadecimal color given a collection. The returned color changed # Returns an hexadecimal color given a collection. The returned color changed

View file

@ -1,4 +1,4 @@
class Contact < ActiveRecord::Base class Contact < ApplicationRecord
has_paper_trail on: [:update], ignore: [:updated_at], meta: { conference_id: :conference_id } has_paper_trail on: [:update], ignore: [:updated_at], meta: { conference_id: :conference_id }
belongs_to :conference belongs_to :conference

View file

@ -1,4 +1,4 @@
class DifficultyLevel < ActiveRecord::Base class DifficultyLevel < ApplicationRecord
belongs_to :program belongs_to :program
has_many :events, dependent: :nullify has_many :events, dependent: :nullify

View file

@ -1,4 +1,4 @@
class EmailSettings < ActiveRecord::Base class EmailSettings < ApplicationRecord
belongs_to :conference belongs_to :conference
has_paper_trail on: [:update], ignore: [:updated_at], meta: { conference_id: :conference_id } has_paper_trail on: [:update], ignore: [:updated_at], meta: { conference_id: :conference_id }

View file

@ -1,4 +1,4 @@
class Event < ActiveRecord::Base class Event < ApplicationRecord
include ActiveRecord::Transitions include ActiveRecord::Transitions
include RevisionCount include RevisionCount
has_paper_trail on: [:create, :update], ignore: [:updated_at, :guid, :week], meta: { conference_id: :conference_id } has_paper_trail on: [:create, :update], ignore: [:updated_at, :guid, :week], meta: { conference_id: :conference_id }
@ -197,6 +197,14 @@ class Event < ActiveRecord::Base
send(transition) send(transition)
end end
save save
# If the event was previously scheduled, and then withdrawn or cancelled
# its event_schedule will have enabled set to false
# If the event is now confirmed again, we want it to be available for scheduling
Rails.logger.debug "transition is #{transition}"
if transition == :confirm
Rails.logger.debug "schedules #{EventSchedule.unscoped.where(event: self, enabled: false)}"
EventSchedule.unscoped.where(event: self, enabled: false).destroy_all
end
rescue Transitions::InvalidTransition => e rescue Transitions::InvalidTransition => e
alert = "Update state failed. #{e.message}" alert = "Update state failed. #{e.message}"
end end

View file

@ -1,4 +1,5 @@
class EventSchedule < ActiveRecord::Base class EventSchedule < ApplicationRecord
default_scope { where(enabled: true) }
belongs_to :schedule belongs_to :schedule
belongs_to :event belongs_to :event
belongs_to :room belongs_to :room
@ -33,7 +34,7 @@ class EventSchedule < ActiveRecord::Base
# Returns event schedules that are scheduled in the same room and start_time as event # Returns event schedules that are scheduled in the same room and start_time as event
# #
def intersecting_event_schedules def intersecting_event_schedules
room.event_schedules.where(start_time: start_time, schedule: schedule).where.not(id: id) EventSchedule.unscoped.where(room: room, start_time: start_time, schedule: schedule).where.not(id: id)
end end
def replacement? def replacement?

View file

@ -1,4 +1,4 @@
class EventType < ActiveRecord::Base class EventType < ApplicationRecord
belongs_to :program belongs_to :program
has_many :events, dependent: :restrict_with_error has_many :events, dependent: :restrict_with_error

View file

@ -1,4 +1,4 @@
class EventUser < ActiveRecord::Base class EventUser < ApplicationRecord
# TODO: Do we need these roles? # TODO: Do we need these roles?
ROLES = [%w[Speaker speaker], %w[Submitter submitter], %w[Moderator moderator]] ROLES = [%w[Speaker speaker], %w[Submitter submitter], %w[Moderator moderator]]

View file

@ -1,4 +1,4 @@
class EventsRegistration < ActiveRecord::Base class EventsRegistration < ApplicationRecord
belongs_to :registration belongs_to :registration
belongs_to :event belongs_to :event

View file

@ -1,4 +1,4 @@
class Lodging < ActiveRecord::Base class Lodging < ApplicationRecord
belongs_to :conference belongs_to :conference
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id } has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }

View file

@ -1,6 +1,6 @@
class Openid < ActiveRecord::Base class Openid < ApplicationRecord
belongs_to :user belongs_to :user
validates :provider, :uid, presence: true validates :provider, :uid, :email, presence: true
# Searches for openid based on provider and uid. # Searches for openid based on provider and uid.
# Returns found openid or a new openid. # Returns found openid or a new openid.

View file

@ -1,4 +1,4 @@
class Organization < ActiveRecord::Base class Organization < ApplicationRecord
resourcify :roles, dependent: :delete_all resourcify :roles, dependent: :delete_all
has_paper_trail has_paper_trail

View file

@ -1,4 +1,4 @@
class Payment < ActiveRecord::Base class Payment < ApplicationRecord
has_many :ticket_purchases has_many :ticket_purchases
belongs_to :user belongs_to :user
belongs_to :conference belongs_to :conference

View file

@ -1,4 +1,4 @@
class PhysicalTicket < ActiveRecord::Base class PhysicalTicket < ApplicationRecord
belongs_to :ticket_purchase belongs_to :ticket_purchase
has_one :ticket, through: :ticket_purchase has_one :ticket, through: :ticket_purchase
has_one :conference, through: :ticket_purchase has_one :conference, through: :ticket_purchase

View file

@ -1,6 +1,6 @@
# cannot delete program if there are events submitted # cannot delete program if there are events submitted
class Program < ActiveRecord::Base class Program < ApplicationRecord
has_paper_trail on: [:update], ignore: [:updated_at], meta: { conference_id: :conference_id } has_paper_trail on: [:update], ignore: [:updated_at], meta: { conference_id: :conference_id }
belongs_to :conference belongs_to :conference
@ -51,6 +51,10 @@ class Program < ActiveRecord::Base
def registered(conference) def registered(conference)
joins(:registrations).where('registrations.conference_id = ?', conference.id) joins(:registrations).where('registrations.conference_id = ?', conference.id)
end end
def unregistered(conference)
self - registered(conference)
end
end end
accepts_nested_attributes_for :event_types, allow_destroy: true accepts_nested_attributes_for :event_types, allow_destroy: true
@ -165,7 +169,7 @@ class Program < ActiveRecord::Base
# * +False+ -> If there is not any event for the given date # * +False+ -> If there is not any event for the given date
def any_event_for_this_date?(date) def any_event_for_this_date?(date)
parsed_date = DateTime.parse("#{date} 00:00").utc parsed_date = DateTime.parse("#{date} 00:00").utc
EventSchedule.where(schedule: selected_schedule).where(start_time: parsed_date..(parsed_date + 1)).any? EventSchedule.where(schedule: selected_schedule).where(start_time: parsed_date..(parsed_date + 1.day)).any?
end end
## ##

View file

@ -1,4 +1,4 @@
class Qanswer < ActiveRecord::Base class Qanswer < ApplicationRecord
belongs_to :question belongs_to :question
belongs_to :answer, dependent: :delete belongs_to :answer, dependent: :delete

View file

@ -1,4 +1,4 @@
class Question < ActiveRecord::Base class Question < ApplicationRecord
belongs_to :question_type belongs_to :question_type
has_and_belongs_to_many :conferences has_and_belongs_to_many :conferences

View file

@ -1,3 +1,3 @@
class QuestionType < ActiveRecord::Base class QuestionType < ApplicationRecord
has_many :questions has_many :questions
end end

View file

@ -1,4 +1,4 @@
class Registration < ActiveRecord::Base class Registration < ApplicationRecord
belongs_to :user belongs_to :user
belongs_to :conference belongs_to :conference

View file

@ -1,4 +1,4 @@
class RegistrationPeriod < ActiveRecord::Base class RegistrationPeriod < ApplicationRecord
belongs_to :conference belongs_to :conference
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id } has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }

View file

@ -1,4 +1,4 @@
class Resource < ActiveRecord::Base class Resource < ApplicationRecord
belongs_to :conference belongs_to :conference
validates :name, :used, :quantity, presence: true validates :name, :used, :quantity, presence: true
validates :used, :quantity, numericality: { greater_than_or_equal_to: 0, only_integer: true } validates :used, :quantity, numericality: { greater_than_or_equal_to: 0, only_integer: true }

View file

@ -1,4 +1,4 @@
class Role < ActiveRecord::Base class Role < ApplicationRecord
belongs_to :resource, polymorphic: true belongs_to :resource, polymorphic: true
has_many :users_roles has_many :users_roles
has_many :users, through: :users_roles has_many :users, through: :users_roles

View file

@ -1,4 +1,4 @@
class Room < ActiveRecord::Base class Room < ApplicationRecord
include RevisionCount include RevisionCount
belongs_to :venue belongs_to :venue
has_many :event_schedules, dependent: :destroy has_many :event_schedules, dependent: :destroy

View file

@ -1,4 +1,4 @@
class Schedule < ActiveRecord::Base class Schedule < ApplicationRecord
belongs_to :program belongs_to :program
belongs_to :track belongs_to :track
has_many :event_schedules, dependent: :destroy has_many :event_schedules, dependent: :destroy

View file

@ -1,4 +1,4 @@
class Splashpage < ActiveRecord::Base class Splashpage < ApplicationRecord
belongs_to :conference belongs_to :conference
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id } has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }

View file

@ -1,4 +1,4 @@
class Sponsor < ActiveRecord::Base class Sponsor < ApplicationRecord
belongs_to :sponsorship_level belongs_to :sponsorship_level
belongs_to :conference belongs_to :conference

View file

@ -1,4 +1,4 @@
class SponsorshipLevel < ActiveRecord::Base class SponsorshipLevel < ApplicationRecord
validates :title, presence: true validates :title, presence: true
belongs_to :conference belongs_to :conference
acts_as_list scope: :conference acts_as_list scope: :conference

View file

@ -1,4 +1,4 @@
class Subscription < ActiveRecord::Base class Subscription < ApplicationRecord
belongs_to :conference belongs_to :conference
belongs_to :user belongs_to :user

View file

@ -1,4 +1,4 @@
class Target < ActiveRecord::Base class Target < ApplicationRecord
include ActionView::Helpers::TextHelper include ActionView::Helpers::TextHelper
default_scope { order('due_date ASC') } default_scope { order('due_date ASC') }

View file

@ -1,4 +1,4 @@
class Ticket < ActiveRecord::Base class Ticket < ApplicationRecord
belongs_to :conference belongs_to :conference
has_many :ticket_purchases, dependent: :destroy has_many :ticket_purchases, dependent: :destroy
has_many :buyers, -> { distinct }, through: :ticket_purchases, source: :user has_many :buyers, -> { distinct }, through: :ticket_purchases, source: :user
@ -61,7 +61,7 @@ class Ticket < ActiveRecord::Base
end end
def tickets_turnover_total(id) def tickets_turnover_total(id)
tickets = TicketPurchase.where(ticket_id: id) tickets = TicketPurchase.where(ticket_id: id).paid
tickets.inject(0){ |sum, ticket| sum + (ticket.amount_paid * ticket.quantity) } tickets.inject(0){ |sum, ticket| sum + (ticket.amount_paid * ticket.quantity) }
end end

View file

@ -1,4 +1,4 @@
class TicketPurchase < ActiveRecord::Base class TicketPurchase < ApplicationRecord
belongs_to :ticket belongs_to :ticket
belongs_to :user belongs_to :user
belongs_to :conference belongs_to :conference

View file

@ -1,4 +1,4 @@
class TicketScanning < ActiveRecord::Base class TicketScanning < ApplicationRecord
belongs_to :physical_ticket belongs_to :physical_ticket
before_create :mark_user_present before_create :mark_user_present

View file

@ -1,4 +1,4 @@
class Track < ActiveRecord::Base class Track < ApplicationRecord
include ActiveRecord::Transitions include ActiveRecord::Transitions
include RevisionCount include RevisionCount

View file

@ -4,7 +4,7 @@ end
class UserDisabled < StandardError class UserDisabled < StandardError
end end
class User < ActiveRecord::Base class User < ApplicationRecord
rolify rolify
has_many :physical_tickets, through: :ticket_purchases do has_many :physical_tickets, through: :ticket_purchases do
def by_conference(conference) def by_conference(conference)
@ -45,8 +45,8 @@ class User < ActiveRecord::Base
attr_accessor :login attr_accessor :login
has_many :event_users, dependent: :destroy has_many :event_users, dependent: :destroy
has_many :events, -> { uniq }, through: :event_users has_many :events, -> { distinct }, through: :event_users
has_many :presented_events, -> { joins(:event_users).where(event_users: {event_role: 'speaker'}).uniq }, through: :event_users, source: :event has_many :presented_events, -> { joins(:event_users).where(event_users: {event_role: 'speaker'}).distinct }, through: :event_users, source: :event
has_many :registrations, dependent: :destroy do has_many :registrations, dependent: :destroy do
def for_conference conference def for_conference conference
where(conference: conference).first where(conference: conference).first
@ -216,7 +216,7 @@ class User < ActiveRecord::Base
end end
def proposals(conference) def proposals(conference)
events.where('program_id = ? AND event_users.event_role=?', conference.program.id, 'submitter') events.where('program_id = ? AND (event_users.event_role=? OR event_users.event_role=?)', conference.program.id, 'submitter', 'speaker')
end end
def proposal_count(conference) def proposal_count(conference)

View file

@ -1,4 +1,4 @@
class UsersRole < ActiveRecord::Base class UsersRole < ApplicationRecord
belongs_to :role belongs_to :role
belongs_to :user belongs_to :user

View file

@ -1,4 +1,4 @@
class Vchoice < ActiveRecord::Base class Vchoice < ApplicationRecord
belongs_to :vday belongs_to :vday
belongs_to :vposition belongs_to :vposition

View file

@ -1,4 +1,4 @@
class Vday < ActiveRecord::Base class Vday < ApplicationRecord
belongs_to :conference belongs_to :conference
has_many :vchoices has_many :vchoices

View file

@ -1,4 +1,4 @@
class Venue < ActiveRecord::Base class Venue < ApplicationRecord
belongs_to :conference belongs_to :conference
has_one :commercial, as: :commercialable, dependent: :destroy has_one :commercial, as: :commercialable, dependent: :destroy
has_many :rooms, dependent: :destroy has_many :rooms, dependent: :destroy

View file

@ -1,4 +1,4 @@
class Visit < ActiveRecord::Base class Visit < ApplicationRecord
has_many :ahoy_events, class_name: 'Ahoy::Event' has_many :ahoy_events, class_name: 'Ahoy::Event'
belongs_to :user belongs_to :user
end end

View file

@ -1,4 +1,4 @@
class Vote < ActiveRecord::Base class Vote < ApplicationRecord
belongs_to :user belongs_to :user
belongs_to :event belongs_to :event

View file

@ -1,4 +1,4 @@
class Vposition < ActiveRecord::Base class Vposition < ApplicationRecord
belongs_to :conference belongs_to :conference
has_many :vchoices has_many :vchoices

View file

@ -1,3 +1,5 @@
require 'open-uri'
class TicketPdf < Prawn::Document class TicketPdf < Prawn::Document
def initialize(conference, user, physical_ticket, ticket_layout, file_name) def initialize(conference, user, physical_ticket, ticket_layout, file_name)
super(page_layout: ticket_layout, page_size: 'A4', filename: file_name) super(page_layout: ticket_layout, page_size: 'A4', filename: file_name)
@ -43,11 +45,17 @@ class TicketPdf < Prawn::Document
def draw_second_square def draw_second_square
move_up 150 move_up 150
if @conference.picture? if @conference.picture?
if 7 * @conference.picture.image[:width] > 12 * @conference.picture.image[:height] conference_image = case @conference.picture.ticket.url[0, 4]
image "#{Rails.root}/public#{@conference.picture_url}", at: [@mid_horizontal + 30, cursor], width: 120 when 'http', 'ftp:' # CDNs
else open(@conference.picture.ticket.url)
image "#{Rails.root}/public#{@conference.picture_url}", at: [@mid_horizontal + 30, cursor], height: 70 when '/sys' # local storage
open([
Rails.root,
'/public',
@conference.picture.ticket.url
].join)
end end
image conference_image, at: [@mid_horizontal + 30, cursor]
else else
image "#{Rails.root}/public/img/osem-logo.png", at: [@mid_horizontal + 30, cursor], height: 70 image "#{Rails.root}/public/img/osem-logo.png", at: [@mid_horizontal + 30, cursor], height: 70
end end

View file

@ -52,10 +52,6 @@ class PictureUploader < CarrierWave::Uploader::Base
"system/#{object_class_name}/#{mounted_as}/#{model.id}" "system/#{object_class_name}/#{mounted_as}/#{model.id}"
end end
def image
@image ||= MiniMagick::Image.open(file.file)
end
# Create different versions of your uploaded files: # Create different versions of your uploaded files:
version :large do version :large do
process resize_to_fit: [300, 300] process resize_to_fit: [300, 300]
@ -80,6 +76,11 @@ class PictureUploader < CarrierWave::Uploader::Base
process resize_and_pad: [320, 120, 'white'] process resize_and_pad: [320, 120, 'white']
end end
version :ticket, if: :conference?
version :ticket do
process resize_and_pad: [120, 70]
end
# Add a white list of extensions which are allowed to be uploaded. # Add a white list of extensions which are allowed to be uploaded.
# For images you might use something like this: # For images you might use something like this:
def extension_white_list def extension_white_list
@ -95,4 +96,8 @@ class PictureUploader < CarrierWave::Uploader::Base
def sponsor?(_picture) def sponsor?(_picture)
object_class_name == 'sponsors' object_class_name == 'sponsors'
end end
def conference?(_picture)
object_class_name == 'conferences'
end
end end

View file

@ -1,7 +1,8 @@
.row .row
.col-md-12 .col-md-12
%h3 %h3
= image_tag(@booth.picture.thumb.url, size: '20%', alt: '') - if @booth.logo_link
= image_tag( @booth.picture.thumb.url, size: '20%', alt: '')
= @booth.title = @booth.title
.btn-group.pull-right .btn-group.pull-right
= link_to 'Edit', edit_admin_conference_booth_path(@conference.short_title, @booth), class: 'btn btn-mini btn-primary' = link_to 'Edit', edit_admin_conference_booth_path(@conference.short_title, @booth), class: 'btn btn-mini btn-primary'

View file

@ -11,7 +11,7 @@
.col-md-8 .col-md-8
= semantic_form_for(@campaign, url: (@campaign.new_record? ? admin_conference_campaigns_path : admin_conference_campaign_path(@conference.short_title, @campaign))) do |f| = semantic_form_for(@campaign, url: (@campaign.new_record? ? admin_conference_campaigns_path : admin_conference_campaign_path(@conference.short_title, @campaign))) do |f|
= f.inputs do = f.inputs do
= f.input :name = f.input :name, input_html: { autofocus: true }
= f.inputs name: 'UTM Parameters' do = f.inputs name: 'UTM Parameters' do
= f.input :utm_campaign, label: 'Campaign', hint: 'Groups all of the content from one campaign. E.g. 20percentpromocode' = f.input :utm_campaign, label: 'Campaign', hint: 'Groups all of the content from one campaign. E.g. 20percentpromocode'
= f.input :utm_source, label: 'Source', hint: 'Which website is sending you traffic. E.g. Facebook, google+, blog' = f.input :utm_source, label: 'Source', hint: 'Which website is sending you traffic. E.g. Facebook, google+, blog'

View file

@ -21,7 +21,7 @@
%dt %dt
Event types: Event types:
%dd %dd
= event_types(@conference) = event_types_sentence(@conference)
%dt %dt
Tracks: Tracks:
%dd %dd

View file

@ -7,7 +7,7 @@
- if @program.cfps - if @program.cfps
.row .row
.col-md-12 .col-md-12
%table.table.table-hover.datatable#tickets %table.table.table-hover#tickets
%thead %thead
%th Type %th Type
%th Start Date %th Start Date
@ -27,7 +27,7 @@
= cfp.end_date.strftime('%A, %B %-d. %Y') = cfp.end_date.strftime('%A, %B %-d. %Y')
%td %td
%p %p
= markdown(truncate(cfp.description)) = truncate(cfp.description)
%td %td
= pluralize(cfp.remaining_days, 'day') = pluralize(cfp.remaining_days, 'day')
%td %td

View file

@ -14,7 +14,7 @@
.row .row
.col-md-6 .col-md-6
= semantic_form_for(@commercial, url: admin_conference_commercials_path(conference_id: @conference.short_title)) do |f| = semantic_form_for(@commercial, url: admin_conference_commercials_path(conference_id: @conference.short_title)) do |f|
= f.input :url, label: 'URL', as: :string, input_html: { required: 'required' }, = f.input :url, label: 'URL', as: :string, input_html: { required: 'required', autofocus: true },
hint: 'Just paste the url of your video/photo provider. YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.' hint: 'Just paste the url of your video/photo provider. YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.'
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true } = f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }
%hr %hr

View file

@ -1,6 +1,6 @@
.text-center .text-center
%h4 #{title} %h4 #{title}
%canvas.doughnut_chart{ id: "dough_#{title}", 'data-chart' => data.to_json } %canvas.doughnut_chart{ id: "dough_#{title.parameterize.underscore}", 'data-chart' => data.to_json }
- if data - if data
- data.each do |key, value| - data.each do |key, value|
%span{ 'style' => "border-bottom: 3px solid #{value['color']}" } #{key}: #{value['value']} %span{ 'style' => "border-bottom: 3px solid #{value['color']}" } #{key}: #{value['value']}
@ -8,7 +8,7 @@
:javascript :javascript
$(document).ready( function(){ $(document).ready( function(){
var d = $("#dough_#{title}"); var d = $("#dough_#{title.parameterize.underscore}");
var dt = d.get(0).getContext('2d'); var dt = d.get(0).getContext('2d');
$(window).resize( respondCanvas ); $(window).resize( respondCanvas );

View file

@ -8,7 +8,7 @@
.col-md-8 .col-md-8
= semantic_form_for(@contact, url: admin_conference_contact_path(@conference.short_title), html: {multipart: true}) do |f| = semantic_form_for(@contact, url: admin_conference_contact_path(@conference.short_title), html: {multipart: true}) do |f|
= f.inputs name: 'Mail' do = f.inputs name: 'Mail' do
= f.input :email, hint: 'Contact email address for your conference. Will be used as reply-to address in emails sent out by the system.' = f.input :email, input_html: { autofocus: true }, hint: 'Contact email address for your conference. Will be used as reply-to address in emails sent out by the system.'
= f.input :sponsor_email, hint: 'This will appear in the sponsor segment of the splash for the sponsors to contact to the organizers' = f.input :sponsor_email, hint: 'This will appear in the sponsor segment of the splash for the sponsors to contact to the organizers'
= f.inputs name: 'Social Media' do = f.inputs name: 'Social Media' do
= f.input :social_tag, hint: "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'" = f.input :social_tag, hint: "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'"

View file

@ -9,7 +9,7 @@
.row .row
.col-md-8 .col-md-8
= semantic_form_for(@difficulty_level, url: (@difficulty_level.new_record? ? admin_conference_program_difficulty_levels_path : admin_conference_program_difficulty_level_path(@conference.short_title, @difficulty_level))) do |f| = semantic_form_for(@difficulty_level, url: (@difficulty_level.new_record? ? admin_conference_program_difficulty_levels_path : admin_conference_program_difficulty_level_path(@conference.short_title, @difficulty_level))) do |f|
= f.input :title, required: true = f.input :title, input_html: { autofocus: true }, required: true
= f.input :description, input_html: {rows: 3, class: 'span6'} = f.input :description, input_html: {rows: 3, class: 'span6'}
= f.input :color, input_html: {size: 6, type: 'color'} = f.input :color, input_html: {size: 6, type: 'color'}
%p.text-right %p.text-right

Some files were not shown because too many files have changed in this diff Show more