├── .foreman ├── .gitignore ├── .rspec ├── .ruby-version ├── .slugignore ├── Gemfile ├── Gemfile.lock ├── Gruntfile.js ├── Guardfile ├── LICENSE.md ├── Procfile ├── README.md ├── Rakefile ├── app ├── assets │ ├── images │ │ ├── .keep │ │ ├── 1px_empty.png │ │ └── article_share_1.png │ ├── javascripts │ │ ├── admin │ │ │ ├── JSXTransformer.js │ │ │ ├── add_csrf_header.js │ │ │ ├── admin.js │ │ │ ├── bootstrap-markdown.js │ │ │ ├── ccount.js │ │ │ ├── d3.v3.js │ │ │ ├── debug.js.coffee │ │ │ ├── email_newsletter.js.coffee │ │ │ ├── formats.js.coffee │ │ │ ├── highlightify_current_nav_link.js │ │ │ ├── letters.js.coffee │ │ │ ├── links.js.coffee │ │ │ ├── live_edit_contenteditable.js │ │ │ ├── localstorage_graf.js │ │ │ ├── markdown.js │ │ │ ├── max_char_count.js │ │ │ ├── md5_graf.js │ │ │ ├── newsletters.js.coffee │ │ │ ├── photos.js.coffee │ │ │ ├── pjax_loader.js │ │ │ ├── post_threads.js.coffee │ │ │ ├── post_time_now_button.js │ │ │ ├── posts.js.coffee │ │ │ ├── public.js.coffee │ │ │ ├── quizbuilder_standalone.js │ │ │ ├── ractive.js │ │ │ ├── ractive_2_-decorators-sortable.js │ │ │ ├── rangy-test.js │ │ │ ├── ratings.js.coffee │ │ │ ├── rattle_can.js.coffee │ │ │ ├── react.js │ │ │ ├── search.js.coffee │ │ │ ├── sessions.js.coffee │ │ │ ├── social_in_post_admin.js │ │ │ ├── tags.js.coffee │ │ │ ├── underscore.js │ │ │ ├── user_deploy_api.js.coffee │ │ │ └── users.js.coffee │ │ ├── admin_components │ │ │ └── .gitkeep │ │ ├── app │ │ │ ├── annotation_2.js │ │ │ ├── app.js │ │ │ ├── audioplayer_1.js │ │ │ ├── bq_pageviews.js │ │ │ ├── build_uuid.js │ │ │ ├── cookie_helpers.js │ │ │ ├── cookie_js_lib.js │ │ │ ├── email-signup.js │ │ │ ├── email_modal_v1.js │ │ │ ├── exp_scroll_events.js │ │ │ ├── exp_social_id.js │ │ │ ├── fb-inline-share.js │ │ │ ├── feed.js │ │ │ ├── ga_reporting_helpers.js │ │ │ ├── head.js │ │ │ ├── hotzone.js │ │ │ ├── jquery-1.11.1.min.js │ │ │ ├── jquery.validate.js │ │ │ ├── js-shareable-tools.js │ │ │ ├── lazy-photos.js │ │ │ ├── lovestory_node_reporter.js │ │ │ ├── lovestory_ruby_reporter.js │ │ │ ├── mailchimp_goal_tracking.js │ │ │ ├── menu.js │ │ │ ├── moment.js │ │ │ ├── mustache.js │ │ │ ├── page-visibility.js │ │ │ ├── resize_fullbleed_photos.js │ │ │ ├── responsive_iframes.js │ │ │ ├── scroll_depth.js │ │ │ ├── share_tool_analytics.js │ │ │ ├── sidebar-embed-experiment.js │ │ │ ├── stream.js │ │ │ ├── strftime.js │ │ │ ├── svg_arc_helpers.js │ │ │ ├── topshelf.js │ │ │ ├── underscore-1.8.3.js │ │ │ ├── underscore.js │ │ │ └── uuid.js │ │ ├── collections.js.coffee │ │ ├── donate.js │ │ ├── freeform_stream_promos.js.coffee │ │ ├── launch.js │ │ ├── partner_pageviews.js.coffee │ │ ├── partners.js.coffee │ │ ├── post_deploy_tokens.js.coffee │ │ ├── project_router.js.coffee │ │ ├── react_admin.js │ │ ├── socketio.js │ │ ├── weedwacker.js.coffee │ │ ├── weekly_newsletters.js.coffee │ │ └── yahoo_posts.js.coffee │ └── stylesheets │ │ ├── admin │ │ ├── admin.css.scss │ │ ├── bootstrap-markdown.min.css │ │ ├── ccount.css.scss │ │ ├── debug.css.scss │ │ ├── email_newsletter.css.scss │ │ ├── formats.css.scss │ │ ├── letters.css.scss │ │ ├── links.css.scss │ │ ├── nav.css.scss │ │ ├── newsletters.css.scss │ │ ├── photos.css.scss │ │ ├── post_threads.css.scss │ │ ├── posts.css.scss │ │ ├── public.css.scss │ │ ├── ratings.css.scss │ │ ├── rattle_can.css.scss │ │ ├── scaffolds.css.scss │ │ ├── search.css.scss │ │ ├── sessions.css.scss │ │ ├── tags.css.scss │ │ ├── user_deploy_api.css.scss │ │ └── users.css.scss │ │ ├── admin_analytics.scss │ │ ├── admin_api_v1.scss │ │ ├── admin_gator.scss │ │ ├── admin_google_doc.css.scss │ │ ├── admin_simple.scss │ │ ├── amicus.css.scss │ │ ├── app │ │ ├── app.scss │ │ ├── article.scss.erb │ │ ├── audioplayer_1.scss │ │ ├── author.scss │ │ ├── base │ │ │ ├── _base.scss │ │ │ ├── _buttons.scss │ │ │ ├── _flashes.scss │ │ │ ├── _forms.scss │ │ │ ├── _grid-settings.scss │ │ │ ├── _lists.scss │ │ │ ├── _tables.scss │ │ │ ├── _typography.scss │ │ │ ├── _variables.scss │ │ │ ├── extends │ │ │ │ ├── _button.scss │ │ │ │ ├── _clearfix.scss │ │ │ │ └── _hide-text.scss │ │ │ └── mixins │ │ │ │ └── _flash.scss │ │ ├── base_feature_header.scss │ │ ├── collection_homepage.scss │ │ ├── container-temporary.scss │ │ ├── donate.scss │ │ ├── email_signup.scss │ │ ├── featured-block.scss │ │ ├── fluid-test.scss │ │ ├── fonts.scss.erb │ │ ├── g_google_form_v1.scss │ │ ├── landing-unbelievable.scss │ │ ├── launch.scss │ │ ├── letters.scss │ │ ├── library.scss │ │ ├── nav.scss │ │ ├── newsletter.scss │ │ ├── newsletter_subscribe.scss │ │ ├── post_annotation_2.scss │ │ ├── post_photo_essay.scss.erb │ │ ├── print.scss │ │ ├── series.scss │ │ ├── static_page.scss │ │ ├── stream_promo.scss │ │ ├── tag_collection.scss │ │ ├── topshelf.scss │ │ └── topshelf_collection.scss │ │ ├── asset_files.scss │ │ ├── assets.scss │ │ ├── collections.scss.erb │ │ ├── documents.css.scss │ │ ├── freeform_stream_promos.scss │ │ ├── launch.css.scss │ │ ├── login.css.scss │ │ ├── partner_pageviews.scss │ │ ├── partners.scss │ │ ├── post_deploy_tokens.scss │ │ ├── post_locks.css.scss │ │ ├── post_sharables.scss │ │ ├── pretest.css.scss │ │ ├── project_repo.scss │ │ ├── project_router.scss │ │ ├── public_partner.scss │ │ ├── rss.css.scss │ │ ├── scaffolds.css.scss │ │ ├── scaffolds.scss │ │ ├── sitemap.css.scss │ │ ├── user_features.css.scss │ │ ├── weedwacker.scss │ │ ├── weekly_newsletters.scss │ │ └── yahoo_posts.scss ├── controllers │ ├── admin_analytics_controller.rb │ ├── admin_api_v1_controller.rb │ ├── admin_controller.rb │ ├── admin_gator_controller.rb │ ├── admin_google_doc_controller.rb │ ├── admin_simple_controller.rb │ ├── admin_slack_bot_controller.rb │ ├── amicus_controller.rb │ ├── application_controller.rb │ ├── asset_files_controller.rb │ ├── collections_controller.rb │ ├── concerns │ │ └── .keep │ ├── debug_controller.rb │ ├── documents_controller.rb │ ├── donate_controller.rb │ ├── email_newsletter_controller.rb │ ├── email_signup_controller.rb │ ├── embed_controller.rb │ ├── featured_blocks_controller.rb │ ├── freeform_stream_promos_controller.rb │ ├── graphics_controller.rb │ ├── landing_page_controller.rb │ ├── letters_controller.rb │ ├── links_controller.rb │ ├── members_controller.rb │ ├── newsletters_controller.rb │ ├── offline_template.rb │ ├── partner_pageviews_controller.rb │ ├── partners_controller.rb │ ├── photos_controller.rb │ ├── post_deploy_tokens_controller.rb │ ├── post_locks_controller.rb │ ├── post_shareables_controller.rb │ ├── post_threads_controller.rb │ ├── posts_controller.rb │ ├── pretest_controller.rb │ ├── project_repo_controller.rb │ ├── project_repos_controller.rb │ ├── project_router_controller.rb │ ├── public_controller.rb │ ├── public_partner_controller.rb │ ├── ratings_controller.rb │ ├── rattle_can_controller.rb │ ├── rss_controller.rb │ ├── search_controller.rb │ ├── sessions_controller.rb │ ├── sitemap_controller.rb │ ├── static_pages_controller.rb │ ├── status_controller.rb │ ├── tags_controller.rb │ ├── user_deploy_api_controller.rb │ ├── user_features_controller.rb │ ├── users_controller.rb │ ├── weedwacker_controller.rb │ ├── weekly_newsletters_controller.rb │ └── yahoo_posts_controller.rb ├── helpers │ ├── admin_analytics_helper.rb │ ├── admin_api_v1_helper.rb │ ├── admin_gator_helper.rb │ ├── admin_google_doc_helper.rb │ ├── admin_helper.rb │ ├── admin_simple_helper.rb │ ├── admin_slack_bot_helper.rb │ ├── amicus_helper.rb │ ├── application_helper.rb │ ├── asset_files_helper.rb │ ├── assets_helper.rb │ ├── collections_helper.rb │ ├── debug_helper.rb │ ├── documents_helper.rb │ ├── donate_helper.rb │ ├── email_newsletter_helper.rb │ ├── featured_blocks_helper.rb │ ├── formats_helper.rb │ ├── freeform_stream_promos_helper.rb │ ├── graphics_helper.rb │ ├── letters_helper.rb │ ├── links_helper.rb │ ├── members_helper.rb │ ├── newsletters_helper.rb │ ├── partner_pageviews_helper.rb │ ├── partners_helper.rb │ ├── photos_helper.rb │ ├── post_deploy_tokens_helper.rb │ ├── post_locks_helper.rb │ ├── post_shareables_helper.rb │ ├── post_threads_helper.rb │ ├── posts_helper.rb │ ├── pretest_helper.rb │ ├── project_repo_helper.rb │ ├── project_router_helper.rb │ ├── public_helper.rb │ ├── public_partner_helper.rb │ ├── ratings_helper.rb │ ├── rattle_can_helper.rb │ ├── rss_helper.rb │ ├── search_helper.rb │ ├── sessions_helper.rb │ ├── sitemap_helper.rb │ ├── static_pages_helper.rb │ ├── tags_helper.rb │ ├── user_deploy_api_helper.rb │ ├── user_features_helper.rb │ ├── users_helper.rb │ ├── weedwacker_helper.rb │ ├── weekly_newsletters_helper.rb │ └── yahoo_posts_helper.rb ├── lib │ ├── analytics_links.rb │ ├── analytics_posts.rb │ ├── analytics_posts_per_day.rb │ ├── assets │ │ └── .keep │ ├── cached_google_analytics_query.rb │ ├── collection_item_presenter.rb │ ├── collection_recent_query.rb │ ├── collection_slice.rb │ ├── collection_summary.rb │ ├── collections │ │ ├── link_partial.mustache │ │ ├── link_partial.rb │ │ ├── post_partial.mustache │ │ └── post_partial.rb │ ├── cookie_vault.rb │ ├── crowdtangle.rb │ ├── daily_analytics_email.rb │ ├── domain_to_organization.rb │ ├── email_user_report.rb │ ├── es.rb │ ├── es_index_all_links_worker.rb │ ├── es_index_all_posts_worker.rb │ ├── external_link.rb │ ├── facebook_insights.rb │ ├── facebook_linter.rb │ ├── fastly_soft_purge.rb │ ├── gator_report.rb │ ├── gator_tag_update_post.rb │ ├── google_analytics.rb │ ├── google_doc_markdown_converter_v2.rb │ ├── hammer_string.rb │ ├── heroku.rb │ ├── mailchimp_bulk_export.rb │ ├── mailchimp_export.rb │ ├── mailchimp_old_bulk_export.rb │ ├── markdown_google_doc.rb │ ├── mini_analytics_bar_chart.rb │ ├── post_metadata_provider.rb │ ├── post_projection.rb │ ├── post_renderer.rb │ ├── post_shareable_maybe.rb │ ├── print_renderer.rb │ ├── project_next_to_die.rb │ ├── public_post_preview.rb │ ├── quick_s3_upload.rb │ ├── quiz_api_v1.rb │ ├── report_v1.rb │ ├── s3_file_uploader.rb │ ├── s3_sync_upload.rb │ ├── s3_upload.rb │ ├── s3_upload_form.rb │ ├── shortcode_annotation.rb │ ├── shortcode_argument_parser.rb │ ├── shortcode_assets.rb │ ├── shortcode_author.rb │ ├── shortcode_batman.rb │ ├── shortcode_divider.rb │ ├── shortcode_dropcap.rb │ ├── shortcode_graphic.rb │ ├── shortcode_list.rb │ ├── shortcode_photo.rb │ ├── shortcode_photo_inline.rb │ ├── shortcode_photo_tag.rb │ ├── shortcode_qaquestion.rb │ ├── shortcode_quote.rb │ ├── shortcode_section_break.rb │ ├── shortcode_sidebar.rb │ ├── shortcode_sidebar_left.rb │ ├── shortcode_sidebar_note.rb │ ├── shortcode_subhead.rb │ ├── shortcode_tag.rb │ ├── shortcode_tag_sidebar.rb │ ├── shortcode_tweet.rb │ ├── stream.rb │ ├── strip_extra_p_tag.rb │ ├── thriller.rb │ ├── topshelf_provider.rb │ ├── track_click.rb │ ├── url_rewriter.rb │ └── yahoo_renderer.rb ├── mailers │ ├── .keep │ ├── application_mailer.rb │ ├── gator_mailer.rb │ ├── post_mailer.rb │ └── user_mailer.rb ├── models │ ├── .keep │ ├── asset_file.rb │ ├── concerns │ │ └── .keep │ ├── document.rb │ ├── email_signup.rb │ ├── external_service_response.rb │ ├── feature_flag.rb │ ├── featured_block.rb │ ├── featured_block_activate_event.rb │ ├── freeform_stream_promo.rb │ ├── graphic.rb │ ├── letter.rb │ ├── link.rb │ ├── link_decode_event.rb │ ├── link_remote_status_worker.rb │ ├── link_report.rb │ ├── mailchimp_webhook.rb │ ├── member.rb │ ├── newsletter.rb │ ├── newsletter_assignment.rb │ ├── partner.rb │ ├── partner_pageview.rb │ ├── photo.rb │ ├── post.rb │ ├── post_delegate_path.rb │ ├── post_deploy_token.rb │ ├── post_embed.rb │ ├── post_lock.rb │ ├── post_mock.rb │ ├── post_published_event.rb │ ├── post_shareable.rb │ ├── post_thread.rb │ ├── post_thread_assignment.rb │ ├── post_version.rb │ ├── project_repo.rb │ ├── public_search_query.rb │ ├── rating.rb │ ├── static_page.rb │ ├── stripe_customer.rb │ ├── tag.rb │ ├── tagging.rb │ ├── user.rb │ ├── user_post_assignment.rb │ ├── user_session.rb │ ├── weekly_newsletter.rb │ ├── weekly_newsletter_assignment.rb │ └── yahoo_post.rb ├── views │ ├── admin │ │ ├── _post_index_row.html.erb │ │ ├── analytics_all_posts_v1.html.erb │ │ ├── branding.html.erb │ │ ├── daily_email.html.erb │ │ ├── debug_os_links.html.erb │ │ ├── dragons.html.erb │ │ ├── email_signup.html.erb │ │ ├── email_signups_per_day_chart.html.erb │ │ ├── every_link.html.erb │ │ ├── feedback.html.erb │ │ ├── freeform_email.html.erb │ │ ├── freeform_email_editor.html.erb │ │ ├── google_forms_index.html │ │ ├── gutcheck_stream.html.erb │ │ ├── index.html.erb │ │ ├── inlined_photos.html.erb │ │ ├── link_decode_events.html.erb │ │ ├── moar_posts.html.erb │ │ ├── ops_dynos.html.erb │ │ ├── outcome_tracker.html.erb │ │ ├── performance.html.erb │ │ ├── post_bench.html.erb │ │ ├── posts_email_index.html.erb │ │ ├── posts_index.html.erb │ │ ├── preview_post_inject.html.erb │ │ ├── preview_promo_lte.html.erb │ │ ├── qa_all.html.erb │ │ ├── quick_s3_upload.html.erb │ │ ├── quizbuilder_edit.html.erb │ │ ├── quizbuilder_index.html.erb │ │ ├── quizbuilder_preview.html.erb │ │ ├── react_tag_test.html.erb │ │ ├── report_v1.html.erb │ │ ├── robot_daily_email.html.erb │ │ ├── robot_weekly_link_social.html.erb │ │ ├── search_queries.html.erb │ │ ├── sprout_links.html.erb │ │ ├── stream_main_debug.html.erb │ │ ├── stream_preview.html.erb │ │ ├── style_guide.html.erb │ │ ├── tag_bot.html.erb │ │ ├── tag_leaderboard.html.erb │ │ ├── tag_post_index.html.erb │ │ ├── tag_post_search.html.erb │ │ ├── tag_post_show.html.erb │ │ ├── taggings.html.erb │ │ ├── user_sessions.html.erb │ │ ├── users.html.erb │ │ └── v1_hud.html.erb │ ├── admin_analytics │ │ ├── daily_email.html.erb │ │ ├── email_v1.html.erb │ │ ├── engaged_time.html.erb │ │ ├── ga_test.html.erb │ │ ├── lovestory_total.html.erb │ │ ├── partners.html.erb │ │ ├── partners_nojs.html.erb │ │ ├── today.html.erb │ │ └── yesterday.html.erb │ ├── admin_api_v1 │ │ ├── preview_gist.html.erb │ │ └── preview_post_via_post.html.erb │ ├── admin_gator │ │ ├── activity.html.erb │ │ ├── bookmarklet.js │ │ ├── iframe.html.erb │ │ ├── index.html.erb │ │ ├── post.html.erb │ │ ├── search.html.erb │ │ ├── search_links.html.erb │ │ └── tag_post_index.html.erb │ ├── admin_google_doc │ │ ├── all_google_docs.html.erb │ │ ├── all_spreadsheets.html.erb │ │ ├── oauth_callback.html.erb │ │ ├── parse_doc.html.erb │ │ └── parse_spreadsheet.html.erb │ ├── admin_simple │ │ └── edit.html.erb │ ├── admin_slack_bot │ │ └── incoming_slash_command.html.erb │ ├── amicus │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── preview.html.erb │ │ ├── preview_draft.html.erb │ │ ├── sync.html.erb │ │ └── update.html.erb │ ├── asset_files │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── collections │ │ ├── _index_tag.html.erb │ │ ├── api_v1_items.html.erb │ │ ├── index.html.erb │ │ ├── live.html.erb │ │ └── show.html.erb │ ├── debug │ │ └── throw_error.html.erb │ ├── documents │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── potential.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── donate │ │ ├── charge.html.erb │ │ └── form.html.erb │ ├── email_newsletter │ │ ├── _show_styles.html.erb │ │ ├── search_archive.html.erb │ │ └── show.html.erb │ ├── email_signup │ │ └── index.xls.erb │ ├── embed │ │ └── v1_email.html.erb │ ├── featured_blocks │ │ ├── _form.html.erb │ │ ├── _index_row.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── preview.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── freeform_stream_promos │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── preview.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── gator_mailer │ │ └── daily_email.html.erb │ ├── graphics │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── landing_page │ │ └── victim.html.erb │ ├── layouts │ │ ├── _admin_analytics.html.erb │ │ ├── _debug_box.html.erb │ │ ├── _easter.html.erb │ │ ├── _flashes.html.erb │ │ ├── _footer_analytics.html.erb │ │ ├── _layout_js_footer.html.erb │ │ ├── _nav.html.erb │ │ ├── _pixel_ping.html.erb │ │ ├── _social_metadata.html.erb │ │ ├── _typography.html.erb │ │ ├── application.html.erb │ │ ├── login.html.erb │ │ ├── mailer.html.erb │ │ ├── mailer.text.erb │ │ ├── partner.html.erb │ │ ├── pjax_loader.js │ │ └── public.html.erb │ ├── letters │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── links │ │ ├── _form.html.erb │ │ ├── _link.html.erb │ │ ├── _newsletter_attachment.html.erb │ │ ├── bookmarklet.html.erb │ │ ├── bookmarklet_app.js.erb │ │ ├── bookmarklet_link.html.erb │ │ ├── edit.html.erb │ │ ├── edit_link_in_iframe.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── partials_before.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── members │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── newsletters │ │ ├── _email_header.html.erb │ │ ├── _form.html.erb │ │ ├── _sorter_potential_item.html.erb │ │ ├── build.html.erb │ │ ├── build_text.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ ├── show.json.jbuilder │ │ └── sort.html.erb │ ├── partner_pageviews │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── partners │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── photos │ │ ├── _embed.html.erb │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── embed.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ ├── show.json.jbuilder │ │ ├── upload_form.html │ │ └── v1_picker.html.erb │ ├── post_deploy_tokens │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── post_formats │ │ └── _post_full │ │ │ ├── _decision_of_the_day.html.erb │ │ │ ├── _follow.html.erb │ │ │ ├── _stub.html.erb │ │ │ └── _trawl.html.erb │ ├── post_locks │ │ ├── _form.html.erb │ │ ├── actives_widget.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── post_mailer │ │ ├── new_published.html.erb │ │ └── new_published.text.erb │ ├── post_shareables │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── post_threads │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── posts │ │ ├── _disqus.html.erb │ │ ├── _form.html.erb │ │ ├── _post_collapse.html.erb │ │ ├── _post_full.html.erb │ │ ├── _social_bar.html.erb │ │ ├── andy.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── preview.html.erb │ │ ├── preview_post.html.erb │ │ ├── preview_promo.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── pretest │ │ ├── error.html.erb │ │ └── slow.html.erb │ ├── project_repos │ │ ├── index.html.erb │ │ └── show.html.erb │ ├── project_router │ │ └── next_to_die.html.erb │ ├── public │ │ ├── 404.html │ │ ├── _anno_1.html.erb │ │ ├── _featured_block.html.erb │ │ ├── _feed.html.erb │ │ ├── _header.html.erb │ │ ├── _header_v1.html.erb │ │ ├── _header_v2.html.erb │ │ ├── _home_topshelf.html.erb │ │ ├── _homepage_featured.html.erb │ │ ├── _inline_topshelf.html.erb │ │ ├── _nav_v1.html.erb │ │ ├── _nav_v2.html.erb │ │ ├── _newsletter.html.erb │ │ ├── _newsletter_signup_banner.html │ │ ├── _post_byline.html.erb │ │ ├── _post_footer.html.erb │ │ ├── _post_header.html.erb │ │ ├── _post_header_base_feature.html.erb │ │ ├── _post_lead_photo.html.erb │ │ ├── _post_partial.html.erb │ │ ├── _post_share_tools.html.erb │ │ ├── _stream.html.erb │ │ ├── _topshelf.html.erb │ │ ├── _topshelf_facebook.html.erb │ │ ├── _topshelf_opening_statement.html.erb │ │ ├── _topshelf_quickreads.html.erb │ │ ├── amp_post.html.erb │ │ ├── author.html.erb │ │ ├── collection.html.erb │ │ ├── collection │ │ │ └── _link.html.erb │ │ ├── collection_index.html.erb │ │ ├── document.html.erb │ │ ├── email_already_exists.html.erb │ │ ├── email_details.html.erb │ │ ├── email_details_thanks.html.erb │ │ ├── featured_block │ │ │ ├── _deathpenalty_zero_zero.html.erb │ │ │ ├── _obama.html.erb │ │ │ ├── _one_one_deathpenalty.html.erb │ │ │ ├── _one_one_kickstarter.html.erb │ │ │ ├── _one_one_manual_kickstarter.html.erb │ │ │ ├── _one_one_one.html.erb │ │ │ ├── _one_one_onejunesurvey.html.erb │ │ │ ├── _one_one_two.html.erb │ │ │ ├── _one_one_victim.html.erb │ │ │ ├── _one_one_victim_split.html.erb │ │ │ ├── _one_two_newstop.html.erb │ │ │ ├── _one_two_one.html.erb │ │ │ ├── _one_two_two.html.erb │ │ │ └── _one_zero_zero.html.erb │ │ ├── featured_block_test.html.erb │ │ ├── feed_posts.html.erb │ │ ├── fluid_test.html.erb │ │ ├── home.html.erb │ │ ├── launch.html │ │ ├── letters_index.html.erb │ │ ├── not_found.html.erb │ │ ├── opening_statement.html.erb │ │ ├── opening_statement_index.html.erb │ │ ├── pixel_ping.js.erb │ │ ├── pixel_ping_iframe.html.erb │ │ ├── pixel_setup.html.erb │ │ ├── post.html.erb │ │ ├── posts │ │ │ ├── _base.html.erb │ │ │ ├── _base_feature.html.erb │ │ │ ├── _base_freeform_header.html.erb │ │ │ ├── _branded.html.erb │ │ │ ├── _freeform.html.erb │ │ │ ├── _photo_essay.html.erb │ │ │ ├── _root.html.erb │ │ │ ├── _shell.html.erb │ │ │ └── _shell_light_on_dark.html.erb │ │ ├── print_post.html.erb │ │ ├── random_sentence.html.erb │ │ ├── search_v1.html.erb │ │ ├── static_marshall.html.erb │ │ ├── static_page.html.erb │ │ ├── static_privacy.html.erb │ │ ├── stream │ │ │ ├── _freeform_stream_promo.html.erb │ │ │ ├── _letter.html.erb │ │ │ ├── _newsletter.html.erb │ │ │ ├── _popular.html.erb │ │ │ ├── _post.html.erb │ │ │ ├── _tags.html.erb │ │ │ └── posts │ │ │ │ ├── _base.html.erb │ │ │ │ ├── _base_w_art.html.erb │ │ │ │ ├── _feature.html.erb │ │ │ │ ├── _gator.html.erb │ │ │ │ ├── _letter.html.erb │ │ │ │ ├── _photo_essay.html.erb │ │ │ │ └── _stub.html.erb │ │ ├── stream_partials.html.erb │ │ ├── stream_topshelf │ │ │ └── v1 │ │ │ │ ├── _facebook.html.erb │ │ │ │ ├── _openingstatement.html.erb │ │ │ │ ├── _quickreads.html.erb │ │ │ │ └── _records.html.erb │ │ ├── submit_letter.html.erb │ │ ├── subscribe.html.erb │ │ ├── tag.html.erb │ │ ├── tokens.html.erb │ │ └── view_letter.erb │ ├── public_partner │ │ ├── check_pixel.html.erb │ │ └── outcome_tracker.html.erb │ ├── rattle_can │ │ ├── _app.html.erb │ │ └── _template.html.erb │ ├── rss │ │ ├── home.rss.builder │ │ ├── newsbank.rss.builder │ │ ├── tag.rss.builder │ │ └── yahoo.rss.builder │ ├── search │ │ └── search.html.erb │ ├── sessions │ │ ├── create_token.html.erb │ │ ├── new.html.erb │ │ └── new_with_token.html.erb │ ├── sitemap │ │ └── index.xml.builder │ ├── static_pages │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── taggings │ │ ├── _activity_link.html.erb │ │ └── _activity_post.html.erb │ ├── tags │ │ ├── _form.html.erb │ │ ├── _form_tagger.html.erb │ │ ├── _inline.html.erb │ │ ├── _modal.html.erb │ │ ├── _poly_link.html.erb │ │ ├── _poly_post.html.erb │ │ ├── _tag.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ ├── user_features │ │ ├── all.html.erb │ │ ├── disable.html.erb │ │ └── enable.html.erb │ ├── user_mailer │ │ ├── login_token.html.erb │ │ ├── login_token.text.erb │ │ ├── reset_password.html.erb │ │ └── reset_password.text.erb │ ├── users │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ └── new.html.erb │ ├── weedwacker │ │ ├── _today.html.erb │ │ ├── _yesterday.html.erb │ │ └── index.html.erb │ ├── weekly_newsletters │ │ ├── _form.html.erb │ │ ├── build.html.erb │ │ ├── build_text.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder │ └── yahoo_posts │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ └── show.json.jbuilder └── workers │ ├── attach_user_post_worker.rb │ ├── backup_links_worker.rb │ ├── bake_post.rb │ ├── build_post_partial.rb │ ├── collection_slice_worker.rb │ ├── create_mailchimp_campaign.rb │ ├── create_post_version.rb │ ├── create_weekly_newsletter_mailchimp_campaign.rb │ ├── debug_email_worker.rb │ ├── email_signup_worker.rb │ ├── facebook_count_worker.rb │ ├── facebook_linter_worker.rb │ ├── facebook_recent_post_shares_v1_worker.rb │ ├── generate_tag_slugs_if_nil.rb │ ├── index_tag.rb │ ├── link_download_worker.rb │ ├── link_meta_tag_worker.rb │ ├── lint_post_worker.rb │ ├── member_update_stats.rb │ ├── minute_cron_worker.rb │ ├── notify_published_post_worker.rb │ ├── photo_aspect_ratio_worker.rb │ ├── photo_resizer.rb │ ├── photo_resizer_service.rb │ ├── post_lock_sweeper.rb │ ├── pull_document_cloud.rb │ ├── pull_logs_for_email_signup.rb │ ├── rebuild_all_tags_json.rb │ ├── redis_heartbeat_worker.rb │ ├── refresh_twitter_count.rb │ ├── s3_upload.rb │ ├── scan_new_published_posts.rb │ ├── send_ttin.rb │ ├── slack.rb │ ├── sync_mailchimp_campaign.rb │ ├── sync_weekly_newsletter_mailchimp_campaign.rb │ ├── tag_report_v1.rb │ ├── touch_active_homepages.rb │ ├── tweet_count_worker.rb │ ├── update_document_published_url.rb │ ├── update_user_last_seen.rb │ └── upload_link_image.rb ├── bin ├── bundle ├── rails ├── rake ├── rspec └── spring ├── config.ru ├── config ├── application.rb ├── boot.rb ├── database.yml ├── environment.rb ├── environments │ ├── development.rb │ ├── production.rb │ └── test.rb ├── feature_flag_config.yml ├── featured_block_templates.yml ├── initializers │ ├── activesupport_notifications.rb │ ├── asset_precompiling.rb │ ├── backtrace_silencers.rb │ ├── cookies_serializer.rb │ ├── database_connection.rb │ ├── database_connection_old.rb │ ├── dotenv_if_development.rb │ ├── enable_gc_profiler.rb │ ├── filter_parameter_logging.rb │ ├── inflections.rb │ ├── mime_types.rb │ ├── post_lock_sweeper.rb │ ├── precompile_assets.rb │ ├── rack_attack.rb │ ├── rack_timeout.rb │ ├── redis.rb │ ├── session_store.rb │ ├── set_default_host_url.rb │ ├── sidekiq_thread_backtrace_dumper.rb │ ├── time_formats.rb │ └── wrap_parameters.rb ├── locales │ └── en.yml ├── newrelic.yml ├── post_formats.yml ├── post_stream_promos.yml ├── puma.rb ├── routes.rb ├── secrets.yml ├── sidekiq.yml ├── tag_types.yml └── unicorn.rb ├── data ├── domain_to_organization.yml ├── google-doc-html │ └── congress-passport.html └── pretty_print_v1.xsl ├── db ├── migrate │ ├── 20140624212702_create_formats.rb │ ├── 20140624214936_create_posts.rb │ ├── 20140624215659_change_formats_to_post_formats.rb │ ├── 20140624235032_change_format_column_on_posts.rb │ ├── 20140624235537_create_post_thread_assignments.rb │ ├── 20140624235554_create_post_threads.rb │ ├── 20140626161124_rename_publish_at_to_published_at_for_posts.rb │ ├── 20140630191447_add_title_to_posts.rb │ ├── 20140702164716_create_tags.rb │ ├── 20140707140945_create_photos.rb │ ├── 20140707152927_create_users.rb │ ├── 20140708204328_add_bookmarklet_token_to_users.rb │ ├── 20140708204407_create_links.rb │ ├── 20140708210125_add_login_token_to_users.rb │ ├── 20140708215131_add_login_token_date_to_users.rb │ ├── 20140709143254_add_domain_to_links.rb │ ├── 20140714142920_create_taggings.rb │ ├── 20140714230725_add_approved_to_links.rb │ ├── 20140715213751_add_content_to_taggings.rb │ ├── 20140716151713_add_html_to_links.rb │ ├── 20140724214823_add_index_on_url_to_links.rb │ ├── 20140728164656_create_ratings.rb │ ├── 20140728184730_create_hstore.rb │ ├── 20140728184738_add_slugs_to_posts.rb │ ├── 20140729173805_add_fb_url_to_links.rb │ ├── 20140807204017_add_deploy_api_key_to_users.rb │ ├── 20140808202045_add_tag_type_to_tags.rb │ ├── 20140809183938_rename_slugs_to_redirects_for_posts.rb │ ├── 20140809190927_add_slug_to_posts.rb │ ├── 20140812152811_add_post_format_to_posts.rb │ ├── 20140813201832_add_user_id_to_taggings.rb │ ├── 20140813225952_add_tweet_count_to_links.rb │ ├── 20140814150658_add_created_at_index_to_links.rb │ ├── 20140816212540_add_email_content_to_posts.rb │ ├── 20140816215902_add_random_slug_to_photos.rb │ ├── 20140816223427_add_sizes_to_photos.rb │ ├── 20140819213506_create_newsletters.rb │ ├── 20140819213524_create_newsletter_assignments.rb │ ├── 20140820175114_add_email_content_to_links.rb │ ├── 20140827181627_add_web_id_to_newsletters.rb │ ├── 20140827184510_change_id_to_string_for_newsletters.rb │ ├── 20140903182906_add_fb_count_to_links.rb │ ├── 20140911184603_add_homepage_position_to_newsletter_assignments.rb │ ├── 20140912194825_add_deck_to_posts.rb │ ├── 20140912203048_create_letters.rb │ ├── 20140912210124_add_index_to_anon_on_letters.rb │ ├── 20140912211128_add_original_content_to_letters.rb │ ├── 20140918171834_create_featured_blocks.rb │ ├── 20140926173831_add_slug_and_name_to_users.rb │ ├── 20140926173836_add_byline_freeform_to_posts.rb │ ├── 20140928155451_create_user_post_assignments.rb │ ├── 20140929154301_add_public_flag_to_tags.rb │ ├── 20140929154302_add_featured_image_to_tags.rb │ ├── 20140929154308_add_content_to_tags.rb │ ├── 20140929154315_add_byline_to_newsletters.rb │ ├── 20140929154320_add_editors_pick_boolean_to_links.rb │ ├── 20140929154324_add_published_at_to_newsletters.rb │ ├── 20140929154328_add_stream_promo_to_post.rb │ ├── 20140929154332_create_post_versions.rb │ ├── 20140929192047_add_public_to_newsletters.rb │ ├── 20140930152431_add_html_url_to_links.rb │ ├── 20140930195827_add_via_gator_to_photos.rb │ ├── 20140930195931_add_photo_id_to_links.rb │ ├── 20140930201536_add_featured_photo_to_posts.rb │ ├── 20140930201810_add_fb_and_twitter_headlines_to_posts.rb │ ├── 20140930202454_add_pgp_to_users.rb │ ├── 20140930223606_create_static_pages.rb │ ├── 20141001140928_add_published_at_to_letters.rb │ ├── 20141010190750_add_phone_to_users.rb │ ├── 20141010194404_add_produced_by_to_posts.rb │ ├── 20141010201348_add_revised_at_to_posts.rb │ ├── 20141016141413_add_lead_photo_to_posts.rb │ ├── 20141016203144_create_members.rb │ ├── 20141017160523_add_visits_from_ips_to_members.rb │ ├── 20141021210632_create_feature_flags.rb │ ├── 20141022184406_create_email_signups.rb │ ├── 20141024173220_create_graphics.rb │ ├── 20141024183444_add_title_and_desc_to_static_pages.rb │ ├── 20141103232347_add_sidebar_to_tags.rb │ ├── 20141104163602_create_documents.rb │ ├── 20141104175531_add_custom_head_to_posts.rb │ ├── 20141104185907_add_confirm_token_to_email_signups.rb │ ├── 20141104191406_add_email_fieldsto_email_signups.rb │ ├── 20141105205417_add_archive_url_to_newsletters.rb │ ├── 20141106213909_add_fields_to_email_signups.rb │ ├── 20141110184742_add_title_deck_to_documents.rb │ ├── 20141111191300_add_source_to_user_post_assignments.rb │ ├── 20141112183847_add_title_to_users.rb │ ├── 20141112230331_add_signup_source_to_email_signups.rb │ ├── 20141115163446_create_stripe_customers.rb │ ├── 20141117152901_create_post_locks.rb │ ├── 20141117204959_add_names_to_stripe_customers.rb │ ├── 20141118184153_add_draft_to_posts.rb │ ├── 20141124181757_remove_cols_from_posts.rb │ ├── 20141125171851_add_log_blob_to_email_signups.rb │ ├── 20141204145044_add_last_seen_to_users.rb │ ├── 20141207170627_create_user_sessions.rb │ ├── 20141208202311_add_display_headline_to_posts.rb │ ├── 20141208222447_add_custom_scss_to_posts.rb │ ├── 20141210162637_create_featured_block_activate_events.rb │ ├── 20141212170751_change_cols_to_strings_in_email_signups.rb │ ├── 20150112211908_create_public_search_queries.rb │ ├── 20150113161343_add_search_results_to_public_search_queries.rb │ ├── 20150113163509_add_user_id_to_public_search_queries.rb │ ├── 20150122213121_create_external_service_responses.rb │ ├── 20150129163905_add_shorttoken_to_links.rb │ ├── 20150130192809_create_link_decode_events.rb │ ├── 20150130193426_add_referer_to_link_decode_events.rb │ ├── 20150224165135_add_freeform_post_header_to_posts.rb │ ├── 20150224165406_change_freeform_post_header_to_text.rb │ ├── 20150515145826_change_byline_column_to_text_on_newsletters.rb │ ├── 20150609173000_add_facebook_description_to_posts.rb │ ├── 20150618195818_create_assets.rb │ ├── 20150618201733_create_asset_files.rb │ ├── 20150622213626_create_post_sharables.rb │ ├── 20150622220203_rename_sharable_to_shareables.rb │ ├── 20150702175957_add_mailchimp_id_to_email_signups.rb │ ├── 20150716172651_add_mailchimp_euid_leid_to_email_signups.rb │ ├── 20150729185629_create_post_published_events.rb │ ├── 20150824213411_create_weekly_newsletter_assignments.rb │ ├── 20150824213516_create_weekly_newsletters.rb │ ├── 20150831172334_add_sections_to_weekly_newsletters.rb │ ├── 20150903204918_add_options_to_email_signups.rb │ ├── 20150914174642_create_freeform_stream_promos.rb │ ├── 20150914175053_add_published_to_freeform_stream_promos.rb │ ├── 20150922174410_create_post_delegate_paths.rb │ ├── 20150923205331_create_yahoo_posts.rb │ ├── 20151007152415_add_photo_flag_to_yahoo_posts.rb │ ├── 20151014155320_add_summary_to_yahoo_posts.rb │ ├── 20151104192738_create_partners.rb │ ├── 20151104194642_create_partner_pageviews.rb │ ├── 20151202171252_create_post_deploy_tokens.rb │ ├── 20160104184134_add_deploy_token_to_graphics.rb │ ├── 20160106193656_add_souce_and_slug_to_asset_file.rb │ ├── 20160113221245_add_s3_url_to_asset_files.rb │ ├── 20160121191220_create_post_embeds.rb │ ├── 20160204195644_add_meta_tags_to_links.rb │ ├── 20160204200517_add_remote_alive_to_links.rb │ ├── 20160209200020_add_aspect_ratio_to_photos.rb │ ├── 20160219184054_rename_featured_image_for_tags.rb │ ├── 20160222185522_add_page_title_to_static_pages.rb │ ├── 20160308193653_create_link_reports.rb │ ├── 20160310222554_add_mailchimp_data_to_email_signups.rb │ ├── 20160325203410_collection_summary_to_tags.rb │ ├── 20160325214356_add_collection_summary_to_tags.rb │ ├── 20160404152647_add_in_stream_to_posts.rb │ └── 20160426134033_create_mailchimp_webhooks.rb ├── schema.rb └── seeds.rb ├── example-dot-env ├── lib └── tasks │ ├── .keep │ ├── analytics.rake │ ├── collections.rake │ ├── email_signups.rake │ ├── export.rake │ ├── external_service_response.rake │ ├── ga_rollup.rake │ ├── gator_mailer.rake │ ├── heroku.rake │ ├── index_links.rake │ ├── index_posts.rake │ ├── index_tags.rake │ ├── link.rake │ ├── posts.rake │ ├── schedule_10min_workers.rake │ ├── schedule_minute_cron_worker.rake │ ├── sidekiq.rake │ └── social_count_snapshot.rake ├── log └── .keep ├── os-x-setup.sh ├── package.json ├── public ├── 404.html ├── 422.html ├── 500.html ├── favicon.ico └── robots.txt ├── spec ├── factories.rb ├── helpers │ └── collections_helper_spec.rb ├── integration │ ├── admin_spec.rb │ ├── collection_spec.rb │ ├── home_spec.rb │ ├── public_api_spec.rb │ ├── public_post_spec.rb │ ├── public_web_api_spec.rb │ └── static_pages_spec.rb ├── mailers │ ├── gator_mailer_spec.rb │ ├── post_mailer_spec.rb │ └── previews │ │ ├── gator_mailer_preview.rb │ │ └── post_mailer_preview.rb ├── models │ ├── collection_slice_spec.rb │ ├── create_mailchimp_campaign_spec.rb │ ├── domain_to_organization_spec.rb │ ├── donation_spec.rb │ ├── featured_block_spec.rb │ ├── freeform_stream_promo_spec.rb │ ├── google_doc_markdown_converter_v2_spec.rb │ ├── link_report_spec.rb │ ├── link_spec.rb │ ├── mailchimp_webhook_spec.rb │ ├── minute_cron_worker_spec.rb │ ├── partner_spec.rb │ ├── photo_spec.rb │ ├── post_delegate_path_spec.rb │ ├── post_deploy_token_spec.rb │ ├── post_embed_spec.rb │ ├── post_metadata_provider_spec.rb │ ├── post_published_event_spec.rb │ ├── post_renderer_stress_spec.rb │ ├── post_spec.rb │ ├── posts_helper_spec.rb │ ├── print_renderer_spec.rb │ ├── quick_s3_upload_spec.rb │ ├── quiz_api_v1_spec.rb │ ├── s3_upload_form_spec.rb │ ├── shortcode_argument_parser_spec.rb │ ├── shortcode_graphic_spec.rb │ ├── shortcode_section_break_spec.rb │ ├── shortcode_sidebar_note_spec.rb │ ├── stream_spec.rb │ ├── tag_spec.rb │ ├── tagging_spec.rb │ ├── tweet_count_worker_spec.rb │ ├── url_rewriter_spec.rb │ ├── weekly_newsletter_assignment_spec.rb │ └── weekly_newsletter_spec.rb ├── rails_helper.rb ├── requests │ ├── collections_controller_spec.rb │ ├── email_signup_spec.rb │ ├── links_controller_spec.rb │ ├── photos_controller_spec.rb │ ├── posts_controller_spec.rb │ ├── public_controller_spec.rb │ └── status_controller_spec.rb ├── spec_helper.rb └── views │ └── collections │ ├── api_v1_items.html.erb_spec.rb │ ├── index.html.erb_spec.rb │ └── show.html.erb_spec.rb └── utils ├── ai_hammer.rb ├── ai_preview_header.html ├── base64_image.rb ├── current_pg_connections.sh ├── feature_flags.sh ├── find_inline_styles.sh ├── howto_preview.md ├── miller.html ├── millerital.html ├── post_deploy_token_client.rb ├── preview.rb ├── preview_alias ├── public_html_comments.sh └── setup_pow_port.sh /.foreman: -------------------------------------------------------------------------------- 1 | port: 7000 2 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.3.0 2 | -------------------------------------------------------------------------------- /.slugignore: -------------------------------------------------------------------------------- 1 | /prod_db 2 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | grunt.initConfig({ 3 | pkg: grunt.file.readJSON('package.json'), 4 | watch: { 5 | all: { 6 | files: 'app/**/*', 7 | options: { 8 | livereload: true, 9 | }, 10 | }, 11 | } 12 | }); 13 | 14 | grunt.loadNpmTasks('grunt-contrib-watch'); 15 | grunt.registerTask('default', ['watch']); 16 | } 17 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: bundle exec puma -C config/puma.rb 2 | sidekiq: env SIDEKIQ=true bundle exec sidekiq -c 10 -t 8 -q critical,10 -q default,5 -q photo,1 -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/assets/images/.keep -------------------------------------------------------------------------------- /app/assets/images/1px_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/assets/images/1px_empty.png -------------------------------------------------------------------------------- /app/assets/images/article_share_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/assets/images/article_share_1.png -------------------------------------------------------------------------------- /app/assets/javascripts/admin/add_csrf_header.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/assets/javascripts/admin/add_csrf_header.js -------------------------------------------------------------------------------- /app/assets/javascripts/admin/debug.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/email_newsletter.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/formats.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/highlightify_current_nav_link.js: -------------------------------------------------------------------------------- 1 | $(document).on('ready page:load', function() { 2 | $('.nav a[href="'+ window.location.pathname +'"]').parent().addClass('active'); 3 | }); -------------------------------------------------------------------------------- /app/assets/javascripts/admin/letters.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/links.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/newsletters.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/photos.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/pjax_loader.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/assets/javascripts/admin/pjax_loader.js -------------------------------------------------------------------------------- /app/assets/javascripts/admin/post_threads.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/posts.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/public.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/ratings.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/rattle_can.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/search.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/sessions.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/tags.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/user_deploy_api.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin/users.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/admin_components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/assets/javascripts/admin_components/.gitkeep -------------------------------------------------------------------------------- /app/assets/javascripts/app/email_modal_v1.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | window.tmp_20151020modal = function() { 3 | return true; 4 | } 5 | })(); 6 | -------------------------------------------------------------------------------- /app/assets/javascripts/app/feed.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/assets/javascripts/app/feed.js -------------------------------------------------------------------------------- /app/assets/javascripts/app/ga_reporting_helpers.js: -------------------------------------------------------------------------------- 1 | var report = function(category, action, label) { 2 | if (!window['ga']) { 3 | window._tmp_no_ga = true; 4 | return false; 5 | } 6 | try { 7 | ga('send', 'event', category, action, label, {'nonInteraction': 1}); 8 | } catch(e) { 9 | console.log('error reporting event', category, action, label, e); 10 | } 11 | } -------------------------------------------------------------------------------- /app/assets/javascripts/app/head.js: -------------------------------------------------------------------------------- 1 | //= require 'jquery' 2 | //= require 'app/underscore' 3 | $.ajaxSetup({ cache: true }); -------------------------------------------------------------------------------- /app/assets/javascripts/app/strftime.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/assets/javascripts/app/strftime.js -------------------------------------------------------------------------------- /app/assets/javascripts/collections.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/freeform_stream_promos.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/partner_pageviews.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/partners.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/post_deploy_tokens.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/project_router.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/react_admin.js: -------------------------------------------------------------------------------- 1 | //= require react 2 | //= require react_ujs 3 | //= require_tree ./admin_components -------------------------------------------------------------------------------- /app/assets/javascripts/weedwacker.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/weekly_newsletters.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/yahoo_posts.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/ccount.css.scss: -------------------------------------------------------------------------------- 1 | .ccount-attach { 2 | font-size: 20px; 3 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/debug.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the debug controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/email_newsletter.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the EmailNewsletter controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/formats.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Formats controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/nav.css.scss: -------------------------------------------------------------------------------- 1 | 2 | .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { 3 | border-bottom: 3px solid #428bca; 4 | background: #FFF !important; 5 | } 6 | 7 | .navbar-brand { 8 | padding: 10px 15px 10px 15px !important; 9 | } 10 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/photos.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Photos controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/public.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Public controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | 5 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/ratings.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Ratings controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/scaffolds.css.scss: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/search.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Search controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/sessions.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the sessions controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/tags.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Tags controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/user_deploy_api.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the UserDeployAPI controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin/users.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the users controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin_analytics.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the AdminAnalytics controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin_api_v1.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the admin_api_v1 controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin_gator.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the admin_gator controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin_google_doc.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the AdminGoogleDoc controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/admin_simple.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the admin_simple controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/amicus.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Amicus controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/app/base/_buttons.scss: -------------------------------------------------------------------------------- 1 | button, 2 | input[type="submit"] { 3 | @extend %button; 4 | @include appearance(none); 5 | border: none; 6 | cursor: pointer; 7 | user-select: none; 8 | vertical-align: middle; 9 | white-space: nowrap; 10 | } 11 | -------------------------------------------------------------------------------- /app/assets/stylesheets/app/base/_flashes.scss: -------------------------------------------------------------------------------- 1 | %flash-alert { 2 | @include flash($alert-color); 3 | } 4 | 5 | %flash-error { 6 | @include flash($error-color); 7 | } 8 | 9 | %flash-notice { 10 | @include flash($notice-color); 11 | } 12 | 13 | %flash-success { 14 | @include flash($success-color); 15 | } 16 | -------------------------------------------------------------------------------- /app/assets/stylesheets/app/base/_grid-settings.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/assets/stylesheets/app/base/_grid-settings.scss -------------------------------------------------------------------------------- /app/assets/stylesheets/app/base/_typography.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/assets/stylesheets/app/base/_typography.scss -------------------------------------------------------------------------------- /app/assets/stylesheets/app/base/extends/_button.scss: -------------------------------------------------------------------------------- 1 | %button { 2 | -webkit-font-smoothing: antialiased; 3 | background-color: $base-button-color; 4 | border-radius: $base-border-radius; 5 | color: white; 6 | display: inline-block; 7 | font-size: $base-font-size; 8 | font-weight: bold; 9 | line-height: 1; 10 | padding: .75em 1em; 11 | text-decoration: none; 12 | 13 | &:hover { 14 | background-color: $hover-button-color; 15 | color: white; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/assets/stylesheets/app/base/extends/_clearfix.scss: -------------------------------------------------------------------------------- 1 | %clearfix { 2 | @include clearfix; 3 | } 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/app/base/extends/_hide-text.scss: -------------------------------------------------------------------------------- 1 | %hide-text { 2 | @include hide-text; 3 | } 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/app/base/mixins/_flash.scss: -------------------------------------------------------------------------------- 1 | @mixin flash($color) { 2 | background: $color; 3 | color: darken($color, 60); 4 | font-weight: bold; 5 | margin-bottom: $base-line-height / 2; 6 | padding: $base-line-height / 2; 7 | 8 | a { 9 | color: darken($color, 70); 10 | 11 | &:hover { 12 | color: darken($color, 90); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/assets/stylesheets/asset_files.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the AssetFiles controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/assets.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Assets controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/documents.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Documents controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ -------------------------------------------------------------------------------- /app/assets/stylesheets/freeform_stream_promos.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the FreeformStreamPromos controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/partner_pageviews.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the PartnerPageviews controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/partners.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Partners controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/post_deploy_tokens.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the PostDeployTokens controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/post_locks.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the PostLocks controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/post_sharables.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the PostSharables controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pretest.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the pretest controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/project_repo.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the ProjectRepo controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/project_router.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the project_router controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/public_partner.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the public_partner controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/rss.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the RSS controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/sitemap.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Sitemap controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/user_features.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the UserFeatures controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/weedwacker.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the weedwacker controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/weekly_newsletters.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the weekly_newsletters controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/yahoo_posts.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the YahooPosts controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/controllers/admin_simple_controller.rb: -------------------------------------------------------------------------------- 1 | class AdminSimpleController < ApplicationController 2 | before_action :verify_current_user_present 3 | 4 | def edit 5 | PostLockSweeper.new.perform # sync! 6 | 7 | @post = Post.find_by_id(params[:post_id]) 8 | @post ||= Post.new 9 | 10 | if @post.persisted? 11 | @post_lock = PostLock.acquire(user: current_user, post: @post) 12 | end 13 | 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /app/controllers/debug_controller.rb: -------------------------------------------------------------------------------- 1 | class DebugController < ApplicationController 2 | before_action :verify_current_user_present 3 | def throw_error 4 | raise "I have no idea what I'm doing." 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/controllers/embed_controller.rb: -------------------------------------------------------------------------------- 1 | class EmbedController < ApplicationController 2 | after_action :allow_iframe 3 | 4 | def v1_email 5 | render layout: false 6 | end 7 | 8 | private 9 | 10 | def allow_iframe 11 | # https://stackoverflow.com/questions/18445782/how-to-override-x-frame-options-for-a-controller-or-action-in-rails-4 12 | response.headers.except!('X-Frame-Options') 13 | end 14 | end -------------------------------------------------------------------------------- /app/controllers/landing_page_controller.rb: -------------------------------------------------------------------------------- 1 | class LandingPageController < ApplicationController 2 | 3 | def victim 4 | redirect_to "/2015/12/16/an-unbelievable-story-of-rape#.SxkSdehUz", status: :moved_permanently 5 | end 6 | 7 | end -------------------------------------------------------------------------------- /app/controllers/pretest_controller.rb: -------------------------------------------------------------------------------- 1 | class PretestController < ApplicationController 2 | def slow 3 | @inject_public_cache_control = true 4 | sleep 2 5 | render plain: "slow #{Time.now.utc.to_s}" 6 | end 7 | 8 | def error 9 | @inject_public_cache_control = true 10 | if rand() < 0.9 11 | render plain: "oops #{Time.now.utc.to_s}", status: 500 12 | else 13 | render plain: "ok #{Time.now.utc.to_s}" 14 | end 15 | end 16 | 17 | end 18 | -------------------------------------------------------------------------------- /app/controllers/project_repo_controller.rb: -------------------------------------------------------------------------------- 1 | class ProjectReposController < ApplicationController 2 | before_action :verify_current_user_present 3 | 4 | def index 5 | @repos = ProjectRepo.new.all 6 | render json: @repos 7 | end 8 | 9 | def show 10 | @repo = ProjectRepo.new(slug: params[:slug]) 11 | render json: @repo 12 | end 13 | 14 | end 15 | -------------------------------------------------------------------------------- /app/controllers/project_repos_controller.rb: -------------------------------------------------------------------------------- 1 | class ProjectReposController < ApplicationController 2 | before_action :verify_current_user_present 3 | 4 | def index 5 | @repos = ProjectRepo.new.all 6 | render json: { 7 | repos: @repos['values'].map do |repo| 8 | { 9 | name: repo['name'] 10 | } 11 | end 12 | } 13 | 14 | end 15 | 16 | def show 17 | @repo = ProjectRepo.new(slug: params[:slug]) 18 | render json: @repo 19 | end 20 | 21 | end 22 | -------------------------------------------------------------------------------- /app/controllers/search_controller.rb: -------------------------------------------------------------------------------- 1 | class SearchController < ApplicationController 2 | before_action :verify_current_user_present 3 | def search 4 | @posts = Post.where("title @@ :q or content @@ :q", q: params[:q]) 5 | @links = Link.where("title @@ :q or html @@ :q", q: params[:q]) 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/controllers/sitemap_controller.rb: -------------------------------------------------------------------------------- 1 | class SitemapController < ApplicationController 2 | 3 | layout nil 4 | 5 | def index 6 | headers['Content-Type'] = 'application/xml' 7 | @inject_public_cache_control = true 8 | 9 | last_post = Post.published.order('revised_at DESC').first 10 | if stale?(etag: last_post, last_modified: last_post.revised_at.utc) 11 | @posts = Post.published.order('revised_at DESC').all 12 | end 13 | end 14 | 15 | end -------------------------------------------------------------------------------- /app/helpers/admin_analytics_helper.rb: -------------------------------------------------------------------------------- 1 | module AdminAnalyticsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/admin_api_v1_helper.rb: -------------------------------------------------------------------------------- 1 | module AdminApiV1Helper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/admin_gator_helper.rb: -------------------------------------------------------------------------------- 1 | module AdminGatorHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/admin_google_doc_helper.rb: -------------------------------------------------------------------------------- 1 | module AdminGoogleDocHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/admin_helper.rb: -------------------------------------------------------------------------------- 1 | module AdminHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/admin_simple_helper.rb: -------------------------------------------------------------------------------- 1 | module AdminSimpleHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/admin_slack_bot_helper.rb: -------------------------------------------------------------------------------- 1 | module AdminSlackBotHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/amicus_helper.rb: -------------------------------------------------------------------------------- 1 | module AmicusHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/asset_files_helper.rb: -------------------------------------------------------------------------------- 1 | module AssetFilesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/assets_helper.rb: -------------------------------------------------------------------------------- 1 | module AssetsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/collections_helper.rb: -------------------------------------------------------------------------------- 1 | module CollectionsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/debug_helper.rb: -------------------------------------------------------------------------------- 1 | module DebugHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/documents_helper.rb: -------------------------------------------------------------------------------- 1 | module DocumentsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/donate_helper.rb: -------------------------------------------------------------------------------- 1 | module DonateHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/email_newsletter_helper.rb: -------------------------------------------------------------------------------- 1 | module EmailNewsletterHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/formats_helper.rb: -------------------------------------------------------------------------------- 1 | module FormatsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/freeform_stream_promos_helper.rb: -------------------------------------------------------------------------------- 1 | module FreeformStreamPromosHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/graphics_helper.rb: -------------------------------------------------------------------------------- 1 | module GraphicsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/letters_helper.rb: -------------------------------------------------------------------------------- 1 | module LettersHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/links_helper.rb: -------------------------------------------------------------------------------- 1 | module LinksHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/members_helper.rb: -------------------------------------------------------------------------------- 1 | module MembersHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/newsletters_helper.rb: -------------------------------------------------------------------------------- 1 | module NewslettersHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/partner_pageviews_helper.rb: -------------------------------------------------------------------------------- 1 | module PartnerPageviewsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/partners_helper.rb: -------------------------------------------------------------------------------- 1 | module PartnersHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/photos_helper.rb: -------------------------------------------------------------------------------- 1 | module PhotosHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/post_deploy_tokens_helper.rb: -------------------------------------------------------------------------------- 1 | module PostDeployTokensHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/post_locks_helper.rb: -------------------------------------------------------------------------------- 1 | module PostLocksHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/post_shareables_helper.rb: -------------------------------------------------------------------------------- 1 | module PostShareablesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/post_threads_helper.rb: -------------------------------------------------------------------------------- 1 | module PostThreadsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/posts_helper.rb: -------------------------------------------------------------------------------- 1 | module PostsHelper 2 | 3 | def self.social_hash_id 4 | chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' 5 | hash = (1..9).map{ 6 | chars[SecureRandom.random_number(chars.length)] 7 | }.join('') 8 | "#." + hash 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/helpers/pretest_helper.rb: -------------------------------------------------------------------------------- 1 | module PretestHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/project_repo_helper.rb: -------------------------------------------------------------------------------- 1 | module ProjectRepoHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/project_router_helper.rb: -------------------------------------------------------------------------------- 1 | module ProjectRouterHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/public_helper.rb: -------------------------------------------------------------------------------- 1 | module PublicHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/public_partner_helper.rb: -------------------------------------------------------------------------------- 1 | module PublicPartnerHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/ratings_helper.rb: -------------------------------------------------------------------------------- 1 | module RatingsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/rattle_can_helper.rb: -------------------------------------------------------------------------------- 1 | module RattleCanHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/rss_helper.rb: -------------------------------------------------------------------------------- 1 | module RssHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/search_helper.rb: -------------------------------------------------------------------------------- 1 | module SearchHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/sessions_helper.rb: -------------------------------------------------------------------------------- 1 | module SessionsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/sitemap_helper.rb: -------------------------------------------------------------------------------- 1 | module SitemapHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/static_pages_helper.rb: -------------------------------------------------------------------------------- 1 | module StaticPagesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/tags_helper.rb: -------------------------------------------------------------------------------- 1 | module TagsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/user_deploy_api_helper.rb: -------------------------------------------------------------------------------- 1 | module UserDeployApiHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/user_features_helper.rb: -------------------------------------------------------------------------------- 1 | module UserFeaturesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/users_helper.rb: -------------------------------------------------------------------------------- 1 | module UsersHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/weedwacker_helper.rb: -------------------------------------------------------------------------------- 1 | module WeedwackerHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/weekly_newsletters_helper.rb: -------------------------------------------------------------------------------- 1 | module WeeklyNewslettersHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/yahoo_posts_helper.rb: -------------------------------------------------------------------------------- 1 | module YahooPostsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/lib/assets/.keep -------------------------------------------------------------------------------- /app/lib/collections/link_partial.rb: -------------------------------------------------------------------------------- 1 | class Collections::LinkPartial < Mustache 2 | 3 | def initialize(link: nil) 4 | attrs = CollectionItemPresenter.new(link).render 5 | attrs.each do |k, v| 6 | self[k] = v 7 | end 8 | end 9 | 10 | def template 11 | File.read(File.join(Rails.root, "app", "lib", "collections", "link_partial.mustache")) 12 | end 13 | 14 | end -------------------------------------------------------------------------------- /app/lib/collections/post_partial.rb: -------------------------------------------------------------------------------- 1 | class Collections::PostPartial < Mustache 2 | 3 | def initialize(post: nil) 4 | attrs = CollectionItemPresenter.new(post).render 5 | attrs.each do |k, v| 6 | self[k] = v 7 | end 8 | end 9 | 10 | def template 11 | File.read(File.join(Rails.root, "app", "lib", "collections", "post_partial.mustache")) 12 | end 13 | 14 | end -------------------------------------------------------------------------------- /app/lib/cookie_vault.rb: -------------------------------------------------------------------------------- 1 | class CookieVault 2 | def self.crypt 3 | key = ActiveSupport::KeyGenerator.new(ENV['COOKIE_VAULT_PASSWORD']).generate_key(ENV['COOKIE_VAULT_SALT']) 4 | ActiveSupport::MessageEncryptor.new(key) 5 | end 6 | 7 | def self.encrypt(text) 8 | self.crypt.encrypt_and_sign(text) 9 | end 10 | 11 | def self.decrypt(text) 12 | self.crypt.decrypt_and_verify(text) 13 | end 14 | end -------------------------------------------------------------------------------- /app/lib/domain_to_organization.rb: -------------------------------------------------------------------------------- 1 | class DomainToOrganization 2 | 3 | def self.data 4 | contents = File.read(File.join(Rails.root, 'data', 'domain_to_organization.yml')) 5 | return HashWithIndifferentAccess.new(YAML.load(contents)) 6 | end 7 | 8 | def self.lookup(domain) 9 | domain = domain.to_s 10 | 11 | org = self.data[domain] 12 | 13 | if org.blank? 14 | return domain 15 | else 16 | return org 17 | end 18 | end 19 | 20 | end 21 | -------------------------------------------------------------------------------- /app/lib/es_index_all_links_worker.rb: -------------------------------------------------------------------------------- 1 | class ESIndexAllLinksWorker 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform 6 | puts "ESIndexAllLinksWorker rebuilding index" 7 | puts ES.index_all_links 8 | end # perform 9 | 10 | end -------------------------------------------------------------------------------- /app/lib/es_index_all_posts_worker.rb: -------------------------------------------------------------------------------- 1 | class ESIndexAllPostsWorker 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform 6 | puts "ESIndexAllPostsWorker rebuilding index" 7 | puts ES.index_all_published_posts 8 | end # perform 9 | 10 | end -------------------------------------------------------------------------------- /app/lib/gator_tag_update_post.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/lib/gator_tag_update_post.rb -------------------------------------------------------------------------------- /app/lib/google_doc_markdown_converter_v2.rb: -------------------------------------------------------------------------------- 1 | class GoogleDocMarkdownConverterV2 2 | 3 | end 4 | -------------------------------------------------------------------------------- /app/lib/hammer_string.rb: -------------------------------------------------------------------------------- 1 | class HammerString 2 | def self.coerce(dirty) 3 | dirty.to_s.force_encoding("UTF-8").encode("UTF-8", invalid: :replace, replace: "") 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/lib/post_projection.rb: -------------------------------------------------------------------------------- 1 | class PostProjection 2 | 3 | attr_reader :post 4 | def initialize(post) 5 | @post = post 6 | self 7 | end 8 | 9 | def to_array 10 | post_renderer = PostRenderer.new(post) 11 | html = post_renderer.render_markdown() 12 | doc = Nokogiri::HTML(post.content) 13 | 14 | doc.css('body > *').map do |el| 15 | el.to_html 16 | end 17 | end 18 | 19 | end -------------------------------------------------------------------------------- /app/lib/post_shareable_maybe.rb: -------------------------------------------------------------------------------- 1 | class PostShareableMaybe 2 | def self.override(shareable, post, col) 3 | if shareable.present? and shareable.respond_to?(col) and shareable.send(col).present? 4 | shareable.send(col) 5 | else 6 | post.send(col) 7 | end 8 | end 9 | end -------------------------------------------------------------------------------- /app/lib/report_v1.rb: -------------------------------------------------------------------------------- 1 | require 'securerandom' 2 | 3 | class ReportV1 4 | 5 | def self.generate_id 6 | SecureRandom.urlsafe_base64 7 | end 8 | 9 | def self.fulfill_report(id, content) 10 | Rails.cache.write("report/v1/#{id}", content) 11 | end 12 | 13 | def self.find_by_id(id) 14 | Rails.cache.read("report/v1/#{id}") 15 | end 16 | 17 | end -------------------------------------------------------------------------------- /app/lib/shortcode_divider.rb: -------------------------------------------------------------------------------- 1 | class ShortcodeDivider 2 | def self.regex 3 | /\[divider\]([\s\S]*?)\[\/divider\]/m 4 | end 5 | def self.parse(full_text) 6 | full_text.gsub!(self.regex) do |capture| 7 | inner_html = $1 8 | ['
', 9 | '
', 10 | '
', 11 | inner_html, 12 | '
', 13 | '
'].join("\n") 14 | end 15 | full_text 16 | end 17 | end -------------------------------------------------------------------------------- /app/lib/shortcode_photo_tag.rb: -------------------------------------------------------------------------------- 1 | module ShortcodePhotoInline 2 | def self.parse(html) 3 | html 4 | end 5 | end -------------------------------------------------------------------------------- /app/lib/shortcode_section_break.rb: -------------------------------------------------------------------------------- 1 | class ShortcodeSectionBreak 2 | def self.regex 3 | /\[section-break\](.*?)\[\/section-break\]/m 4 | end 5 | def self.parse(full_text, post_id) 6 | full_text.gsub(self.regex) do |capture| 7 | "
#{$1}
" 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/lib/shortcode_sidebar_note.rb: -------------------------------------------------------------------------------- 1 | class ShortcodeSidebarNote 2 | def self.regex 3 | /\[sidebar-note\](.*?)\[\/sidebar-note\]/ 4 | end 5 | def self.parse(full_text, post_id) 6 | full_text.gsub(self.regex) do |capture| 7 | [ '
', 8 | '
', 9 | $1, 10 | '
', 11 | '
', 12 | ].join('') 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/lib/shortcode_subhead.rb: -------------------------------------------------------------------------------- 1 | class ShortcodeSubhead 2 | def self.regex 3 | /(\[subhead\])([\s\S]*?)(\[\/subhead\])/ 4 | end 5 | def self.parse(full_text) 6 | full_text.gsub(self.regex) do |capture| 7 | inner_html = $2 8 | ["\n", inner_html, "\n"].join("") 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/lib/thriller.rb: -------------------------------------------------------------------------------- 1 | class Thriller 2 | include HTTParty 3 | base_uri ENV['THRILLER_HOST'] 4 | 5 | def token 6 | ENV['THRILLER_TOKEN'] 7 | end 8 | 9 | def social_snapshot(urls) 10 | self.class.post( 11 | "/api/v1/report/social/snapshot", 12 | { 13 | body: { 14 | token: token(), 15 | urls: urls 16 | } 17 | } 18 | ) 19 | end 20 | 21 | end -------------------------------------------------------------------------------- /app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/mailers/.keep -------------------------------------------------------------------------------- /app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "ivong@themarshallproject.org" 3 | layout 'mailer' 4 | end 5 | -------------------------------------------------------------------------------- /app/mailers/gator_mailer.rb: -------------------------------------------------------------------------------- 1 | class GatorMailer < ApplicationMailer 2 | default from: 'ivong@themarshallproject.org' 3 | layout false 4 | 5 | def daily_email 6 | @links = Link.where('created_at > ?', 24.hours.ago) 7 | mail(to: 'ivong@themarshallproject.org', subject: 'GatorToday', layout: false) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/mailers/post_mailer.rb: -------------------------------------------------------------------------------- 1 | class PostMailer < ApplicationMailer 2 | 3 | def new_published(post) 4 | @post = post 5 | 6 | to_list = ENV['POST_PUBLISHED_ALERT_EMAILS'].split(',') 7 | to_list << post.authors.map(&:email) 8 | to_list = to_list.flatten 9 | 10 | mail(to: to_list, subject: "#{@post.title} [PUBLISHED]") 11 | end 12 | 13 | end -------------------------------------------------------------------------------- /app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/models/.keep -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/models/concerns/.keep -------------------------------------------------------------------------------- /app/models/external_service_response.rb: -------------------------------------------------------------------------------- 1 | class ExternalServiceResponse < ActiveRecord::Base 2 | serialize :response, JSON 3 | 4 | after_create do 5 | puts "ExternalServiceResponse:after_create #{self.inspect}" 6 | end 7 | 8 | def stale? 9 | self.created_at > 15.minutes.ago 10 | end 11 | 12 | end 13 | -------------------------------------------------------------------------------- /app/models/featured_block_activate_event.rb: -------------------------------------------------------------------------------- 1 | class FeaturedBlockActivateEvent < ActiveRecord::Base 2 | belongs_to :user 3 | belongs_to :featured_block 4 | end 5 | -------------------------------------------------------------------------------- /app/models/freeform_stream_promo.rb: -------------------------------------------------------------------------------- 1 | class FreeformStreamPromo < ActiveRecord::Base 2 | 3 | scope :published, -> do 4 | where(published: true).where("revised_at < ?", Time.now) 5 | end 6 | 7 | scope :stream, -> (min_time, max_time) do 8 | published.where('revised_at < ?', max_time) 9 | .where('revised_at > ?', min_time) 10 | end 11 | 12 | def stream_sort_key 13 | revised_at 14 | end 15 | 16 | end -------------------------------------------------------------------------------- /app/models/graphic.rb: -------------------------------------------------------------------------------- 1 | class Graphic < ActiveRecord::Base 2 | 3 | after_create :rotate_deploy_token 4 | 5 | def rotate_deploy_token 6 | self.deploy_token = SecureRandom.hex 7 | self.save! 8 | end 9 | 10 | def to_param 11 | "#{id}-#{slug.parameterize}" 12 | end 13 | 14 | end -------------------------------------------------------------------------------- /app/models/link_decode_event.rb: -------------------------------------------------------------------------------- 1 | class LinkDecodeEvent < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /app/models/link_remote_status_worker.rb: -------------------------------------------------------------------------------- 1 | class LinkRemoteStatusWorker 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform(link_id) 6 | link = Link.find_by(id: link_id) 7 | if link.present? 8 | link.update_remote_status! 9 | end 10 | end 11 | 12 | end -------------------------------------------------------------------------------- /app/models/link_report.rb: -------------------------------------------------------------------------------- 1 | class LinkReport < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /app/models/mailchimp_webhook.rb: -------------------------------------------------------------------------------- 1 | class MailchimpWebhook < ActiveRecord::Base 2 | 3 | serialize :payload, JSON 4 | 5 | def self.create_from_params(_params) 6 | params = _params.except('controller', 'action') 7 | 8 | event_type = params['type'] rescue '' 9 | email = params['data']['email'] rescue '' 10 | 11 | self.create(email: email, event_type: event_type, payload: params) 12 | end 13 | 14 | end 15 | 16 | -------------------------------------------------------------------------------- /app/models/newsletter_assignment.rb: -------------------------------------------------------------------------------- 1 | class NewsletterAssignment < ActiveRecord::Base 2 | belongs_to :newsletter, touch: true 3 | validates_presence_of :newsletter 4 | 5 | belongs_to :taggable, polymorphic: true, touch: true 6 | validates_presence_of :taggable 7 | 8 | end -------------------------------------------------------------------------------- /app/models/partner.rb: -------------------------------------------------------------------------------- 1 | class Partner < ActiveRecord::Base 2 | default_scope { order('name ASC') } 3 | end -------------------------------------------------------------------------------- /app/models/partner_pageview.rb: -------------------------------------------------------------------------------- 1 | class PartnerPageview < ActiveRecord::Base 2 | belongs_to :post 3 | belongs_to :partner 4 | end 5 | -------------------------------------------------------------------------------- /app/models/post_delegate_path.rb: -------------------------------------------------------------------------------- 1 | class PostDelegatePath < ActiveRecord::Base 2 | 3 | belongs_to :post, touch: true 4 | validates :post, presence: true, uniqueness: true 5 | validates :path, length: { minimum: 2 } 6 | 7 | scope :active, -> { where(active: true) } 8 | 9 | def self.lookup_path(post_instance) 10 | self.active.find_by(post: post_instance).try(:path) 11 | rescue 12 | puts "ERROR in PostDelegatePath.lookup_path: #{$!.inspect}" 13 | false 14 | end 15 | 16 | end -------------------------------------------------------------------------------- /app/models/post_thread.rb: -------------------------------------------------------------------------------- 1 | class PostThread < ActiveRecord::Base 2 | has_many :post_thread_assignments 3 | has_many :posts, through: :post_thread_assignments 4 | 5 | end -------------------------------------------------------------------------------- /app/models/post_thread_assignment.rb: -------------------------------------------------------------------------------- 1 | class PostThreadAssignment < ActiveRecord::Base 2 | 3 | belongs_to :post 4 | validates :post, presence: true 5 | 6 | belongs_to :post_thread 7 | validates :post_thread, presence: true 8 | 9 | end -------------------------------------------------------------------------------- /app/models/public_search_query.rb: -------------------------------------------------------------------------------- 1 | class PublicSearchQuery < ActiveRecord::Base 2 | 3 | # after_create do 4 | # Slack.perform_async('SLACK_DEV_LOGS_URL', { 5 | # channel: "#endrun", 6 | # username: "SearchQuery", 7 | # text: "'#{self.query}' (referer: #{self.referer})", 8 | # icon_emoji: ":doughnut:" 9 | # }) 10 | # end 11 | 12 | def user_first_seen 13 | Time.at(self.token.split('|p|').first.to_i) 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/models/rating.rb: -------------------------------------------------------------------------------- 1 | class Rating < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /app/models/static_page.rb: -------------------------------------------------------------------------------- 1 | class StaticPage < ActiveRecord::Base 2 | validates :slug, length: { minimum: 2 } 3 | validates :content, length: { minimum: 2 } 4 | 5 | def to_param 6 | "#{id}-#{slug}" 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/models/stripe_customer.rb: -------------------------------------------------------------------------------- 1 | class StripeCustomer < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /app/models/user_post_assignment.rb: -------------------------------------------------------------------------------- 1 | class UserPostAssignment < ActiveRecord::Base 2 | belongs_to :post, touch: true 3 | belongs_to :user, touch: true 4 | validates_presence_of :post 5 | validates_presence_of :user 6 | end 7 | -------------------------------------------------------------------------------- /app/models/weekly_newsletter_assignment.rb: -------------------------------------------------------------------------------- 1 | class WeeklyNewsletterAssignment < ActiveRecord::Base 2 | # belongs_to :weekly_newsletter, touch: true 3 | # validates_presence_of :weekly_newsletter 4 | 5 | # belongs_to :taggable, polymorphic: true, touch: true 6 | # validates_presence_of :taggable 7 | end 8 | -------------------------------------------------------------------------------- /app/views/admin/daily_email.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/views/admin/daily_email.html.erb -------------------------------------------------------------------------------- /app/views/admin/debug_os_links.html.erb: -------------------------------------------------------------------------------- 1 | 2 | <% @assignments.each do |assignment| %> 3 | <% if assignment.taggable.is_a? Link %> 4 | <%= assignment.taggable.url %>
5 | <%= assignment.taggable.short_token %>
6 |
7 | <% end %> 8 | <% end %> 9 |
-------------------------------------------------------------------------------- /app/views/admin/dragons.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_tag update_dragons_path do %> 2 | <% ['javascript', 'style'].each do |block_name| %> 3 | <%= "<#{block_name}>" %>
4 |
5 | <% end %> 6 | <%= submit_tag %> 7 | <% end %> -------------------------------------------------------------------------------- /app/views/admin/every_link.html.erb: -------------------------------------------------------------------------------- 1 | 2 | <% @posts.each do |post| %> 3 | <% post.parse_all_links.each do |link| %> 4 | 5 | 6 | 7 | 8 | 9 | <% end %> 10 | <% end %> 11 |
<%= post.path %><%= link['href'] %><%= link.text %>
-------------------------------------------------------------------------------- /app/views/admin/feedback.html.erb: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/views/admin/freeform_email_editor.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_tag(freeform_email_path, method: :post) do %> 2 | 3 | 4 | <% end %> 5 | -------------------------------------------------------------------------------- /app/views/admin/moar_posts.html.erb: -------------------------------------------------------------------------------- 1 | <% @posts.each do |post| %> 2 | <% @post = post %> 3 | 4 | <%= render "public/posts/#{post.post_format}" %> 5 | <% end %> -------------------------------------------------------------------------------- /app/views/admin/outcome_tracker.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 |
7 | 8 |
9 | 10 | -------------------------------------------------------------------------------- /app/views/admin/post_bench.html.erb: -------------------------------------------------------------------------------- 1 | <%= render "public/posts/#{@post.post_format}" %> -------------------------------------------------------------------------------- /app/views/admin/preview_post_inject.html.erb: -------------------------------------------------------------------------------- 1 | <%= render 'public/posts/base' %> -------------------------------------------------------------------------------- /app/views/admin/preview_promo_lte.html.erb: -------------------------------------------------------------------------------- 1 | <% item = @letter %> 2 | <%= render partial: "public/stream/#{item.class.model_name.singular}", locals: { item: item } %> -------------------------------------------------------------------------------- /app/views/admin/quizbuilder_preview.html.erb: -------------------------------------------------------------------------------- 1 | <%= render 'public/posts/base' %> -------------------------------------------------------------------------------- /app/views/admin/report_v1.html.erb: -------------------------------------------------------------------------------- 1 | <% if @content.nil? %> 2 |

