package main | |
import ( | |
"encoding/json" | |
"flag" | |
"io" | |
"net/http" | |
"github.com/golang/glog" | |
"golang.org/x/net/websocket" |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
Often our application interacts with different web services, in order to test it we need to do some preparations to be able to stub those requests and then if they take a lot of time to proceed - to replay the records of it without repeating real requests.
To install VCR we need to add two gems to the test group, gem webmock will be installed as a dependancy and will handle all the external requests, there are
Spree has a lot of native factories, that could help you to test your spree-based application, creating "testing infrastructure". The first thing you should do (if it is not done yet) is to load Spree factories in your app.
#spec_helper.rb
require 'spree/testing_support/factories'
#As well you might want to add more spree testing stuff such as preferences:
package main | |
import ( | |
"compress/gzip" | |
"io" | |
"net/http" | |
"strings" | |
) | |
// Gzip Compression |
class ApiController < ApplicationController | |
# define which model will act as token authenticatable | |
acts_as_token_authentication_handler_for Login | |
# Prevent CSRF attacks by raising an exception. | |
# For APIs, you may want to use :null_session instead. | |
protect_from_forgery with: :null_session | |
respond_to :json | |
skip_before_filter :verify_authenticity_token, if: :json_request? |
before_filter :authenticate | |
protected | |
def authenticate | |
authenticate_or_request_with_http_basic do |username, password| | |
username == "foo" && password == "bar" | |
end | |
end |
# Run Coverage report | |
require 'simplecov' | |
SimpleCov.start do | |
add_filter 'spec/dummy' | |
add_group 'Controllers', 'app/controllers' | |
add_group 'Helpers', 'app/helpers' | |
add_group 'Mailers', 'app/mailers' | |
add_group 'Models', 'app/models' | |
add_group 'Views', 'app/views' | |
add_group 'Libraries', 'lib' |
{ | |
"Ofrecemos": | |
[ | |
"Trabajo que importa, con posibilidades de cambiar el mundo.", | |
"Satisfacción profesional y personal", | |
"Espacio para aprender, investigar e innovar", | |
"Ser miembro de un equipo amistoso, respetuoso e innovador", | |
"Ser parte de una organización multidisciplanaria con redes en varios países", | |
"Mesa de ping-pong", | |
"café café" |