Eric Steven Raymond, Thyrsus Enterprises, < [email protected] >
Rick Moen, < [email protected] >
翻译:柯非, < [email protected] >
这篇译文基于2014.05.21更新的原文修订版3.10。
特别感谢王刚,此前本文的翻译是由他进行的。
#config/initializers/simple_form/description_component.rb | |
module SimpleForm | |
module Components | |
# Needs to be enabled in order to do automatic lookups | |
module Description | |
# Name of the component method | |
def desc(wrapper_options = nil) | |
object.send(attribute_name) if @builder.instance_variable_get('@lookup_action') == :show | |
end | |
end |
Eric Steven Raymond, Thyrsus Enterprises, < [email protected] >
Rick Moen, < [email protected] >
翻译:柯非, < [email protected] >
这篇译文基于2014.05.21更新的原文修订版3.10。
特别感谢王刚,此前本文的翻译是由他进行的。
require_relative "task" | |
desc "Send an invite" | |
task :invite do |name, email| | |
puts "Invitation sent to '#{name} <#{email}>'" | |
end | |
# Example: | |
# | |
# $ rake invite "Paul Engel" [email protected] |
# - Try to find FFMPEG | |
# Once done this will define | |
# FFMPEG_FOUND - System has FFMPEG | |
# FFMPEG_INCLUDE_DIRS - The FFMPEG include directories | |
# FFMPEG_LIBRARIES - The libraries needed to use FFMPEG | |
# FFMPEG_LIBRARY_DIRS - The directory to find FFMPEG libraries | |
# | |
# written by Roy Shilkrot 2013 http://www.morethantechnical.com/ | |
# |
--- | |
language: ruby | |
rvm: | |
- 2.0.0 | |
bundler_args: --without development --path=~/.bundle | |
env: | |
global: | |
- BUNDLE_ARCHIVE="app-bundle-archive" | |
- RAILS_ENV=test | |
- secure: "A_VERY_LONG_SERIES_OF_CHARACTERS_HERE" |
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed. | |
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
# | |
# Deployment structure | |
# | |
# SERVER: | |
# /etc/init.d/nginx (1. nginx) | |
# /home/app/public_html/app_production/current (Capistrano directory) | |
# |
#!/usr/bin/env python | |
import hashlib | |
from collections import defaultdict | |
from io import BufferedReader, FileIO | |
from aribgaiji import GAIJI_MAP | |
""" | |
TSファイルから字幕を取り出すスクリプト。 |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |