#Video
##Pré-Production
- brief : 10 points
https://gist.github.com/ManyBaby/aeab61ac281e66fe55df
- script : clair et court
- scénario : détaillé et précis
#Video
##Pré-Production
https://gist.github.com/ManyBaby/aeab61ac281e66fe55df
// Javascript Cheat Sheet | |
/************************************ | |
*********** DOM: How to... ********* | |
************************************/ | |
// Find an element by its ID | |
document.getElementById("anId"); | |
// Show an element | |
element.show(); |
client = get_client | |
positions = client.profile(:fields => ["positions"]) | |
positions.values # should return a hash with companies, dates and so on. | |
# This is what I did with Devise: | |
# devise.rb | |
config.omniauth :linkedin, ENV['OAUTH_LINKEDIN_ID'], ENV['OAUTH_LINKEDIN_SECRET'], | |
fields: %w(id email-address first-name last-name headline industry picture-url public-profile-url location num-connections positions) | |
#Matchers
expect(page).to have_content 'Success'
expect(page).to have_xpath("//a",:href => "google.com")
expect(page).to have_selector(:xpath, "//p/h1")
expect(page).to have_selector(:css, "p a#post_edit_path")
expect(page).to have_selector("input", :value =>"Post Title")
#Actions
Create a new objet and associate it to a new variable before each scenario
or it
.
let!(:message) { create(:message) } # if used with FactoryGirl, otherwise Message.create(params)
Check if objets have been created
expect { createsomething }.to change{Message.count}.by(20)
# Update files that are already in the index and commit. | |
# == git add . + git commit -m "A message" | |
git commit -a -m "Ajouté itinéraire dans checklist-vacances.md" | |
# Create a new commit to cancel another one. | |
git revert SHACommit | |
# Change last commit message. | |
git commit --amend -m "Votre nouveau message" |
# run server | |
./manage.py runserver | |
# Interactive shell | |
./manage.py shell | |
# don't forget to import the objects you need (models, ...) | |
# eg from polls.models import Question, Choice | |
################################# | |
########### Generators ########## |
# check ruby version && rbenv | |
rbenv local | |
# Check last available version of Ruby | |
rbenv install --list | |
# Create app | |
rails _5.1.4_ new appname --database=postgresql | |
# Add pg gem to Gemfile |
# set the base image to Debian | |
# https://hub.docker.com/_/debian/ | |
FROM debian:latest | |
# replace shell with bash so we can source files | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
# update the repository sources list | |
# and install dependencies | |
RUN apt-get update \ |