Skip to content

Commit

Permalink
Merge branch 'master' into kyle/fileUploads
Browse files Browse the repository at this point in the history
  • Loading branch information
didvi committed May 14, 2020
2 parents 391f761 + b65808e commit 77eee04
Show file tree
Hide file tree
Showing 82 changed files with 1,265 additions and 1,296 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.5.6'
ruby '2.6.3'

gem 'faker'

Expand Down
125 changes: 62 additions & 63 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.2.2)
actionpack (= 6.0.2.2)
actioncable (6.0.3)
actionpack (= 6.0.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.2.2)
actionpack (= 6.0.2.2)
activejob (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
actionmailbox (6.0.3)
actionpack (= 6.0.3)
activejob (= 6.0.3)
activerecord (= 6.0.3)
activestorage (= 6.0.3)
activesupport (= 6.0.3)
mail (>= 2.7.1)
actionmailer (6.0.2.2)
actionpack (= 6.0.2.2)
actionview (= 6.0.2.2)
activejob (= 6.0.2.2)
actionmailer (6.0.3)
actionpack (= 6.0.3)
actionview (= 6.0.3)
activejob (= 6.0.3)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.2.2)
actionview (= 6.0.2.2)
activesupport (= 6.0.2.2)
actionpack (6.0.3)
actionview (= 6.0.3)
activesupport (= 6.0.3)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.2.2)
actionpack (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
actiontext (6.0.3)
actionpack (= 6.0.3)
activerecord (= 6.0.3)
activestorage (= 6.0.3)
activesupport (= 6.0.3)
nokogiri (>= 1.8.5)
actionview (6.0.2.2)
activesupport (= 6.0.2.2)
actionview (6.0.3)
activesupport (= 6.0.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
Expand All @@ -42,29 +42,29 @@ GEM
activemodel (>= 4.1, < 6.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (6.0.2.2)
activesupport (= 6.0.2.2)
activejob (6.0.3)
activesupport (= 6.0.3)
globalid (>= 0.3.6)
activemodel (6.0.2.2)
activesupport (= 6.0.2.2)
activemodel (6.0.3)
activesupport (= 6.0.3)
activemodel-serializers-xml (1.0.2)
activemodel (> 5.x)
activesupport (> 5.x)
builder (~> 3.1)
activerecord (6.0.2.2)
activemodel (= 6.0.2.2)
activesupport (= 6.0.2.2)
activestorage (6.0.2.2)
actionpack (= 6.0.2.2)
activejob (= 6.0.2.2)
activerecord (= 6.0.2.2)
activerecord (6.0.3)
activemodel (= 6.0.3)
activesupport (= 6.0.3)
activestorage (6.0.3)
actionpack (= 6.0.3)
activejob (= 6.0.3)
activerecord (= 6.0.3)
marcel (~> 0.3.1)
activesupport (6.0.2.2)
activesupport (6.0.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
zeitwerk (~> 2.2, >= 2.2.2)
ast (2.4.0)
aws-eventstream (1.1.0)
aws-partitions (1.308.0)
Expand Down Expand Up @@ -127,7 +127,7 @@ GEM
jbuilder (2.10.0)
activesupport (>= 5.0.0)
jmespath (1.4.0)
jquery-rails (4.3.5)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
Expand Down Expand Up @@ -160,7 +160,7 @@ GEM
mimemagic (~> 0.3.2)
maruku (0.7.3)
method_source (1.0.0)
mimemagic (0.3.4)
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
Expand Down Expand Up @@ -210,20 +210,20 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.2.2)
actioncable (= 6.0.2.2)
actionmailbox (= 6.0.2.2)
actionmailer (= 6.0.2.2)
actionpack (= 6.0.2.2)
actiontext (= 6.0.2.2)
actionview (= 6.0.2.2)
activejob (= 6.0.2.2)
activemodel (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
rails (6.0.3)
actioncable (= 6.0.3)
actionmailbox (= 6.0.3)
actionmailer (= 6.0.3)
actionpack (= 6.0.3)
actiontext (= 6.0.3)
actionview (= 6.0.3)
activejob (= 6.0.3)
activemodel (= 6.0.3)
activerecord (= 6.0.3)
activestorage (= 6.0.3)
activesupport (= 6.0.3)
bundler (>= 1.3.0)
railties (= 6.0.2.2)
railties (= 6.0.3)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
Expand All @@ -242,9 +242,9 @@ GEM
rails (>= 5.0, < 7)
remotipart (~> 1.3)
sassc-rails (>= 1.3, < 3)
railties (6.0.2.2)
actionpack (= 6.0.2.2)
activesupport (= 6.0.2.2)
railties (6.0.3)
actionpack (= 6.0.3)
activesupport (= 6.0.3)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
Expand All @@ -266,9 +266,9 @@ GEM
reverse_markdown (1.4.0)
nokogiri
rexml (3.2.4)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.1)
rspec-core (3.9.2)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
Expand All @@ -282,9 +282,8 @@ GEM
rspec-expectations (~> 3.9)
rspec-mocks (~> 3.9)
rspec-support (~> 3.9)
rspec-support (3.9.2)
rubocop (0.82.0)
jaro_winkler (~> 1.5.1)
rspec-support (3.9.3)
rubocop (0.83.0)
parallel (~> 1.10)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
Expand Down Expand Up @@ -314,7 +313,7 @@ GEM
tilt
sentry-raven (3.0.0)
faraday (>= 1.0)
solargraph (0.39.4)
solargraph (0.39.7)
backport (~> 1.1)
benchmark
bundler (>= 1.17.2)
Expand Down Expand Up @@ -351,7 +350,7 @@ GEM
unicode-display_width (1.7.0)
warden (1.2.8)
rack (>= 2.0.6)
web-console (4.0.1)
web-console (4.0.2)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
Expand All @@ -363,7 +362,7 @@ GEM
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
yard (0.9.24)
yard (0.9.25)
zeitwerk (2.3.0)

PLATFORMS
Expand Down Expand Up @@ -399,7 +398,7 @@ DEPENDENCIES
webpacker (~> 4.0)

RUBY VERSION
ruby 2.5.6p201
ruby 2.6.3p62

BUNDLED WITH
2.0.2
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) 2020 Blueprint, Technology for Nonprofits

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.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Technologies

- Ruby 2.5.6
- Ruby 2.6.3
- Rails 6.0.0
- Postgresql 11.6

Expand Down Expand Up @@ -97,3 +97,13 @@ You can also attach `functional` or `class` after generate to quickly specify wh
### After Generating

If your component is not a root for a page or shared component, move your component to the folder that matches the page or shared component that it will live under.

## Potential Errors and Solutions
Gems have many dependencies and also require certain ruby versions in order to be used. Be sure that the ruby version you are using is compatible with this repo's gemfile. If you run into any issues with gems while you run `bundle install`, double check that your ruby version is the same as specified above.

### Faraday
`Bundler could not find compatible versions for gem "faraday"`

Make sure your ruby version is 2.6.3 as specificed above. Afterwards, run `bundle update`.


Binary file added app/assets/images/blueprint_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 2 additions & 17 deletions app/controllers/api/assignments_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Api::AssignmentsController < ApplicationController
before_action :set_assignment, only: [:show, :update, :destroy]
before_action :set_template, only: [:show_template, :update_template, :destroy_template]
before_action :set_assignment, only: [:update, :destroy]
before_action :set_template, only: [:update_template, :destroy_template]
respond_to :json

def create
Expand Down Expand Up @@ -55,11 +55,6 @@ def create
render json: created_assignments, status: :created
end

def show
authorize @assignment
render json: @assignment, status: :ok
end

def update
authorize @assignment
action_item_copied = false
Expand Down Expand Up @@ -110,16 +105,6 @@ def create_template
end
end

def get_templates
@action_items = authorize ActionItem.where(is_template: true), :show?
render json: @action_items, status: :ok
end

def show_template
authorize @template, :show?
render json: @template, status: :ok
end

def update_template
authorize @template, :update?
if @template.update(action_item_params)
Expand Down
6 changes: 1 addition & 5 deletions app/controllers/api/case_notes_controller.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
class Api::CaseNotesController < ApplicationController
before_action :set_case_note, only: [:show, :update, :not_visible, :destroy]
before_action :set_case_note, only: [:update, :not_visible, :destroy]
respond_to :json

def show
render json: @case_note
end

def create
@case_note = authorize CaseNote.new(case_notes_params)
sentry_helper(@case_note)
Expand Down
6 changes: 1 addition & 5 deletions app/controllers/api/paperworks_controller.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
class Api::PaperworksController < ApplicationController
before_action :set_paperwork, only: [:show, :update, :complete, :viewed, :destroy]
before_action :set_paperwork, only: [:update, :complete, :viewed, :destroy]
respond_to :json

def show
render json: @paperwork
end

def create
@paperwork = authorize Paperwork.new(paperwork_params)
sentry_helper(@paperwork)
Expand Down
6 changes: 1 addition & 5 deletions app/controllers/api/personal_questionnaires_controller.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
class Api::PersonalQuestionnairesController < ApplicationController
before_action :set_questionnaire, only: [:show, :update, :destroy]
before_action :set_questionnaire, only: [:update, :destroy]
respond_to :json

def show
render json: @questionnaire
end

def create
@questionnaire = PersonalQuestionnaire.new(questionnaire_params)
authorize @questionnaire, policy_class: QuestionnairePolicy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
class Api::ProfessionalQuestionnairesController < ApplicationController
before_action :set_questionnaire, only: [:show, :update, :destroy]
before_action :set_questionnaire, only: [:update, :destroy]
respond_to :json

def show
render json: @questionnaire
end

def create
@questionnaire = ProfessionalQuestionnaire.new(questionnaire_params)
authorize @questionnaire, policy_class: QuestionnairePolicy
Expand Down
6 changes: 1 addition & 5 deletions app/controllers/api/studio_assessments_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Api::StudioAssessmentsController < ApplicationController
before_action :set_studio_assessment, only: [:show, :update, :destroy]
before_action :set_studio_assessment, only: [:update, :destroy]
respond_to :json

def create
Expand All @@ -17,10 +17,6 @@ def user_not_authorized
render json: { error: 'You are not authorized to perform this action' }, status: :unauthorized
end

def show
render json: @studio_assessment
end

def update
if @studio_assessment.update(studio_assessment_params)
render json: @studio_assessment, status: :ok
Expand Down
Loading

0 comments on commit 77eee04

Please sign in to comment.