droom 0.4.3 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/app/assets/images/droom/admin_menu.png +0 -0
- data/app/assets/images/droom/applications_menu.png +0 -0
- data/app/assets/images/droom/arrows_small.png +0 -0
- data/app/assets/images/droom/config_menu.png +0 -0
- data/app/assets/images/droom/dropdown.png +0 -0
- data/app/assets/images/droom/menu/asterisk.png +0 -0
- data/app/assets/images/droom/{smalladd.png → menu/smalladd.png} +0 -0
- data/app/assets/images/droom/{small_asterisk.png → menu/smallasterisk.png} +0 -0
- data/app/assets/images/droom/{smalldelete.png → menu/smalldelete.png} +0 -0
- data/app/assets/images/droom/{smalldownload.png → menu/smalldownload.png} +0 -0
- data/app/assets/images/droom/{smalledit.png → menu/smalledit.png} +0 -0
- data/app/assets/images/droom/message.png +0 -0
- data/app/assets/images/droom/missing/scrap.jpg +0 -0
- data/app/assets/images/droom/missing/scrap.png +0 -0
- data/app/assets/images/droom/missing/thumb.png +0 -0
- data/app/assets/images/droom/missing/user.png +0 -0
- data/app/assets/images/droom/object_icons.png +0 -0
- data/app/assets/images/droom/panel/add.png +0 -0
- data/app/assets/images/droom/panel/edit.png +0 -0
- data/app/assets/images/droom/panel/manage.png +0 -0
- data/app/assets/images/droom/pointer_upwards.png +0 -0
- data/app/assets/images/droom/search_menu.png +0 -0
- data/app/assets/images/droom/setter.png +0 -0
- data/app/assets/images/droom/small_icons.png +0 -0
- data/app/assets/images/droom/stream/closer.png +0 -0
- data/app/assets/images/droom/stream/next.png +0 -0
- data/app/assets/images/droom/stream/prev.png +0 -0
- data/app/assets/images/droom/stream/previous.png +0 -0
- data/app/assets/images/droom/subscribe.png +0 -0
- data/app/assets/javascripts/droom.js.coffee +23 -13
- data/app/assets/javascripts/droom/actions.js.coffee +104 -10
- data/app/assets/javascripts/droom/ajax.js.coffee +36 -24
- data/app/assets/javascripts/droom/extensions.js.coffee +13 -0
- data/app/assets/javascripts/droom/lib/jquery.datepicker.js +1026 -0
- data/app/assets/javascripts/droom/lib/jquery.deserialize.js +142 -0
- data/app/assets/javascripts/droom/lib/jquery_ujs.js +416 -0
- data/app/assets/javascripts/droom/lib/swipe.js +568 -0
- data/app/assets/javascripts/droom/lib/underscore.js +1276 -0
- data/app/assets/javascripts/droom/popups.js.coffee +98 -37
- data/app/assets/javascripts/droom/stream.js.coffee +119 -77
- data/app/assets/javascripts/droom/utilities.js.coffee +25 -3
- data/app/assets/javascripts/droom/widgets.js.coffee +318 -253
- data/app/assets/stylesheets/droom.css.sass +482 -955
- data/app/assets/stylesheets/droom/_mixins.css.sass +12 -42
- data/app/assets/stylesheets/droom/_popups.css.sass +28 -11
- data/app/assets/stylesheets/droom/_stream.css.sass +375 -0
- data/app/assets/stylesheets/droom/_toolbar.css.sass +0 -6
- data/app/assets/stylesheets/droom/_variables.css.sass +4 -2
- data/app/controllers/droom/agenda_categories_controller.rb +6 -14
- data/app/controllers/droom/api/api_controller.rb +56 -0
- data/app/controllers/droom/api/events_controller.rb +74 -0
- data/app/controllers/droom/api/users_controller.rb +92 -0
- data/app/controllers/droom/api/venues_controller.rb +71 -0
- data/app/controllers/droom/calendars_controller.rb +4 -10
- data/app/controllers/droom/{user_confirmations_controller.rb → confirmations_controller.rb} +8 -7
- data/app/controllers/droom/dashboard_controller.rb +2 -19
- data/app/controllers/droom/documents_controller.rb +12 -60
- data/app/controllers/droom/dropbox_tokens_controller.rb +3 -4
- data/app/controllers/droom/engine_controller.rb +39 -11
- data/app/controllers/droom/events_controller.rb +62 -84
- data/app/controllers/droom/folders_controller.rb +30 -40
- data/app/controllers/droom/group_invitations_controller.rb +6 -23
- data/app/controllers/droom/group_permissions_controller.rb +26 -0
- data/app/controllers/droom/groups_controller.rb +10 -14
- data/app/controllers/droom/invitations_controller.rb +7 -25
- data/app/controllers/droom/memberships_controller.rb +13 -18
- data/app/controllers/droom/organisations_controller.rb +6 -25
- data/app/controllers/droom/permissions_controller.rb +50 -0
- data/app/controllers/droom/preferences_controller.rb +9 -10
- data/app/controllers/droom/scraps_controller.rb +23 -26
- data/app/controllers/droom/services_controller.rb +50 -0
- data/app/controllers/droom/suggestions_controller.rb +6 -4
- data/app/controllers/droom/users/confirmations_controller.rb +24 -0
- data/app/controllers/droom/users/passwords_controller.rb +39 -0
- data/app/controllers/droom/users/sessions_controller.rb +7 -0
- data/app/controllers/droom/users_controller.rb +60 -38
- data/app/controllers/droom/venues_controller.rb +8 -15
- data/app/controllers/droom/youtube_controller.rb +1 -1
- data/app/helpers/droom/droom_helper.rb +22 -17
- data/app/models/droom/ability.rb +81 -0
- data/app/models/droom/agenda_category.rb +0 -1
- data/app/models/droom/calendar.rb +12 -7
- data/app/models/droom/category.rb +4 -10
- data/app/models/droom/concerns/slugged.rb +21 -0
- data/app/models/droom/document.rb +15 -17
- data/app/models/droom/dropbox_document.rb +3 -6
- data/app/models/droom/dropbox_token.rb +2 -3
- data/app/models/droom/event.rb +117 -163
- data/app/models/droom/event_type.rb +25 -0
- data/app/models/droom/folder.rb +36 -48
- data/app/models/droom/group.rb +35 -27
- data/app/models/droom/group_invitation.rb +7 -10
- data/app/models/droom/group_permission.rb +29 -0
- data/app/models/droom/invitation.rb +14 -23
- data/app/models/droom/mailing_list_membership.rb +0 -1
- data/app/models/droom/membership.rb +32 -31
- data/app/models/droom/organisation.rb +6 -3
- data/app/models/droom/permission.rb +19 -0
- data/app/models/droom/personal_folder.rb +9 -21
- data/app/models/droom/preference.rb +1 -2
- data/app/models/droom/scrap.rb +31 -26
- data/app/models/droom/service.rb +31 -0
- data/app/models/droom/tag.rb +10 -9
- data/app/models/droom/tagging.rb +1 -1
- data/app/models/droom/user.rb +453 -130
- data/app/models/droom/user_permission.rb +8 -0
- data/app/models/droom/venue.rb +21 -32
- data/app/serializers/droom/user_serializer.rb +45 -0
- data/app/serializers/droom/venue_serializer.rb +5 -0
- data/app/views/droom/dashboard/_documents.html.haml +1 -1
- data/app/views/droom/dashboard/_folders.html.haml +1 -1
- data/app/views/droom/dashboard/_future_events.html.haml +10 -8
- data/app/views/droom/dashboard/_groups.html.haml +1 -1
- data/app/views/droom/dashboard/_past_events.haml +19 -12
- data/app/views/droom/dashboard/_stream.html.haml +2 -2
- data/app/views/droom/{users/_extra_columns.html.haml → dashboard/_welcome.html.haml} +0 -0
- data/app/views/droom/dashboard/index.html.haml +3 -0
- data/app/views/droom/documents/_document.html.haml +0 -2
- data/app/views/droom/documents/_documents.html.haml +1 -1
- data/app/views/droom/documents/_documents_list.html.haml +1 -1
- data/app/views/droom/documents/_documents_table.html.haml +1 -1
- data/app/views/droom/documents/_form.html.haml +8 -5
- data/app/views/droom/documents/_listing.html.haml +4 -2
- data/app/views/droom/documents/index.html.haml +13 -7
- data/app/views/droom/documents/new.html.haml +1 -4
- data/app/views/droom/events/_action_menu.html.haml +2 -2
- data/app/views/droom/events/_attachments.html.haml +8 -0
- data/app/views/droom/events/_calendar.html.haml +4 -8
- data/app/views/droom/events/_event.html.haml +44 -63
- data/app/views/droom/events/_event_line.html.haml +1 -1
- data/app/views/droom/events/_events.html.haml +18 -2
- data/app/views/droom/events/_form.html.haml +26 -19
- data/app/views/droom/events/_invitations.html.haml +7 -3
- data/app/views/droom/events/_scrap_events.html.haml +8 -0
- data/app/views/droom/events/_suggested.html.haml +4 -1
- data/app/views/droom/events/calendar.html.haml +8 -0
- data/app/views/droom/events/index.html.haml +24 -26
- data/app/views/droom/events/show.html.haml +6 -6
- data/app/views/droom/folders/_contents.html.haml +34 -4
- data/app/views/droom/folders/_folder.html.haml +7 -2
- data/app/views/droom/folders/_form.html.haml +11 -8
- data/app/views/droom/folders/index.html.haml +19 -22
- data/app/views/droom/group_invitations/_attending_groups.html.haml +1 -1
- data/app/views/droom/group_permissions/_toggle.html.haml +18 -0
- data/app/views/droom/groups/_action_menu.haml +0 -2
- data/app/views/droom/groups/_created.html.haml +0 -1
- data/app/views/droom/groups/_form.html.haml +3 -0
- data/app/views/droom/groups/_group.html.haml +10 -8
- data/app/views/droom/groups/_groups.html.haml +1 -1
- data/app/views/droom/groups/_search_result.html.haml +1 -1
- data/app/views/droom/groups/_suggested.html.haml +1 -1
- data/app/views/droom/groups/index.html.haml +15 -16
- data/app/views/droom/invitations/_form.html.haml +1 -1
- data/app/views/droom/invitations/_invitation.html.haml +1 -1
- data/app/views/droom/invitations/_invitations.html.haml +4 -4
- data/app/views/droom/memberships/_button.html.haml +5 -5
- data/app/views/droom/memberships/_form.html.haml +26 -7
- data/app/views/droom/memberships/_member.html.haml +1 -1
- data/app/views/droom/memberships/{_membership_toggle.html.haml → _toggle.html.haml} +4 -4
- data/app/views/droom/memberships/index.html.haml +9 -0
- data/app/views/droom/organisations/_action_menu.html.haml +1 -1
- data/app/views/droom/organisations/_organisation.html.haml +2 -2
- data/app/views/droom/organisations/_suggested.html.haml +1 -1
- data/app/views/droom/organisations/index.html.haml +11 -11
- data/app/views/droom/panels/_admin.html.haml +2 -2
- data/app/views/droom/panels/_configuration.html.haml +28 -0
- data/app/views/droom/panels/_devices.html.haml +2 -4
- data/app/views/droom/panels/_search.html.haml +9 -0
- data/app/views/droom/permissions/_action_menu.html.haml +10 -0
- data/app/views/droom/permissions/_created.html.haml +3 -0
- data/app/views/droom/permissions/_form.html.haml +17 -0
- data/app/views/droom/permissions/edit.html.haml +7 -0
- data/app/views/droom/permissions/new.html.haml +8 -0
- data/app/views/droom/permissions/show.html.haml +4 -0
- data/app/views/droom/preferences/_checkbox.html.haml +4 -2
- data/app/views/droom/scraps/_caption.html.haml +0 -2
- data/app/views/droom/scraps/_credit.html.haml +1 -1
- data/app/views/droom/scraps/_form.html.haml +68 -69
- data/app/views/droom/scraps/_preload.html.haml +4 -0
- data/app/views/droom/scraps/_stream.html.haml +11 -3
- data/app/views/droom/scraps/_thumb.html.haml +33 -1
- data/app/views/droom/scraps/edit.html.haml +6 -1
- data/app/views/droom/scraps/full/_document.html.haml +4 -3
- data/app/views/droom/scraps/full/_event.html.haml +17 -16
- data/app/views/droom/scraps/full/_image.html.haml +1 -2
- data/app/views/droom/scraps/full/_link.html.haml +4 -3
- data/app/views/droom/scraps/full/_quote.html.haml +4 -7
- data/app/views/droom/scraps/full/_text.html.haml +3 -2
- data/app/views/droom/scraps/full/_video.html.haml +2 -2
- data/app/views/droom/scraps/new.html.haml +6 -1
- data/app/views/droom/scraps/show.html.haml +4 -3
- data/app/views/droom/services/_action_menu.html.haml +12 -0
- data/app/views/droom/services/_created.html.haml +3 -0
- data/app/views/droom/services/_form.html.haml +18 -0
- data/app/views/droom/services/_services.html.haml +44 -0
- data/app/views/droom/services/edit.html.haml +7 -0
- data/app/views/droom/services/index.html.haml +5 -0
- data/app/views/droom/{people → services}/new.html.haml +4 -3
- data/app/views/droom/services/show.html.haml +4 -0
- data/app/views/droom/shared/_controls.html.haml +2 -2
- data/app/views/droom/shared/_navigation.html.haml +2 -2
- data/app/views/droom/shared/_toolbar.html.haml +1 -1
- data/app/views/droom/suggestions/index.html.haml +1 -0
- data/app/views/droom/users/_action_menu.html.haml +21 -0
- data/app/views/droom/users/_suggested.html.haml +14 -0
- data/app/views/droom/users/_user.html.haml +2 -2
- data/app/views/droom/users/_users.html.haml +7 -0
- data/app/views/droom/users/_users_table.html.haml +21 -22
- data/app/views/droom/users/admin.html.haml +10 -0
- data/app/views/droom/users/confirmations/_after_confirmation.html.haml +2 -0
- data/app/views/droom/users/confirmations/_password_required.html.haml +30 -0
- data/app/views/droom/users/confirmations/failure.en.html.haml +22 -0
- data/app/views/droom/users/confirmations/show.html.haml +13 -0
- data/app/views/droom/users/edit.html.haml +2 -10
- data/app/views/droom/users/edit/_details.html.haml +13 -0
- data/app/views/droom/users/edit/_memberships.html.haml +13 -0
- data/app/views/droom/users/edit/_password_fields.html.haml +16 -0
- data/app/views/droom/users/edit/_preferences.html.haml +37 -0
- data/app/views/droom/users/edit/_profile.html.haml +26 -0
- data/app/views/droom/users/edit/_user_fields.html.haml +66 -0
- data/app/views/droom/users/index.html.haml +6 -32
- data/app/views/droom/users/new.html.haml +3 -0
- data/app/views/droom/users/passwords/completed.html.haml +13 -0
- data/app/views/{devise → droom/users}/passwords/edit.html.haml +10 -4
- data/app/views/{devise → droom/users}/passwords/new.html.haml +4 -3
- data/app/views/droom/users/passwords/show.html.haml +6 -0
- data/app/views/droom/users/show.html.haml +2 -0
- data/app/views/droom/users/show/_listed.html.haml +46 -0
- data/app/views/droom/users/show/_profile.html.haml +33 -0
- data/app/views/droom/users/show/_tabled.html.haml +28 -0
- data/config/initializers/chronic.rb +2 -0
- data/config/initializers/devise.rb +35 -2
- data/config/initializers/paperclip.rb +11 -6
- data/config/locales/devise.en.yml +1 -1
- data/config/locales/en.yml +198 -103
- data/config/routes.rb +37 -45
- data/db/migrate/20130207123614_stream.rb +5 -1
- data/db/migrate/20130225095328_create_droom_calendars.rb +0 -1
- data/db/migrate/20130627065459_permissions.rb +34 -0
- data/db/migrate/20130627071938_users_take_over.rb +38 -0
- data/db/migrate/20130627073759_user_properties.rb +34 -0
- data/db/migrate/20130627080021_no_more_people.rb +11 -0
- data/db/migrate/20130701122935_directory_groups.rb +8 -0
- data/db/migrate/20130701123152_remove_old_access_control.rb +16 -0
- data/db/migrate/20130729102857_more_scrap_data.rb +12 -0
- data/db/migrate/20130904080340_international_names.rb +17 -0
- data/db/migrate/20130904080341_honours.rb +5 -0
- data/db/migrate/20131124082222_simple_addresses.rb +25 -0
- data/db/migrate/20131201093351_event_time_zone.rb +5 -0
- data/db/migrate/20131217060311_session_revocable.rb +5 -0
- data/db/migrate/20131219180311_event_types.rb +15 -0
- data/lib/devise/strategies/cookie_authenticatable.rb +46 -0
- data/lib/droom.rb +48 -33
- data/lib/droom/auth_cookie.rb +82 -0
- data/lib/droom/cropper.rb +24 -0
- data/lib/droom/engine.rb +20 -2
- data/lib/droom/folders.rb +6 -6
- data/lib/droom/lazy_hash.rb +11 -1
- data/lib/droom/monkeys.rb +6 -6
- data/lib/droom/taggability.rb +1 -1
- data/lib/droom/validators.rb +1 -1
- data/lib/droom/version.rb +1 -1
- data/lib/generators/droom/install/templates/droom_initializer.rb +10 -2
- data/lib/paperclip/geometry_transformation.rb +80 -0
- data/lib/paperclip/validators/attachment_height_validator.rb +89 -0
- data/lib/paperclip/validators/attachment_width_validator.rb +89 -0
- data/lib/paperclip_processors/offset_thumbnail.rb +85 -0
- data/spec/dummy/config/application.rb +0 -7
- data/spec/dummy/config/environments/development.rb +1 -10
- data/spec/dummy/config/environments/production.rb +1 -0
- data/spec/dummy/config/environments/test.rb +2 -7
- data/spec/dummy/db/migrate/20130130120631_folder_ancestry_to_parents.droom.rb +1 -1
- data/spec/dummy/db/migrate/20130724124758_dropbox_tokens.droom.rb +10 -0
- data/spec/dummy/db/migrate/20130724124759_preference_uuids.droom.rb +6 -0
- data/spec/dummy/db/migrate/20130724124760_stream.droom.rb +14 -0
- data/spec/dummy/db/migrate/20130724124761_access_token_secret.droom.rb +6 -0
- data/spec/dummy/db/migrate/20130724124762_person_image.droom.rb +10 -0
- data/spec/dummy/db/migrate/20130724124763_devise_confirmable.droom.rb +14 -0
- data/spec/dummy/db/migrate/20130724124764_create_droom_calendars.droom.rb +20 -0
- data/spec/dummy/db/migrate/20130724124765_give_scraps_document.droom.rb +6 -0
- data/spec/dummy/db/migrate/20130724124766_privateness.droom.rb +10 -0
- data/spec/dummy/db/migrate/20130724124767_store_metadata.droom.rb +6 -0
- data/spec/dummy/db/migrate/20130724124768_folders_nicely.droom.rb +7 -0
- data/spec/dummy/db/migrate/20130724124769_niceties.droom.rb +8 -0
- data/spec/dummy/db/migrate/20130724124770_create_droom_dropbox_documents.droom.rb +12 -0
- data/spec/dummy/db/migrate/20130724124771_dropbox_documents_changed.droom.rb +6 -0
- data/spec/dummy/db/migrate/20130724124772_user_titles.droom.rb +6 -0
- data/spec/dummy/db/migrate/20130724124773_permissions.droom.rb +35 -0
- data/spec/dummy/db/migrate/20130724124774_users_take_over.droom.rb +39 -0
- data/spec/dummy/db/migrate/20130724124775_user_properties.droom.rb +35 -0
- data/spec/dummy/db/migrate/20130724124776_no_more_people.droom.rb +12 -0
- data/spec/dummy/db/migrate/20130724124777_directory_groups.droom.rb +9 -0
- data/spec/dummy/db/migrate/20130724124778_remove_old_access_control.droom.rb +17 -0
- data/spec/dummy/db/schema.rb +217 -140
- data/spec/factories/documents.rb +0 -5
- data/spec/factories/events.rb +0 -9
- data/spec/factories/user.rb +4 -2
- data/spec/lib/droom/folders_spec.rb +8 -8
- data/spec/models/droom/document_spec.rb +6 -43
- data/spec/models/droom/event_spec.rb +0 -34
- data/spec/models/droom/mailing_list_membership_spec.rb +4 -4
- data/spec/models/droom/membership_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -10
- metadata +322 -282
- data/app/assets/images/droom/Untitled-1.png +0 -0
- data/app/assets/images/droom/asterisk.png +0 -0
- data/app/assets/images/droom/smallmanage.png +0 -0
- data/app/assets/javascripts/droom/lib/kalendae.js +0 -1692
- data/app/assets/stylesheets/lib/_kalendae.css.sass +0 -139
- data/app/controllers/droom/pages_controller.rb +0 -61
- data/app/controllers/droom/people_controller.rb +0 -111
- data/app/models/droom/document_attachment.rb +0 -37
- data/app/models/droom/page.rb +0 -26
- data/app/models/droom/person.rb +0 -309
- data/app/models/droom/recurrence_rule.rb +0 -82
- data/app/models/droom/user_action_observer.rb +0 -12
- data/app/views/devise/confirmations/failure.en.html.haml +0 -20
- data/app/views/devise/confirmations/show.html.haml +0 -19
- data/app/views/droom/confirmations/show.html.haml +0 -40
- data/app/views/droom/documents/_document_line.html.haml +0 -2
- data/app/views/droom/events/_created.html.haml +0 -2
- data/app/views/droom/folders/_attachments.html.haml +0 -3
- data/app/views/droom/pages/_contents.html.haml +0 -10
- data/app/views/droom/pages/_form.html.haml +0 -36
- data/app/views/droom/pages/_full_page.html.haml +0 -17
- data/app/views/droom/pages/_page.html.haml +0 -5
- data/app/views/droom/pages/_pages.html.haml +0 -2
- data/app/views/droom/pages/admin.html.haml +0 -24
- data/app/views/droom/pages/edit.html.haml +0 -1
- data/app/views/droom/pages/index.html.haml +0 -10
- data/app/views/droom/pages/new.html.haml +0 -4
- data/app/views/droom/pages/show.html.haml +0 -5
- data/app/views/droom/panels/_account.html.haml +0 -16
- data/app/views/droom/panels/_readers.html.haml +0 -18
- data/app/views/droom/panels/_suggestions.html.haml +0 -15
- data/app/views/droom/people/_action_menu.html.haml +0 -22
- data/app/views/droom/people/_created.html.haml +0 -6
- data/app/views/droom/people/_form.html.haml +0 -66
- data/app/views/droom/people/_listing.html.haml +0 -19
- data/app/views/droom/people/_memberships.html.haml +0 -24
- data/app/views/droom/people/_people.html.haml +0 -5
- data/app/views/droom/people/_person.html.haml +0 -32
- data/app/views/droom/people/_search_result.html.haml +0 -14
- data/app/views/droom/people/_suggested.html.haml +0 -14
- data/app/views/droom/people/edit.html.haml +0 -9
- data/app/views/droom/people/index.html.haml +0 -8
- data/app/views/droom/people/show.html.haml +0 -31
- data/app/views/droom/scraps/_heading.html.haml +0 -16
- data/app/views/droom/scraps/thumbs/_document.html.haml +0 -9
- data/app/views/droom/scraps/thumbs/_event.html.haml +0 -17
- data/app/views/droom/scraps/thumbs/_image.html.haml +0 -6
- data/app/views/droom/scraps/thumbs/_link.html.haml +0 -10
- data/app/views/droom/scraps/thumbs/_quote.html.haml +0 -8
- data/app/views/droom/scraps/thumbs/_text.html.haml +0 -8
- data/app/views/droom/scraps/thumbs/_video.html.haml +0 -6
- data/app/views/droom/users/_extra_columns_header.html.haml +0 -0
- data/app/views/droom/users/_extra_columns_note.html.haml +0 -0
- data/app/views/droom/users/_form.html.haml +0 -14
- data/app/views/droom/users/_password_fields.html.haml +0 -15
- data/app/views/droom/users/_user_or_person.html.haml +0 -72
- data/app/views/kaminari/_paginator.html.haml +0 -16
- data/lib/droom/dav_resource.rb +0 -36
- data/lib/droom/model_helpers.rb +0 -25
- data/lib/droom/routing.rb +0 -13
- data/spec/datasets/calendar_events_dataset.rb +0 -44
- data/spec/datasets/calendar_pages_dataset.rb +0 -8
- data/spec/datasets/calendar_sites_dataset.rb +0 -6
- data/spec/datasets/calendars_dataset.rb +0 -34
- data/spec/datasets/documents_dataset.rb +0 -28
- data/spec/datasets/recurrence_dataset.rb +0 -7
- data/spec/dummy/config/sunspot.yml +0 -17
- data/spec/dummy/log/dav.log +0 -1
- data/spec/dummy/log/development.log +0 -2
- data/spec/dummy/log/test.log +0 -1
- data/spec/dummy/solr/conf/admin-extra.html +0 -31
- data/spec/dummy/solr/conf/elevate.xml +0 -36
- data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +0 -246
- data/spec/dummy/solr/conf/protwords.txt +0 -21
- data/spec/dummy/solr/conf/schema.xml +0 -238
- data/spec/dummy/solr/conf/scripts.conf +0 -24
- data/spec/dummy/solr/conf/solrconfig.xml +0 -934
- data/spec/dummy/solr/conf/spellings.txt +0 -2
- data/spec/dummy/solr/conf/stopwords.txt +0 -58
- data/spec/dummy/solr/conf/synonyms.txt +0 -31
- data/spec/dummy/solr/data/development/index/segments.gen +0 -0
- data/spec/dummy/solr/data/development/index/segments_1 +0 -0
- data/spec/dummy/solr/data/development/spellchecker/segments.gen +0 -0
- data/spec/dummy/solr/data/development/spellchecker/segments_1 +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_3nu +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments.gen +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- data/spec/factories/recurrence_rules.rb +0 -25
- data/spec/models/droom/person_spec.rb +0 -72
- data/spec/models/droom/recurrence_rule_spec.rb +0 -81
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
module Paperclip
|
|
2
|
+
# Handles thumbnailing images that are uploaded.
|
|
3
|
+
class OffsetThumbnail < Processor
|
|
4
|
+
|
|
5
|
+
attr_accessor :current_geometry, :target_geometry, :format, :whiny, :animated, :scale, :crop_and_offset
|
|
6
|
+
|
|
7
|
+
# List of formats that we need to preserve animation
|
|
8
|
+
ANIMATED_FORMATS = %w(gif)
|
|
9
|
+
|
|
10
|
+
# Creates a Thumbnail object set to work on the +file+ given. It
|
|
11
|
+
# will attempt to transform the image into one defined by +target_geometry+
|
|
12
|
+
# which is a "WxH"-style string. +format+ will be inferred from the +file+
|
|
13
|
+
# unless specified. Thumbnail creation will raise no errors unless
|
|
14
|
+
# +whiny+ is true (which it is, by default. If +convert_options+ is
|
|
15
|
+
# set, the options will be appended to the convert command upon image conversion
|
|
16
|
+
#
|
|
17
|
+
# Options include:
|
|
18
|
+
#
|
|
19
|
+
# +geometry+ - the desired width and height of the thumbnail (required)
|
|
20
|
+
# +file_geometry_parser+ - an object with a method named +from_file+ that takes an image file and produces its geometry and a +transformation_to+. Defaults to Paperclip::Geometry
|
|
21
|
+
# +string_geometry_parser+ - an object with a method named +parse+ that takes a string and produces an object with +width+, +height+, and +to_s+ accessors. Defaults to Paperclip::Geometry
|
|
22
|
+
# +source_file_options+ - flags passed to the +convert+ command that influence how the source file is read
|
|
23
|
+
# +convert_options+ - flags passed to the +convert+ command that influence how the image is processed
|
|
24
|
+
# +whiny+ - whether to raise an error when processing fails. Defaults to true
|
|
25
|
+
# +format+ - the desired filename extension
|
|
26
|
+
# +animated+ - whether to merge all the layers in the image. Defaults to true
|
|
27
|
+
def initialize(file, options = {}, attachment = nil)
|
|
28
|
+
super
|
|
29
|
+
|
|
30
|
+
geometry = options[:geometry] # this is not an option
|
|
31
|
+
@file = file
|
|
32
|
+
@crop = geometry[-1,1] == '#'
|
|
33
|
+
@target_geometry = (options[:string_geometry_parser] || Geometry).parse(geometry)
|
|
34
|
+
@current_geometry = (options[:file_geometry_parser] || Geometry).from_file(@file)
|
|
35
|
+
@whiny = options[:whiny].nil? ? true : options[:whiny]
|
|
36
|
+
@format = options[:format]
|
|
37
|
+
@animated = options[:animated].nil? ? true : options[:animated]
|
|
38
|
+
@scale = options[:scale]
|
|
39
|
+
@crop_and_offset = options[:crop_and_offset]
|
|
40
|
+
@current_format = File.extname(@file.path)
|
|
41
|
+
@basename = File.basename(@file.path, @current_format)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Performs the conversion of the +file+ into a thumbnail. Returns the Tempfile
|
|
45
|
+
# that contains the new image.
|
|
46
|
+
def make
|
|
47
|
+
src = @file
|
|
48
|
+
dst = Tempfile.new([@basename, @format ? ".#{@format}" : ''])
|
|
49
|
+
dst.binmode
|
|
50
|
+
|
|
51
|
+
begin
|
|
52
|
+
parameters = []
|
|
53
|
+
parameters << ":source"
|
|
54
|
+
parameters << transformation_command
|
|
55
|
+
parameters << ":dest"
|
|
56
|
+
|
|
57
|
+
parameters = parameters.flatten.compact.join(" ").strip.squeeze(" ")
|
|
58
|
+
|
|
59
|
+
success = Paperclip.run("convert", parameters, :source => "#{File.expand_path(src.path)}#{'[0]' unless animated?}", :dest => File.expand_path(dst.path))
|
|
60
|
+
rescue Cocaine::ExitStatusError => e
|
|
61
|
+
raise Paperclip::Error, "There was an error processing the thumbnail for #{@basename}: #{e}" if @whiny
|
|
62
|
+
rescue Cocaine::CommandNotFoundError => e
|
|
63
|
+
raise Paperclip::CommandNotFoundError.new("Could not run the `convert` command. Please install ImageMagick.")
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
dst
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Returns the arguments to ImageMagick's +convert+ that will transform the image into the thumbnail.
|
|
70
|
+
def transformation_command
|
|
71
|
+
trans = []
|
|
72
|
+
trans << "-coalesce" if animated?
|
|
73
|
+
trans << "-resize" << %["#{scale}"] unless scale.nil? || scale.empty?
|
|
74
|
+
trans << "-crop" << %["#{crop_and_offset}"] << "+repage"
|
|
75
|
+
trans
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
protected
|
|
79
|
+
|
|
80
|
+
# Return true if the format is animated
|
|
81
|
+
def animated?
|
|
82
|
+
@animated && ANIMATED_FORMATS.include?(@current_format[1..-1]) && (ANIMATED_FORMATS.include?(@format.to_s) || @format.blank?)
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -4,7 +4,6 @@ require File.expand_path('../boot', __FILE__)
|
|
|
4
4
|
require "active_record/railtie"
|
|
5
5
|
require "action_controller/railtie"
|
|
6
6
|
require "action_mailer/railtie"
|
|
7
|
-
require "active_resource/railtie"
|
|
8
7
|
require "sprockets/railtie"
|
|
9
8
|
# require "rails/test_unit/railtie"
|
|
10
9
|
|
|
@@ -49,12 +48,6 @@ module Dummy
|
|
|
49
48
|
# like if you have constraints or database-specific column types
|
|
50
49
|
# config.active_record.schema_format = :sql
|
|
51
50
|
|
|
52
|
-
# Enforce whitelist mode for mass assignment.
|
|
53
|
-
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
|
54
|
-
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
|
55
|
-
# parameters by using an attr_accessible or attr_protected declaration.
|
|
56
|
-
config.active_record.whitelist_attributes = true
|
|
57
|
-
|
|
58
51
|
# Enable the asset pipeline
|
|
59
52
|
config.assets.enabled = true
|
|
60
53
|
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
Dummy::Application.configure do
|
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb
|
|
3
|
+
config.eager_load = false
|
|
3
4
|
|
|
4
5
|
# In the development environment your application's code is reloaded on
|
|
5
6
|
# every request. This slows down response time but is perfect for development
|
|
6
7
|
# since you don't have to restart the web server when you make code changes.
|
|
7
8
|
config.cache_classes = false
|
|
8
9
|
|
|
9
|
-
# Log error messages when you accidentally call methods on nil.
|
|
10
|
-
config.whiny_nils = true
|
|
11
|
-
|
|
12
10
|
# Show full error reports and disable caching
|
|
13
11
|
config.consider_all_requests_local = true
|
|
14
12
|
config.action_controller.perform_caching = false
|
|
@@ -23,13 +21,6 @@ Dummy::Application.configure do
|
|
|
23
21
|
# Only use best-standards-support built into browsers
|
|
24
22
|
config.action_dispatch.best_standards_support = :builtin
|
|
25
23
|
|
|
26
|
-
# Raise exception on mass assignment protection for Active Record models
|
|
27
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
|
28
|
-
|
|
29
|
-
# Log the query plan for queries taking more than this (works
|
|
30
|
-
# with SQLite, MySQL, and PostgreSQL)
|
|
31
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
32
|
-
|
|
33
24
|
# Do not compress assets
|
|
34
25
|
config.assets.compress = false
|
|
35
26
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Dummy::Application.configure do
|
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb
|
|
3
|
-
|
|
3
|
+
config.eager_load = false
|
|
4
|
+
|
|
4
5
|
# The test environment is used exclusively to run your application's
|
|
5
6
|
# test suite. You never need to work with it otherwise. Remember that
|
|
6
7
|
# your test database is "scratch space" for the test suite and is wiped
|
|
@@ -11,9 +12,6 @@ Dummy::Application.configure do
|
|
|
11
12
|
config.serve_static_assets = true
|
|
12
13
|
config.static_cache_control = "public, max-age=3600"
|
|
13
14
|
|
|
14
|
-
# Log error messages when you accidentally call methods on nil
|
|
15
|
-
config.whiny_nils = true
|
|
16
|
-
|
|
17
15
|
# Show full error reports and disable caching
|
|
18
16
|
config.consider_all_requests_local = true
|
|
19
17
|
config.action_controller.perform_caching = false
|
|
@@ -30,9 +28,6 @@ Dummy::Application.configure do
|
|
|
30
28
|
config.action_mailer.delivery_method = :test
|
|
31
29
|
config.action_mailer.default_url_options = { :host => 'dummy.host' }
|
|
32
30
|
|
|
33
|
-
# Raise exception on mass assignment protection for Active Record models
|
|
34
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
|
35
|
-
|
|
36
31
|
# Print deprecation notices to the stderr
|
|
37
32
|
config.active_support.deprecation = :stderr
|
|
38
33
|
end
|
|
@@ -3,6 +3,6 @@ class FolderAncestryToParents < ActiveRecord::Migration
|
|
|
3
3
|
def change
|
|
4
4
|
change_column :droom_folders, :ancestry, :integer
|
|
5
5
|
rename_column :droom_folders, :ancestry, :parent_id
|
|
6
|
-
remove_index :droom_folders, :ancestry
|
|
6
|
+
# remove_index :droom_folders, :ancestry
|
|
7
7
|
end
|
|
8
8
|
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This migration comes from droom (originally 20130116155331)
|
|
2
|
+
class DropboxTokens < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :droom_dropbox_tokens do |t|
|
|
5
|
+
t.column :created_by_id, :integer
|
|
6
|
+
t.column :access_token, :string
|
|
7
|
+
t.timestamps
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# This migration comes from droom (originally 20130207123614)
|
|
2
|
+
class Stream < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :droom_scraps do |t|
|
|
5
|
+
t.string :name
|
|
6
|
+
t.text :body
|
|
7
|
+
t.attachment :image
|
|
8
|
+
t.integer :created_by_id
|
|
9
|
+
t.string :scraptype
|
|
10
|
+
t.string :note
|
|
11
|
+
t.timestamps
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# This migration comes from droom (originally 20130217152644)
|
|
2
|
+
class DeviseConfirmable < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
add_column :droom_users, :confirmation_token, :string
|
|
5
|
+
add_column :droom_users, :confirmed_at, :datetime
|
|
6
|
+
add_column :droom_users, :confirmation_sent_at, :datetime
|
|
7
|
+
add_column :droom_users, :unconfirmed_email, :string
|
|
8
|
+
add_index :droom_users, :confirmation_token, :unique => true
|
|
9
|
+
|
|
10
|
+
remove_column :droom_users, :invited_at
|
|
11
|
+
remove_column :droom_users, :invited_by_id
|
|
12
|
+
remove_column :droom_users, :activated_at
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This migration comes from droom (originally 20130225095328)
|
|
2
|
+
class CreateDroomCalendars < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :droom_calendars do |t|
|
|
5
|
+
t.string :name
|
|
6
|
+
t.string :slug
|
|
7
|
+
t.boolean :events_private, :default => false
|
|
8
|
+
t.boolean :documents_private, :default => false
|
|
9
|
+
t.integer :created_by_id
|
|
10
|
+
t.timestamps
|
|
11
|
+
end
|
|
12
|
+
add_index :droom_calendars, :slug
|
|
13
|
+
|
|
14
|
+
add_column :droom_events, :calendar_id, :integer
|
|
15
|
+
add_index :droom_events, :calendar_id
|
|
16
|
+
|
|
17
|
+
add_column :droom_scraps, :event_id, :integer
|
|
18
|
+
add_index :droom_scraps, :event_id
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This migration comes from droom (originally 20130228083509)
|
|
2
|
+
class Privateness < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
add_column :droom_folders, :private, :boolean
|
|
5
|
+
rename_column :droom_documents, :secret, :private
|
|
6
|
+
rename_column :droom_people, :shy, :private
|
|
7
|
+
add_column :droom_groups, :private, :boolean
|
|
8
|
+
add_column :droom_groups, :public, :boolean
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# This migration comes from droom (originally 20130305151936)
|
|
2
|
+
class Niceties < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
add_column :droom_invitations, :response, :integer, :default => 1
|
|
5
|
+
add_column :droom_groups, :privileged, :boolean, :default => false
|
|
6
|
+
add_column :droom_people, :privileged, :boolean, :default => false
|
|
7
|
+
end
|
|
8
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# This migration comes from droom (originally 20130308103807)
|
|
2
|
+
class CreateDroomDropboxDocuments < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :droom_dropbox_documents do |t|
|
|
5
|
+
t.integer :person_id
|
|
6
|
+
t.string :path
|
|
7
|
+
t.integer :document_id
|
|
8
|
+
t.boolean :deleted
|
|
9
|
+
t.timestamps
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# This migration comes from droom (originally 20130627065459)
|
|
2
|
+
class Permissions < ActiveRecord::Migration
|
|
3
|
+
|
|
4
|
+
def change
|
|
5
|
+
create_table :droom_services do |t|
|
|
6
|
+
t.string :name
|
|
7
|
+
t.string :slug
|
|
8
|
+
t.string :url
|
|
9
|
+
t.text :description
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
create_table :droom_permissions do |t|
|
|
13
|
+
t.integer :service_id
|
|
14
|
+
t.string :name
|
|
15
|
+
t.string :slug
|
|
16
|
+
t.text :description
|
|
17
|
+
t.integer :position
|
|
18
|
+
t.timestamps
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
create_table :droom_group_permissions do |t|
|
|
22
|
+
t.integer :group_id
|
|
23
|
+
t.integer :permission_id
|
|
24
|
+
t.timestamps
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
create_table :droom_user_permissions do |t|
|
|
28
|
+
t.integer :user_id
|
|
29
|
+
t.integer :group_permission_id
|
|
30
|
+
t.integer :permission_id
|
|
31
|
+
t.timestamps
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# This migration comes from droom (originally 20130627071938)
|
|
2
|
+
class UsersTakeOver < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
add_column :droom_invitations, :user_id, :integer
|
|
5
|
+
add_column :droom_memberships, :user_id, :integer
|
|
6
|
+
add_column :droom_personal_folders, :user_id, :integer
|
|
7
|
+
add_column :droom_dropbox_documents, :user_id, :integer
|
|
8
|
+
|
|
9
|
+
add_index :droom_invitations, :user_id
|
|
10
|
+
add_index :droom_memberships, :user_id
|
|
11
|
+
add_index :droom_personal_folders, :user_id
|
|
12
|
+
add_index :droom_dropbox_documents, :user_id
|
|
13
|
+
|
|
14
|
+
user_ids_by_person = Droom::Person.all.each_with_object({}) do |person, carrier|
|
|
15
|
+
carrier[person.id] = person.user.id if person.user
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
Droom::Invitation.reset_column_information
|
|
19
|
+
Droom::Invitation.all.each do |inv|
|
|
20
|
+
inv.update_column :user_id, user_ids_by_person[inv.person_id]
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
Droom::Membership.reset_column_information
|
|
24
|
+
Droom::Membership.all.each do |mem|
|
|
25
|
+
mem.update_column :user_id, user_ids_by_person[mem.person_id]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
Droom::PersonalFolder.reset_column_information
|
|
29
|
+
Droom::PersonalFolder.all.each do |pf|
|
|
30
|
+
pf.update_column :user_id, user_ids_by_person[pf.person_id]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
Droom::DropboxDocument.reset_column_information
|
|
34
|
+
Droom::DropboxDocument.all.each do |dd|
|
|
35
|
+
dd.update_column :user_id, user_ids_by_person[dd.person_id]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# This migration comes from droom (originally 20130627073759)
|
|
2
|
+
class UserProperties < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
add_column :droom_users, :uid, :string
|
|
5
|
+
add_column :droom_users, :organisation_id, :integer
|
|
6
|
+
add_column :droom_users, :phone, :string
|
|
7
|
+
add_column :droom_users, :description, :text
|
|
8
|
+
add_column :droom_users, :post_line1, :string
|
|
9
|
+
add_column :droom_users, :post_line2, :string
|
|
10
|
+
add_column :droom_users, :post_city, :string
|
|
11
|
+
add_column :droom_users, :post_region, :string
|
|
12
|
+
add_column :droom_users, :post_country, :string
|
|
13
|
+
add_column :droom_users, :post_code, :string
|
|
14
|
+
add_column :droom_users, :mobile, :string
|
|
15
|
+
add_column :droom_users, :dob, :datetime
|
|
16
|
+
add_column :droom_users, :private, :boolean
|
|
17
|
+
add_column :droom_users, :public, :boolean
|
|
18
|
+
add_column :droom_users, :female, :boolean
|
|
19
|
+
add_attachment :droom_users, :image
|
|
20
|
+
add_column :droom_users, :image_offset_top, :integer
|
|
21
|
+
add_column :droom_users, :image_offset_left, :integer
|
|
22
|
+
add_column :droom_users, :image_scale_width, :integer
|
|
23
|
+
add_column :droom_users, :image_scale_height, :integer
|
|
24
|
+
|
|
25
|
+
Droom::User.reset_column_information
|
|
26
|
+
Droom::Person.all.each do |p|
|
|
27
|
+
if u = Droom::User.find(p.user_id)
|
|
28
|
+
u.update_attributes p.attributes.slice(*%w{organisation_id phone description description post_line1 post_line2 post_city post_region post_country post_code mobile image})
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|