Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
Merge pull request #3 from TechforgoodCAST/dev
  • Loading branch information
suninthesky authored Oct 5, 2018
2 parents cec1399 + b45bf1f commit 1299587
Show file tree
Hide file tree
Showing 88 changed files with 4,065 additions and 44 deletions.
9 changes: 8 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

Expand All @@ -33,9 +33,16 @@ gem 'jbuilder', '~> 2.5'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false

gem 'activeadmin'
gem 'devise'
gem 'sequenced'
gem 'simple_form'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'factory_bot_rails'
gem 'faraday'
end

group :development do
Expand Down
88 changes: 88 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ GEM
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activeadmin (1.3.1)
arbre (>= 1.1.1)
coffee-rails
formtastic (~> 3.1)
formtastic_i18n
inherited_resources (>= 1.9.0)
jquery-rails (>= 4.2.0)
kaminari (>= 0.15)
railties (>= 4.2, < 5.3)
ransack (>= 1.8.7)
sass (~> 3.1)
sprockets (< 4.1)
activejob (5.2.1)
activesupport (= 5.2.1)
globalid (>= 0.3.6)
Expand All @@ -44,9 +56,12 @@ GEM
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
arbre (1.1.1)
activesupport (>= 3.0.0)
archive-zip (0.11.0)
io-like (~> 0.3.0)
arel (9.0.0)
bcrypt (3.1.12)
bindex (0.5.0)
bootsnap (1.3.2)
msgpack (~> 1.0)
Expand All @@ -64,19 +79,66 @@ GEM
chromedriver-helper (2.1.0)
archive-zip (~> 0.10)
nokogiri (~> 1.8)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
crass (1.0.4)
devise (4.5.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 6.0)
responders
warden (~> 1.2.3)
erubi (1.7.1)
execjs (2.7.0)
factory_bot (4.11.1)
activesupport (>= 3.0.0)
factory_bot_rails (4.11.1)
factory_bot (~> 4.11.1)
railties (>= 3.0.0)
faraday (0.15.3)
multipart-post (>= 1.2, < 3)
ffi (1.9.25)
formtastic (3.1.5)
actionpack (>= 3.2.13)
formtastic_i18n (0.6.0)
globalid (0.4.1)
activesupport (>= 4.2.0)
has_scope (0.7.2)
actionpack (>= 4.1)
activesupport (>= 4.1)
i18n (1.1.0)
concurrent-ruby (~> 1.0)
inherited_resources (1.9.0)
actionpack (>= 4.2, < 5.3)
has_scope (~> 0.6)
railties (>= 4.2, < 5.3)
responders
io-like (0.3.0)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jquery-rails (4.3.3)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
kaminari (1.1.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.1.1)
kaminari-activerecord (= 1.1.1)
kaminari-core (= 1.1.1)
kaminari-actionview (1.1.1)
actionview
kaminari-core (= 1.1.1)
kaminari-activerecord (1.1.1)
activerecord
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
Expand All @@ -95,9 +157,11 @@ GEM
minitest (5.11.3)
msgpack (1.2.4)
multi_json (1.13.1)
multipart-post (2.0.0)
nio4r (2.3.1)
nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
orm_adapter (0.5.0)
pg (1.1.3)
public_suffix (3.0.3)
puma (3.12.0)
Expand Down Expand Up @@ -131,9 +195,18 @@ GEM
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (12.3.1)
ransack (2.0.1)
actionpack (>= 5.0)
activerecord (>= 5.0)
activesupport (>= 5.0)
i18n
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
redis (4.0.2)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
ruby_dep (1.5.0)
rubyzip (1.2.2)
sass (3.6.0)
Expand All @@ -150,6 +223,12 @@ GEM
selenium-webdriver (3.14.0)
childprocess (~> 0.5)
rubyzip (~> 1.2)
sequenced (3.1.1)
activerecord (>= 3.0)
activesupport (>= 3.0)
simple_form (4.0.1)
actionpack (>= 5.0)
activemodel (>= 5.0)
spring (2.0.2)
activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
Expand All @@ -172,6 +251,8 @@ GEM
thread_safe (~> 0.1)
uglifier (4.1.19)
execjs (>= 0.3.0, < 3)
warden (1.2.7)
rack (>= 1.0)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
Expand All @@ -191,17 +272,24 @@ PLATFORMS
ruby

