Skip to content

Commit

Permalink
Merge branch 'main' of github.com:sarvaiyanidhi/casa into email-reimb…
Browse files Browse the repository at this point in the history
…ursement-requests
  • Loading branch information
sarvaiyanidhi committed Sep 19, 2023
2 parents 6a45698 + e4601a7 commit b5c1563
Show file tree
Hide file tree
Showing 26 changed files with 2,456 additions and 583 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
RAILS_ENV: test
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create downloads folder
run: |
mkdir -p tmp/downloads
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/erb_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/factory_bot_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rake-after_party.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ruby_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spec_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
spec_checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yaml_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
lintAllTheThings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: yaml-lint
uses: ibiqlik/action-yamllint@v3
2 changes: 1 addition & 1 deletion .github/workflows/yarn_lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
source "https://rubygems.org"

ruby "3.2.2"
gem "rails", "~> 7.0.7"
gem "rails", "~> 7.0.8"

gem "after_party" # post-deployment tasks
gem "amazing_print" # easier console reading
gem "azure-storage-blob", require: false
gem "bugsnag" # tracking errors in prod
gem "caxlsx", "~> 3.4" # excel spreadsheets - TODO can we remove this version restriction?
gem "caxlsx_rails", "~> 0.6.3" # excel spreadsheets - TODO can we remove this version restriction?
gem "cssbundling-rails", "~> 1.2" # compiles css
gem "cssbundling-rails", "~> 1.3" # compiles css
gem "delayed_job_active_record"
gem "devise" # for authentication
gem "devise_invitable"
Expand Down
122 changes: 61 additions & 61 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,71 +1,71 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.7.2)
actionpack (= 7.0.7.2)
activesupport (= 7.0.7.2)
actioncable (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.7.2)
actionpack (= 7.0.7.2)
activejob (= 7.0.7.2)
activerecord (= 7.0.7.2)
activestorage (= 7.0.7.2)
activesupport (= 7.0.7.2)
actionmailbox (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.7.2)
actionpack (= 7.0.7.2)
actionview (= 7.0.7.2)
activejob (= 7.0.7.2)
activesupport (= 7.0.7.2)
actionmailer (7.0.8)
actionpack (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activesupport (= 7.0.8)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.7.2)
actionview (= 7.0.7.2)
activesupport (= 7.0.7.2)
actionpack (7.0.8)
actionview (= 7.0.8)
activesupport (= 7.0.8)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.7.2)
actionpack (= 7.0.7.2)
activerecord (= 7.0.7.2)
activestorage (= 7.0.7.2)
activesupport (= 7.0.7.2)
actiontext (7.0.8)
actionpack (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.7.2)
activesupport (= 7.0.7.2)
actionview (7.0.8)
activesupport (= 7.0.8)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.7.2)
activesupport (= 7.0.7.2)
activejob (7.0.8)
activesupport (= 7.0.8)
globalid (>= 0.3.6)
activemodel (7.0.7.2)
activesupport (= 7.0.7.2)
activemodel (7.0.8)
activesupport (= 7.0.8)
activemodel-serializers-xml (1.0.2)
activemodel (> 5.x)
activesupport (> 5.x)
builder (~> 3.1)
activerecord (7.0.7.2)
activemodel (= 7.0.7.2)
activesupport (= 7.0.7.2)
activestorage (7.0.7.2)
actionpack (= 7.0.7.2)
activejob (= 7.0.7.2)
activerecord (= 7.0.7.2)
activesupport (= 7.0.7.2)
activerecord (7.0.8)
activemodel (= 7.0.8)
activesupport (= 7.0.8)
activestorage (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activesupport (= 7.0.8)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.7.2)
activesupport (7.0.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -133,7 +133,7 @@ GEM
crack (0.4.5)
rexml
crass (1.0.6)
cssbundling-rails (1.2.0)
cssbundling-rails (1.3.2)
railties (>= 6.0.0)
database_cleaner-active_record (2.1.0)
activerecord (>= 5.a)
Expand Down Expand Up @@ -219,8 +219,8 @@ GEM
filterrific (5.2.5)
friendly_id (5.5.0)
activerecord (>= 4.0.0)
globalid (1.1.0)
activesupport (>= 5.0)
globalid (1.2.1)
activesupport (>= 6.1)
hashdiff (1.0.1)
htmlentities (4.3.4)
http (5.1.1)
Expand All @@ -242,7 +242,7 @@ GEM
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jsbundling-rails (1.1.2)
jsbundling-rails (1.2.1)
railties (>= 6.0.0)
jwt (2.7.1)
launchy (2.5.0)
Expand Down Expand Up @@ -270,7 +270,7 @@ GEM
method_source (1.0.0)
mini_magick (4.11.0)
mini_mime (1.1.5)
minitest (5.19.0)
minitest (5.20.0)
multi_xml (0.6.0)
multipart-post (2.3.0)
net-http-persistent (4.0.1)
Expand Down Expand Up @@ -324,20 +324,20 @@ GEM
rack (>= 1.0, < 4)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.7.2)
actioncable (= 7.0.7.2)
actionmailbox (= 7.0.7.2)
actionmailer (= 7.0.7.2)
actionpack (= 7.0.7.2)
actiontext (= 7.0.7.2)
actionview (= 7.0.7.2)
activejob (= 7.0.7.2)
activemodel (= 7.0.7.2)
activerecord (= 7.0.7.2)
activestorage (= 7.0.7.2)
activesupport (= 7.0.7.2)
rails (7.0.8)
actioncable (= 7.0.8)
actionmailbox (= 7.0.8)
actionmailer (= 7.0.8)
actionpack (= 7.0.8)
actiontext (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activemodel (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
bundler (>= 1.15.0)
railties (= 7.0.7.2)
railties (= 7.0.8)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -349,9 +349,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.0.7.2)
actionpack (= 7.0.7.2)
activesupport (= 7.0.7.2)
railties (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand Down Expand Up @@ -441,7 +441,7 @@ GEM
timeout (0.4.0)
traceroute (0.8.1)
rails (>= 3.0.0)
twilio-ruby (6.5.0)
twilio-ruby (6.6.0)
faraday (>= 0.9, < 3.0)
jwt (>= 1.5, < 3.0)
nokogiri (>= 1.6, < 2.0)
Expand Down Expand Up @@ -500,7 +500,7 @@ DEPENDENCIES
capybara-screenshot
caxlsx (~> 3.4)
caxlsx_rails (~> 0.6.3)
cssbundling-rails (~> 1.2)
cssbundling-rails (~> 1.3)
database_cleaner-active_record
delayed_job_active_record
devise
Expand Down Expand Up @@ -532,7 +532,7 @@ DEPENDENCIES
puma (= 6.3.1)
pundit
rack-attack
rails (~> 7.0.7)
rails (~> 7.0.8)
rails-controller-testing
rake
request_store
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,23 @@ The complete [role description of a CASA volunteer](https://pgcasa.org/volunteer
2. You can ask a [maintainer](https://github.com/rubyforgood/casa/wiki/Who's-who%3F) for permission to make a branch on this repo.
3. You can also [create a fork on GitHub](https://docs.github.com/en/get-started/quickstart/fork-a-repo) and make a pull request from the fork.

**Nix**

If you have [Nix](https://nixos.org) installed you can use
the [flake.nix](flake.nix) configuration file located at the root of the
project to build and develop within an environment without needing to install
`rvm`, `nodejs`, `yarn` or other tools separately. All you need is this file
to get the server up and running:

1. Install [Nix](https://zero-to-nix.com/concepts/nix-installer)
1. `cd` into casa
1. `nix develop`
1. `bundix` # to generate a a Gemfile lock that nix can understand
1. `bundle install`

Then you can setup the database and run the server.
This will run on Linux and macOS.

**Ruby**
1. Install a ruby version manager: [rvm](https://rvm.io/) or [rbenv](https://github.com/rbenv/rbenv)
1. when you cd into the project directory, let your version manager install the ruby version in `.ruby-version`. Right now that's Ruby 3.2.2
Expand Down
1 change: 1 addition & 0 deletions app/models/placement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Placement < ApplicationRecord
#
# Foreign Keys
#
# fk_rails_... (casa_case_id => casa_cases.id)
# fk_rails_... (creator_id => users.id)
# fk_rails_... (placement_type_id => placement_types.id)
#
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddForeignKeyCasaCaseToPlacement < ActiveRecord::Migration[7.0]
def change
add_foreign_key :placements, :casa_cases, column: :casa_case_id, validate: false
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2023_08_09_002819) do
ActiveRecord::Schema[7.0].define(version: 2023_09_03_182657) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

Expand Down Expand Up @@ -628,6 +628,7 @@
add_foreign_key "patch_notes", "patch_note_groups"
add_foreign_key "patch_notes", "patch_note_types"
add_foreign_key "placement_types", "casa_orgs"
add_foreign_key "placements", "casa_cases"
add_foreign_key "placements", "placement_types"
add_foreign_key "placements", "users", column: "creator_id"
add_foreign_key "preference_sets", "users"
Expand Down
Loading

0 comments on commit b5c1563

Please sign in to comment.