Skip to content

Instantly share code, notes, and snippets.

View wearethefoos's full-sized avatar

Wouter de Vos wearethefoos

View GitHub Profile
RSpec.configure do |config|
config.use_transactional_fixtures = false
config.before(:suite) do
if config.use_transactional_fixtures?
raise(<<-MSG)
Delete line `config.use_transactional_fixtures = true` from rails_helper.rb
(or set it to false) to prevent uncommitted transactions being used in
JavaScript-dependent specs.
RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
end
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, IndexRoute, Link, browserHistory } from 'react-router';
import App from './App';
import Categories from './Categories';
import Category from './Category';
import Games from './Games';
import Game from './Game';
import PageNotFound from './PageNotFound';
import React from 'react';
class Categories extends React.Component {
render() {
return (
<h1>Categories!</h1>
);
}
}
.DS_Store
node_modules
npm-debug.log
dist
class VideogameReviews::Application
config.middleware.insert_before 0, "Rack::Cors", debug: true, logger: (-> { Rails.logger }) do
allow do
origins 'localhost:3000', '127.0.0.1:3000'
resource '/cors',
headers: :any,
methods: [:post],
credentials: true,
max_age: 0
const feathers = require('feathers');
const rest = require('feathers-rest');
const socketio = require('feathers-socketio');
// const errors = require('feathers-errors');
const bodyParser = require('body-parser');
var MongoClient = require('mongodb').MongoClient;
const service = require('feathers-mongodb');
// Create a feathers instance.
const app = feathers()
class Utils {
uuid() {
var i, random;
var uuid = '';
for (i = 0; i < 32; i++) {
random = Math.random() * 16 | 0;
if (i === 8 || i === 12 || i === 16 || i === 20) {
uuid += '-';
}
import SocketClient from 'socket.io-client';
import Feathers from 'feathers-client';
import Utils from '../lib/Utils';
const API_HOST = "http://localhost:3030";
class BaseModel {
defaults() { return {}; }
constructor(resource_name, host = API_HOST) {
require 'rails_helper'
describe BingeSerie do
it { should validate_presence_of :title}
it { should validate_presence_of :description}
it { should validate_presence_of :image}
it { should have_many :binge_episodes}
describe "#seasons" do
let(:series) { create(:binge_serie) }