Giter Site home page Giter Site logo

lpalmes / cardistryio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davidpdrsn/cardistryio

0.0 2.0 0.0 1.21 MB

The cardistry community of the future

Home Page: cardistry.io

Ruby 78.97% CoffeeScript 1.47% CSS 8.02% HTML 10.55% Shell 1.00%

cardistryio's Introduction

CardistryIO

Build Status Code Climate

What is this?

  • CardistryIO is a place on the internet entirely devoted to cardistry. If you like shuffling cards and watching videos of other people shuffling cards, then you've come to the right place.
  • CardistryIO is not a producer of instructional content.
  • CardistryIO does not hate magic, we just think there are enough great magic communities already.
  • CardistryIO is completely open source and built by the community. So whether you're into programming, design, or just have a good idea, we welcome you.

I wanna contribute, where do I start?

Please read the Contributing guidelines as the first thing.

CardistryIO is made with Ruby on Rails so if you're unfamiliar with that, and you want to contribute code, we recommend you start here.

Issues labeled with "Low hanging fruit" are a good starting point for new contributors.

If you want to report a bug, or suggest a new feature, you're welcome to open a new issue.

If you want to contact one from the core team you can find them here.

Development

Getting Started

We use Docker to run the application locally in development so if you're totally unfamiliar with Docker we recommend you start here.

After you have cloned this repo, run this setup script to set up your machine with the necessary dependencies to run and test this app:

$ script/bootstrap

It requires that you have the docker toolbox installed.

Remember to read the instructions shown when the script finishes.

After setting up, you can run the application using:

$ script/server

Helper scripts

  • script/console: Open a rails console.
  • script/build: Build the docker container.
  • script/migrate: Migrate the database.
  • script/server: Start a local web server.
  • script/test: Run the tests.

Creating test notifications

In test and development environments you can create test notifications from the console like so:

Find your user id. You find that by visiting your profile in the browser and looking at the URL. If you profile is at localhost:3000/users/1337-bob-robertsen then your id is 1337. Then run:

$ script/console
=> me = User.find(1337)
=> TestNotifications.new(me).comment_on_video

That would create you a notification that someone commented on a video. The video might not be one of yours, but should still work.

Note that for all the notifications to work there has to be at least two users in the database. You can just create a second one through the browser. Some notifications also require a move and a video to be present.

You can call the following methods on TestNotifications:

  • comment_on_video
  • comment_on_move
  • video_approved
  • new_follower
  • video_shared
  • mentioned
  • new_credit

Creating test activities

You can also create test activities for testing the feed.

The process is similar to creating test notifications:

$ script/console
=> me = User.find(your_id)
=> TestActivities.new(me).video
=> TestActivities.new(me).move

Setting the date the activity was created can be done like so:

$ bin/rails console
=> me = User.find(your_id)
=> activity = TestActivities.new(me).video
=> activity.update!(created_at: 1.day.ago)
=> activity.update!(created_at: 1.week.ago)
=> activity.update!(created_at: 1.month.ago) # etc...

Setting an account as admin

In order to flag an account as admin, you have to set the admin column of the user account to true. Do it like so:

$ script/console
=> User.find(your_user_id).update!(admin: true)

Misc

Expense report

We have a simple expense report written in Ruby (because who needs spreadsheets)

$ ruby expense_report.rb

Services we depend on

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.