Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark McLeod - Instagram challenge #894

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 53 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
Instagram Challenge
===================

## Instructions

* Feel free to use Google, your notes, books, etc., but work on your own
* If you refer to the solution of another coach or student, please put a link to that in your README
* If you have a partial solution, **still check in a partial solution**
* You must submit a pull request to this repo with your code by 9am Monday morning

## Task

Build Instagram: Simple huh!
Expand All @@ -16,26 +9,63 @@ Your challenge is to build Instagram using Rails. You'll need **users** who can

Bonus if you can add filters!

## How to start
## User stories

1. Produce some stories, break them down into tasks, and estimate
2. Fork this repo, clone, etc
3. Initialize a new rails project
**Completed stories:**

Remember to proceed in small steps! Getting confused? Make the steps even smaller.
```
As a developer
I want a basic rails app up and running
So that I can implement features for users
```

## Code Quality
```
As a user
I want to post some text
So that other people can see my post
```

For linting, you can use the `.rubocop.yml` in this repository (or your own!).
You'll need these gems:
```
As a user
I want to comment on someone else's post
So that I can react to the content of someone else's post
```

```ruby
group :development, :test do
gem 'rubocop', '1.20', require: false
gem 'rubocop-rails'
end
```
As a user
I want to add an image to my post
So that other people can see the image
```

You can also lint Javascript, CSS, and ERB — feel free to research this. These
will help you to train yourself to produce cleaner code — and will often alert
you to mistakes or mishaps!
**Not started stories:**

```
As a user
I want to like someone else's posts
So that I can react to the content of someone else's post
```

```
As a user
I want to sign up and log in
So that I can create my own posts and react to other people's posts
```

## Technology used
Ruby on Rails
RSpec
DatabaseCleaner
Orderly
Bootstrap
Capybara
SimpleCov
Git
Github

## Instructions
1. Clone this repository
2. Run `bundle install`
3. Run `bin/rails db:create`
4. Run `bin/rails db:migrate`
5. Run `bundle exec rspec`
6. Run `bin/rails server`
1 change: 1 addition & 0 deletions instagram/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults
10 changes: 10 additions & 0 deletions instagram/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.

# Mark the database schema as having been generated.
db/schema.rb linguist-generated

# Mark the yarn lockfile as having been generated.
yarn.lock linguist-generated

# Mark any vendored files as having been vendored.
vendor/* linguist-vendored
42 changes: 42 additions & 0 deletions instagram/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-*

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep

/public/assets
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key

/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity

coverage/
1 change: 1 addition & 0 deletions instagram/.rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
1 change: 1 addition & 0 deletions instagram/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby-3.0.2
61 changes: 61 additions & 0 deletions instagram/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.0.2'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
gem 'rails', '~> 6.1.4', '>= 6.1.4.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Use Puma as the app server
gem 'puma', '~> 5.0'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 5.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Active Storage variant
# gem 'image_processing', '~> 1.2'

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.4', require: false

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'rspec-rails'
end

group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 4.1.0'
# Display performance information such as SQL time and flame graphs for each request in your browser.
# Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
gem 'rack-mini-profiler', '~> 2.0'
gem 'listen', '~> 3.3'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end

group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 3.26'
gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers
gem 'webdrivers'
gem 'database_cleaner-active_record'
gem 'shoulda-matchers'
gem 'simplecov'
gem 'orderly'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Loading