calagator 0.0.1.pre1
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/LICENSE.txt +23 -0
- data/README.md +75 -0
- data/Rakefile +12 -0
- data/app/assets/images/confused-alligator-sm.png +0 -0
- data/app/assets/images/disk.png +0 -0
- data/app/assets/images/edit.png +0 -0
- data/app/assets/images/external_sites/epdx.png +0 -0
- data/app/assets/images/external_sites/external.gif +0 -0
- data/app/assets/images/external_sites/facebook.png +0 -0
- data/app/assets/images/external_sites/foursquare.png +0 -0
- data/app/assets/images/external_sites/gowalla.png +0 -0
- data/app/assets/images/external_sites/lanyrd.png +0 -0
- data/app/assets/images/external_sites/meetup.png +0 -0
- data/app/assets/images/external_sites/plancast.png +0 -0
- data/app/assets/images/external_sites/shizzow.png +0 -0
- data/app/assets/images/external_sites/upcoming.png +0 -0
- data/app/assets/images/external_sites/yelp.png +0 -0
- data/app/assets/images/feed.png +0 -0
- data/app/assets/images/heart.png +0 -0
- data/app/assets/images/icon_ical.gif +0 -0
- data/app/assets/images/information.png +0 -0
- data/app/assets/images/nav_marker.gif +0 -0
- data/app/assets/images/nav_marker.png +0 -0
- data/app/assets/images/plus.png +0 -0
- data/app/assets/images/redx.png +0 -0
- data/app/assets/images/site-icon.png +0 -0
- data/app/assets/images/spinner.gif +0 -0
- data/app/assets/images/star.png +0 -0
- data/app/assets/images/subnav_marker.gif +0 -0
- data/app/assets/images/subnav_marker.png +0 -0
- data/app/assets/images/tag_blue.png +0 -0
- data/app/assets/images/tag_icons/angular.png +0 -0
- data/app/assets/images/tag_icons/beer.png +0 -0
- data/app/assets/images/tag_icons/bitcoin.png +0 -0
- data/app/assets/images/tag_icons/free.png +0 -0
- data/app/assets/images/tag_icons/golang.png +0 -0
- data/app/assets/images/tag_icons/html.png +0 -0
- data/app/assets/images/tag_icons/javascript.png +0 -0
- data/app/assets/images/tag_icons/linux.png +0 -0
- data/app/assets/images/tag_icons/php.png +0 -0
- data/app/assets/images/tag_icons/pizza.png +0 -0
- data/app/assets/images/tag_icons/python.png +0 -0
- data/app/assets/images/tag_icons/rails.png +0 -0
- data/app/assets/images/tag_icons/ruby.png +0 -0
- data/app/assets/images/tag_icons/sass.png +0 -0
- data/app/assets/images/tag_icons/swift.png +0 -0
- data/app/assets/images/transmit_blue.png +0 -0
- data/app/assets/images/weekday_background.gif +0 -0
- data/app/assets/javascripts/calagator.js +18 -0
- data/app/assets/javascripts/calagator/forms.js +60 -0
- data/app/assets/stylesheets/calagator.scss +8 -0
- data/app/assets/stylesheets/calagator/common.scss +14 -0
- data/app/assets/stylesheets/calagator/datepicker.scss +177 -0
- data/app/assets/stylesheets/calagator/errors.css +110 -0
- data/app/assets/stylesheets/calagator/forms.scss +4 -0
- data/app/assets/stylesheets/calagator/reset.css +40 -0
- data/app/assets/stylesheets/calagator/theme.css +0 -0
- data/app/controllers/calagator/admin_controller.rb +27 -0
- data/app/controllers/calagator/application_controller.rb +82 -0
- data/app/controllers/calagator/events_controller.rb +171 -0
- data/app/controllers/calagator/site_controller.rb +35 -0
- data/app/controllers/calagator/sources_controller.rb +94 -0
- data/app/controllers/calagator/venues_controller.rb +133 -0
- data/app/controllers/calagator/versions_controller.rb +20 -0
- data/app/helpers/calagator/application_helper.rb +128 -0
- data/app/helpers/calagator/events_helper.rb +184 -0
- data/app/helpers/calagator/google_event_export_helper.rb +67 -0
- data/app/helpers/calagator/mapping_helper.rb +103 -0
- data/app/helpers/calagator/sources_helper.rb +10 -0
- data/app/helpers/calagator/tags_helper.rb +42 -0
- data/app/helpers/calagator/time_range_helper.rb +166 -0
- data/app/models/calagator/event.rb +246 -0
- data/app/models/calagator/event/cloner.rb +39 -0
- data/app/models/calagator/event/ical_renderer.rb +155 -0
- data/app/models/calagator/event/overview.rb +45 -0
- data/app/models/calagator/event/saver.rb +58 -0
- data/app/models/calagator/event/search.rb +72 -0
- data/app/models/calagator/event/search_engine.rb +28 -0
- data/app/models/calagator/event/search_engine/apache_sunspot.rb +106 -0
- data/app/models/calagator/event/search_engine/sql.rb +107 -0
- data/app/models/calagator/source.rb +115 -0
- data/app/models/calagator/source/importer.rb +46 -0
- data/app/models/calagator/source/parser.rb +128 -0
- data/app/models/calagator/source/parser/facebook.rb +67 -0
- data/app/models/calagator/source/parser/hcal.rb +108 -0
- data/app/models/calagator/source/parser/http_authentication_required_error.rb +6 -0
- data/app/models/calagator/source/parser/ical.rb +186 -0
- data/app/models/calagator/source/parser/meetup.rb +72 -0
- data/app/models/calagator/source/parser/not_found.rb +9 -0
- data/app/models/calagator/source/parser/plancast.rb +59 -0
- data/app/models/calagator/venue.rb +161 -0
- data/app/models/calagator/venue/geocoder.rb +51 -0
- data/app/models/calagator/venue/search.rb +63 -0
- data/app/models/calagator/venue/search_engine.rb +24 -0
- data/app/models/calagator/venue/search_engine/apache_sunspot.rb +85 -0
- data/app/models/calagator/venue/search_engine/sql.rb +68 -0
- data/app/models/event/search_engine/base.rb +0 -0
- data/app/observers/calagator/cache_observer.rb +37 -0
- data/app/views/calagator/admin/events.html.erb +28 -0
- data/app/views/calagator/admin/index.html.erb +8 -0
- data/app/views/calagator/events/_feed_item.html.erb +62 -0
- data/app/views/calagator/events/_form.html.erb +63 -0
- data/app/views/calagator/events/_gcal_reminder.html.erb +1 -0
- data/app/views/calagator/events/_hcal.html.erb +41 -0
- data/app/views/calagator/events/_item.html.erb +120 -0
- data/app/views/calagator/events/_list.html.erb +30 -0
- data/app/views/calagator/events/_list_item.html.erb +37 -0
- data/app/views/calagator/events/_search_section.html.erb +15 -0
- data/app/views/calagator/events/_subnav.html.erb +13 -0
- data/app/views/calagator/events/_table.html.erb +74 -0
- data/app/views/calagator/events/duplicates.html.erb +58 -0
- data/app/views/calagator/events/edit.html.erb +3 -0
- data/app/views/calagator/events/index.atom.builder +32 -0
- data/app/views/calagator/events/index.html.erb +51 -0
- data/app/views/calagator/events/index.kml.erb +20 -0
- data/app/views/calagator/events/new.html.erb +7 -0
- data/app/views/calagator/events/search.html.erb +25 -0
- data/app/views/calagator/events/show.html.erb +81 -0
- data/app/views/calagator/site/_appropriateness_message.html.erb +15 -0
- data/app/views/calagator/site/_description.html.erb +3 -0
- data/app/views/calagator/site/about.html.erb +7 -0
- data/app/views/calagator/site/defunct.html.erb +15 -0
- data/app/views/calagator/site/export.html.erb +4 -0
- data/app/views/calagator/site/index.html.erb +40 -0
- data/app/views/calagator/site/opensearch.xml.builder +8 -0
- data/app/views/calagator/sources/_subnav.html.erb +0 -0
- data/app/views/calagator/sources/edit.html.erb +12 -0
- data/app/views/calagator/sources/import.html.erb +10 -0
- data/app/views/calagator/sources/index.html.erb +22 -0
- data/app/views/calagator/sources/new.html.erb +32 -0
- data/app/views/calagator/sources/show.html.erb +16 -0
- data/app/views/calagator/venues/_form.html.erb +57 -0
- data/app/views/calagator/venues/_subnav.html.erb +10 -0
- data/app/views/calagator/venues/duplicates.html.erb +65 -0
- data/app/views/calagator/venues/edit.html.erb +3 -0
- data/app/views/calagator/venues/index.html.erb +93 -0
- data/app/views/calagator/venues/index.kml.erb +15 -0
- data/app/views/calagator/venues/map.html.erb +4 -0
- data/app/views/calagator/venues/new.html.erb +5 -0
- data/app/views/calagator/venues/show.html.erb +113 -0
- data/app/views/calagator/versions/_chooser.html.erb +28 -0
- data/app/views/calagator/versions/_edit_with_chooser.html.erb +16 -0
- data/app/views/layouts/calagator/application.html.erb +110 -0
- data/config/deploy/local.rb +37 -0
- data/config/deploy/lucca.rb +33 -0
- data/config/initializers/dates.rb +7 -0
- data/config/initializers/formtastic.rb +82 -0
- data/config/initializers/geokit.rb +74 -0
- data/config/initializers/ics_renderer.rb +6 -0
- data/config/initializers/load_tag_model_extensions.rb +3 -0
- data/config/initializers/mime_types.rb +9 -0
- data/config/initializers/observers.rb +1 -0
- data/config/initializers/search_engine.rb +4 -0
- data/config/initializers/set_default_url_host.rb +5 -0
- data/config/initializers/time_get_zone.rb +8 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +55 -0
- data/config/secrets.yml.blag +75 -0
- data/config/sunspot.yml +23 -0
- data/db/development.sqlite3 +0 -0
- data/db/development.sqlite3.bak +0 -0
- data/db/development.sqlite3.old +0 -0
- data/db/development~20111112@110950.sqlite3 +0 -0
- data/db/migrate/001_create_events.rb +17 -0
- data/db/migrate/002_create_venues.rb +17 -0
- data/db/migrate/003_create_sources.rb +16 -0
- data/db/migrate/004_add_detailed_fields_to_venue.rb +19 -0
- data/db/migrate/005_add_end_time_to_events.rb +9 -0
- data/db/migrate/006_add_source_id_to_events.rb +9 -0
- data/db/migrate/008_add_source_id_to_venues.rb +10 -0
- data/db/migrate/009_add_duplicate_of_column_to_venues.rb +9 -0
- data/db/migrate/010_add_duplicate_of_column_to_events.rb +9 -0
- data/db/migrate/011_change_lat_long_type.rb +12 -0
- data/db/migrate/012_add_source_reimport.rb +9 -0
- data/db/migrate/013_change_end_time_to_duration.rb +11 -0
- data/db/migrate/014_remove_format_type_from_source.rb +9 -0
- data/db/migrate/015_create_updates.rb +15 -0
- data/db/migrate/016_remove_next_update_from_source.rb +9 -0
- data/db/migrate/20080705163959_change_duration_to_end_time.rb +11 -0
- data/db/migrate/20080705164959_create_tags_and_taggings.rb +28 -0
- data/db/migrate/20081011181519_create_versioned_events.rb +25 -0
- data/db/migrate/20081011193124_create_versioned_venues.rb +32 -0
- data/db/migrate/20081115190515_add_rrule_to_events.rb +15 -0
- data/db/migrate/20090912082129_create_versions.rb +18 -0
- data/db/migrate/20110219205156_add_closed_flag_to_venues.rb +9 -0
- data/db/migrate/20110220001008_add_wifi_flag_to_venues.rb +9 -0
- data/db/migrate/20110220011427_add_access_notes_to_venues.rb +9 -0
- data/db/migrate/20110220031117_add_events_count_to_venues.rb +8 -0
- data/db/migrate/20110604174521_add_venue_details_to_events.rb +9 -0
- data/db/migrate/20110717231316_acts_as_taggable_on_migration.rb +50 -0
- data/db/migrate/20120709092821_cleanup.rb +14 -0
- data/db/migrate/20120831234448_specify_venues_latitude_and_longitude_precision.rb +11 -0
- data/db/migrate/20150206085809_remove_updates.rb +13 -0
- data/db/migrate/20150207231355_add_locked_status_to_events.rb +5 -0
- data/db/production.sqlite3 +0 -0
- data/db/schema.rb +102 -0
- data/db/seeds.rb +16 -0
- data/db/test.sqlite3 +0 -0
- data/db/test2.sqlite3 +0 -0
- data/lib/calagator.rb +30 -0
- data/lib/calagator/blacklist_validator.rb +69 -0
- data/lib/calagator/decode_html_entities_hack.rb +33 -0
- data/lib/calagator/duplicate_checking.rb +133 -0
- data/lib/calagator/duplicate_checking/controller_actions.rb +38 -0
- data/lib/calagator/duplicate_checking/duplicate_finder.rb +83 -0
- data/lib/calagator/duplicate_checking/duplicate_squasher.rb +74 -0
- data/lib/calagator/engine.rb +30 -0
- data/lib/calagator/strip_whitespace.rb +19 -0
- data/lib/calagator/tag_model_extensions.rb +104 -0
- data/lib/calagator/url_prefixer.rb +9 -0
- data/lib/calagator/version.rb +3 -0
- data/lib/generators/calagator/install_generator.rb +39 -0
- data/lib/generators/calagator/templates/config/calagator.rb +26 -0
- data/lib/generators/calagator/templates/config/secrets.yml.sample +83 -0
- data/lib/secrets_reader.rb +76 -0
- data/lib/tasks/spec_db.rake +53 -0
- data/lib/tasks/sunspot_reindex_calagator.rake +6 -0
- data/lib/tasks/sunspot_solr_restart_enhancements.rake +19 -0
- data/lib/tasks/update_counter_caches.rake +13 -0
- data/lib/templates/erb/scaffold/_form.html.erb +11 -0
- data/lib/theme_reader.rb +17 -0
- data/lib/wait_for_solr.rb +25 -0
- data/spec/controllers/calagator/application_controller_spec.rb +47 -0
- data/spec/controllers/calagator/events_controller_spec.rb +794 -0
- data/spec/controllers/calagator/site_controller_spec.rb +59 -0
- data/spec/controllers/calagator/sources_controller_spec.rb +439 -0
- data/spec/controllers/calagator/venues_controller_spec.rb +319 -0
- data/spec/controllers/calagator/versions_controller_spec.rb +82 -0
- data/spec/controllers/squash_many_duplicates_examples.rb +49 -0
- data/spec/dummy/Gemfile +39 -0
- data/spec/dummy/Gemfile.lock +195 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/images/rails.png +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +16 -0
- data/spec/dummy/app/assets/stylesheets/application.css +14 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +62 -0
- data/spec/dummy/config/boot.rb +6 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/calagator.rb +26 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +59 -0
- data/spec/dummy/config/secrets.yml +83 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20150309023304_create_events.calagator.rb +18 -0
- data/spec/dummy/db/migrate/20150309023305_create_venues.calagator.rb +18 -0
- data/spec/dummy/db/migrate/20150309023306_create_sources.calagator.rb +17 -0
- data/spec/dummy/db/migrate/20150309023307_add_detailed_fields_to_venue.calagator.rb +20 -0
- data/spec/dummy/db/migrate/20150309023308_add_end_time_to_events.calagator.rb +10 -0
- data/spec/dummy/db/migrate/20150309023309_add_source_id_to_events.calagator.rb +10 -0
- data/spec/dummy/db/migrate/20150309023310_add_source_id_to_venues.calagator.rb +11 -0
- data/spec/dummy/db/migrate/20150309023311_add_duplicate_of_column_to_venues.calagator.rb +10 -0
- data/spec/dummy/db/migrate/20150309023312_add_duplicate_of_column_to_events.calagator.rb +10 -0
- data/spec/dummy/db/migrate/20150309023313_change_lat_long_type.calagator.rb +13 -0
- data/spec/dummy/db/migrate/20150309023314_add_source_reimport.calagator.rb +10 -0
- data/spec/dummy/db/migrate/20150309023315_change_end_time_to_duration.calagator.rb +12 -0
- data/spec/dummy/db/migrate/20150309023316_remove_format_type_from_source.calagator.rb +10 -0
- data/spec/dummy/db/migrate/20150309023317_create_updates.calagator.rb +16 -0
- data/spec/dummy/db/migrate/20150309023318_remove_next_update_from_source.calagator.rb +10 -0
- data/spec/dummy/db/migrate/20150309023319_change_duration_to_end_time.calagator.rb +12 -0
- data/spec/dummy/db/migrate/20150309023320_create_tags_and_taggings.calagator.rb +29 -0
- data/spec/dummy/db/migrate/20150309023321_create_versioned_events.calagator.rb +26 -0
- data/spec/dummy/db/migrate/20150309023322_create_versioned_venues.calagator.rb +33 -0
- data/spec/dummy/db/migrate/20150309023323_add_rrule_to_events.calagator.rb +16 -0
- data/spec/dummy/db/migrate/20150309023324_create_versions.calagator.rb +19 -0
- data/spec/dummy/db/migrate/20150309023325_add_closed_flag_to_venues.calagator.rb +10 -0
- data/spec/dummy/db/migrate/20150309023326_add_wifi_flag_to_venues.calagator.rb +10 -0
- data/spec/dummy/db/migrate/20150309023327_add_access_notes_to_venues.calagator.rb +10 -0
- data/spec/dummy/db/migrate/20150309023328_add_events_count_to_venues.calagator.rb +9 -0
- data/spec/dummy/db/migrate/20150309023329_add_venue_details_to_events.calagator.rb +10 -0
- data/spec/dummy/db/migrate/20150309023330_acts_as_taggable_on_migration.calagator.rb +51 -0
- data/spec/dummy/db/migrate/20150309023331_cleanup.calagator.rb +15 -0
- data/spec/dummy/db/migrate/20150309023332_specify_venues_latitude_and_longitude_precision.calagator.rb +12 -0
- data/spec/dummy/db/migrate/20150309023333_remove_updates.calagator.rb +14 -0
- data/spec/dummy/db/migrate/20150309023334_add_locked_status_to_events.calagator.rb +6 -0
- data/spec/dummy/db/schema.rb +95 -0
- data/spec/dummy/db/seeds.rb +7 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/doc/README_FOR_APP +2 -0
- data/spec/dummy/log/development.log +273 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/robots.txt +5 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/test/performance/browsing_test.rb +12 -0
- data/spec/dummy/test/test_helper.rb +13 -0
- data/spec/factories.rb +93 -0
- data/spec/features/add_event_spec.rb +99 -0
- data/spec/features/add_venue_spec.rb +34 -0
- data/spec/features/admin_auth_spec.rb +22 -0
- data/spec/features/admin_lock_event_spec.rb +41 -0
- data/spec/features/import_events_from_feed_spec.rb +43 -0
- data/spec/features/managing_event_spec.rb +111 -0
- data/spec/features/managing_venue_spec.rb +71 -0
- data/spec/features/search_event_spec.rb +27 -0
- data/spec/helpers/calagator/application_helper_spec.rb +82 -0
- data/spec/helpers/calagator/events_helper_spec.rb +172 -0
- data/spec/helpers/calagator/google_event_export_helper_spec.rb +70 -0
- data/spec/helpers/calagator/sources_helper_spec.rb +12 -0
- data/spec/helpers/calagator/tags_helper_spec.rb +85 -0
- data/spec/helpers/calagator/time_range_helper_spec.rb +59 -0
- data/spec/lib/calagator/blacklist_validator_spec.rb +65 -0
- data/spec/lib/calagator/decode_html_entities_hack_spec.rb +54 -0
- data/spec/lib/calagator/settings_spec.rb +20 -0
- data/spec/lib/calagator/url_prefixer_spec.rb +33 -0
- data/spec/lib/secrets_reader_spec.rb +65 -0
- data/spec/models/calagator/event/cloner_spec.rb +43 -0
- data/spec/models/calagator/event/overview_spec.rb +79 -0
- data/spec/models/calagator/event/search_spec.rb +103 -0
- data/spec/models/calagator/event_search_spec.rb +149 -0
- data/spec/models/calagator/event_spec.rb +859 -0
- data/spec/models/calagator/source/parser_facebook_spec.rb +73 -0
- data/spec/models/calagator/source/parser_hcal_spec.rb +69 -0
- data/spec/models/calagator/source/parser_ical_non_standard_spec.rb +91 -0
- data/spec/models/calagator/source/parser_ical_spec.rb +322 -0
- data/spec/models/calagator/source/parser_meetup_spec.rb +69 -0
- data/spec/models/calagator/source/parser_plancast_spec.rb +53 -0
- data/spec/models/calagator/source/parser_spec.rb +238 -0
- data/spec/models/calagator/source_spec.rb +135 -0
- data/spec/models/calagator/venue/search_spec.rb +92 -0
- data/spec/models/calagator/venue_search_spec.rb +124 -0
- data/spec/models/calagator/venue_spec.rb +346 -0
- data/spec/models/tag_spec.rb +35 -0
- data/spec/rails_helper.rb +39 -0
- data/spec/spec_helper.rb +140 -0
- data/spec/support/disable_geocoding.rb +1 -0
- data/spec/support/http_samples.rb +5 -0
- data/spec/support/samples/facebook.json +23 -0
- data/spec/support/samples/hcal_basic.xml +6 -0
- data/spec/support/samples/hcal_dup_event_dup_venue.xml +13 -0
- data/spec/support/samples/hcal_event_duplicates_fixture.xml +13 -0
- data/spec/support/samples/hcal_event_wo_lat_and_long.xml +14 -0
- data/spec/support/samples/hcal_multiple.xml +16 -0
- data/spec/support/samples/hcal_same_event_twice_with_different_venues.xml +12 -0
- data/spec/support/samples/hcal_single.xml +8 -0
- data/spec/support/samples/hcal_two_identical_events.xml +14 -0
- data/spec/support/samples/hcal_upcoming_v1.html +412 -0
- data/spec/support/samples/hcal_upcoming_v2.html +749 -0
- data/spec/support/samples/hcal_upcoming_v3.html +685 -0
- data/spec/support/samples/hcal_upcoming_v4.html +761 -0
- data/spec/support/samples/ical_apple.ics +22 -0
- data/spec/support/samples/ical_apple_v3.ics +37 -0
- data/spec/support/samples/ical_basic.ics +15 -0
- data/spec/support/samples/ical_basic_with_duration.ics +16 -0
- data/spec/support/samples/ical_event_with_squashed_venue.ics +12 -0
- data/spec/support/samples/ical_eventful_many.ics +504 -0
- data/spec/support/samples/ical_gmt.ics +12 -0
- data/spec/support/samples/ical_google.ics +786 -0
- data/spec/support/samples/ical_multiple_calendars.ics +111 -0
- data/spec/support/samples/ical_upcoming.ics +36 -0
- data/spec/support/samples/ical_upcoming_many.ics +682 -0
- data/spec/support/samples/ical_upcoming_v2.ics +43 -0
- data/spec/support/samples/ical_z.ics +10 -0
- data/spec/support/samples/meetup.ics +16 -0
- data/spec/support/samples/meetup.json +31 -0
- data/spec/support/samples/plancast.ics +59 -0
- data/spec/support/samples/plancast.json +51 -0
- data/spec/support/samples/plancast_with_missing_venue.json +39 -0
- data/spec/support/samples/upcoming_v1.xml +8 -0
- data/spec/support/samples/upcoming_v2_with_invalid_utc_dates.xml +8 -0
- data/spec/support/time_convenience_methods.rb +8 -0
- data/spec/support/time_zones.rb +12 -0
- data/spec/support/url_helpers.rb +5 -0
- data/spec/support/wait_for_ajax.rb +15 -0
- data/spec/support/webmock.rb +8 -0
- data/spec/travis_spec.rb +7 -0
- metadata +1194 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
require "formtastic"
|
|
2
|
+
# --------------------------------------------------------------------------------------------------
|
|
3
|
+
# Please note: If you're subclassing Formtastic::FormBuilder, Formtastic uses
|
|
4
|
+
# class_attribute for these configuration attributes instead of the deprecated
|
|
5
|
+
# class_inheritable_attribute. The behaviour is slightly different with subclasses (especially
|
|
6
|
+
# around attributes with Hash or Array) values, so make sure you understand what's happening.
|
|
7
|
+
# See the documentation for class_attribute in ActiveSupport for more information.
|
|
8
|
+
# --------------------------------------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
# Set the default text field size when input is a string. Default is nil.
|
|
11
|
+
# Formtastic::FormBuilder.default_text_field_size = 50
|
|
12
|
+
|
|
13
|
+
# Set the default text area height when input is a text. Default is 20.
|
|
14
|
+
# Formtastic::FormBuilder.default_text_area_height = 5
|
|
15
|
+
|
|
16
|
+
# Set the default text area width when input is a text. Default is nil.
|
|
17
|
+
# Formtastic::FormBuilder.default_text_area_width = 50
|
|
18
|
+
|
|
19
|
+
# Should all fields be considered "required" by default?
|
|
20
|
+
# Defaults to true.
|
|
21
|
+
Formtastic::FormBuilder.all_fields_required_by_default = false
|
|
22
|
+
|
|
23
|
+
# Should select fields have a blank option/prompt by default?
|
|
24
|
+
# Defaults to true.
|
|
25
|
+
# Formtastic::FormBuilder.include_blank_for_select_by_default = true
|
|
26
|
+
|
|
27
|
+
# Set the string that will be appended to the labels/fieldsets which are required
|
|
28
|
+
# It accepts string or procs and the default is a localized version of
|
|
29
|
+
# '<abbr title="required">*</abbr>'. In other words, if you configure formtastic.required
|
|
30
|
+
# in your locale, it will replace the abbr title properly. But if you don't want to use
|
|
31
|
+
# abbr tag, you can simply give a string as below
|
|
32
|
+
# Formtastic::FormBuilder.required_string = "(required)"
|
|
33
|
+
|
|
34
|
+
# Set the string that will be appended to the labels/fieldsets which are optional
|
|
35
|
+
# Defaults to an empty string ("") and also accepts procs (see required_string above)
|
|
36
|
+
# Formtastic::FormBuilder.optional_string = "(optional)"
|
|
37
|
+
|
|
38
|
+
# Set the way inline errors will be displayed.
|
|
39
|
+
# Defaults to :sentence, valid options are :sentence, :list, :first and :none
|
|
40
|
+
# Formtastic::FormBuilder.inline_errors = :sentence
|
|
41
|
+
# Formtastic uses the following classes as default for hints, inline_errors and error list
|
|
42
|
+
|
|
43
|
+
# If you override the class here, please ensure to override it in your stylesheets as well
|
|
44
|
+
# Formtastic::FormBuilder.default_hint_class = "inline-hints"
|
|
45
|
+
# Formtastic::FormBuilder.default_inline_error_class = "inline-errors"
|
|
46
|
+
# Formtastic::FormBuilder.default_error_list_class = "errors"
|
|
47
|
+
|
|
48
|
+
# Set the method to call on label text to transform or format it for human-friendly
|
|
49
|
+
# reading when formtastic is used without object. Defaults to :humanize.
|
|
50
|
+
# Formtastic::FormBuilder.label_str_method = :humanize
|
|
51
|
+
|
|
52
|
+
# Set the array of methods to try calling on parent objects in :select and :radio inputs
|
|
53
|
+
# for the text inside each @<option>@ tag or alongside each radio @<input>@. The first method
|
|
54
|
+
# that is found on the object will be used.
|
|
55
|
+
# Defaults to ["to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
|
|
56
|
+
# Formtastic::FormBuilder.collection_label_methods = [
|
|
57
|
+
# "to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
|
|
58
|
+
|
|
59
|
+
# Additionally, you can customize the order for specific types of inputs.
|
|
60
|
+
# This is configured on a type basis and if a type is not found it will
|
|
61
|
+
# fall back to the default order as defined by #inline_order
|
|
62
|
+
# Formtastic::FormBuilder.custom_inline_order[:checkbox] = [:errors, :hints, :input]
|
|
63
|
+
# Formtastic::FormBuilder.custom_inline_order[:select] = [:hints, :input, :errors]
|
|
64
|
+
|
|
65
|
+
# Specifies if labels/hints for input fields automatically be looked up using I18n.
|
|
66
|
+
# Default value: true. Overridden for specific fields by setting value to true,
|
|
67
|
+
# i.e. :label => true, or :hint => true (or opposite depending on initialized value)
|
|
68
|
+
# Formtastic::FormBuilder_lookups_by_default = false
|
|
69
|
+
|
|
70
|
+
# You can add custom inputs or override parts of Formtastic by subclassing Formtastic::FormBuilder and
|
|
71
|
+
# specifying that class here. Defaults to Formtastic::FormBuilder.
|
|
72
|
+
# Formtastic::Helpers::FormHelper.builder = MyCustomBuilder
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
# # Hack to disable Formtastic's HTML5 'required' attributes until Chrome properly supports the novalidate option.
|
|
76
|
+
# module NoHtmlRequired
|
|
77
|
+
# def input_html_options_with_no_html_5_required_attribute
|
|
78
|
+
# input_html_options_without_no_html_5_required_attribute.merge(:required => nil)
|
|
79
|
+
# end
|
|
80
|
+
# end
|
|
81
|
+
# Formtastic::Inputs::Base::Html.send(:include, NoHtmlRequired)
|
|
82
|
+
# Formtastic::Inputs::Base::Html.send(:alias_method_chain, :input_html_options, :no_html_5_required_attribute)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
require 'geokit'
|
|
2
|
+
|
|
3
|
+
# CALAGATOR: Differences from the defaults are tagged like this below.
|
|
4
|
+
|
|
5
|
+
# remap Google V3 geocoder so we can reference it in provider list, see:
|
|
6
|
+
# https://github.com/geokit/geokit/issues/86
|
|
7
|
+
Geokit::Geocoders::Google3Geocoder = Geokit::Geocoders::GoogleGeocoder3
|
|
8
|
+
|
|
9
|
+
# These defaults are used in GeoKit::Mappable.distance_to and in acts_as_mappable
|
|
10
|
+
GeoKit::default_units = :miles
|
|
11
|
+
GeoKit::default_formula = :sphere
|
|
12
|
+
|
|
13
|
+
# This is the timeout value in seconds to be used for calls to the geocoder web
|
|
14
|
+
# services. For no timeout at all, comment out the setting. The timeout unit
|
|
15
|
+
# is in seconds.
|
|
16
|
+
GeoKit::Geocoders::request_timeout = 3
|
|
17
|
+
|
|
18
|
+
# These settings are used if web service calls must be routed through a proxy.
|
|
19
|
+
# These setting can be nil if not needed, otherwise, addr and port must be
|
|
20
|
+
# filled in at a minimum. If the proxy requires authentication, the username
|
|
21
|
+
# and password can be provided as well.
|
|
22
|
+
GeoKit::Geocoders::proxy_addr = nil
|
|
23
|
+
GeoKit::Geocoders::proxy_port = nil
|
|
24
|
+
GeoKit::Geocoders::proxy_user = nil
|
|
25
|
+
GeoKit::Geocoders::proxy_pass = nil
|
|
26
|
+
|
|
27
|
+
# This is your yahoo application key for the Yahoo Geocoder.
|
|
28
|
+
# See http://developer.yahoo.com/faq/index.html#appid
|
|
29
|
+
# and http://developer.yahoo.com/maps/rest/V1/geocode.html
|
|
30
|
+
GeoKit::Geocoders::yahoo = 'REPLACE_WITH_YOUR_YAHOO_KEY'
|
|
31
|
+
|
|
32
|
+
# This is your Google Maps geocoder key.
|
|
33
|
+
# See http://www.google.com/apis/maps/signup.html
|
|
34
|
+
# and http://www.google.com/apis/maps/documentation/#Geocoding_Examples
|
|
35
|
+
#
|
|
36
|
+
# CALAGATOR: was GeoKit::Geocoders::google = 'REPLACE_WITH_YOUR_GOOGLE_KEY',
|
|
37
|
+
# but since each developer needs their own, we get it from the secrets file.
|
|
38
|
+
#
|
|
39
|
+
google_key = SECRETS.mapping && SECRETS.mapping["google_maps_api_key"]
|
|
40
|
+
old_keys_path = Rails.root.join('config','geocoder_api_keys.yml')
|
|
41
|
+
|
|
42
|
+
if google_key
|
|
43
|
+
GeoKit::Geocoders::google = google_key
|
|
44
|
+
elsif File.exist? old_keys_path
|
|
45
|
+
raise "Loading keys from config/geocoder_api_keys.yml is deprecated. Please use config/secrets.yml instead."
|
|
46
|
+
else
|
|
47
|
+
puts "Warning: No Google Maps API key was set. Geocoding will not function."
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# This is your username and password for geocoder.us.
|
|
51
|
+
# To use the free service, the value can be set to nil or false. For
|
|
52
|
+
# usage tied to an account, the value should be set to username:password.
|
|
53
|
+
# See http://geocoder.us
|
|
54
|
+
# and http://geocoder.us/user/signup
|
|
55
|
+
GeoKit::Geocoders::geocoder_us = false
|
|
56
|
+
|
|
57
|
+
# This is your authorization key for geocoder.ca.
|
|
58
|
+
# To use the free service, the value can be set to nil or false. For
|
|
59
|
+
# usage tied to an account, set the value to the key obtained from
|
|
60
|
+
# Geocoder.ca.
|
|
61
|
+
# See http://geocoder.ca
|
|
62
|
+
# and http://geocoder.ca/?register=1
|
|
63
|
+
GeoKit::Geocoders::geocoder_ca = false
|
|
64
|
+
|
|
65
|
+
# This is the order in which the geocoders are called in a failover scenario
|
|
66
|
+
# If you only want to use a single geocoder, put a single symbol in the array.
|
|
67
|
+
# Valid symbols are :google, :yahoo, :us, and :ca.
|
|
68
|
+
# Be aware that there are Terms of Use restrictions on how you can use the
|
|
69
|
+
# various geocoders. Make sure you read up on relevant Terms of Use for each
|
|
70
|
+
# geocoder you are going to use.
|
|
71
|
+
#
|
|
72
|
+
# CALAGATOR: was [:google, :us], but this is all we need since we're Google-only.
|
|
73
|
+
#
|
|
74
|
+
GeoKit::Geocoders::provider_order = [:google3]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# Add new mime types for use in respond_to blocks:
|
|
4
|
+
# Mime::Type.register "text/richtext", :rtf
|
|
5
|
+
# Mime::Type.register_alias "text/html", :iphone
|
|
6
|
+
|
|
7
|
+
Mime::Type.register "application/vnd.google-earth.kml+xml", :kml
|
|
8
|
+
Mime::Type.register "application/sqlite3", :sqlite3
|
|
9
|
+
Mime::Type.register "application/data", :data
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ActiveRecord::Base.observers << Calagator::CacheObserver
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# `ri_cal` relies on a monkeypatch that was removed in Rails 3.1. This adds it back because `ri_cal` hasn't been updated to deal with this.
|
|
2
|
+
class Time
|
|
3
|
+
unless respond_to?(:get_zone)
|
|
4
|
+
def self.get_zone(time_zone)
|
|
5
|
+
return self.find_zone(time_zone)
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
data/config/routes.rb
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Calagator::Engine.routes.draw do
|
|
2
|
+
match 'omfg' => 'site#omfg'
|
|
3
|
+
match 'hello' => 'site#hello'
|
|
4
|
+
|
|
5
|
+
match 'about' => 'site#about'
|
|
6
|
+
|
|
7
|
+
match 'opensearch.:format' => 'site#opensearch'
|
|
8
|
+
match 'defunct' => 'site#defunct'
|
|
9
|
+
|
|
10
|
+
match 'admin' => 'admin#index'
|
|
11
|
+
get "admin/index"
|
|
12
|
+
get "admin/events"
|
|
13
|
+
match "lock_event" => "admin#lock_event", :only => :post
|
|
14
|
+
|
|
15
|
+
resources :events do
|
|
16
|
+
collection do
|
|
17
|
+
post :squash_many_duplicates
|
|
18
|
+
get :search
|
|
19
|
+
get :duplicates
|
|
20
|
+
match 'tag/:tag', via: :get, to: :search, as: :tag
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
member do
|
|
24
|
+
get :clone
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
resources :sources do
|
|
29
|
+
collection do
|
|
30
|
+
post :import
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
resources :venues do
|
|
35
|
+
collection do
|
|
36
|
+
post :squash_many_duplicates
|
|
37
|
+
get :map
|
|
38
|
+
get :duplicates
|
|
39
|
+
get :autocomplete
|
|
40
|
+
match 'tag/:tag', via: :get, to: :search, as: :tag
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
resources :versions, :only => [:edit]
|
|
45
|
+
resources :changes, :controller => 'paper_trail_manager/changes'
|
|
46
|
+
match 'recent_changes' => redirect("/changes")
|
|
47
|
+
match 'recent_changes.:format' => redirect("/changes.%{format}")
|
|
48
|
+
|
|
49
|
+
match 'css/:name' => 'site#style'
|
|
50
|
+
match 'css/:name.:format' => 'site#style'
|
|
51
|
+
|
|
52
|
+
match '/' => 'site#index', :as => :root
|
|
53
|
+
match '/index' => 'site#index'
|
|
54
|
+
match '/index.:format' => 'site#index'
|
|
55
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#===[ Secrets ]=========================================================
|
|
2
|
+
#
|
|
3
|
+
# This file is meant for storing secret information that is never
|
|
4
|
+
# published or committed to a revision control system.
|
|
5
|
+
#
|
|
6
|
+
# Do not modify this "config/secrets.yml.sample" file directly -- you
|
|
7
|
+
# should copy it to "config/secrets.yml" and customize it there.
|
|
8
|
+
#
|
|
9
|
+
#---[ Values ]----------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
# Email address of administrator that will get exception notifications
|
|
12
|
+
# and requests for assistance from users:
|
|
13
|
+
administrator_email: 'reidab@gmail.com'
|
|
14
|
+
|
|
15
|
+
# Secret code for verifying cookie session data integrity. If you change it,
|
|
16
|
+
# all old sessions will become invalid! Make sure the secret is at least 30
|
|
17
|
+
# characters and all random, no regular words or you'll be exposed to
|
|
18
|
+
# dictionary attacks.
|
|
19
|
+
session_secret: '1290832312281326461234712c347134618233441234513341132032545424856956711678856985f0575586671765c678659e7855bd58c6978856178b56e8f6'
|
|
20
|
+
|
|
21
|
+
# Name to use for storing application's session cookies, this is often a
|
|
22
|
+
# shortened form of your organization and application name, e.g.,
|
|
23
|
+
# "igniteportlandproposals", "igniteproposals", "openproposals", etc:
|
|
24
|
+
session_name: 'calagator'
|
|
25
|
+
|
|
26
|
+
# API key for Upcoming.com, get your own from: http://upcoming.yahoo.com/services/api/
|
|
27
|
+
upcoming_api_key: 'f12d0c34c0'
|
|
28
|
+
|
|
29
|
+
# API key for Meetup.com, get your own from: http://www.meetup.com/meetup_api/key/
|
|
30
|
+
# meetup_api_key: registerNow
|
|
31
|
+
|
|
32
|
+
# Search engine to use for searching events, uncomment the line to specify that
|
|
33
|
+
# search engine. Defaults to 'sql'. For further information, see `INSTALL.md`.
|
|
34
|
+
# search_engine: sql
|
|
35
|
+
### search_engine: acts_as_solr
|
|
36
|
+
search_engine: sql
|
|
37
|
+
|
|
38
|
+
# Configure a mapping provider
|
|
39
|
+
# Stamen's terrain tiles will be used by default.
|
|
40
|
+
mapping:
|
|
41
|
+
# The tile provider to use when rendering maps with Leaflet.
|
|
42
|
+
# One of: leaflet, stamen, mapbox, google
|
|
43
|
+
# provider: stamen
|
|
44
|
+
#
|
|
45
|
+
# The tiles to use for the map, see the docs for individual Leaflet plugins.
|
|
46
|
+
# For stamen, this can be one of: terrain, toner, watercolor
|
|
47
|
+
# tiles: terrain
|
|
48
|
+
#
|
|
49
|
+
# If using Google, you'll need to set your Google Maps v3 API key
|
|
50
|
+
# google_maps_api_key: "key"
|
|
51
|
+
#
|
|
52
|
+
#== Examples ==
|
|
53
|
+
# Stamen
|
|
54
|
+
# (available tiles: terrain, toner, watercolor)
|
|
55
|
+
# provider: stamen
|
|
56
|
+
# tiles: watercolor
|
|
57
|
+
#
|
|
58
|
+
# MapBox Streets (use a map from your own account)
|
|
59
|
+
# provider: mapbox
|
|
60
|
+
# tiles: examples.map-9ijuk24y
|
|
61
|
+
#
|
|
62
|
+
# Google Maps
|
|
63
|
+
provider: 'google'
|
|
64
|
+
tiles: 'ROADMAP'
|
|
65
|
+
google_maps_api_key: 'AIzaSyDro5ZQaNHU0vcbFlVAILQJZZaq0jUGwvc'
|
|
66
|
+
#
|
|
67
|
+
# OpenStreetMap
|
|
68
|
+
# provider: leaflet
|
|
69
|
+
# tiles: http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
#===[ fin ]=============================================================
|
|
74
|
+
|
|
75
|
+
#===[ fin ]=============================================================
|
data/config/sunspot.yml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
production:
|
|
2
|
+
solr:
|
|
3
|
+
hostname: localhost
|
|
4
|
+
port: 8983
|
|
5
|
+
log_level: WARNING
|
|
6
|
+
path: /solr/production
|
|
7
|
+
# read_timeout: 2
|
|
8
|
+
# open_timeout: 0.5
|
|
9
|
+
|
|
10
|
+
development:
|
|
11
|
+
solr:
|
|
12
|
+
hostname: localhost
|
|
13
|
+
port: 8982
|
|
14
|
+
log_level: INFO
|
|
15
|
+
path: /solr/development
|
|
16
|
+
|
|
17
|
+
test:
|
|
18
|
+
solr:
|
|
19
|
+
hostname: localhost
|
|
20
|
+
port: 8981
|
|
21
|
+
log_level: WARNING
|
|
22
|
+
path: /solr/test
|
|
23
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class CreateEvents < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
create_table :events do |t|
|
|
4
|
+
t.string :title
|
|
5
|
+
t.text :description
|
|
6
|
+
t.timestamp :start_time
|
|
7
|
+
t.integer :venue_id
|
|
8
|
+
t.string :url
|
|
9
|
+
|
|
10
|
+
t.timestamps
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.down
|
|
15
|
+
drop_table :events
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class CreateVenues < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
create_table :venues do |t|
|
|
4
|
+
t.string :title
|
|
5
|
+
t.text :description
|
|
6
|
+
t.string :address
|
|
7
|
+
t.string :url
|
|
8
|
+
|
|
9
|
+
t.timestamps
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.down
|
|
15
|
+
drop_table :venues
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
class CreateSources < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
create_table :sources do |t|
|
|
4
|
+
t.string :title
|
|
5
|
+
t.string :url
|
|
6
|
+
t.string :format_type
|
|
7
|
+
t.timestamp :imported_at
|
|
8
|
+
|
|
9
|
+
t.timestamps
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def self.down
|
|
14
|
+
drop_table :sources
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class AddDetailedFieldsToVenue < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
add_column :venues, :street_address, :string
|
|
4
|
+
add_column :venues, :locality, :string
|
|
5
|
+
add_column :venues, :region, :string
|
|
6
|
+
add_column :venues, :postal_code, :string
|
|
7
|
+
add_column :venues, :country, :string
|
|
8
|
+
|
|
9
|
+
add_column :venues, :latitude, :float
|
|
10
|
+
add_column :venues, :longitude, :float
|
|
11
|
+
|
|
12
|
+
add_column :venues, :email, :string
|
|
13
|
+
add_column :venues, :telephone, :string
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.down
|
|
17
|
+
remove_columns :venues, :street_address, :locality, :region, :postal_code, :country, :latitude, :longitude, :email, :telephone
|
|
18
|
+
end
|
|
19
|
+
end
|