This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RSpec.configure do |config| | |
| config.include FactoryGirl::Syntax::Methods | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| class Categories extends React.Component { | |
| render() { | |
| return ( | |
| <h1>Categories!</h1> | |
| ); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .DS_Store | |
| node_modules | |
| npm-debug.log | |
| dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 += '-'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) } |