Skip to content

Commit 34716b2

Browse files
committed
resolve conflicts
1 parent a42f300 commit 34716b2

File tree

107 files changed

+765
-559
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+765
-559
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @cattywampus @abronkema @yarmiganosca
1+
* @cattywampus @abronkema @yarmiganosca @pollygee

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gem 'rails', '~> 5.2.3'
88
# Use postgresql as the database for Active Record
99
gem 'pg', '>= 0.18', '< 2.0'
1010
# Use Puma as the app server
11-
gem 'puma', '~> 3.11'
11+
gem 'puma', '~> 4.1'
1212
# Use SCSS for stylesheets
1313
gem 'sassc-rails', '~> 2.1'
1414
# Use Uglifier as compressor for JavaScript assets

Gemfile.lock

+3-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ GEM
148148
byebug (~> 11.0)
149149
pry (~> 0.10)
150150
public_suffix (3.1.1)
151-
puma (3.12.1)
151+
puma (4.2.1)
152+
nio4r (~> 2.0)
152153
pundit (2.0.1)
153154
activesupport (>= 3.0.0)
154155
rack (2.0.7)
@@ -265,7 +266,7 @@ DEPENDENCIES
265266
mini_magick (~> 4.8)
266267
pg (>= 0.18, < 2.0)
267268
pry-byebug
268-
puma (~> 3.11)
269+
puma (~> 4.1)
269270
pundit
270271
rails (~> 5.2.3)
271272
rolify

README.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -83,23 +83,17 @@ device available in those moments.
8383

8484
### Ruby Version
8585

86-
This app uses Ruby version 2.6.3 and Rails version 5.2.3
86+
This app uses Ruby version 2.6.3, Rails version 5.2.3, and PostgreSQL 11.4
8787

8888
### Setup
8989

9090
- Clone the repo
91-
- run `bundle install`
92-
- run `rails db:create`
93-
- run `rake:db:migrate`
94-
95-
### Seed the database
96-
97-
From the root of the app, run bundle exec rails `db:seed`. This will create some initial data to use while testing the app and developing new features.
91+
- run `bin/setup`
9892

9993
### Install ImageMagick
10094

10195
ImageMagick is needed for the pages with images of carriers
102-
run`brew install imagemagick`
96+
run `brew install imagemagick`
10397

10498
### Start the app
10599

app/assets/stylesheets/application.scss

+62-23
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
# Then, remove all the *= require and *= require_tree statements from the Sass file. Instead, use @import to import Sass files.
2222
# Do not use *= require in Sass or your other stylesheets will not be able to access the Bootstrap mixins and variables.
2323
*/
24-
$bw-color-purple: #A36EB9;
25-
$bw-color-dark-purple: #7A7289;
26-
$bw-color-slate: #84A5C6;
27-
$bw-color-blue: #73C3FE;
24+
$bw-color-purple: #a36eb9;
25+
$bw-color-dark-purple: #7a7289;
26+
$bw-color-slate: #84a5c6;
27+
$bw-color-blue: #73c3fe;
2828
$bw-color-darkest-purple: #808808;
2929

3030
// Custom bootstrap variables must be set or imported *before* bootstrap.
@@ -33,31 +33,70 @@ $navbar-brand-padding-y: 8px;
3333

3434
@import "bootstrap";
3535

36-
.navbar-brand img {height: 84px}
37-
.nav-icon img {width: 50px}
38-
.nav-icon {height: 100px; width: 100px; font-size: 12px}
39-
.nav-link {text-align: center}
40-
.background-purple {background-color: $bw-color-purple}
41-
.background-dark-purple {background-color: $bw-color-dark-purple}
42-
.background-slate {background-color: $bw-color-slate}
43-
.background-blue {background-color: $bw-color-blue}
44-
.background-darkest-purple {background-color: $bw-color-darkest-purple}
45-
.navbar-text .pull-right {position: fixed}
36+
.navbar-brand img {
37+
height: 84px;
38+
}
39+
.nav-icon {
40+
height: 100px;
41+
width: 100px;
42+
font-size: 12px;
43+
}
44+
.nav-link {
45+
text-align: center;
46+
}
47+
.background-purple {
48+
background-color: $bw-color-purple;
49+
}
50+
.background-dark-purple {
51+
background-color: $bw-color-dark-purple;
52+
}
53+
.background-slate {
54+
background-color: $bw-color-slate;
55+
}
56+
.background-blue {
57+
background-color: $bw-color-blue;
58+
}
59+
.background-darkest-purple {
60+
background-color: $bw-color-darkest-purple;
61+
}
62+
.navbar-text .pull-right {
63+
position: fixed;
64+
}
65+
66+
.nav-item {
67+
display: flex;
68+
align-items: center;
69+
}
4670

71+
.nav-first img {
72+
width: 6.4em;
73+
}
74+
.nav-second img {
75+
width: 5.5em;
76+
}
77+
.nav-third {
78+
width: 9em;
79+
img {
80+
width: 5.1em;
81+
}
82+
}
83+
.nav-fourth img {
84+
width: 6.2em;
85+
}
4786
#outer-container {
48-
display: table;
49-
width: 100%;
50-
height: 100%;
87+
display: table;
88+
width: 100%;
89+
height: 100%;
5190
}
5291

5392
#sidebar {
54-
display: table-cell;
55-
width: 15%;
56-
vertical-align: top;
93+
display: table-cell;
94+
width: 15%;
95+
vertical-align: top;
5796
}
5897

