Skip to content

Commit

Permalink
Merge branch 'deploy' into mobile-icons
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulhamiid authored Jan 12, 2024
2 parents 05c8137 + b261eb3 commit be3e2ac
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ gem 'rubocop', '>= 1.0', '< 2.0'

ruby '3.1.2'

gem 'sass-rails', '>= 5.0.3'

gem 'cancancan'

gem 'jwt'
Expand Down Expand Up @@ -92,3 +94,5 @@ end
gem 'sassc-rails'

gem 'active_model_serializers', '~> 0.10.13'

gem 'psych', '~> 3.3', '>= 3.3.0'
6 changes: 4 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ GEM
parser (>= 3.2.1.0)
ruby-progressbar (1.13.0)
rubyzip (2.3.2)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
Expand Down Expand Up @@ -286,7 +288,6 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2023.4)
tzinfo (>= 1.0.0)
unicode-display_width (2.5.0)
uniform_notifier (1.16.0)
warden (1.2.9)
Expand Down Expand Up @@ -327,12 +328,13 @@ DEPENDENCIES
jwt
letter_opener
pg (~> 1.1)
psych (~> 3.3, >= 3.3.0)
puma (~> 5.0)
rails (~> 7.0.4)
rails-controller-testing
rspec-rails (>= 3.9.0)
rubocop (>= 1.0, < 2.0)
sassc-rails
sass-rails (>= 5.0.3)
selenium-webdriver
shoulda-matchers (~> 5.0)
sprockets-rails
Expand Down
3 changes: 1 addition & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ class User < ApplicationRecord
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable,
:confirmable
:recoverable, :rememberable, :validatable
has_many :posts, foreign_key: 'author_id'
has_many :comments, foreign_key: 'author_id'
has_many :likes, foreign_key: 'author_id'
Expand Down
7 changes: 7 additions & 0 deletions bin/render-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# exit on error
set -o errexit

bundle install
./bin/rails assets:precompile
./bin/rails assets:clean
2 changes: 1 addition & 1 deletion config/credentials.yml.enc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
YGE9nzPR1Emwc0zZgQbC0g0Xo++SeAn1tCR3unVXA0J2SFnF79CEGyfyAg0S+f9jFWKiRz+DU/cvyO5in7z8Uc9N7NwolURO7S9bYXWQ8pp6s0TAq3DlNcbFRXC+ggItkqPU773bMC9YopGlH5B6G9dveFAR7ULjYETMOzfYYH5MZAx1XF59lvAD2YDVTlLji3siL9psyelAZF7YPEayeVT1ZbnoAnRiZsD0sNta9HGVjqPEzw3u3ubJ6kBQ5kIFX7YMCq4q8NV131Tzv6IRq5XR4JvebU0qJ9vMBYFLaQtCQAhDk5yAOJldumAWMcadrmdWX3eP3GYYkOXPOeP9hw9lacoV6oMFXxnLdLY74QsEaJ0JmjdfjQcviecKQTFCS8ib3LAY9ceoerlww0QgF26r3UcZVq6kw9Hf--onVdoWyrSEwHZ2tl--8IF/q1D/FqOXmShTrbM7fw==
fZJBl7a528fR1BWykT8AM3LD18ZKA1FtrIg9KuYw/KcDFKAjmff3dsorD+vfVVtUY+cNyl3Sl0XJJC0duImB8O6apOTCPnsuDiXPQXL/aeHMCrsKdZ02DVJj1TvCCNMAHN+O0awJWyjzM6mRrcMtnrWY+dUmwm1qp1Zu6S84NjSTtdAQoYeTCTjt6kTiLx2S5xIfAdXUU8tU27LlGPxzSvb0iOCh5Ha9tj7qVUGYlyZ3cdYBIyNKmKn1aUKY0ja3J7rAE6GpNrjHPuo0wxcGWFJI18pgAZ8ZJjUU+3pS406oxz2FFLmuxOhCjpK09DvfxHHM8du6rOZdGLJkHf9fHc48ebkkhNKrz60+RnQoEjvgBoZJ8QqyMTOgzTMCajmZwy7t2KvDbnhRunK6/qj1eHWtO0Sm1W0cUxHS--zL1yMu6ZxRNxnpWq--1mQb7olLAvAxI7nqcs0X+g==
2 changes: 0 additions & 2 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ default: &default
development:
<<: *default
database: blog_app_development
host: localhost
username: postgres
password: hamid

Expand Down Expand Up @@ -61,7 +60,6 @@ development:
test:
<<: *default
database: blog_app_test
host: localhost
username: postgres
password: hamid

Expand Down
1 change: 1 addition & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
config.action_mailer.default_url_options = { host: 'https://blog-app-8pi0.onrender.com/' }

# Include generic and useful information about system operation, but avoid logging too much
# information to avoid inadvertent exposure of personally identifiable information (PII).
Expand Down
8 changes: 4 additions & 4 deletions db/migrate/20221007101943_add_devise_to_users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def self.up
# t.string :last_sign_in_ip

## Confirmable
t.string :confirmation_token
t.datetime :confirmed_at
t.datetime :confirmation_sent_at
t.string :unconfirmed_email # Only if using reconfirmable
# t.string :confirmation_token
# t.datetime :confirmed_at
# t.datetime :confirmation_sent_at
# t.string :unconfirmed_email # Only if using reconfirmable

## Lockable
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
Expand Down
23 changes: 23 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
databases:
- name: mysite
databaseName: mysite
user: mysite
plan: free

services:
- type: web
name: mysite
runtime: ruby
plan: free
buildCommand: "./bin/render-build.sh"
# preDeployCommand: "./bin/rails db:migrate" # preDeployCommand only available on paid instance types
startCommand: "./bin/rails server"
envVars:
- key: DATABASE_URL
fromDatabase:
name: mysite
property: connectionString
- key: RAILS_MASTER_KEY
sync: false
- key: WEB_CONCURRENCY
value: 2 # sensible default

0 comments on commit be3e2ac

Please sign in to comment.