DEPENDENCIES
activeadmin
bootsnap (>= 1.1.0)
byebug
capybara (>= 2.15)
chromedriver-helper
devise
factory_bot_rails
faraday
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
pg (>= 0.18, < 2.0)
puma (~> 3.11)
rails (~> 5.2.1)
redis (~> 4.0)
sass-rails (~> 5.0)
selenium-webdriver
sequenced
simple_form
spring
spring-watcher-listen (~> 2.0.0)
turbolinks (~> 5)
Expand Down
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) 2018 Centre for the Acceleration of Social Technology (CAST)

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.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: bundle exec puma -C config/puma.rb
62 changes: 49 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,60 @@
# README
# Cardinal Hume Centre Referral System

This README would normally document whatever steps are necessary to get the
application up and running.
## About

Things you may want to cover:
### Problem

* Ruby version
>How can we better show capacity to our partners and provide tools for referrals in order to ensure a diversity of clients so that we can reach the most vulnerable with our services.
* System dependencies
### Solution

* Configuration
>A referral system for charities working together providing immigration advice and legal aid in London.
* Database creation
The tool provides an interface for accepting and reviewing form submissions via Typeform's [Embed](https://developer.typeform.com/embed/) and [Webhooks](https://developer.typeform.com/webhooks/) API.

* Database initialization
## Development

* How to run the test suite
### Local setup

* Services (job queues, cache servers, search engines, etc.)
Prerequisites: [Ruby v2.5.1](https://www.ruby-lang.org), [Bundler](https://bundler.io/), [PostgreSQL](https://www.postgresql.org/), [NodeJS](https://nodejs.org/), [Yarn](https://yarnpkg.com/)

* Deployment instructions
1. `git clone https://github.com/TechforgoodCAST/chc-referrals.git`
2. `cd chc-referrals`
3. `bundle install`
4. `yarn install`
5. `rails db:setup`
6. `rails s` to start local development server

* ...
### Running tests

`rails test` for unit tests, and `rails test:system` for system tests.

## Deployment

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/TechforgoodCAST/chc-referrals)

## Contributing

First of all, **thank you** for your help!

Be sure to check out the projects open [issues](https://github.com/suninthesky/slice-and-dice/issues) to see where help is needed.

### Bugs

If you've spotted a bug please file an [issue](https://github.com/suninthesky/slice-and-dice/issues). Even better, submit a [pull request](https://github.com/suninthesky/slice-and-dice/pulls) (details below) with a patch.

### Features

If you want a feature added, the best way to get it done is to submit a pull request that implements it...

1. Fork the repo
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a [pull request](https://github.com/suninthesky/slice-and-dice/pulls)

Alternatively you can submit an [issue](https://github.com/suninthesky/slice-and-dice/issues) describing the feature.

## License

This software is released under the [MIT License](https://opensource.org/licenses/MIT).
6 changes: 6 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "CHC Referral System",
"description": "A referral system for charities working together providing immigration advice and legal aid in London.",
"repository": "https://github.com/TechforgoodCAST/chc-referrals",
"keywords": ["ruby", "rails", "tech-for-good"]
}
30 changes: 30 additions & 0 deletions app/admin/admin_users.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
ActiveAdmin.register AdminUser do
permit_params :email, :password, :password_confirmation

controller do
def update_resource(resource, params)
resource.update_without_password(params[0]) if params[0][:password].blank?
super
end
end

index do
selectable_column
column :email
column :created_at
actions
end

filter :email
filter :created_at
filter :updated_at

form do |f|
f.inputs do
f.input :email
f.input :password
f.input :password_confirmation
end
f.actions
end
end
39 changes: 39 additions & 0 deletions app/admin/dashboard.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
ActiveAdmin.register_page "Dashboard" do
menu priority: 1, label: proc{ I18n.t('active_admin.dashboard') }

content title: proc{ I18n.t('active_admin.dashboard') } do
columns do
column do
panel 'Admin Users' do
h1 AdminUser.count
end
end

column do
panel 'Users' do
h1 User.count
end
end
end

columns do
column do
panel 'Partners' do
h1 Partner.count
end
end

column do
panel 'Referrals' do
h1 Referral.count
end
end

column do
panel 'Reviews' do
h1 Review.count
end
end
end
end
end
Loading

0 comments on commit 1299587

Please sign in to comment.