Formatting updates.

This commit is contained in:
Rico Sta. Cruz 2014-10-23 19:43:16 +08:00
parent 5f5d24a6b1
commit db1ce5f0fe
3 changed files with 25 additions and 25 deletions

View File

@ -3,17 +3,17 @@ title: Capybara
layout: default layout: default
--- ---
### Navigating ## Navigating
visit articles_path visit articles_path
### Clicking links and buttons ## Clicking links and buttons
click 'Link Text' click 'Link Text'
click_button click_button
click_link click_link
### Interacting with forms ## Interacting with forms
attach_file attach_file
fill_in 'First Name', :with => 'John' fill_in 'First Name', :with => 'John'
@ -23,7 +23,7 @@ layout: default
select select
unselect unselect
### Querying ## Querying
Takes a CSS selector (or XPath if you're into that). Takes a CSS selector (or XPath if you're into that).
Translates nicely into RSpec matchers: Translates nicely into RSpec matchers:
@ -52,7 +52,7 @@ should_not doesn't wait for a timeout from the driver
page.has_select? page.has_select?
page.has_no_select? page.has_no_select?
### Finding ## Finding
find find
find_button find_button
@ -61,7 +61,7 @@ should_not doesn't wait for a timeout from the driver
find_link find_link
locate locate
### Scoping ## Scoping
within within
within_fieldset within_fieldset
@ -69,16 +69,16 @@ should_not doesn't wait for a timeout from the driver
within_frame within_frame
scope_to scope_to
### Scripting ## Scripting
execute_script execute_script
evaluate_script evaluate_script
### Debugging ## Debugging
save_and_open_page save_and_open_page
### Miscellaneous ## Miscellaneous
all all
body body
@ -89,7 +89,7 @@ should_not doesn't wait for a timeout from the driver
wait_until wait_until
current_path current_path
### Capybara RSpec matchers ## Capybara RSpec matchers
expect(page).to have_button expect(page).to have_button
expect(page).to have_checked_field expect(page).to have_checked_field

View File

@ -3,7 +3,7 @@ title: Make for assets
layout: default layout: default
--- ---
### Basic compiling ## Basic compiling
bin := ./node_modules/.bin bin := ./node_modules/.bin
@ -12,7 +12,7 @@ layout: default
build/%.js: src/%.coffee build/%.js: src/%.coffee
@$(bin)/coffee < $^ > $@ @$(bin)/coffee < $^ > $@
### Stylus + Autoprefixer ## Stylus + Autoprefixer
bin := ./node_modules/.bin bin := ./node_modules/.bin
stylus := $(bin)/stylus stylus := $(bin)/stylus
@ -26,18 +26,18 @@ layout: default
%.css: %.styl $(styl_files) %.css: %.styl $(styl_files)
@$(stylus) $< | $(autoprefixer) -b "> 1%" > $@ @$(stylus) $< | $(autoprefixer) -b "> 1%" > $@
### Hint ## Hint
hint: hint:
$(js_files) $(js_files)
### Watching ## Watching
watch: watch:
@echo "... watching for changes" @echo "... watching for changes"
@while true; do make -s; sleep 1; done @while true; do make -s; sleep 1; done
### Browserify ## Browserify
js_files := $(shell find web/ -name "*.js") js_files := $(shell find web/ -name "*.js")

View File

@ -3,13 +3,13 @@ title: Makefile
layout: default layout: default
--- ---
### Var assignment ## Var assignment
uglify = $(uglify) # assignment uglify = $(uglify) # assignment
compressor := $(uglify) # lazy assignment compressor := $(uglify) # lazy assignment
prefix ?= /usr/local # safe assignment prefix ?= /usr/local # safe assignment
### Magic variables ## Magic variables
out.o: src.c src.h out.o: src.c src.h
$@ - "out.o" (target) $@ - "out.o" (target)
@ -27,7 +27,7 @@ layout: default
$(@D) - target directory $(@D) - target directory
### Command prefixes ## Command prefixes
- Ignore errors - Ignore errors
@ Don't print command @ Don't print command
@ -39,12 +39,12 @@ layout: default
-include .depend -include .depend
### Find files ## Find files
js_files := $(wildcard test/*.js) js_files := $(wildcard test/*.js)
all_files := $(shell find images -name "*") all_files := $(shell find images -name "*")
### Substitutions ## Substitutions
file = $(SOURCE:.cpp=.o) # foo.cpp => foo.o file = $(SOURCE:.cpp=.o) # foo.cpp => foo.o
outputs = $(files:src/%.coffee=lib/%.js) outputs = $(files:src/%.coffee=lib/%.js)
@ -52,24 +52,24 @@ layout: default
outputs = $(patsubst %.c, %.o, $(wildcard *.c)) outputs = $(patsubst %.c, %.o, $(wildcard *.c))
assets = $(patsubst images/%, assets/%, $(wildcard images/*)) assets = $(patsubst images/%, assets/%, $(wildcard images/*))
### More functions ## More functions
$(strip $(string_var)) $(strip $(string_var))
$(filter %.less, $(files)) $(filter %.less, $(files))
$(filter-out %.less, $(files)) $(filter-out %.less, $(files))
### Building files ## Building files
%.o: %.c %.o: %.c
ffmpeg -i $< > $@ # Input and output ffmpeg -i $< > $@ # Input and output
foo $^ foo $^
### Includes ## Includes
-include foo.make -include foo.make
### Options ## Options
make make
-e, --environment-overrides -e, --environment-overrides
@ -78,7 +78,7 @@ layout: default
-j, --jobs=N # parallel processing -j, --jobs=N # parallel processing
### Conditionals ## Conditionals
foo: $(objects) foo: $(objects)
ifeq ($(CC),gcc) ifeq ($(CC),gcc)