Copy the trello card for yourself https://trello.com/b/VoRUQAqz/breaking-rails-conventions-workshop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Succeed or sleep and try again (for Capybara js) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using selenium_chrome | |
Capybara starting Puma... | |
* Version 5.3.1 , codename: Sweetnighter | |
* Min threads: 0, max threads: 4 | |
* Listening on http://127.0.0.1:59751 | |
browser logs empty from selenium_chrome | |
-------------------------------------------------------------------------------- | |
Using selenium_chrome_w3c | |
browser logs empty from selenium_chrome_w3c | |
-------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'capybara' | |
# gem 'capybara', path: "/Users/twalpole/projects/Capybara" | |
gem 'puma' | |
gem 'selenium-webdriver' | |
gem 'webdrivers' | |
gem 'byebug' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
RSpec.shared_context "save_and_open_page for request" do | |
def asset_host | |
"http://localhost:3000" | |
end | |
def save_and_open_page | |
Dir.mkdir(Rails.root.join("tmp/requests")) unless Dir.exist?(Rails.root.join("tmp/requests")) | |
file = Rails.root.join("tmp/requests/screenshot-#{Time.now.to_s(:number)}.html") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2018-02-20 18:41:58 - RuntimeError - Unable to read pdf file: https://www.poettker.com/files/pdf/Produktkatalog_170912.pdf: | |
/Users/tim/workspaces/bws/onebox/lib/onebox/engine/pdf_onebox.rb:14:in `data' | |
/Users/tim/workspaces/bws/onebox/lib/onebox/engine.rb:66:in `block in record' | |
/Users/tim/.rvm/gems/ruby-2.3.1@rails/gems/moneta-1.0.0/lib/moneta/mixins.rb:165:in `fetch' | |
/Users/tim/workspaces/bws/onebox/lib/onebox/engine.rb:66:in `record' | |
/Users/tim/workspaces/bws/onebox/lib/onebox/layout_support.rb:9:in `layout' | |
/Users/tim/workspaces/bws/onebox/lib/onebox/layout_support.rb:13:in `to_html' | |
/Users/tim/workspaces/bws/onebox/lib/onebox/preview.rb:35:in `engine_html' | |
/Users/tim/workspaces/bws/onebox/lib/onebox/preview.rb:16:in `to_s' | |
/Users/tim/workspaces/bws/onebox/lib/onebox/web.rb:33:in `block in <class:Web>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RuntimeError in Thredded::Topics#show | |
Showing /Users/tim/workspaces/bws/thredded/app/views/thredded/posts_common/_content.html.erb where line #2 raised: | |
Unable to read pdf file: https://www.poettker.com/files/pdf/Produktkatalog_170912.pdf | |
Extracted source (around line #14): | |
def data | |
pdf_info = get_pdf_info | |
raise "Unable to read pdf file: #{@url}" if pdf_info.nil? | |
result = { link: link, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/support/disable_template_cache_clearing | |
# may also need to configure, either here | |
Rails.application.config.action_view.cache_template_loading = true | |
# or in config/environments/test.rb: | |
# config.action_view.cache_template_loading = true | |
# ensure ActionView::Digestor is already autoloaded before patching it | |
ActionView::Digestor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/intitializers/thredded.rb | |
# to allow you to not to have to add `main_app` before every path helper | |
# when embedding Thredded within a main-app supplied layout (with navbar and links to the main_app) | |
# ... Add this to the bottom of the initializer | |
Rails.application.config.to_prepare do | |
Rails.application.reload_routes! | |
thredded_methods = (Thredded::Engine.routes.url_helpers.methods + Thredded::UrlsHelper.instance_methods) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def header(version) | |
puts | |
puts "-" * 80 | |
puts " rspec #{version}" | |
end | |
def run(version, command) | |
system <<-SCRIPT |
NewerOlder