Processing...

3 | 4 | <% else %> 5 | <%= raw @content %> 6 | <% end %> -------------------------------------------------------------------------------- /app/views/admin/stream_preview.html.erb: -------------------------------------------------------------------------------- 1 | 2 | <% @items.each do |item| %> 3 | 4 | 5 | 7 | 8 | <% end %> 9 |
<%= item.class %><%= link_to (item.try(:title) || item.try(:name) || item.id), edit_polymorphic_path(item) %> 6 | <%= item.published_at %>
-------------------------------------------------------------------------------- /app/views/admin/tag_leaderboard.html.erb: -------------------------------------------------------------------------------- 1 | <% @data.each do |user_id, count| %> 2 | 3 | <%= count %> tags -- <%= User.find(user_id).email rescue 'unknown' %>
4 | <% end %> -------------------------------------------------------------------------------- /app/views/admin/taggings.html.erb: -------------------------------------------------------------------------------- 1 | <% @taggings.each do |tagging| %> 2 | <%= render partial: "taggings/activity_#{tagging.taggable_type.downcase}", locals: { tagging: tagging } %> 3 | <% end %> 4 | -------------------------------------------------------------------------------- /app/views/admin/users.html.erb: -------------------------------------------------------------------------------- 1 |

Admin#users

2 |

