Skip to content

Commit

Permalink
Add rspec, license file and live server link in the readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
VanessaAoki committed May 6, 2021
1 parent 0300f0c commit 1801c11
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 50 deletions.
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
21 changes: 8 additions & 13 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.7.2'
ruby '2.7.3'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
gem 'rails', '~> 6.1.3', '>= 6.1.3.1'

# Use sqlite3 as the database for Active Record
group :development, :test do
gem 'sqlite3'
Expand All @@ -14,6 +15,7 @@ group :production do
gem 'pg'
gem 'rails_12factor'
end

# Use Puma as the app server
gem 'puma', '~> 5.0'
# Use SCSS for stylesheets
Expand All @@ -24,26 +26,14 @@ gem 'webpacker', '~> 5.0'
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'

# Bulma-rails
gem 'bulma-rails', '~> 0.9.1'

# Simple form
gem 'simple_form', '~> 5.1'

# Gravatar
gem 'gravatar_image_tag', '~> 1.2'

# Devise
gem 'devise', '~> 4.7', '>= 4.7.3'

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

Expand All @@ -67,6 +57,8 @@ group :development do
end

group :test do
# The RSpec testing framework
gem 'rspec-rails', '~> 5.0', '>= 5.0.1'
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 3.26'
gem 'selenium-webdriver'
Expand All @@ -76,3 +68,6 @@ end

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

# Rubocop
gem 'rubocop', '>= 1.0', '< 2.0'
42 changes: 41 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ GEM
zeitwerk (~> 2.3)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.2)
bcrypt (3.1.16)
better_errors (2.9.1)
coderay (>= 1.0.0)
Expand Down Expand Up @@ -92,6 +93,7 @@ GEM
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
diff-lcs (1.4.4)
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
Expand Down Expand Up @@ -149,6 +151,10 @@ GEM
nenv (~> 0.1)
shellany (~> 0.0)
orm_adapter (0.5.0)
parallel (1.20.1)
parser (3.0.1.1)
ast (~> 2.4.1)
pg (1.2.3)
pg (1.2.3-x64-mingw32)
pry (0.14.1)
coderay (~> 1.1)
Expand Down Expand Up @@ -195,6 +201,7 @@ GEM
method_source
rake (>= 0.8.7)
thor (~> 1.0)
rainbow (3.0.0)
rake (13.0.3)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
Expand All @@ -203,6 +210,36 @@ GEM
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
rexml (3.2.5)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-rails (5.0.1)
actionpack (>= 5.2)
activesupport (>= 5.2)
railties (>= 5.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.10.2)
rubocop (1.14.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.5.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.5.0)
parser (>= 3.0.1.1)
ruby-progressbar (1.11.0)
rubyzip (2.3.0)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
Expand Down Expand Up @@ -242,6 +279,7 @@ GEM
concurrent-ruby (~> 1.0)
tzinfo-data (1.2021.1)
tzinfo (>= 1.0.0)
unicode-display_width (2.0.0)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.1.0)
Expand Down Expand Up @@ -286,6 +324,8 @@ DEPENDENCIES
rack-mini-profiler (~> 2.0)
rails (~> 6.1.3, >= 6.1.3.1)
rails_12factor
rspec-rails (~> 5.0, >= 5.0.1)
rubocop (>= 1.0, < 2.0)
sass-rails (>= 6)
selenium-webdriver
simple_form (~> 5.1)
Expand All @@ -298,7 +338,7 @@ DEPENDENCIES
webpacker (~> 5.0)

RUBY VERSION
ruby 2.7.2p137
ruby 2.7.3p183

BUNDLED WITH
2.2.16
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 NSABIMANA Emmanuel & Vanessa Aoki

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
65 changes: 29 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<a href="https://www.microverse.org/">
<img alt="Microverse" src="https://img.shields.io/badge/-Microverse-blueviolet?style=flat-square">
</a>
<a href="https://github.com/VanessaAoki/MembersOnly/blob/development/LICENSE">
<img alt="MIT Licensed" src="https://img.shields.io/github/license/VanessaAoki/MembersOnly?style=flat-square">
<a href="https://github.com/Emmyn5600/PrivateEvent/blob/development/LICENSE">
<img alt="MIT Licensed" src="https://img.shields.io/github/license/Emmyn5600/PrivateEvent?style=flat-square">
</a>
<a href="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/VanessaAoki/MembersOnly">
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/VanessaAoki/MembersOnly/authentication?color=blue&style=flat-square">
<a href="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/Emmyn5600/PrivateEvent">
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/Emmyn5600/PrivateEvent/development?color=blue&style=flat-square">
</a>
</p>


