- Make teams of 2 to 3 ppl
- One creates a Repository and adds the rest of the team as collaborators (see repo "Settings")
- All of you clone the repository on your local machine (make sure you
are not cloning inside another git repo!)
git clone [email protected]:NAME/REPO.git
- Recreate the Beer project together, but spread the work in different files, e.g.:
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
| .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
| 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
| 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
| 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
| 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
| 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
| class Beer | |
| # We ONLY want to be able to read @amount, not | |
| # change it without calling "sip!" | |
| attr_reader :amount | |
| def initialize | |
| @amount = 250 | |
| end | |
| def sip! |