Find me in app/views/admin/users.html.erb

3 | -------------------------------------------------------------------------------- /app/views/admin_analytics/email_v1.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | <% @top_posts.each do |post| %> 5 | 6 | 7 | 8 | 9 | <% end %> 10 |
<%= post[:post].title %><%= post[:count] %>
11 | 12 |
13 | 14 |
15 | <%= JSON.pretty_generate @source %>
16 | 
-------------------------------------------------------------------------------- /app/views/admin_analytics/ga_test.html.erb: -------------------------------------------------------------------------------- 1 |

AdminAnalytics#ga_test

2 |

Find me in app/views/admin_analytics/ga_test.html.erb

3 | -------------------------------------------------------------------------------- /app/views/admin_analytics/partners.html.erb: -------------------------------------------------------------------------------- 1 |

AdminAnalytics#partners

2 |

Find me in app/views/admin_analytics/partners.html.erb

3 | -------------------------------------------------------------------------------- /app/views/admin_analytics/partners_nojs.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <% (@response['aggregations']['group_by_slug']['buckets'] rescue []).each do |slug| %> 7 | 8 | 9 | 10 | 11 | <% end %> 12 |
SlugPageviews
<%= slug['key'] %><%= slug['doc_count'] %>
13 | 14 |
<%= JSON.pretty_generate @response %>
-------------------------------------------------------------------------------- /app/views/admin_api_v1/preview_gist.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%= render "public/posts/#{post_format}" %> 4 | 5 | <% if params.keys.include? 'debug' %> 6 |
<%= YAML.dump @debug %>
7 | <% end %> -------------------------------------------------------------------------------- /app/views/admin_api_v1/preview_post_via_post.html.erb: -------------------------------------------------------------------------------- 1 | <%= render "public/posts/#{post_format}" %> -------------------------------------------------------------------------------- /app/views/admin_gator/index.html.erb: -------------------------------------------------------------------------------- 1 |