# Private Events (Eventbrite)
> This is an exclusive app where users can create events and then manage user signups.
> Users can create events and send invitations and parties [the Odin Project’s](https://www.theodinproject.com/courses/ruby-on-rails/lessons/associations).
This is an app, created with Ruby on Rails, developed for you to create and attend events!
> This is the 5th project of the Micoverse's Ruby on Rails module, the full description can be found at [the Odin Project’s](https://www.theodinproject.com/courses/ruby-on-rails/lessons/associations) website.
![screenshot](./app/assets/images/img1.png)
![screenshot](./app/assets/images/img2.png)
Expand All @@ -25,8 +25,8 @@
**What you can do with this project**
- You can create Users and Events;
- Once you sign in, you can:
- attend or Ignore meetings;
- create events with date and location
- create events, with giving it a title, description, date, and location;
- attend or ignore events;

## Built With

Expand All @@ -35,45 +35,38 @@
- Ruby gems: devise, bulma, simple-forms, sqlite3, puma, sass-rails, webpacker, turbolinks, jbuilder, rubocop;
- Visual Studio, Git & GitHub;

## Live Server Link
[Live demo link](https://private-event-1.herokuapp.com/)


## Prerequisites
Make sure that your system has the proper prerequisites installed. These include:
To run this project, you need a computer with Ruby and Ruby on Rails installed.

- Ruby
- SQLite3
- Node.js
- Yarn
> If you are uncertain about how to install Ruby, check out this [tutorial](https://www.theodinproject.com/courses/ruby-programming/lessons/installing-ruby-ruby-programming) made by [The Odin Project](https://www.theodinproject.com/about).
If you need step by step installation guidence, visit [this page](https://guides.rubyonrails.org/getting_started.html#creating-a-new-rails-project-installing-rails).
> If you are uncertain about how to install Ruby on Rails, check out this [tutorial](https://www.theodinproject.com/paths/full-stack-ruby-on-rails/courses/ruby-on-rails/lessons/your-first-rails-application-ruby-on-rails) made by [The Odin Project](https://www.theodinproject.com/about).
## Getting Started

To get a local copy up and running follow these simple example steps.
To get a local copy up and running, follow these simple steps:

1. In your terminal, type the following, to clone this repository:
```
$ git clone https://github.com/Emmyn5600/PrivateEvent.git
```
2. Type `$ cd PrivateEvent` to move to the project folder;

- On the project GitHub page, navigate to the main page of the repository [this page](https://github.com/Emmyn5600/PrivateEvent.git).
- Under the repository name, locate and click on a green button named `Code`.
- Copy the project URL as displayed.
- If you're running Windows Operating System, open your command prompt. On Linux, Open your terminal.
- Change the current working directory to the location where you want the cloned directory to be made. Leave as it is if the current location is where you want the project to be.
- Type `git clone`, and then paste the URL you copied in Step 3.<br>
`$ git clone https://github.com/Emmyn5600/PrivateEvent.git` <em>Press Enter key</em><br>
- Press Enter. Your local copy will be created.
3. Install all required gems by typing `$ bundle install` on the terminal;

Please Note that you must have Git installed on your PC, this can be done [here](https://gist.github.com/derhuerst/1b15ff4652a867391f03).
4. Migrate the database with `$ rails db:migrate`;

## How to use the app?
5. Type `$ cd bin` to move to the bin folder, *you must be on this folder to execute the file*;

1. Follow Getting Started section to download the app
2. Open/navigate to the project directory in your terminal
3. Run `bundle install`
4. Run `rails db:create`
5. Migrate, run `rails db:migrate`
6. Execute `$ rails server` on the terminal and run `http:https://localhost:3000` on your browser *(Google Chrome, Mozilla Firefox, Microsoft Edge, Apple Safari, etc.)*;

## How to run tests?
7. Explore the app, sign up - or sign in if you are already a user - create and attend events;

1. Follow Getting Started section to download the app
2. Open/navigate to the project directory in your terminal
3. Run `rails s` or `rails server`.
4. You will be asked to open `http:https://localhost:3000/` in your terminal. Open it and you are ready to use with User Interface.
8. After you are done, stop running the server by clicking `ctrl + C` on your terminal.

## Authors

Expand Down Expand Up @@ -106,4 +99,4 @@ Give a ⭐️ if you like this project!

## 📝 License

This project is [MIT](https://en.wikipedia.org/wiki/MIT_License) licensed.
This project is [MIT](./LICENSE) licensed.
64 changes: 64 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This file is copied to spec/ when you run 'rails generate rspec:install'
require 'spec_helper'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../config/environment', __dir__)
# Prevent database truncation if the environment is production
abort('The Rails environment is running in production mode!') if Rails.env.production?
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!

# Requires supporting ruby files with custom matchers and macros, etc, in
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
# run as spec files by default. This means that files in spec/support that end
# in _spec.rb will both be required and run as specs, causing the specs to be
# run twice. It is recommended that you do not name files matching this glob to
# end with _spec.rb. You can configure this pattern with the --pattern
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
#
# The following line is provided for convenience purposes. It has the downside
# of increasing the boot-up time by auto-requiring all files in the support
# directory. Alternatively, in the individual `*_spec.rb` files, manually
# require only the support files necessary.
#
# Dir[Rails.root.join('spec', 'support', '**', '*.rb')].sort.each { |f| require f }

# Checks for pending migrations and applies them before tests are run.
# If you are not using ActiveRecord, you can remove these lines.
begin
ActiveRecord::Migration.maintain_test_schema!
rescue ActiveRecord::PendingMigrationError => e
puts e.to_s.strip
exit 1
end
RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{::Rails.root}/spec/fixtures"

# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
config.use_transactional_fixtures = true

# You can uncomment this line to turn off ActiveRecord support entirely.
# config.use_active_record = false

# RSpec Rails can automatically mix in different behaviours to your tests
# based on their file location, for example enabling you to call `get` and
# `post` in specs under `spec/controllers`.
#
# You can disable this behaviour by removing the line below, and instead
# explicitly tag your specs with their type, e.g.:
#
# RSpec.describe UsersController, type: :controller do
# # ...
# end
#
# The different available types are documented in the features, such as in
# https://relishapp.com/rspec/rspec-rails/docs
config.infer_spec_type_from_file_location!

# Filter lines from Rails gems in backtraces.
config.filter_rails_from_backtrace!
# arbitrary gems may also be filtered via:
# config.filter_gems_from_backtrace("gem name")
end
Loading

0 comments on commit 1801c11

Please sign in to comment.