Rails デフォルトの chromedriver-helper gem をそのまま利用するだけでは、エラーが出て実行できない場合がある。
以下、エラー別に対策を考察。
git diff master --name-only --diff-filter=ACMR "*.rb" | sed 's| |\\ |g' | xargs ./node_modules/.bin/prettier --write |
#!/usr/bin/env zsh | |
set -eu | |
test "$#" -ne 1 && echo "Usage: $0 ROOTDIR" && exit 1 | |
root=$1 | |
test ! -d $root && echo "$root is not a valid directory" && exit 1 | |
for file in $(find $root -name '*.rb') |
# gem install qiita | |
require 'qiita' | |
items = Qiita::Client.new.list_user_items('username') | |
items.body.each { |item| File.open("items/#{item['title']}.md", 'w') { |f| f.write(item["body"]) } } |
module ApplicationHelper | |
# activated の条件が真のとき、.active クラス付きの <a> タグを生成 | |
# | |
# 例: | |
# = activated_link_to params[:sort] == 'newly', hogehoge_path(sort: :newly) do | |
# %span 新着順 | |
# | |
def activated_link_to(activated, name = nil, options = {}, html_options = {}, &block) | |
if block_given? | |
html_options = options |
FROM ubuntu | |
# prepare packages | |
RUN apt-get update \ | |
&& apt-get upgrade -y \ | |
&& apt-get install -y git \ | |
&& apt-get build-dep -y ruby | |
# set timezone | |
RUN echo "Asia/Tokyo" > /etc/timezone \ |
module SslRedirectable | |
extend ActiveSupport::Concern | |
included do | |
before_action :force_non_ssl, if: :force_non_ssl? | |
class_attribute :ssl_actions | |
SSL_ACTIONS_ALL = [:all] |
display: none
で非表示にしてあるものはcapybaraのfind対象なのか??
という疑問があるわけです。
ここは公式みてみますか。
Module: Capybara::Node::Finders
visible (Boolean) — Only find elements that are visible on the page. Setting this to false finds invisible andvisible elements.