Gator2

2 | 3 | 4 | 5 | 6 | "})();<%= @js %>'>Gator2 7 | 8 | -------------------------------------------------------------------------------- /app/views/admin_gator/tag_post_index.html.erb: -------------------------------------------------------------------------------- 1 | <% @posts.each do |post| %> 2 | <%= link_to post.title, "/admin/gator/post/#{post.id}" %>
3 | <% end %> -------------------------------------------------------------------------------- /app/views/admin_google_doc/all_spreadsheets.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/admin_google_doc/oauth_callback.html.erb: -------------------------------------------------------------------------------- 1 |

AdminGoogleDoc#oauth_callback

2 |

Find me in app/views/admin_google_doc/oauth_callback.html.erb

3 | -------------------------------------------------------------------------------- /app/views/admin_google_doc/parse_spreadsheet.html.erb: -------------------------------------------------------------------------------- 1 | <%= raw @html %> -------------------------------------------------------------------------------- /app/views/admin_slack_bot/incoming_slash_command.html.erb: -------------------------------------------------------------------------------- 1 |

AdminSlackBot#incoming_slash_command

2 |

Find me in app/views/admin_slack_bot/incoming_slash_command.html.erb

3 | -------------------------------------------------------------------------------- /app/views/amicus/preview.html.erb: -------------------------------------------------------------------------------- 1 |

Amicus#preview

2 |

Find me in app/views/amicus/preview.html.erb

3 | -------------------------------------------------------------------------------- /app/views/amicus/preview_draft.html.erb: -------------------------------------------------------------------------------- 1 | <%= render "public/posts/#{@post.post_format}" %> -------------------------------------------------------------------------------- /app/views/amicus/sync.html.erb: -------------------------------------------------------------------------------- 1 |

Amicus#sync

2 |

Find me in app/views/amicus/sync.html.erb

3 | -------------------------------------------------------------------------------- /app/views/amicus/update.html.erb: -------------------------------------------------------------------------------- 1 |

Amicus#update

2 |

Find me in app/views/amicus/update.html.erb

