Capybara
save_and_open_page
Matchers
have_button(locator)
#!/usr/bin/env ruby | |
name = ARGV[0] | |
if name.to_s.strip.empty? | |
puts "usage: bin/create_engine <name>" | |
exit(1) | |
end | |
cmd = <<-CMD | |
bin/rails plugin new engines/#{name}_engine \ |
# frozen_string_literal: true | |
require 'json' | |
require 'net/http' | |
require 'digest' | |
class UcloudAPI | |
API_HOST = 'https://api.ucloud.cn' | |
def initialize(public_key, private_key) |
save_and_open_page
have_button(locator)
# frozen_string_literal: true | |
require 'json' | |
require 'net/http' | |
class DnspodAPI | |
API_HOST = 'https://dnsapi.cn' | |
# API requires UserAgent contains app name/version and email | |
def initialize(token, app_name:, app_version:, email:) |
# | |
# This is a simple rackup file for geminabox. It allows simple role-based authorization. | |
# | |
# roles: | |
# - developer | |
# - upload | |
# - delete | |
# - admin (can do anything) | |
# | |
# For example, a developer who can access the service and upload new gems would have the following roles: `%w(developer upload) |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/bash | |
PING_COUNT=10 | |
INFO_LOG=/var/log/ups_monitor.log | |
ERROR_LOG=/var/log/ups_monitor.err | |
STATUS_LOG=/tmp/ups_monitor.log | |
SHUTDOWN_LOG=/var/log/ups_monitor_shutdown.log | |
LOCKER=/tmp/ups_monitor.lock | |
SHUTDOWN_COUNTER=5 |
load 'deploy' unless defined?(_cset) | |
_cset :asset_env, "RAILS_GROUPS=assets" | |
_cset :assets_prefix, "assets" | |
_cset :assets_role, [:web] | |
_cset :normalize_asset_timestamps, false | |
before 'deploy:finalize_update', 'deploy:mm_assets:symlink' | |
after 'deploy:update_code', 'deploy:mm_assets:precompile' |