5998
#content {
60-
display: table-cell;
61-
width: 85%;
62-
vertical-align: top;
99+
display: table-cell;
100+
width: 85%;
101+
vertical-align: top;
63102
}

app/channels/application_cable/channel.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module ApplicationCable
24
class Channel < ActionCable::Channel::Base
35
end

app/channels/application_cable/connection.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module ApplicationCable
24
class Connection < ActionCable::Connection::Base
35
end

app/controllers/agreements_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class AgreementsController < ApplicationController
24
before_action :set_agreement, only: [:show, :edit, :update, :destroy]
35

app/controllers/application_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class ApplicationController < ActionController::Base
24
include Pundit
35
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized

app/controllers/carriers_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class CarriersController < ApplicationController
24
before_action :set_carrier, only: [:show, :edit, :update]
35

app/controllers/categories_controller.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
# frozen_string_literal: true
2+
13
class CategoriesController < ApplicationController
24
before_action :set_category, only: [:show, :edit, :update, :destroy]
35

46
# GET /categories
57
# GET /categories.json
68
def index
7-
@categories = Category.all
9+
@categories = Category.includes(:parent)
810
end
911

1012
# GET /categories/1

app/controllers/fee_types_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class FeeTypesController < ApplicationController
24
before_action :set_fee_type, only: [:show, :edit, :update, :destroy]
35

app/controllers/home_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class HomeController < ApplicationController
24
def index
35
end

app/controllers/locations_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class LocationsController < ApplicationController
24

35
before_action :set_location, only: [:show, :edit, :update]

app/controllers/membership_types_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class MembershipTypesController < ApplicationController
24
before_action :set_membership_type, only: [:show, :edit, :update, :destroy]
35

app/controllers/organizations_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class OrganizationsController < ApplicationController
24
before_action :set_organization, only: [:edit, :update, :destroy]
35

app/controllers/photos_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class PhotosController < ApplicationController
24
def destroy
35
@photo = ActiveStorage::Attachment.find(params[:id])

app/controllers/signed_agreements_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class SignedAgreementsController < ApplicationController
24
before_action :set_agreement, only: [:new, :show]
35

app/controllers/users/registrations_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class Users::RegistrationsController < Devise::RegistrationsController
24

35
private

app/controllers/users_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class UsersController < ApplicationController
24
attr_reader :user
35

app/helpers/agreements_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# frozen_string_literal: true
2+
13
module AgreementsHelper
24
end

app/helpers/application_helper.rb

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
# frozen_string_literal: true
2+
13
module ApplicationHelper
24
def flash_class(level)
35
case level.to_sym
4-
when :notice then "alert alert-info"
5-
when :success then "alert alert-success"
6-
when :error then "alert alert-error"
7-
when :alert then "alert alert-error"
6+
when :notice then "alert alert-info"
7+
when :success then "alert alert-success"
8+
when :error then "alert alert-error"
9+
when :alert then "alert alert-error"
810
end
911
end
1012
end

app/helpers/fee_types_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# frozen_string_literal: true
2+
13
module FeeTypesHelper
24
end

app/helpers/locations_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# frozen_string_literal: true
2+
13
module LocationsHelper
24
end
+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# frozen_string_literal: true
2+
13
module MembershipTypesHelper
24
end

app/helpers/users_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# frozen_string_literal: true
2+
13
module UsersHelper
24
end

app/jobs/application_job.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# frozen_string_literal: true
2+
13
class ApplicationJob < ActiveJob::Base
24
end

app/mailers/application_mailer.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class ApplicationMailer < ActionMailer::Base
24
default from: '[email protected]'
35
layout 'mailer'

app/mailers/custom_mailer.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
# frozen_string_literal: true
2+
13
class CustomMailer < Devise::Mailer
24
helper :application # gives access to all helpers defined within `application_helper`.
35
include Devise::Controllers::UrlHelpers # Optional. eg. `confirmation_url`
46
default template_path: 'devise/mailer' # to make sure that your mailer uses the devise views
5-
end
7+
end

app/mailers/welcome_mailer.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# frozen_string_literal: true
2+
13
class WelcomeMailer < CustomMailer
24
def welcome_email(user)
35
@user = user
46
mail(to: @user.email, subject: 'Babywearing Account Registration')
57
end
6-
end
8+
end

app/models/agreement.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class Agreement < ApplicationRecord
24
has_many :signed_agreements
35

app/models/application_record.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class ApplicationRecord < ActiveRecord::Base
24
self.abstract_class = true
35
end

app/models/carrier.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class Carrier < ApplicationRecord
24
belongs_to :location
35
has_many :loans

app/models/cart.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class Cart < ApplicationRecord
24
belongs_to :member, class_name: "User"
35
validates :member, presence: true

app/models/category.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class Category < ApplicationRecord
24
validates :name, presence: true, uniqueness: true
35

app/models/fee_type.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class FeeType < ApplicationRecord
24
validates_presence_of :name, :amount
35
end

app/models/loan.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class Loan < ApplicationRecord
24
belongs_to :cart
35
belongs_to :carrier

app/models/location.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class Location < ApplicationRecord
24
has_many :carriers
35
belongs_to :organization

app/models/membership_type.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class MembershipType < ApplicationRecord
24
validates :name, :fee_cents, :duration_days, :number_of_items, :description, presence: true
35
end

app/models/organization.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class Organization < ApplicationRecord
24
validates :name, presence: true
35
has_many :locations

0 commit comments

Comments
 (0)