3 | -------------------------------------------------------------------------------- /app/views/asset_files/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing Asset File

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @asset_file %> | 6 | <%= link_to 'Back', asset_files_path %> 7 | -------------------------------------------------------------------------------- /app/views/asset_files/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@asset_files) do |asset_file| 2 | json.extract! asset_file, :id, :asset_id, :s3_bucket, :s3_key 3 | json.url asset_file_url(asset_file, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/asset_files/new.html.erb: -------------------------------------------------------------------------------- 1 |

New Asset File

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', asset_files_path %> 6 | -------------------------------------------------------------------------------- /app/views/asset_files/show.html.erb: -------------------------------------------------------------------------------- 1 |

<%= notice %>

2 | 3 |

4 | Asset: 5 | <%= @asset_file.asset_id %> 6 |

7 | 8 |

9 | S3 bucket: 10 | <%= @asset_file.s3_bucket %> 11 |

12 | 13 |

14 | S3 key: 15 | <%= @asset_file.s3_key %> 16 |

17 | 18 | <%= link_to 'Edit', edit_asset_file_path(@asset_file) %> | 19 | <%= link_to 'Back', asset_files_path %> 20 | -------------------------------------------------------------------------------- /app/views/asset_files/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @asset_file, :id, :asset_id, :s3_bucket, :s3_key, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/collections/api_v1_items.html.erb: -------------------------------------------------------------------------------- 1 |

Collections#api_v1_items

2 |

Find me in app/views/collections/api_v1_items.html.erb

3 | -------------------------------------------------------------------------------- /app/views/debug/throw_error.html.erb: -------------------------------------------------------------------------------- 1 |

Debug#throw_error

2 |

Find me in app/views/debug/throw_error.html.erb

3 | -------------------------------------------------------------------------------- /app/views/documents/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing document

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @document %> | 6 | <%= link_to 'Back', documents_path %> 7 | -------------------------------------------------------------------------------- /app/views/documents/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@documents) do |document| 2 | json.extract! document, :id, :dc_id, :published, :body, :dc_data, :dc_published_url 3 | json.url document_url(document, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/documents/new.html.erb: -------------------------------------------------------------------------------- 1 |

New document

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', documents_path %> 6 | -------------------------------------------------------------------------------- /app/views/documents/potential.html.erb: -------------------------------------------------------------------------------- 1 |

DocumentCloud Documents

2 | 3 | <% @potential_documents.each do |document| %> 4 | 5 | 6 | 7 | 8 | 9 | 10 | <% end %> 11 |

<%= document['title'] %>

<%= document['id'] %><%= link_to 'Ingest', ingest_document_path(document['id']), method: :post, class: "btn btn-success pull-right btn-padded" %>
-------------------------------------------------------------------------------- /app/views/documents/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @document, :id, :dc_id, :published, :body, :dc_data, :dc_published_url, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/featured_blocks/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing Homepage

2 | <%= link_to 'Dupe', dupe_featured_block_path(@featured_block), method: :post, class: 'pull-right btn btn-warning' %> 3 |
4 | 5 | <%= render 'form' %> 6 | 7 | <%= link_to 'Show', @featured_block %> | 8 | <%= link_to 'Back', featured_blocks_path %> 9 | -------------------------------------------------------------------------------- /app/views/featured_blocks/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@featured_blocks) do |featured_block| 2 | json.extract! featured_block, :id, :template, :slots, :published 3 | json.url featured_block_url(featured_block, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/featured_blocks/new.html.erb: -------------------------------------------------------------------------------- 1 |

New Homepage

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', featured_blocks_path %> 6 | -------------------------------------------------------------------------------- /app/views/featured_blocks/preview.html.erb: -------------------------------------------------------------------------------- 1 | <% @hide_nav = true %> 2 | <% begin %> 3 | <%= render partial: "public/featured_block/#{@featured_block.template}" %> 4 | <% rescue %> 5 |

Invalid configuation

6 |
7 | 	<%= $!.inspect %>
8 | 	
9 | <% end %> -------------------------------------------------------------------------------- /app/views/featured_blocks/show.html.erb: -------------------------------------------------------------------------------- 1 |

<%= notice %>

2 | 3 |

4 | Template: 5 | <%= @featured_block.template %> 6 |

7 | 8 |

9 | Slots: 10 | <%= @featured_block.slots %> 11 |

12 | 13 |

14 | Published: 15 | <%= @featured_block.published %> 16 |

17 | 18 | <%= link_to 'Edit', edit_featured_block_path(@featured_block) %> | 19 | <%= link_to 'Back', featured_blocks_path %> 20 | -------------------------------------------------------------------------------- /app/views/featured_blocks/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @featured_block, :id, :template, :slots, :published, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/freeform_stream_promos/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing Freeform Stream Promo

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @freeform_stream_promo %> | 6 | <%= link_to 'Back', freeform_stream_promos_path %> 7 | -------------------------------------------------------------------------------- /app/views/freeform_stream_promos/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@freeform_stream_promos) do |freeform_stream_promo| 2 | json.extract! freeform_stream_promo, :id, :slug, :html, :revised_at, :deploy_token 3 | json.url freeform_stream_promo_url(freeform_stream_promo, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/freeform_stream_promos/new.html.erb: -------------------------------------------------------------------------------- 1 |

New Freeform Stream Promo

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', freeform_stream_promos_path %> 6 | -------------------------------------------------------------------------------- /app/views/freeform_stream_promos/preview.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 3 | <%= render 'public/stream/freeform_stream_promo', item: @freeform_stream_promo %> -------------------------------------------------------------------------------- /app/views/freeform_stream_promos/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @freeform_stream_promo, :id, :slug, :html, :revised_at, :deploy_token, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/graphics/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing Graphic <%= link_to 'Back', graphics_path, class: "btn btn-info pull-right" %> 2 |

3 | 4 | <%= render 'form' %> 5 | -------------------------------------------------------------------------------- /app/views/graphics/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@graphics) do |graphic| 2 | json.extract! graphic, :id, :slug, :html, :head 3 | json.url graphic_url(graphic, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/graphics/new.html.erb: -------------------------------------------------------------------------------- 1 |

New Graphic <%= link_to 'Back', graphics_path, class: "btn btn-info pull-right" %>

2 | 3 | <%= render 'form' %> 4 | 5 | -------------------------------------------------------------------------------- /app/views/graphics/show.html.erb: -------------------------------------------------------------------------------- 1 |

<%= notice %>

2 | 3 |

4 | Slug: 5 | <%= @graphic.slug %> 6 |

7 | 8 |

9 | Deploy Token: 10 | <%= @graphic.deploy_token %> 11 |

12 | 13 |
14 | <%= @graphic.html %>
15 | 
16 | 17 | <%= link_to 'Edit', edit_graphic_path(@graphic) %> | 18 | <%= link_to 'Back', graphics_path %> 19 | -------------------------------------------------------------------------------- /app/views/graphics/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @graphic, :id, :slug, :html, :head, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/landing_page/victim.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/views/landing_page/victim.html.erb -------------------------------------------------------------------------------- /app/views/layouts/_admin_analytics.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/views/layouts/_admin_analytics.html.erb -------------------------------------------------------------------------------- /app/views/layouts/_debug_box.html.erb: -------------------------------------------------------------------------------- 1 |
2 | to_bottom
3 | stream_item_count
4 | updated_at
5 | stream downloading?
6 |
-------------------------------------------------------------------------------- /app/views/layouts/_flashes.html.erb: -------------------------------------------------------------------------------- 1 | <% flash.each do |name, msg| %> 2 | <% if msg.is_a?(String) %> 3 |
4 | 5 | <%= content_tag :div, msg, :id => "flash_#{name}" %> 6 |
7 | <% end %> 8 | <% end %> -------------------------------------------------------------------------------- /app/views/layouts/_footer_analytics.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/views/layouts/_footer_analytics.html.erb -------------------------------------------------------------------------------- /app/views/layouts/_layout_js_footer.html.erb: -------------------------------------------------------------------------------- 1 | <% if params.keys.include?('deferjq') %> 2 | 3 | <%= javascript_include_tag 'app/head' %> 4 | 7 | 8 | <% end %> 9 | -------------------------------------------------------------------------------- /app/views/layouts/_pixel_ping.html.erb: -------------------------------------------------------------------------------- 1 | <% if Rails.env.production? %> 2 | 3 | <% else %> 4 | 5 | <% end %> -------------------------------------------------------------------------------- /app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /app/views/layouts/partner.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 17 | <%= yield %> 18 | 19 | -------------------------------------------------------------------------------- /app/views/letters/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@letters) do |letter| 2 | json.extract! letter, :id, :name, :email, :twitter, :street_address, :is_anonymous, :content, :post_id, :status, :stream_promo, :excerpt 3 | json.url letter_url(letter, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/letters/new.html.erb: -------------------------------------------------------------------------------- 1 |

New letter

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', letters_path %> 6 | -------------------------------------------------------------------------------- /app/views/letters/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @letter, :id, :name, :email, :twitter, :street_address, :is_anonymous, :content, :post_id, :status, :stream_promo, :excerpt, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/links/bookmarklet.html.erb: -------------------------------------------------------------------------------- 1 | Drag this to your bookmarks bar: 2 | 3 | Add Link to Gator<%= " DEV" if Rails.env.development? %> -------------------------------------------------------------------------------- /app/views/links/bookmarklet_link.html.erb: -------------------------------------------------------------------------------- 1 | Drag this to your bookmarks bar: 2 | 3 | Add Link to Gator<%= " DEV" if Rails.env.development? %> -------------------------------------------------------------------------------- /app/views/links/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing link

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @link %> | 6 | <%= link_to 'Back', links_path %> 7 | -------------------------------------------------------------------------------- /app/views/links/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@links) do |link| 2 | json.extract! link, :id, :url, :title, :creator_id, :content 3 | json.url link_url(link, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/links/new.html.erb: -------------------------------------------------------------------------------- 1 |

New link

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', links_path %> 6 | -------------------------------------------------------------------------------- /app/views/links/partials_before.html.erb: -------------------------------------------------------------------------------- 1 | <%= render @links %> -------------------------------------------------------------------------------- /app/views/links/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @link, :id, :url, :title, :creator_id, :content, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/members/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing member

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @member %> | 6 | <%= link_to 'Back', members_path %> 7 | -------------------------------------------------------------------------------- /app/views/members/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@members) do |member| 2 | json.extract! member, :id, :name, :email, :token, :last_seen_at, :last_ip, :active 3 | json.url member_url(member, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/members/new.html.erb: -------------------------------------------------------------------------------- 1 |

New member

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', members_path %> 6 | -------------------------------------------------------------------------------- /app/views/members/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @member, :id, :name, :email, :token, :last_seen_at, :last_ip, :active, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/newsletters/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing newsletter

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @newsletter %> | 6 | <%= link_to 'Back', newsletters_path %> 7 | -------------------------------------------------------------------------------- /app/views/newsletters/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@newsletters) do |newsletter| 2 | json.extract! newsletter, :id, :name, :email_subject, :mailchimp_id, :blurb, :template 3 | json.url newsletter_url(newsletter, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/newsletters/new.html.erb: -------------------------------------------------------------------------------- 1 |

New Newsletter


2 | 3 | <%= render 'form' %> 4 |
5 | <%= link_to 'Back', newsletters_path, class: "btn btn-danger" %> 6 | -------------------------------------------------------------------------------- /app/views/newsletters/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @newsletter, :id, :name, :email_subject, :mailchimp_id, :blurb, :template, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/partner_pageviews/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing Partner Pageview

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @partner_pageview %> | 6 | <%= link_to 'Back', partner_pageviews_path %> 7 | -------------------------------------------------------------------------------- /app/views/partner_pageviews/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@partner_pageviews) do |partner_pageview| 2 | json.extract! partner_pageview, :id, :post_id, :partner_id, :url, :pageviews 3 | json.url partner_pageview_url(partner_pageview, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/partner_pageviews/new.html.erb: -------------------------------------------------------------------------------- 1 |

New Partner Pageview

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', partner_pageviews_path %> 6 | -------------------------------------------------------------------------------- /app/views/partner_pageviews/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @partner_pageview, :id, :post_id, :partner_id, :url, :pageviews, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/partners/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing Partner

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @partner %> | 6 | <%= link_to 'Back', partners_path %> 7 | -------------------------------------------------------------------------------- /app/views/partners/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@partners) do |partner| 2 | json.extract! partner, :id, :name 3 | json.url partner_url(partner, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/partners/new.html.erb: -------------------------------------------------------------------------------- 1 |

New Partner

2 | 3 | Please be careful not to create duplicate partners. 4 | 5 |

6 | 7 | <%= render 'form' %> 8 | 9 | <%= link_to 'Back', partners_path %> 10 | -------------------------------------------------------------------------------- /app/views/partners/show.html.erb: -------------------------------------------------------------------------------- 1 |

<%= notice %>

2 | 3 |

4 | Name: 5 | <%= @partner.name %> 6 |

7 | 8 | <%= link_to 'Edit', edit_partner_path(@partner) %> | 9 | <%= link_to 'Back', partners_path %> 10 | -------------------------------------------------------------------------------- /app/views/partners/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @partner, :id, :name, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/photos/_embed.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/photos/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing Photo

2 | 3 | <%= render 'form' %> 4 |
5 | <%= link_to 'Show', @photo %> | 6 | <%= link_to 'Back', photos_path %> 7 | -------------------------------------------------------------------------------- /app/views/photos/embed.html.erb: -------------------------------------------------------------------------------- 1 | stuff -------------------------------------------------------------------------------- /app/views/photos/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@photos) do |photo| 2 | json.extract! photo, :id, :original_url, :caption, :byline 3 | json.url photo_url(photo, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/photos/new.html.erb: -------------------------------------------------------------------------------- 1 |

New photo

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', photos_path %> 6 | -------------------------------------------------------------------------------- /app/views/photos/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @photo, :id, :original_url, :caption, :byline, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/post_deploy_tokens/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing Post Deploy Token

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @post_deploy_token %> | 6 | <%= link_to 'Back', post_deploy_tokens_path %> 7 | -------------------------------------------------------------------------------- /app/views/post_deploy_tokens/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@post_deploy_tokens) do |post_deploy_token| 2 | json.extract! post_deploy_token, :id, :post_id, :label, :token, :active 3 | json.url post_deploy_token_url(post_deploy_token, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/post_deploy_tokens/new.html.erb: -------------------------------------------------------------------------------- 1 |

New Post Deploy Token

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', post_deploy_tokens_path %> 6 | -------------------------------------------------------------------------------- /app/views/post_deploy_tokens/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @post_deploy_token, :id, :post_id, :label, :token, :active, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/post_formats/_post_full/_decision_of_the_day.html.erb: -------------------------------------------------------------------------------- 1 |
2 | DooD 3 |
-------------------------------------------------------------------------------- /app/views/post_formats/_post_full/_follow.html.erb: -------------------------------------------------------------------------------- 1 |
2 | Follow 3 |
-------------------------------------------------------------------------------- /app/views/post_formats/_post_full/_stub.html.erb: -------------------------------------------------------------------------------- 1 |
2 | Stub 3 |
-------------------------------------------------------------------------------- /app/views/post_formats/_post_full/_trawl.html.erb: -------------------------------------------------------------------------------- 1 |
2 | Trawl 3 |
-------------------------------------------------------------------------------- /app/views/post_locks/actives_widget.html.erb: -------------------------------------------------------------------------------- 1 | Currently Being Editing
2 | -------------------------------------------------------------------------------- /app/views/post_locks/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing post_lock

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @post_lock %> | 6 | <%= link_to 'Back', post_locks_path %> 7 | -------------------------------------------------------------------------------- /app/views/post_locks/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@post_locks) do |post_lock| 2 | json.extract! post_lock, :id, :post_id, :user_id, :acquired_at 3 | json.url post_lock_url(post_lock, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/post_locks/new.html.erb: -------------------------------------------------------------------------------- 1 |

New post_lock

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', post_locks_path %> 6 | -------------------------------------------------------------------------------- /app/views/post_locks/show.html.erb: -------------------------------------------------------------------------------- 1 |

<%= notice %>

2 | 3 |

4 | Post: 5 | <%= @post_lock.post_id %> 6 |

7 | 8 |

9 | User: 10 | <%= @post_lock.user_id %> 11 |

12 | 13 |

14 | Acquired at: 15 | <%= @post_lock.acquired_at %> 16 |

17 | 18 | <%= link_to 'Edit', edit_post_lock_path(@post_lock) %> | 19 | <%= link_to 'Back', post_locks_path %> 20 | -------------------------------------------------------------------------------- /app/views/post_locks/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @post_lock, :id, :post_id, :user_id, :acquired_at, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/post_mailer/new_published.text.erb: -------------------------------------------------------------------------------- 1 | <%= @post.title %> 2 | 3 | <%= @post.canonical_url %> -------------------------------------------------------------------------------- /app/views/post_shareables/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing Post Shareable

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @post_shareable %> | 6 | <%= link_to 'Back', post_shareables_path %> 7 | -------------------------------------------------------------------------------- /app/views/post_shareables/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@post_sharables) do |post_sharable| 2 | json.extract! post_sharable, :id, :post_id, :slug, :photo_id, :facebook_headline, :facebook_description, :twitter_headline 3 | json.url post_sharable_url(post_sharable, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/post_shareables/new.html.erb: -------------------------------------------------------------------------------- 1 |

New Post Sharable

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', post_shareables_path %> 6 | -------------------------------------------------------------------------------- /app/views/post_shareables/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @post_sharable, :id, :post_id, :slug, :photo_id, :facebook_headline, :facebook_description, :twitter_headline, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/post_threads/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing post_thread

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @post_thread %> | 6 | <%= link_to 'Back', post_threads_path %> 7 | -------------------------------------------------------------------------------- /app/views/post_threads/index.html.erb: -------------------------------------------------------------------------------- 1 | <% @post_threads.each do |post_thread| %> 2 |
3 | <% post_thread.posts.sort_by{|post| post.published_at.utc.to_i * -1}.each do |post| %> 4 |
5 | <%= link_to post do %> 6 |

<%= post.title %>

7 | <% end %> 8 |
9 | <% end %> 10 |
11 |
12 | <% end %> -------------------------------------------------------------------------------- /app/views/post_threads/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@post_threads) do |post_thread| 2 | json.extract! post_thread, :id, :name 3 | json.url post_thread_url(post_thread, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/post_threads/new.html.erb: -------------------------------------------------------------------------------- 1 |

New post_thread

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', post_threads_path %> 6 | -------------------------------------------------------------------------------- /app/views/post_threads/show.html.erb: -------------------------------------------------------------------------------- 1 |

<%= notice %>

2 | 3 |

4 | Name: 5 | <%= @post_thread.name %> 6 |

7 | 8 | <%= link_to 'Edit', edit_post_thread_path(@post_thread) %> | 9 | <%= link_to 'Back', post_threads_path %> 10 | -------------------------------------------------------------------------------- /app/views/post_threads/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @post_thread, :id, :name, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/posts/_post_collapse.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/views/posts/_post_collapse.html.erb -------------------------------------------------------------------------------- /app/views/posts/_post_full.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/views/posts/_post_full.html.erb -------------------------------------------------------------------------------- /app/views/posts/edit.html.erb: -------------------------------------------------------------------------------- 1 | 6 | <%= render 'form' %> 7 | 8 | -------------------------------------------------------------------------------- /app/views/posts/index.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for(:body_classes) { 'post-index-body' } %> 2 |
3 | <% @posts.each do |post| %> 4 | <%= render 'post_full', post: post %> 5 | <% end %> 6 |
-------------------------------------------------------------------------------- /app/views/posts/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@posts) do |post| 2 | json.extract! post, :id, :content, :format_id, :publish_at, :status 3 | json.url post_url(post, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/posts/new.html.erb: -------------------------------------------------------------------------------- 1 | <%= render 'form' %> 2 | 3 | <%= link_to 'Back to all posts', posts_path %> 4 | -------------------------------------------------------------------------------- /app/views/posts/preview_post.html.erb: -------------------------------------------------------------------------------- 1 | <%= render partial: "public/stream/#{@post.class.model_name.singular}", locals: { item: @post } %> -------------------------------------------------------------------------------- /app/views/posts/preview_promo.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 3 | <%= render partial: "public/stream/#{@post.class.model_name.singular}", locals: { item: @post } %> -------------------------------------------------------------------------------- /app/views/posts/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @post, :id, :content, :post_format, :publish_at, :status, :created_at, :updated_at -------------------------------------------------------------------------------- /app/views/pretest/error.html.erb: -------------------------------------------------------------------------------- 1 |

Pretest#error

2 |

Find me in app/views/pretest/error.html.erb

3 | -------------------------------------------------------------------------------- /app/views/pretest/slow.html.erb: -------------------------------------------------------------------------------- 1 |

Pretest#slow

2 |

Find me in app/views/pretest/slow.html.erb

3 | -------------------------------------------------------------------------------- /app/views/project_repos/index.html.erb: -------------------------------------------------------------------------------- 1 |

ProjectRepo#index

2 |

Find me in app/views/project_repo/index.html.erb

3 | -------------------------------------------------------------------------------- /app/views/project_repos/show.html.erb: -------------------------------------------------------------------------------- 1 |

ProjectRepo#show

2 |

Find me in app/views/project_repo/show.html.erb

3 | -------------------------------------------------------------------------------- /app/views/project_router/next_to_die.html.erb: -------------------------------------------------------------------------------- 1 |

ProjectRouter#next_to_die

2 |

Find me in app/views/project_router/next_to_die.html.erb

3 | -------------------------------------------------------------------------------- /app/views/public/_featured_block.html.erb: -------------------------------------------------------------------------------- 1 | 2 | <%= render partial: "public/featured_block/#{@featured_block.template}" %> 3 | -------------------------------------------------------------------------------- /app/views/public/_feed.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% @posts.each do |post| %> 4 | <%= render partial: 'public/post_partial', locals: { post: post } %> 5 | <% end %> -------------------------------------------------------------------------------- /app/views/public/_header.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/public/_homepage_featured.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/views/public/_homepage_featured.html.erb -------------------------------------------------------------------------------- /app/views/public/_post_byline.html.erb: -------------------------------------------------------------------------------- 1 | <% if post.present? and post.byline.present? %> 2 | <%= raw post.byline %> 3 | <% else %> 4 | By The Marshall Project 5 | <% end %> -------------------------------------------------------------------------------- /app/views/public/_post_lead_photo.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 | <%= photo.caption.try(:html_safe) %> 7 | 8 |
9 |
10 |
11 |
-------------------------------------------------------------------------------- /app/views/public/_post_partial.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/views/public/_post_partial.html.erb -------------------------------------------------------------------------------- /app/views/public/_topshelf.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/views/public/_topshelf.html.erb -------------------------------------------------------------------------------- /app/views/public/collection_index.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/views/public/collection_index.html.erb -------------------------------------------------------------------------------- /app/views/public/featured_block_test.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/views/public/featured_block_test.html.erb -------------------------------------------------------------------------------- /app/views/public/feed_posts.html.erb: -------------------------------------------------------------------------------- 1 | <% @posts.each do |post| %> 2 | <%= render partial: 'public/post_partial', locals: { post: post } %> 3 | <% end %> 4 | -------------------------------------------------------------------------------- /app/views/public/fluid_test.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | <%= render partial: 'public/post_header', locals: { post: @post } %> 5 | 6 | <%= raw PostRenderer.new(@post).render() %> 7 |
8 |
9 |
-------------------------------------------------------------------------------- /app/views/public/pixel_setup.html.erb: -------------------------------------------------------------------------------- 1 |
2 |

Tracking Pixel

3 |
<%= '' %>
4 |
-------------------------------------------------------------------------------- /app/views/public/posts/_base_freeform_header.html.erb: -------------------------------------------------------------------------------- 1 | <%= render partial: 'public/posts/base', locals: { override_post_header: true } %> -------------------------------------------------------------------------------- /app/views/public/posts/_freeform.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <%= raw @post.content %> 7 | 8 | 9 | 10 | <%= raw @post.inject_html if @post.inject_html.present? %> 11 | -------------------------------------------------------------------------------- /app/views/public/posts/_photo_essay.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render partial: 'public/posts/base' %> 3 |
-------------------------------------------------------------------------------- /app/views/public/posts/_root.html.erb: -------------------------------------------------------------------------------- 1 | <% cache ['posts_root', 'v4', @post] do %> 2 | 3 | 4 | <%= render partial: "public/posts/#{@post.post_format}", layout: false %> 5 | <% end %> -------------------------------------------------------------------------------- /app/views/public/posts/_shell_light_on_dark.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render partial: 'public/posts/shell' %> 3 |
-------------------------------------------------------------------------------- /app/views/public/random_sentence.html.erb: -------------------------------------------------------------------------------- 1 |

2 | <%= link_to @sentence, @thePost.path %> 3 |

-------------------------------------------------------------------------------- /app/views/public/stream/_freeform_stream_promo.html.erb: -------------------------------------------------------------------------------- 1 | <% cache ['stream', 'v1', item] do %> 2 |
3 | <%= raw item.html %> 4 |
5 | <% end %> -------------------------------------------------------------------------------- /app/views/public/stream/posts/_letter.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/public/stream_partials.html.erb: -------------------------------------------------------------------------------- 1 | <% @stream.items.each do |item| %> 2 | <% # some polymorphism is about to happen, get ready: %> 3 | <%= render partial: "public/stream/#{item.class.model_name.singular}", locals: { item: item } %> 4 | <% end %> -------------------------------------------------------------------------------- /app/views/public/tokens.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/app/views/public/tokens.html.erb -------------------------------------------------------------------------------- /app/views/public_partner/outcome_tracker.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 |
7 | 8 |
9 | 10 | -------------------------------------------------------------------------------- /app/views/search/search.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for(:body_classes) { 'post-index-body' } %> 2 |
3 |

Search for "<%= params[:q] %>"

4 | <% @posts.each do |post| %> 5 | <%= render 'posts/post_full', post: post %> 6 | <% end %> 7 | <% if @posts.empty? %> 8 |

No posts found.

9 | <% end %> 10 | 11 | 12 | <% @links.each do |link| %> 13 | <%= link_to link.title, link %>

14 | <% end %> 15 |
16 | -------------------------------------------------------------------------------- /app/views/sessions/create_token.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 5 |
6 | EndRun 7 |
8 |
9 |

We've sent you a login link. Check your email to proceed.

10 |
-------------------------------------------------------------------------------- /app/views/sessions/new_with_token.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 5 |
6 | EndRun 7 |
8 |
9 | <%= form_tag create_login_token_path do %> 10 | <%= text_field_tag :email, params[:email], class: "input", placeholder: "Email Address" %> 11 | <%= submit_tag "Send Login Link", class: "button" %> 12 | <% end %> 13 |
-------------------------------------------------------------------------------- /app/views/static_pages/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing Static Page

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @static_page %> | 6 | <%= link_to 'Back', static_pages_path %> 7 | -------------------------------------------------------------------------------- /app/views/static_pages/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@static_pages) do |static_page| 2 | json.extract! static_page, :id, :slug, :content 3 | json.url static_page_url(static_page, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/static_pages/new.html.erb: -------------------------------------------------------------------------------- 1 |

New static_page

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', static_pages_path %> 6 | -------------------------------------------------------------------------------- /app/views/static_pages/show.html.erb: -------------------------------------------------------------------------------- 1 |

<%= notice %>

2 | 3 |

4 | Slug: 5 | <%= @static_page.slug %> 6 |

7 | 8 |

9 | Content: 10 | <%= @static_page.content %> 11 |

12 | 13 | <%= link_to 'Edit', edit_static_page_path(@static_page) %> | 14 | <%= link_to 'Back', static_pages_path %> 15 | -------------------------------------------------------------------------------- /app/views/static_pages/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @static_page, :id, :slug, :content, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/taggings/_activity_link.html.erb: -------------------------------------------------------------------------------- 1 |

2 | <%= tagging.created_at.to_s(:full_date) %> | 3 | <%= link_to(tagging.user.email_slug, '#') rescue '(unknown user)' %> 4 | added the tag <%= link_to tagging.tag.name, tagging.tag %> 5 | to the link 6 | <%= link_to (tagging.taggable.try(:title) || tagging.taggable.id) , tagging.taggable %> 7 |

-------------------------------------------------------------------------------- /app/views/taggings/_activity_post.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/tags/_form_tagger.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Tags

4 |
5 |
6 | Tagged with:
7 | 8 |
9 | <% Tag.all.each do |tag| %> 10 | <%= link_to tag.name, tag %>      11 | <% end %> 12 |
13 |
-------------------------------------------------------------------------------- /app/views/tags/_inline.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Tags

4 |
5 |
6 | <% item.tags.each do |tag| %> 7 | <%= link_to tag %> 8 | <% end %> 9 |
10 |
-------------------------------------------------------------------------------- /app/views/tags/_poly_post.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/tags/_tag.html.erb: -------------------------------------------------------------------------------- 1 | <% cache ['v1', tag] do %> 2 | 3 | <%= link_to tag.name, edit_tag_path(tag) %> 4 | <%= tag.type.name %> 5 | <%= tag.public? %> 6 | 7 | <%= link_to 'Edit', edit_tag_path(tag), class: 'btn btn-primary pull-right' %> 8 | 9 | <% end %> 10 | -------------------------------------------------------------------------------- /app/views/tags/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing tag

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @tag %> | 6 | <%= link_to 'Back', tags_path %> 7 | -------------------------------------------------------------------------------- /app/views/tags/index.html.erb: -------------------------------------------------------------------------------- 1 |

Tags<%= link_to 'New Tag', new_tag_path, class: 'btn btn-info pull-right' %>

2 | 3 | <% cache ['v1', Tag.unscoped.order('updated_at DESC').first.updated_at] do %> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | <%= render @tags %> 15 | 16 |
NameTypePublic?
17 | <% end %> -------------------------------------------------------------------------------- /app/views/tags/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@tags) do |tag| 2 | json.extract! tag, :id, :name, :slug 3 | json.url tag_url(tag, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/tags/new.html.erb: -------------------------------------------------------------------------------- 1 |

New Tag

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', tags_path %> 6 | -------------------------------------------------------------------------------- /app/views/tags/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @tag, :id, :name, :slug, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/user_features/disable.html.erb: -------------------------------------------------------------------------------- 1 |

UserFeatures#disable

2 |

Find me in app/views/user_features/disable.html.erb

3 | -------------------------------------------------------------------------------- /app/views/user_features/enable.html.erb: -------------------------------------------------------------------------------- 1 |

UserFeatures#enable

2 |

Find me in app/views/user_features/enable.html.erb

3 | -------------------------------------------------------------------------------- /app/views/user_mailer/login_token.html.erb: -------------------------------------------------------------------------------- 1 | Click this link to log into EndRun:
2 |

<%= @url %>

-------------------------------------------------------------------------------- /app/views/user_mailer/login_token.text.erb: -------------------------------------------------------------------------------- 1 | Click to login: <%= @url %> -------------------------------------------------------------------------------- /app/views/user_mailer/reset_password.html.erb: -------------------------------------------------------------------------------- 1 |

UserMailer#reset_password

2 | 3 |

4 | <%= @greeting %>, find me in app/views/user_mailer/reset_password.html.erb 5 |

6 | -------------------------------------------------------------------------------- /app/views/user_mailer/reset_password.text.erb: -------------------------------------------------------------------------------- 1 | UserMailer#reset_password 2 | 3 | <%= @greeting %>, find me in app/views/user_mailer/reset_password.text.erb 4 | -------------------------------------------------------------------------------- /app/views/users/edit.html.erb: -------------------------------------------------------------------------------- 1 | <%= render 'form' %> 2 | 3 | <%= link_to 'Show', @user %> | 4 | <%= link_to 'Back', users_path %> -------------------------------------------------------------------------------- /app/views/weekly_newsletters/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@weekly_newsletters) do |weekly_newsletter| 2 | json.extract! weekly_newsletter, :id, :name, :email_subject, :mailchimp_id, :mailchimp_web_id, :byline, :published_at, :public, :archive_url, :opening_graf, :quote_graf 3 | json.url weekly_newsletter_url(weekly_newsletter, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/weekly_newsletters/new.html.erb: -------------------------------------------------------------------------------- 1 | 7 | 8 |

New Weekly Newsletter

9 | 10 | <%= render 'form' %> 11 | 12 |

13 |

-------------------------------------------------------------------------------- /app/views/weekly_newsletters/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @weekly_newsletter, :id, :name, :email_subject, :mailchimp_id, :mailchimp_web_id, :byline, :published_at, :public, :archive_url, :opening_graf, :quote_graf, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/views/yahoo_posts/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing Yahoo Post

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'All Yahoo Posts', yahoo_posts_path %>
6 |
7 | <%= link_to 'Delete (Warning, no undo)', @yahoo_post, method: :delete, data: { confirm: 'Are you sure?' } %> 8 | 9 | -------------------------------------------------------------------------------- /app/views/yahoo_posts/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@yahoo_posts) do |yahoo_post| 2 | json.extract! yahoo_post, :id, :post_id, :title, :published 3 | json.url yahoo_post_url(yahoo_post, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /app/views/yahoo_posts/new.html.erb: -------------------------------------------------------------------------------- 1 |

New Yahoo Post

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', yahoo_posts_path %> 6 | -------------------------------------------------------------------------------- /app/views/yahoo_posts/show.html.erb: -------------------------------------------------------------------------------- 1 |

<%= notice %>

2 | 3 |

4 | Post: 5 | <%= @yahoo_post.post_id %> 6 |

7 | 8 |

9 | Title: 10 | <%= @yahoo_post.title %> 11 |

12 | 13 |

14 | Published: 15 | <%= @yahoo_post.published %> 16 |

17 | 18 | <%= link_to 'Edit', edit_yahoo_post_path(@yahoo_post) %> | 19 | <%= link_to 'All Yahoo Posts', yahoo_posts_path %> 20 | -------------------------------------------------------------------------------- /app/views/yahoo_posts/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @yahoo_post, :id, :post_id, :title, :published, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /app/workers/attach_user_post_worker.rb: -------------------------------------------------------------------------------- 1 | class AttachUserToPostWorker 2 | include Sidekiq::Worker 3 | 4 | def perform(args={}) 5 | ActiveRecord::Base.connection_pool.with_connection do 6 | UserPostAssignment.first_or_create!( 7 | source: args['source'], 8 | user: User.find(args['user_id']), 9 | post: Post.find(args['post_id']) 10 | ) 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/workers/build_post_partial.rb: -------------------------------------------------------------------------------- 1 | class BuildPostPartial 2 | 3 | include Sidekiq::Worker 4 | sidekiq_options retry: 0 5 | 6 | def perform(post_id) 7 | ActiveRecord::Base.connection_pool.with_connection do 8 | post = Post.find(post_id) 9 | 10 | html = OfflineTemplate.new 11 | .set_instance_vars(post: post) 12 | .render_to_string("public/posts/single_post_partial") 13 | 14 | puts "BuildPostPartial for #{post_id}: #{html.length} characters" 15 | end 16 | end 17 | end -------------------------------------------------------------------------------- /app/workers/collection_slice_worker.rb: -------------------------------------------------------------------------------- 1 | class CollectionSliceWorker 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform(tag_id, models, slice) 6 | slice = CollectionSlice.new(tag_id: tag_id, models: models, slice: slice) 7 | slice.generate_memcached 8 | slice.generate 9 | end 10 | 11 | end 12 | -------------------------------------------------------------------------------- /app/workers/create_post_version.rb: -------------------------------------------------------------------------------- 1 | class CreatePostVersion 2 | 3 | include Sidekiq::Worker 4 | sidekiq_options retry: 0 5 | 6 | def perform(post_id) 7 | ActiveRecord::Base.connection_pool.with_connection do 8 | post = Post.find(post_id) 9 | # TODO 10 | end 11 | end 12 | end -------------------------------------------------------------------------------- /app/workers/debug_email_worker.rb: -------------------------------------------------------------------------------- 1 | class DebugEmailWorker 2 | include Sidekiq::Worker 3 | 4 | def perform(data) 5 | if ENV['POSTMARK_API_KEY'].blank? 6 | puts "DebugEmailWorker run without POSTMARK_API_KEY, skipping send" 7 | return 8 | end 9 | client = Postmark::ApiClient.new(ENV['POSTMARK_API_KEY'], secure: true, http_open_timeout: 5) 10 | client.deliver(data.symbolize_keys) 11 | end 12 | end -------------------------------------------------------------------------------- /app/workers/facebook_linter_worker.rb: -------------------------------------------------------------------------------- 1 | class FacebookLinterWorker 2 | include Sidekiq::Worker 3 | 4 | def perform(post_id) 5 | linter = FacebookLinter.new(post_id: post_id) 6 | if linter.valid? 7 | result = linter.scrape 8 | puts "FacebookLinterWorker :: result=#{result.to_json}" 9 | else 10 | puts "FacebookLinterWorker :: invalid post_id=#{post_id}" 11 | end 12 | end 13 | end -------------------------------------------------------------------------------- /app/workers/generate_tag_slugs_if_nil.rb: -------------------------------------------------------------------------------- 1 | class GenerateTagSlugsIfNil 2 | include Sidekiq::Worker 3 | 4 | def perform 5 | ActiveRecord::Base.connection_pool.with_connection do 6 | puts Tag.generate_slugs_for_nils() 7 | puts Tag.generate_slugs_for_emptys() 8 | end 9 | end 10 | 11 | end 12 | -------------------------------------------------------------------------------- /app/workers/index_tag.rb: -------------------------------------------------------------------------------- 1 | class IndexTag 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform(tag_id) 6 | puts "IndexTag id=#{tag_id}" 7 | ES.index_tag(tag_id) 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /app/workers/link_meta_tag_worker.rb: -------------------------------------------------------------------------------- 1 | class LinkMetaTagWorker 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform(link_id) 6 | link = Link.find_by(id: link_id) 7 | if link.present? 8 | link.update_meta_tags! 9 | end 10 | end 11 | 12 | end -------------------------------------------------------------------------------- /app/workers/member_update_stats.rb: -------------------------------------------------------------------------------- 1 | class MemberUpdateStats 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | def perform(member_id, options={}) 5 | ActiveRecord::Base.connection_pool.with_connection do 6 | member = Member.find(member_id) 7 | member.update_stats(options) 8 | end 9 | end 10 | end -------------------------------------------------------------------------------- /app/workers/minute_cron_worker.rb: -------------------------------------------------------------------------------- 1 | class MinuteCronWorker 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform 6 | ScanNewPublishedPosts.perform_async 7 | PostLockSweeper.perform_async 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /app/workers/post_lock_sweeper.rb: -------------------------------------------------------------------------------- 1 | class PostLockSweeper 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform 6 | logger.info "PostLockSweeper perform starting..." 7 | ActiveRecord::Base.connection_pool.with_connection do 8 | 9 | PostLock.cleanup_stale_locks 10 | 11 | end # AR::Base 12 | end # perform 13 | 14 | end -------------------------------------------------------------------------------- /app/workers/pull_document_cloud.rb: -------------------------------------------------------------------------------- 1 | class PullDocumentCloud 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform(document_id) 6 | ActiveRecord::Base.connection_pool.with_connection do 7 | document = Document.find(document_id) 8 | document.pull_data 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/workers/rebuild_all_tags_json.rb: -------------------------------------------------------------------------------- 1 | class RebuildAllTagsJSON 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform 6 | puts "RebuildAllTagsJSON" 7 | ActiveRecord::Base.connection_pool.with_connection do 8 | Tag.get_all() 9 | end 10 | end 11 | 12 | end 13 | -------------------------------------------------------------------------------- /app/workers/redis_heartbeat_worker.rb: -------------------------------------------------------------------------------- 1 | class RedisHeartbeatWorker 2 | include Sidekiq::Worker 3 | 4 | def perform 5 | info = $redis.info 6 | # Librato.group 'redis' do |g| 7 | # g.measure 'memory.usage', info['used_memory'].to_i 8 | # g.measure 'connected_clients.count', info['connected_clients'].to_i 9 | # end 10 | end 11 | end -------------------------------------------------------------------------------- /app/workers/refresh_twitter_count.rb: -------------------------------------------------------------------------------- 1 | class RefreshTwitterCount 2 | include Sidekiq::Worker 3 | def perform 4 | puts "Twitter deprecated this API." 5 | end 6 | end -------------------------------------------------------------------------------- /app/workers/send_ttin.rb: -------------------------------------------------------------------------------- 1 | class SendTTIN 2 | include Sidekiq::Worker 3 | 4 | def perform 5 | Process.kill("TTIN", Process.pid) 6 | end 7 | 8 | end -------------------------------------------------------------------------------- /app/workers/touch_active_homepages.rb: -------------------------------------------------------------------------------- 1 | class TouchActiveHomepages 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform(post_id) 6 | ActiveRecord::Base.connection_pool.with_connection do 7 | FeaturedBlock.published.each do |featured_block| 8 | puts "TouchActiveHomepages: #{featured_block}, testing #{post_id}" 9 | featured_block.touch_if_contains_post(post_id) 10 | end 11 | end # AR::Base 12 | end # perform 13 | 14 | end -------------------------------------------------------------------------------- /app/workers/update_document_published_url.rb: -------------------------------------------------------------------------------- 1 | class UpdateDocumentPublishedURL 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform(document_id) 6 | ActiveRecord::Base.connection_pool.with_connection do 7 | document = Document.find(document_id) 8 | document.update_published_url 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/workers/update_user_last_seen.rb: -------------------------------------------------------------------------------- 1 | class UpdateUserLastSeen 2 | include Sidekiq::Worker 3 | sidekiq_options :retry => false 4 | 5 | def perform(user_id, timestamp) 6 | ActiveRecord::Base.connection_pool.with_connection do 7 | puts "bumping user_session for #{user_id}" 8 | user = User.find(user_id) 9 | user.last_seen = Time.at(timestamp) 10 | user.save 11 | UserSession.event_for(user.id) 12 | end # AR::Base 13 | end # perform 14 | 15 | end -------------------------------------------------------------------------------- /bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | APP_PATH = File.expand_path('../../config/application', __FILE__) 8 | require_relative '../config/boot' 9 | require 'rails/commands' 10 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | require_relative '../config/boot' 8 | require 'rake' 9 | Rake.application.run 10 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | 2 | require ::File.expand_path('../config/environment', __FILE__) 3 | run Rails.application -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | # Set up gems listed in the Gemfile. 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | 4 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 5 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /config/initializers/activesupport_notifications.rb: -------------------------------------------------------------------------------- 1 | # ActiveSupport::Notifications.subscribe "process_action.action_controller" do |name, start, finish, id, payload| 2 | # #duration = ((finish - start) * 1000).round(0) 3 | # [:view_runtime, :db_runtime].each do |key| 4 | # if payload[key].present? 5 | # $stdout.puts("measure#app.#{key}=#{payload[key].round(0)}ms") 6 | # end 7 | # end 8 | # end -------------------------------------------------------------------------------- /config/initializers/asset_precompiling.rb: -------------------------------------------------------------------------------- 1 | Rails.application.config.assets.precompile += %w( public.css ) 2 | Rails.application.config.assets.precompile += %w( public.js ) 3 | Rails.application.config.assets.precompile += %w( react_admin.js ) 4 | 5 | Rails.application.config.assets.paths << Rails.root.join("app", "assets", "fonts") -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json -------------------------------------------------------------------------------- /config/initializers/dotenv_if_development.rb: -------------------------------------------------------------------------------- 1 | Dotenv.load if Rails.env.development? -------------------------------------------------------------------------------- /config/initializers/enable_gc_profiler.rb: -------------------------------------------------------------------------------- 1 | GC::Profiler.enable -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | 6 | Mime::Type.register "application/xls", :xls -------------------------------------------------------------------------------- /config/initializers/post_lock_sweeper.rb: -------------------------------------------------------------------------------- 1 | # PostLockSweeper.new.perform # TKTK, safety? -------------------------------------------------------------------------------- /config/initializers/precompile_assets.rb: -------------------------------------------------------------------------------- 1 | Rails.application.config.assets.precompile += [ 2 | 'admin/admin.js', 3 | 'admin/admin.css', 4 | 'app/app.js', 5 | 'app/head.js', 6 | 'app/app.css', 7 | 'app/fonts.css', 8 | 'app/underscore-1.8.3.js', 9 | 'admin/quizbuilder_standalone.js', 10 | ] 11 | -------------------------------------------------------------------------------- /config/initializers/rack_attack.rb: -------------------------------------------------------------------------------- 1 | #Rack::Attack.whitelist('allow from localhost') do |req| 2 | # Requests are allowed if the return value is truthy 3 | # '127.0.0.1' == req.ip 4 | #end 5 | 6 | # Rack::Attack.throttle('ip', limit: 20, period: 10) do |req| 7 | # # need to check that this is actually the right header 8 | # req.ip 9 | # end 10 | 11 | Rack::Attack.throttle('partner_admin', limit: 5, period: 10) do |req| 12 | req.path.include?('/partner/') 13 | end -------------------------------------------------------------------------------- /config/initializers/rack_timeout.rb: -------------------------------------------------------------------------------- 1 | # Rack::Timeout.timeout = 10 # seconds -------------------------------------------------------------------------------- /config/initializers/redis.rb: -------------------------------------------------------------------------------- 1 | if $redis.present? 2 | puts "config/initializers/redis.rb: $redis already exists" 3 | else 4 | $redis = ConnectionPool.new(size: 5, timeout: 5) { 5 | Redis.new(url: ENV[ENV['REDIS_PROVIDER']]) 6 | } 7 | end 8 | -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_endrun_session' 4 | -------------------------------------------------------------------------------- /config/initializers/set_default_host_url.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.default_url_options[:host] = 'endrun.herokuapp.com' -------------------------------------------------------------------------------- /config/initializers/time_formats.rb: -------------------------------------------------------------------------------- 1 | Time::DATE_FORMATS[:full_date] = ->(time) { time.strftime("%B %e, %Y at %l:%M %P").gsub('am', 'a.m.').gsub('pm', 'p.m.') } -------------------------------------------------------------------------------- /config/post_formats.yml: -------------------------------------------------------------------------------- 1 | base: # do not change this. it's the default one. 2 | name: 'Normal' # you can rename this... 3 | 4 | photo_essay: 5 | name: 'Photo Essay' 6 | 7 | shell: 8 | name: 'Shell' 9 | 10 | shell_light_on_dark: 11 | name: 'Shell (Light on dark)' 12 | 13 | freeform: 14 | name: 'Freeform' 15 | 16 | base_freeform_header: 17 | name: 'Base w/ Freeform Header' 18 | 19 | base_feature: 20 | name: 'Base w/ Feature Header' -------------------------------------------------------------------------------- /config/post_stream_promos.yml: -------------------------------------------------------------------------------- 1 | base: # do not change this. it's the default one. 2 | name: 'Base' # you can rename this... 3 | 4 | base_w_art: 5 | name: 'Base w/ art' 6 | 7 | stub: 8 | name: 'Stub' 9 | 10 | feature: 11 | name: 'Feature' 12 | 13 | photo_essay: 14 | name: 'Photo Essay' -------------------------------------------------------------------------------- /config/sidekiq.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/config/sidekiq.yml -------------------------------------------------------------------------------- /config/tag_types.yml: -------------------------------------------------------------------------------- 1 | topic: # do not delete this 2 | name: 'Topic' 3 | 4 | person: 5 | name: 'Person' 6 | 7 | location: 8 | name: 'Location' 9 | 10 | content_type: 11 | name: 'Content Type' 12 | 13 | court_case: 14 | name: 'Court Case' 15 | 16 | bucket: 17 | name: 'Bucket' 18 | 19 | category: 20 | name: 'Rubric' 21 | 22 | series: 23 | name: 'Series' -------------------------------------------------------------------------------- /db/migrate/20140624212702_create_formats.rb: -------------------------------------------------------------------------------- 1 | class CreateFormats < ActiveRecord::Migration 2 | def change 3 | create_table :formats do |t| 4 | t.string :name 5 | t.string :slug 6 | 7 | t.timestamps 8 | end 9 | add_index :formats, :name 10 | add_index :formats, :slug 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20140624214936_create_posts.rb: -------------------------------------------------------------------------------- 1 | class CreatePosts < ActiveRecord::Migration 2 | def change 3 | create_table :posts do |t| 4 | t.text :content 5 | t.integer :format_id 6 | t.datetime :publish_at 7 | t.string :status 8 | 9 | t.timestamps 10 | end 11 | add_index :posts, :format_id 12 | add_index :posts, :publish_at 13 | add_index :posts, :status 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20140624215659_change_formats_to_post_formats.rb: -------------------------------------------------------------------------------- 1 | class ChangeFormatsToPostFormats < ActiveRecord::Migration 2 | def change 3 | rename_table :formats, :post_formats 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140624235032_change_format_column_on_posts.rb: -------------------------------------------------------------------------------- 1 | class ChangeFormatColumnOnPosts < ActiveRecord::Migration 2 | def change 3 | rename_column :posts, :format_id, :post_format_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140624235537_create_post_thread_assignments.rb: -------------------------------------------------------------------------------- 1 | class CreatePostThreadAssignments < ActiveRecord::Migration 2 | def change 3 | create_table :post_thread_assignments do |t| 4 | t.integer :post_id 5 | t.integer :post_thread_id 6 | 7 | t.timestamps 8 | end 9 | add_index :post_thread_assignments, :post_id 10 | add_index :post_thread_assignments, :post_thread_id 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20140624235554_create_post_threads.rb: -------------------------------------------------------------------------------- 1 | class CreatePostThreads < ActiveRecord::Migration 2 | def change 3 | create_table :post_threads do |t| 4 | t.string :name 5 | 6 | t.timestamps 7 | end 8 | add_index :post_threads, :name 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20140626161124_rename_publish_at_to_published_at_for_posts.rb: -------------------------------------------------------------------------------- 1 | class RenamePublishAtToPublishedAtForPosts < ActiveRecord::Migration 2 | def change 3 | rename_column :posts, :publish_at, :published_at 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140630191447_add_title_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddTitleToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :title, :text 4 | add_index :posts, :title 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140702164716_create_tags.rb: -------------------------------------------------------------------------------- 1 | class CreateTags < ActiveRecord::Migration 2 | def change 3 | create_table :tags do |t| 4 | t.string :name 5 | t.string :slug 6 | 7 | t.timestamps 8 | end 9 | add_index :tags, :name 10 | add_index :tags, :slug 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20140707140945_create_photos.rb: -------------------------------------------------------------------------------- 1 | class CreatePhotos < ActiveRecord::Migration 2 | def change 3 | create_table :photos do |t| 4 | t.text :original_url 5 | t.text :caption 6 | t.text :byline 7 | 8 | t.timestamps 9 | end 10 | add_index :photos, :original_url 11 | add_index :photos, :caption 12 | add_index :photos, :byline 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20140707152927_create_users.rb: -------------------------------------------------------------------------------- 1 | class CreateUsers < ActiveRecord::Migration 2 | def change 3 | create_table :users do |t| 4 | t.string :email 5 | t.string :password_digest 6 | t.string :twitter 7 | t.text :bio 8 | 9 | t.timestamps 10 | end 11 | add_index :users, :email 12 | add_index :users, :twitter 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20140708204328_add_bookmarklet_token_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddBookmarkletTokenToUsers < ActiveRecord::Migration 2 | def change 3 | add_column :users, :bookmarklet_token, :string 4 | add_index :users, :bookmarklet_token 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140708204407_create_links.rb: -------------------------------------------------------------------------------- 1 | class CreateLinks < ActiveRecord::Migration 2 | def change 3 | create_table :links do |t| 4 | t.text :url 5 | t.text :title 6 | t.integer :creator_id 7 | t.text :content 8 | 9 | t.timestamps 10 | end 11 | add_index :links, :creator_id 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20140708210125_add_login_token_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddLoginTokenToUsers < ActiveRecord::Migration 2 | def change 3 | add_column :users, :login_token, :string 4 | add_index :users, :login_token 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140708215131_add_login_token_date_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddLoginTokenDateToUsers < ActiveRecord::Migration 2 | def change 3 | add_column :users, :login_token_expires, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140709143254_add_domain_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddDomainToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :domain, :string 4 | add_index :links, :domain 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140714142920_create_taggings.rb: -------------------------------------------------------------------------------- 1 | class CreateTaggings < ActiveRecord::Migration 2 | def change 3 | create_table :taggings do |t| 4 | t.string :taggable_type 5 | t.integer :taggable_id 6 | t.integer :tag_id 7 | 8 | t.timestamps 9 | end 10 | add_index :taggings, :taggable_type 11 | add_index :taggings, :taggable_id 12 | add_index :taggings, :tag_id 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20140714230725_add_approved_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddApprovedToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :approved, :boolean 4 | add_index :links, :approved 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140715213751_add_content_to_taggings.rb: -------------------------------------------------------------------------------- 1 | class AddContentToTaggings < ActiveRecord::Migration 2 | def change 3 | add_column :taggings, :content, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140716151713_add_html_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddHtmlToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :html, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140724214823_add_index_on_url_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddIndexOnUrlToLinks < ActiveRecord::Migration 2 | def change 3 | add_index :links, :url 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140728164656_create_ratings.rb: -------------------------------------------------------------------------------- 1 | class CreateRatings < ActiveRecord::Migration 2 | def change 3 | create_table :ratings do |t| 4 | t.string :resource_type 5 | t.integer :resource_id 6 | t.integer :rating 7 | t.integer :user_id 8 | 9 | t.timestamps 10 | end 11 | add_index :ratings, :resource_type 12 | add_index :ratings, :resource_id 13 | add_index :ratings, :user_id 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20140728184730_create_hstore.rb: -------------------------------------------------------------------------------- 1 | class CreateHstore < ActiveRecord::Migration 2 | def change 3 | execute "CREATE EXTENSION IF NOT EXISTS hstore" 4 | end 5 | end -------------------------------------------------------------------------------- /db/migrate/20140728184738_add_slugs_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddSlugsToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :slugs, :hstore 4 | add_index :posts, :slugs, using: :gin 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140729173805_add_fb_url_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddFbUrlToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :fb_image_url, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140807204017_add_deploy_api_key_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddDeployApiKeyToUsers < ActiveRecord::Migration 2 | def change 3 | add_column :users, :deploy_api_key, :string 4 | add_index :users, :deploy_api_key 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140808202045_add_tag_type_to_tags.rb: -------------------------------------------------------------------------------- 1 | class AddTagTypeToTags < ActiveRecord::Migration 2 | def change 3 | add_column :tags, :tag_type, :string 4 | add_index :tags, :tag_type 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140809183938_rename_slugs_to_redirects_for_posts.rb: -------------------------------------------------------------------------------- 1 | class RenameSlugsToRedirectsForPosts < ActiveRecord::Migration 2 | def change 3 | rename_column :posts, :slugs, :redirects 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140809190927_add_slug_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddSlugToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :slug, :string 4 | add_index :posts, :slug 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140812152811_add_post_format_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddPostFormatToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :post_format, :string 4 | add_index :posts, :post_format 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140813201832_add_user_id_to_taggings.rb: -------------------------------------------------------------------------------- 1 | class AddUserIdToTaggings < ActiveRecord::Migration 2 | def change 3 | add_column :taggings, :user_id, :integer 4 | add_index :taggings, :user_id 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140813225952_add_tweet_count_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddTweetCountToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :tweet_count, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140814150658_add_created_at_index_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddCreatedAtIndexToLinks < ActiveRecord::Migration 2 | def change 3 | add_index :links, :created_at 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140816212540_add_email_content_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddEmailContentToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :email_content, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140816215902_add_random_slug_to_photos.rb: -------------------------------------------------------------------------------- 1 | class AddRandomSlugToPhotos < ActiveRecord::Migration 2 | def change 3 | add_column :photos, :random_slug, :string 4 | add_index :photos, :random_slug 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140816223427_add_sizes_to_photos.rb: -------------------------------------------------------------------------------- 1 | class AddSizesToPhotos < ActiveRecord::Migration 2 | def change 3 | add_column :photos, :sizes, :hstore 4 | add_index :photos, :sizes, using: :gin 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140819213506_create_newsletters.rb: -------------------------------------------------------------------------------- 1 | class CreateNewsletters < ActiveRecord::Migration 2 | def change 3 | create_table :newsletters do |t| 4 | t.string :name 5 | t.string :email_subject 6 | t.integer :mailchimp_id 7 | t.text :blurb 8 | t.text :template 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20140820175114_add_email_content_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddEmailContentToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :email_content, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140827181627_add_web_id_to_newsletters.rb: -------------------------------------------------------------------------------- 1 | class AddWebIdToNewsletters < ActiveRecord::Migration 2 | def change 3 | add_column :newsletters, :mailchimp_web_id, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140827184510_change_id_to_string_for_newsletters.rb: -------------------------------------------------------------------------------- 1 | class ChangeIdToStringForNewsletters < ActiveRecord::Migration 2 | def change 3 | change_column :newsletters, :mailchimp_id, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140903182906_add_fb_count_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddFbCountToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :facebook_count, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140911184603_add_homepage_position_to_newsletter_assignments.rb: -------------------------------------------------------------------------------- 1 | class AddHomepagePositionToNewsletterAssignments < ActiveRecord::Migration 2 | def change 3 | add_column :newsletter_assignments, :homepage_position, :integer 4 | add_index :newsletter_assignments, :homepage_position 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140912194825_add_deck_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddDeckToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :deck, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140912210124_add_index_to_anon_on_letters.rb: -------------------------------------------------------------------------------- 1 | class AddIndexToAnonOnLetters < ActiveRecord::Migration 2 | def change 3 | add_index :letters, :is_anonymous 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140912211128_add_original_content_to_letters.rb: -------------------------------------------------------------------------------- 1 | class AddOriginalContentToLetters < ActiveRecord::Migration 2 | def change 3 | add_column :letters, :original_content, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140918171834_create_featured_blocks.rb: -------------------------------------------------------------------------------- 1 | class CreateFeaturedBlocks < ActiveRecord::Migration 2 | def change 3 | create_table :featured_blocks do |t| 4 | t.string :template 5 | t.text :slots 6 | t.boolean :published 7 | 8 | t.timestamps 9 | end 10 | add_index :featured_blocks, :published 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20140926173831_add_slug_and_name_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddSlugAndNameToUsers < ActiveRecord::Migration 2 | def change 3 | add_column :users, :slug, :string 4 | add_index :users, :slug 5 | add_column :users, :name, :string 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20140926173836_add_byline_freeform_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddBylineFreeformToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :byline_freeform, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140928155451_create_user_post_assignments.rb: -------------------------------------------------------------------------------- 1 | class CreateUserPostAssignments < ActiveRecord::Migration 2 | def change 3 | create_table :user_post_assignments do |t| 4 | t.integer :user_id 5 | t.integer :post_id 6 | t.integer :position 7 | 8 | t.timestamps 9 | end 10 | add_index :user_post_assignments, :user_id 11 | add_index :user_post_assignments, :post_id 12 | add_index :user_post_assignments, :position 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20140929154301_add_public_flag_to_tags.rb: -------------------------------------------------------------------------------- 1 | class AddPublicFlagToTags < ActiveRecord::Migration 2 | def change 3 | add_column :tags, :public, :boolean 4 | add_index :tags, :public 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140929154302_add_featured_image_to_tags.rb: -------------------------------------------------------------------------------- 1 | class AddFeaturedImageToTags < ActiveRecord::Migration 2 | def change 3 | add_column :tags, :featured_image_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140929154308_add_content_to_tags.rb: -------------------------------------------------------------------------------- 1 | class AddContentToTags < ActiveRecord::Migration 2 | def change 3 | add_column :tags, :content, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140929154315_add_byline_to_newsletters.rb: -------------------------------------------------------------------------------- 1 | class AddBylineToNewsletters < ActiveRecord::Migration 2 | def change 3 | add_column :newsletters, :byline, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140929154320_add_editors_pick_boolean_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddEditorsPickBooleanToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :editors_pick, :boolean 4 | add_index :links, :editors_pick 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140929154324_add_published_at_to_newsletters.rb: -------------------------------------------------------------------------------- 1 | class AddPublishedAtToNewsletters < ActiveRecord::Migration 2 | def change 3 | add_column :newsletters, :published_at, :datetime 4 | add_index :newsletters, :published_at 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140929154328_add_stream_promo_to_post.rb: -------------------------------------------------------------------------------- 1 | class AddStreamPromoToPost < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :stream_promo, :string 4 | add_index :posts, :stream_promo 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140929154332_create_post_versions.rb: -------------------------------------------------------------------------------- 1 | class CreatePostVersions < ActiveRecord::Migration 2 | def change 3 | create_table :post_versions do |t| 4 | t.integer :post_id 5 | t.boolean :autosave 6 | t.text :content 7 | t.integer :user_id 8 | 9 | t.timestamps 10 | end 11 | add_index :post_versions, :post_id 12 | add_index :post_versions, :autosave 13 | add_index :post_versions, :user_id 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20140929192047_add_public_to_newsletters.rb: -------------------------------------------------------------------------------- 1 | class AddPublicToNewsletters < ActiveRecord::Migration 2 | def change 3 | add_column :newsletters, :public, :boolean 4 | add_index :newsletters, :public 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140930152431_add_html_url_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddHtmlUrlToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :html_url, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140930195827_add_via_gator_to_photos.rb: -------------------------------------------------------------------------------- 1 | class AddViaGatorToPhotos < ActiveRecord::Migration 2 | def change 3 | add_column :photos, :via_gator, :boolean 4 | add_index :photos, :via_gator 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140930195931_add_photo_id_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddPhotoIdToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :photo_id, :integer 4 | add_index :links, :photo_id 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140930201536_add_featured_photo_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddFeaturedPhotoToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :featured_photo_id, :integer 4 | add_index :posts, :featured_photo_id 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140930201810_add_fb_and_twitter_headlines_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddFbAndTwitterHeadlinesToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :facebook_headline, :text 4 | add_column :posts, :twitter_headline, :text 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140930202454_add_pgp_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddPgpToUsers < ActiveRecord::Migration 2 | def change 3 | add_column :users, :public_key, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140930223606_create_static_pages.rb: -------------------------------------------------------------------------------- 1 | class CreateStaticPages < ActiveRecord::Migration 2 | def change 3 | create_table :static_pages do |t| 4 | t.string :slug 5 | t.text :content 6 | 7 | t.timestamps 8 | end 9 | add_index :static_pages, :slug 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20141001140928_add_published_at_to_letters.rb: -------------------------------------------------------------------------------- 1 | class AddPublishedAtToLetters < ActiveRecord::Migration 2 | def change 3 | add_column :letters, :published_at, :datetime 4 | add_index :letters, :published_at 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20141010190750_add_phone_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddPhoneToUsers < ActiveRecord::Migration 2 | def change 3 | add_column :users, :phone, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141010194404_add_produced_by_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddProducedByToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :produced_by, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141010201348_add_revised_at_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddRevisedAtToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :revised_at, :datetime 4 | add_index :posts, :revised_at 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20141016141413_add_lead_photo_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddLeadPhotoToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :lead_photo_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141016203144_create_members.rb: -------------------------------------------------------------------------------- 1 | class CreateMembers < ActiveRecord::Migration 2 | def change 3 | create_table :members do |t| 4 | t.string :name 5 | t.string :email 6 | t.string :token 7 | t.datetime :last_seen_at 8 | t.string :last_ip 9 | t.boolean :active 10 | 11 | t.timestamps 12 | end 13 | add_index :members, :email 14 | add_index :members, :token 15 | add_index :members, :active 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /db/migrate/20141017160523_add_visits_from_ips_to_members.rb: -------------------------------------------------------------------------------- 1 | class AddVisitsFromIpsToMembers < ActiveRecord::Migration 2 | def change 3 | add_column :members, :visits_from_ips, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141021210632_create_feature_flags.rb: -------------------------------------------------------------------------------- 1 | class CreateFeatureFlags < ActiveRecord::Migration 2 | def change 3 | create_table :feature_flags do |t| 4 | t.string :key 5 | t.string :value 6 | 7 | t.timestamps 8 | end 9 | add_index :feature_flags, :key 10 | add_index :feature_flags, :value 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20141022184406_create_email_signups.rb: -------------------------------------------------------------------------------- 1 | class CreateEmailSignups < ActiveRecord::Migration 2 | def change 3 | create_table :email_signups do |t| 4 | t.string :email 5 | 6 | t.timestamps 7 | end 8 | add_index :email_signups, :email 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20141024173220_create_graphics.rb: -------------------------------------------------------------------------------- 1 | class CreateGraphics < ActiveRecord::Migration 2 | def change 3 | create_table :graphics do |t| 4 | t.string :slug 5 | t.text :html 6 | t.text :head 7 | 8 | t.timestamps 9 | end 10 | add_index :graphics, :slug 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20141024183444_add_title_and_desc_to_static_pages.rb: -------------------------------------------------------------------------------- 1 | class AddTitleAndDescToStaticPages < ActiveRecord::Migration 2 | def change 3 | add_column :static_pages, :title, :text 4 | add_column :static_pages, :description, :text 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20141103232347_add_sidebar_to_tags.rb: -------------------------------------------------------------------------------- 1 | class AddSidebarToTags < ActiveRecord::Migration 2 | def change 3 | add_column :tags, :sidebar_description, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141104163602_create_documents.rb: -------------------------------------------------------------------------------- 1 | class CreateDocuments < ActiveRecord::Migration 2 | def change 3 | create_table :documents do |t| 4 | t.string :dc_id 5 | t.boolean :published 6 | t.text :body 7 | t.text :dc_data 8 | t.text :dc_published_url 9 | 10 | t.timestamps 11 | end 12 | add_index :documents, :dc_id 13 | add_index :documents, :published 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20141104175531_add_custom_head_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddCustomHeadToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :inject_html, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141104185907_add_confirm_token_to_email_signups.rb: -------------------------------------------------------------------------------- 1 | class AddConfirmTokenToEmailSignups < ActiveRecord::Migration 2 | def change 3 | add_column :email_signups, :confirm_token, :string 4 | add_index :email_signups, :confirm_token 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20141104191406_add_email_fieldsto_email_signups.rb: -------------------------------------------------------------------------------- 1 | class AddEmailFieldstoEmailSignups < ActiveRecord::Migration 2 | def change 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /db/migrate/20141105205417_add_archive_url_to_newsletters.rb: -------------------------------------------------------------------------------- 1 | class AddArchiveUrlToNewsletters < ActiveRecord::Migration 2 | def change 3 | add_column :newsletters, :archive_url, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141110184742_add_title_deck_to_documents.rb: -------------------------------------------------------------------------------- 1 | class AddTitleDeckToDocuments < ActiveRecord::Migration 2 | def change 3 | add_column :documents, :title, :text 4 | add_column :documents, :deck, :text 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20141111191300_add_source_to_user_post_assignments.rb: -------------------------------------------------------------------------------- 1 | class AddSourceToUserPostAssignments < ActiveRecord::Migration 2 | def change 3 | add_column :user_post_assignments, :source, :string 4 | add_index :user_post_assignments, :source 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20141112183847_add_title_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddTitleToUsers < ActiveRecord::Migration 2 | def change 3 | add_column :users, :title, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141112230331_add_signup_source_to_email_signups.rb: -------------------------------------------------------------------------------- 1 | class AddSignupSourceToEmailSignups < ActiveRecord::Migration 2 | def change 3 | add_column :email_signups, :signup_source, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141117152901_create_post_locks.rb: -------------------------------------------------------------------------------- 1 | class CreatePostLocks < ActiveRecord::Migration 2 | def change 3 | create_table :post_locks do |t| 4 | t.integer :post_id 5 | t.integer :user_id 6 | t.datetime :acquired_at 7 | 8 | t.timestamps 9 | end 10 | add_index :post_locks, :post_id 11 | add_index :post_locks, :user_id 12 | add_index :post_locks, :acquired_at 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20141117204959_add_names_to_stripe_customers.rb: -------------------------------------------------------------------------------- 1 | class AddNamesToStripeCustomers < ActiveRecord::Migration 2 | def change 3 | add_column :stripe_customers, :first_name, :string 4 | add_column :stripe_customers, :last_name, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20141118184153_add_draft_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddDraftToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :serialized_draft, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141124181757_remove_cols_from_posts.rb: -------------------------------------------------------------------------------- 1 | class RemoveColsFromPosts < ActiveRecord::Migration 2 | def change 3 | remove_column :posts, :post_format_id 4 | remove_column :posts, :serialized_draft 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20141125171851_add_log_blob_to_email_signups.rb: -------------------------------------------------------------------------------- 1 | class AddLogBlobToEmailSignups < ActiveRecord::Migration 2 | def change 3 | add_column :email_signups, :log_blob, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141204145044_add_last_seen_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddLastSeenToUsers < ActiveRecord::Migration 2 | def change 3 | add_column :users, :last_seen, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141207170627_create_user_sessions.rb: -------------------------------------------------------------------------------- 1 | class CreateUserSessions < ActiveRecord::Migration 2 | def change 3 | create_table :user_sessions do |t| 4 | t.integer :user_id 5 | t.integer :events 6 | 7 | t.timestamps 8 | end 9 | add_index :user_sessions, :user_id 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20141208202311_add_display_headline_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddDisplayHeadlineToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :display_headline, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141208222447_add_custom_scss_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddCustomScssToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :custom_scss, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20141212170751_change_cols_to_strings_in_email_signups.rb: -------------------------------------------------------------------------------- 1 | class ChangeColsToStringsInEmailSignups < ActiveRecord::Migration 2 | def change 3 | change_column :email_signups, :q_work_in_criminal_justice, :string 4 | change_column :email_signups, :q_is_journalist, :string 5 | change_column :email_signups, :q_incarcerated, :string 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20150112211908_create_public_search_queries.rb: -------------------------------------------------------------------------------- 1 | class CreatePublicSearchQueries < ActiveRecord::Migration 2 | def change 3 | create_table :public_search_queries do |t| 4 | t.text :query 5 | t.string :token 6 | t.text :referer 7 | 8 | t.timestamps 9 | end 10 | add_index :public_search_queries, :query 11 | add_index :public_search_queries, :token 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20150113161343_add_search_results_to_public_search_queries.rb: -------------------------------------------------------------------------------- 1 | class AddSearchResultsToPublicSearchQueries < ActiveRecord::Migration 2 | def change 3 | add_column :public_search_queries, :search_results, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150113163509_add_user_id_to_public_search_queries.rb: -------------------------------------------------------------------------------- 1 | class AddUserIdToPublicSearchQueries < ActiveRecord::Migration 2 | def change 3 | add_column :public_search_queries, :user_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150122213121_create_external_service_responses.rb: -------------------------------------------------------------------------------- 1 | class CreateExternalServiceResponses < ActiveRecord::Migration 2 | def change 3 | create_table :external_service_responses do |t| 4 | t.string :action 5 | t.text :response 6 | 7 | t.timestamps null: false 8 | end 9 | add_index :external_service_responses, :action 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20150129163905_add_shorttoken_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddShorttokenToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :short_token, :string 4 | add_index :links, :short_token 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20150130192809_create_link_decode_events.rb: -------------------------------------------------------------------------------- 1 | class CreateLinkDecodeEvents < ActiveRecord::Migration 2 | def change 3 | create_table :link_decode_events do |t| 4 | t.integer :link_id 5 | t.text :cookies 6 | t.string :placement 7 | 8 | t.timestamps null: false 9 | end 10 | add_index :link_decode_events, :link_id 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20150130193426_add_referer_to_link_decode_events.rb: -------------------------------------------------------------------------------- 1 | class AddRefererToLinkDecodeEvents < ActiveRecord::Migration 2 | def change 3 | add_column :link_decode_events, :referer, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150224165135_add_freeform_post_header_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddFreeformPostHeaderToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :freeform_post_header, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150224165406_change_freeform_post_header_to_text.rb: -------------------------------------------------------------------------------- 1 | class ChangeFreeformPostHeaderToText < ActiveRecord::Migration 2 | def change 3 | change_column :posts, :freeform_post_header, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150515145826_change_byline_column_to_text_on_newsletters.rb: -------------------------------------------------------------------------------- 1 | class ChangeBylineColumnToTextOnNewsletters < ActiveRecord::Migration 2 | def change 3 | change_column :newsletters, :byline, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150609173000_add_facebook_description_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddFacebookDescriptionToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :facebook_description, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150618195818_create_assets.rb: -------------------------------------------------------------------------------- 1 | class CreateAssets < ActiveRecord::Migration 2 | def change 3 | create_table :assets do |t| 4 | t.text :label 5 | t.text :config 6 | 7 | t.timestamps null: false 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20150618201733_create_asset_files.rb: -------------------------------------------------------------------------------- 1 | class CreateAssetFiles < ActiveRecord::Migration 2 | def change 3 | create_table :asset_files do |t| 4 | t.integer :asset_id 5 | t.string :s3_bucket 6 | t.text :s3_key 7 | 8 | t.timestamps null: false 9 | end 10 | add_index :asset_files, :asset_id 11 | add_index :asset_files, :s3_bucket 12 | add_index :asset_files, :s3_key 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20150622220203_rename_sharable_to_shareables.rb: -------------------------------------------------------------------------------- 1 | class RenameSharableToShareables < ActiveRecord::Migration 2 | def change 3 | rename_table :post_sharables, :post_shareables 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150702175957_add_mailchimp_id_to_email_signups.rb: -------------------------------------------------------------------------------- 1 | class AddMailchimpIdToEmailSignups < ActiveRecord::Migration 2 | def change 3 | add_column :email_signups, :mailchimp_id, :string 4 | add_index :email_signups, :mailchimp_id 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20150729185629_create_post_published_events.rb: -------------------------------------------------------------------------------- 1 | class CreatePostPublishedEvents < ActiveRecord::Migration 2 | def change 3 | create_table :post_published_events do |t| 4 | t.integer :post_id 5 | 6 | t.timestamps null: false 7 | end 8 | add_index :post_published_events, :post_id 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20150831172334_add_sections_to_weekly_newsletters.rb: -------------------------------------------------------------------------------- 1 | class AddSectionsToWeeklyNewsletters < ActiveRecord::Migration 2 | def change 3 | add_column :weekly_newsletters, :tmp_stories, :text 4 | add_column :weekly_newsletters, :other_stories, :text 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20150903204918_add_options_to_email_signups.rb: -------------------------------------------------------------------------------- 1 | class AddOptionsToEmailSignups < ActiveRecord::Migration 2 | def change 3 | add_column :email_signups, :options_on_create, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150914174642_create_freeform_stream_promos.rb: -------------------------------------------------------------------------------- 1 | class CreateFreeformStreamPromos < ActiveRecord::Migration 2 | def change 3 | create_table :freeform_stream_promos do |t| 4 | t.text :slug 5 | t.text :html 6 | t.datetime :revised_at 7 | t.string :deploy_token 8 | 9 | t.timestamps null: false 10 | end 11 | add_index :freeform_stream_promos, :slug 12 | add_index :freeform_stream_promos, :deploy_token 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20150914175053_add_published_to_freeform_stream_promos.rb: -------------------------------------------------------------------------------- 1 | class AddPublishedToFreeformStreamPromos < ActiveRecord::Migration 2 | def change 3 | add_column :freeform_stream_promos, :published, :boolean 4 | add_index :freeform_stream_promos, :published 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20150922174410_create_post_delegate_paths.rb: -------------------------------------------------------------------------------- 1 | class CreatePostDelegatePaths < ActiveRecord::Migration 2 | def change 3 | create_table :post_delegate_paths do |t| 4 | t.integer :post_id 5 | t.boolean :active 6 | t.text :path 7 | 8 | t.timestamps null: false 9 | end 10 | add_index :post_delegate_paths, :post_id 11 | add_index :post_delegate_paths, :active 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20150923205331_create_yahoo_posts.rb: -------------------------------------------------------------------------------- 1 | class CreateYahooPosts < ActiveRecord::Migration 2 | def change 3 | create_table :yahoo_posts do |t| 4 | t.integer :post_id 5 | t.text :title 6 | t.boolean :published 7 | 8 | t.timestamps null: false 9 | end 10 | add_index :yahoo_posts, :post_id 11 | add_index :yahoo_posts, :published 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20151007152415_add_photo_flag_to_yahoo_posts.rb: -------------------------------------------------------------------------------- 1 | class AddPhotoFlagToYahooPosts < ActiveRecord::Migration 2 | def change 3 | add_column :yahoo_posts, :lead_photo, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20151014155320_add_summary_to_yahoo_posts.rb: -------------------------------------------------------------------------------- 1 | class AddSummaryToYahooPosts < ActiveRecord::Migration 2 | def change 3 | add_column :yahoo_posts, :summary, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20151104192738_create_partners.rb: -------------------------------------------------------------------------------- 1 | class CreatePartners < ActiveRecord::Migration 2 | def change 3 | create_table :partners do |t| 4 | t.text :name 5 | 6 | t.timestamps null: false 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20151104194642_create_partner_pageviews.rb: -------------------------------------------------------------------------------- 1 | class CreatePartnerPageviews < ActiveRecord::Migration 2 | def change 3 | create_table :partner_pageviews do |t| 4 | t.integer :post_id 5 | t.integer :partner_id 6 | t.text :url 7 | t.integer :pageviews 8 | 9 | t.timestamps null: false 10 | end 11 | add_index :partner_pageviews, :post_id 12 | add_index :partner_pageviews, :partner_id 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20151202171252_create_post_deploy_tokens.rb: -------------------------------------------------------------------------------- 1 | class CreatePostDeployTokens < ActiveRecord::Migration 2 | def change 3 | create_table :post_deploy_tokens do |t| 4 | t.integer :post_id 5 | t.text :label 6 | t.text :token 7 | t.boolean :active 8 | 9 | t.timestamps null: false 10 | end 11 | add_index :post_deploy_tokens, :post_id 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20160104184134_add_deploy_token_to_graphics.rb: -------------------------------------------------------------------------------- 1 | class AddDeployTokenToGraphics < ActiveRecord::Migration 2 | def change 3 | add_column :graphics, :deploy_token, :text 4 | add_index :graphics, :deploy_token 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20160106193656_add_souce_and_slug_to_asset_file.rb: -------------------------------------------------------------------------------- 1 | class AddSouceAndSlugToAssetFile < ActiveRecord::Migration 2 | def change 3 | add_column :asset_files, :slug, :string 4 | add_index :asset_files, :slug 5 | add_column :asset_files, :source, :string 6 | add_index :asset_files, :source 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20160113221245_add_s3_url_to_asset_files.rb: -------------------------------------------------------------------------------- 1 | class AddS3UrlToAssetFiles < ActiveRecord::Migration 2 | def change 3 | add_column :asset_files, :s3_url, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160121191220_create_post_embeds.rb: -------------------------------------------------------------------------------- 1 | class CreatePostEmbeds < ActiveRecord::Migration 2 | def change 3 | create_table :post_embeds do |t| 4 | t.string :embed_type 5 | t.integer :embed_id 6 | t.integer :post_id 7 | 8 | t.timestamps null: false 9 | end 10 | add_index :post_embeds, :embed_type 11 | add_index :post_embeds, :embed_id 12 | add_index :post_embeds, :post_id 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20160204195644_add_meta_tags_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddMetaTagsToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :html_meta_json, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160204200517_add_remote_alive_to_links.rb: -------------------------------------------------------------------------------- 1 | class AddRemoteAliveToLinks < ActiveRecord::Migration 2 | def change 3 | add_column :links, :remote_is_alive, :boolean 4 | add_index :links, :remote_is_alive 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20160209200020_add_aspect_ratio_to_photos.rb: -------------------------------------------------------------------------------- 1 | class AddAspectRatioToPhotos < ActiveRecord::Migration 2 | def change 3 | add_column :photos, :aspect_ratio, :decimal 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160219184054_rename_featured_image_for_tags.rb: -------------------------------------------------------------------------------- 1 | class RenameFeaturedImageForTags < ActiveRecord::Migration 2 | def change 3 | rename_column :tags, :featured_image_id, :featured_photo_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160222185522_add_page_title_to_static_pages.rb: -------------------------------------------------------------------------------- 1 | class AddPageTitleToStaticPages < ActiveRecord::Migration 2 | def change 3 | add_column :static_pages, :page_title, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160310222554_add_mailchimp_data_to_email_signups.rb: -------------------------------------------------------------------------------- 1 | class AddMailchimpDataToEmailSignups < ActiveRecord::Migration 2 | def change 3 | add_column :email_signups, :mailchimp_data, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160325203410_collection_summary_to_tags.rb: -------------------------------------------------------------------------------- 1 | class CollectionSummaryToTags < ActiveRecord::Migration 2 | def change 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /db/migrate/20160325214356_add_collection_summary_to_tags.rb: -------------------------------------------------------------------------------- 1 | class AddCollectionSummaryToTags < ActiveRecord::Migration 2 | def change 3 | add_column :tags, :collection_summary, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160404152647_add_in_stream_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddInStreamToPosts < ActiveRecord::Migration 2 | def change 3 | add_column :posts, :in_stream, :boolean 4 | add_index :posts, :in_stream 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20160426134033_create_mailchimp_webhooks.rb: -------------------------------------------------------------------------------- 1 | class CreateMailchimpWebhooks < ActiveRecord::Migration 2 | def change 3 | create_table :mailchimp_webhooks do |t| 4 | t.string :event_type 5 | t.string :email 6 | t.text :payload 7 | 8 | t.timestamps null: false 9 | end 10 | add_index :mailchimp_webhooks, :event_type 11 | add_index :mailchimp_webhooks, :email 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/lib/tasks/.keep -------------------------------------------------------------------------------- /lib/tasks/analytics.rake: -------------------------------------------------------------------------------- 1 | namespace :analytics do 2 | task send_daily_email: :environment do 3 | puts DailyAnalyticsEmail.new.send_email! 4 | end 5 | 6 | task generate_posts_csv: :environment do 7 | puts AnalyticsPosts.new.persist_csv 8 | end 9 | 10 | task generate_posts_days_csv: :environment do 11 | puts AnalyticsPostsPerDay.new.persist_csv 12 | end 13 | 14 | task generate_links_csv: :environment do 15 | puts AnalyticsLinks.new.persist_csv 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /lib/tasks/collections.rake: -------------------------------------------------------------------------------- 1 | namespace :collections do 2 | 3 | task build_homepage: :environment do 4 | CollectionSummary.generate_popular_counts 5 | Tag.json_collection_index_all 6 | end 7 | 8 | task build_slices: :environment do 9 | Tag.all.shuffle.each do |tag| 10 | ['facebook_count', 'date'].each do |slice| 11 | CollectionSlice.new(tag_id: tag.id, models: ['link'], slice: slice).generate_memcached 12 | end 13 | end 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /lib/tasks/email_signups.rake: -------------------------------------------------------------------------------- 1 | namespace :email_signups do 2 | desc "TODO" 3 | 4 | task sync_from_mailchimp: :environment do 5 | EmailSignup.all.shuffle.each do |email_signup| 6 | puts "email_signups:sync_from_mailchimp email=#{email_signup.email}" 7 | email_signup.pull_mailchimp_member_info 8 | end 9 | end 10 | 11 | end 12 | -------------------------------------------------------------------------------- /lib/tasks/external_service_response.rake: -------------------------------------------------------------------------------- 1 | namespace :external_service_response do 2 | desc "Pull new TopShelf data from Thriller" 3 | task update_facebook_topshelf: :environment do 4 | FacebookRecentPostSharesV1Worker.new.perform 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /lib/tasks/gator_mailer.rake: -------------------------------------------------------------------------------- 1 | namespace :gator_mailer do 2 | task send_daily_email: :environment do 3 | GatorMailer.daily_email.deliver_now 4 | end 5 | end -------------------------------------------------------------------------------- /lib/tasks/index_links.rake: -------------------------------------------------------------------------------- 1 | namespace :index_links do 2 | task default: :environment do 3 | start = Time.now.utc.to_f 4 | ESIndexAllLinksWorker.new.perform 5 | puts "ESIndexAllLinksWorker took #{Time.now.utc.to_f - start}" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /lib/tasks/index_posts.rake: -------------------------------------------------------------------------------- 1 | namespace :index_posts do 2 | task default: :environment do 3 | start = Time.now.utc.to_f 4 | ESIndexAllPostsWorker.new.perform 5 | puts "ESIndexAllPostsWorker took #{Time.now.utc.to_f - start}" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /lib/tasks/index_tags.rake: -------------------------------------------------------------------------------- 1 | namespace :index_tags do 2 | task default: :environment do 3 | ES.index_all_tags 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /lib/tasks/schedule_minute_cron_worker.rake: -------------------------------------------------------------------------------- 1 | namespace :schedule_minute_cron_worker do 2 | task default: :environment do 3 | (0..9).step(2).each do |scheduled_minutes| 4 | time = scheduled_minutes.minutes 5 | id = MinuteCronWorker.perform_in(time) 6 | puts "schedule_minute_cron_worker time=#{time} id=#{id}" 7 | end 8 | end 9 | end -------------------------------------------------------------------------------- /log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/log/.keep -------------------------------------------------------------------------------- /os-x-setup.sh: -------------------------------------------------------------------------------- 1 | # setup Postgres.app PATH, and rbenv init in ~/.bash_profile 2 | 3 | xcode-select --install 4 | 5 | brew install rbenv 6 | rbenv install $(cat .ruby-version) 7 | 8 | gem install bundler 9 | bundle install 10 | 11 | rake db:create 12 | rake db:migrate 13 | 14 | brew install redis 15 | brew services start redis 16 | brew install elasticsearch 17 | brew services start elasticsearch 18 | 19 | brew install nodejs 20 | npm install 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "endrun", 3 | "version": "1.0.0", 4 | "description": "", 5 | "dependencies": { 6 | "grunt-contrib-watch": "^0.6.1" 7 | }, 8 | "devDependencies": {} 9 | } 10 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/themarshallproject/open-endrun/172b5f15bdd2939d993385c36c2ab54593c35ffe/public/favicon.ico -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /admin/ -------------------------------------------------------------------------------- /spec/integration/public_web_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | describe 'public web api' do 4 | 5 | # it 'stream-topshelf json has quickreads' do 6 | # visit '/api/v1/stream-topshelf' 7 | # expect(page.html).to include('{"quickreads":') # TODO: horrible hack 8 | # end 9 | 10 | # it 'stream-topshelf json has facebook' do 11 | # visit '/api/v1/stream-topshelf' 12 | # expect(page.html).to include('"facebook":"') # TODO: horrible hack 13 | # end 14 | end -------------------------------------------------------------------------------- /spec/mailers/gator_mailer_spec.rb: -------------------------------------------------------------------------------- 1 | require "rails_helper" 2 | 3 | RSpec.describe GatorMailer, type: :mailer do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /spec/mailers/post_mailer_spec.rb: -------------------------------------------------------------------------------- 1 | require "rails_helper" 2 | 3 | RSpec.describe PostMailer, type: :mailer do 4 | 5 | 6 | end 7 | -------------------------------------------------------------------------------- /spec/mailers/previews/gator_mailer_preview.rb: -------------------------------------------------------------------------------- 1 | # Preview all emails at http://localhost:3000/rails/mailers/gator_mailer 2 | class GatorMailerPreview < ActionMailer::Preview 3 | 4 | end 5 | -------------------------------------------------------------------------------- /spec/mailers/previews/post_mailer_preview.rb: -------------------------------------------------------------------------------- 1 | # Preview all emails at http://localhost:3000/rails/mailers/post_mailer 2 | class PostMailerPreview < ActionMailer::Preview 3 | 4 | end 5 | -------------------------------------------------------------------------------- /spec/models/freeform_stream_promo_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe FreeformStreamPromo, type: :model do 4 | 5 | end -------------------------------------------------------------------------------- /spec/models/google_doc_markdown_converter_v2_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe GoogleDocMarkdownConverterV2, type: :model do 4 | 5 | end 6 | -------------------------------------------------------------------------------- /spec/models/link_report_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe LinkReport, type: :model do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /spec/models/partner_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe Partner, type: :model do 4 | 5 | end 6 | -------------------------------------------------------------------------------- /spec/models/post_delegate_path_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe PostDelegatePath, type: :model do 4 | 5 | end 6 | -------------------------------------------------------------------------------- /spec/models/post_published_event_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe PostPublishedEvent, type: :model do 4 | 5 | 6 | 7 | end 8 | -------------------------------------------------------------------------------- /spec/models/weekly_newsletter_assignment_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe WeeklyNewsletterAssignment, type: :model do 4 | 5 | 6 | end 7 | -------------------------------------------------------------------------------- /spec/models/weekly_newsletter_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe WeeklyNewsletter, type: :model do 4 | 5 | 6 | end 7 | -------------------------------------------------------------------------------- /spec/requests/photos_controller_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe PhotosController, type: :feature do 4 | 5 | before :each do 6 | @user = create(:user) 7 | visit "/login" 8 | fill_in :email, with: @user.email 9 | fill_in :password, with: @user.password 10 | click_button "Log In" 11 | end 12 | 13 | it 'has an index', js: true do 14 | visit "/admin/photos" 15 | expect(page.body).to include("Photos") 16 | end 17 | 18 | end -------------------------------------------------------------------------------- /spec/requests/status_controller_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe StatusController, type: :request do 4 | 5 | it "should have a 200 status code for /_status" do 6 | # this tests redis, memcached, postgres and elasticsearch 7 | get "/_status" 8 | expect(response.status).to eq(200) 9 | end 10 | 11 | it "should fail if postgres is poisoned" 12 | 13 | end 14 | -------------------------------------------------------------------------------- /spec/views/collections/api_v1_items.html.erb_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe "collections/api_v1_items.html.erb", type: :view do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /spec/views/collections/index.html.erb_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe "collections/index.html.erb", type: :view do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /spec/views/collections/show.html.erb_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe "collections/show.html.erb", type: :view do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /utils/base64_image.rb: -------------------------------------------------------------------------------- 1 | require 'base64' 2 | puts [ "" 7 | ].join('') 8 | 9 | 10 | -------------------------------------------------------------------------------- /utils/current_pg_connections.sh: -------------------------------------------------------------------------------- 1 | heroku pg:psql -c "select * from pg_stat_activity;" 2 | -------------------------------------------------------------------------------- /utils/feature_flags.sh: -------------------------------------------------------------------------------- 1 | grep -r "FeatureFlag.active" app/* 2 | -------------------------------------------------------------------------------- /utils/find_inline_styles.sh: -------------------------------------------------------------------------------- 1 | grep -r "style=\"" app/views/public/* 2 | grep -r "\!important" app/assets/stylesheets/app/* 3 | -------------------------------------------------------------------------------- /utils/preview_alias: -------------------------------------------------------------------------------- 1 | alias preview='BUNDLE_GEMFILE=~/endrun/Gemfile bundle exec ruby ~/endrun/utils/preview.rb' 2 | -------------------------------------------------------------------------------- /utils/public_html_comments.sh: -------------------------------------------------------------------------------- 1 | grep -r "<\!" app/* | grep public 2 | -------------------------------------------------------------------------------- /utils/setup_pow_port.sh: -------------------------------------------------------------------------------- 1 | echo 7000 > ~/.pow/endrun 2 | --------------------------------------------------------------------------------