Skip to content

Commit

Permalink
Merge branch '17/goat/main' into new-features
Browse files Browse the repository at this point in the history
  • Loading branch information
sclark authored Apr 10, 2017
2 parents 751e116 + 8dc4dc7 commit d680a3c
Show file tree
Hide file tree
Showing 48 changed files with 915 additions and 41 deletions.
9 changes: 9 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ gem 'activeldap', :require => 'active_ldap/railtie'
# For Card-lookup requests
gem 'savon'

gem 'delayed_job'
gem 'delayed_job_active_record'
gem 'daemons'

# For Capistrano deployment
group :development do
gem 'capistrano-rbenv', require: false
Expand Down Expand Up @@ -68,6 +72,8 @@ gem 'dossier'
# Single test gem for unit testing
gem 'single_test'

gem 'daemons'

group :development do
# Automatically generate comments in models and such based on schema
gem 'annotate'
Expand All @@ -78,6 +84,8 @@ group :development do
gem 'rails_layout'
gem 'rails-erd'
gem 'spring'
gem 'delayed_job'

end

group :development, :test do
Expand Down Expand Up @@ -116,4 +124,5 @@ end

group :staging, :production do
gem 'passenger'
gem 'delayed_job_active_record'
end
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ GEM
safe_yaml (~> 1.0.0)
daemons (1.2.3)
debug_inspector (0.0.2)
delayed_job (4.1.2)
activesupport (>= 3.0, < 5.1)
delayed_job_active_record (4.1.1)
activerecord (>= 3.0, < 5.1)
delayed_job (>= 3.0, < 5)
devise (3.5.6)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
Expand Down Expand Up @@ -342,6 +347,9 @@ DEPENDENCIES
carrierwave
coffee-rails
coveralls
daemons
delayed_job
delayed_job_active_record
devise
dossier
factory_girl_rails
Expand Down
17 changes: 17 additions & 0 deletions app/controllers/charge_types_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# ## Schema Information
#
# Table name: `charge_types`
#
# ### Columns
#
# Name | Type | Attributes
# ------------------------------------ | ------------------ | ---------------------------
# **`created_at`** | `datetime` |
# **`default_amount`** | `decimal(8, 2)` |
# **`description`** | `text(65535)` |
# **`id`** | `integer` | `not null, primary key`
# **`name`** | `string(255)` |
# **`requires_booth_chair_approval`** | `boolean` |
# **`updated_at`** | `datetime` |
#

class ChargeTypesController < ApplicationController
load_and_authorize_resource

Expand Down
26 changes: 24 additions & 2 deletions app/controllers/checkouts_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# ## Schema Information
#
# Table name: `checkouts`
#
# ### Columns
#
# Name | Type | Attributes
# ---------------------- | ------------------ | ---------------------------
# **`checked_in_at`** | `datetime` |
# **`checked_out_at`** | `datetime` |
# **`created_at`** | `datetime` |
# **`id`** | `integer` | `not null, primary key`
# **`organization_id`** | `integer` |
# **`participant_id`** | `integer` |
# **`tool_id`** | `integer` |
# **`updated_at`** | `datetime` |
#
# ### Indexes
#
# * `index_checkouts_on_tool_id`:
# * **`tool_id`**
#

class CheckoutsController < ApplicationController
# permissions error - when enabled, this tries to find a Checkout with the current related model id on creation
# load_and_authorize_resource
Expand Down Expand Up @@ -137,8 +160,6 @@ def uncheckin
format.html { redirect_to tool_path(checkout.tool), notice: "Error" }
end
end


end


Expand Down Expand Up @@ -182,5 +203,6 @@ def checkin_bak
end
end
end

end

18 changes: 18 additions & 0 deletions app/controllers/documents_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# ## Schema Information
#
# Table name: `documents`
#
# ### Columns
#
# Name | Type | Attributes
# ---------------------- | ------------------ | ---------------------------
# **`created_at`** | `datetime` |
# **`document_id`** | `integer` |
# **`id`** | `integer` | `not null, primary key`
# **`name`** | `string(255)` |
# **`organization_id`** | `integer` |
# **`public`** | `boolean` |
# **`updated_at`** | `datetime` |
# **`url`** | `string(255)` |
#

class DocumentsController < ApplicationController
load_and_authorize_resource skip_load_resource only: [:create]

Expand Down
15 changes: 14 additions & 1 deletion app/controllers/event_types_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# ## Schema Information
#
# Table name: `event_types`
#
# ### Columns
#
# Name | Type | Attributes
# -------------- | ------------------ | ---------------------------
# **`display`** | `boolean` |
# **`id`** | `integer` | `not null, primary key`
# **`name`** | `string(255)` |
#

class EventTypesController < ApplicationController
load_and_authorize_resource
before_action :set_event_type, only: [:show, :edit, :update, :destroy]
Expand Down Expand Up @@ -78,4 +91,4 @@ def set_event_type
def event_type_params
params.require(:event_type).permit(:display, :name)
end
end
end
23 changes: 21 additions & 2 deletions app/controllers/events_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# ## Schema Information
#
# Table name: `events`
#
# ### Columns
#
# Name | Type | Attributes
# --------------------- | ------------------ | ---------------------------
# **`created_at`** | `datetime` |
# **`description`** | `text(65535)` |
# **`event_type_id`** | `integer` |
# **`id`** | `integer` | `not null, primary key`
# **`is_done`** | `boolean` |
# **`participant_id`** | `integer` |
# **`updated_at`** | `datetime` |
#

class EventsController < ApplicationController
load_and_authorize_resource
before_action :set_event, only: [:show, :edit, :update, :destroy,:approve]
Expand All @@ -16,6 +33,7 @@ def show
# GET /events/new
def new
@event = Event.new
@scc_members = Participant.all.scc
end

# PUT
Expand All @@ -27,6 +45,7 @@ def approve

# GET /events/1/edit
def edit
@scc_members = Participant.all.scc
@event.updated_at = DateTime.now
@event.save
end
Expand Down Expand Up @@ -81,6 +100,6 @@ def set_event

# Never trust parameters from the scary internet, only allow the white list through.
def event_params
params.require(:event).permit(:is_done, :title, :created_at, :description, :updated_at, :display, :event_type_id)
params.require(:event).permit(:is_done, :title, :created_at, :description, :updated_at, :display, :event_type_id, :participant_id)
end
end
end
15 changes: 15 additions & 0 deletions app/controllers/faqs_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# ## Schema Information
#
# Table name: `faqs`
#
# ### Columns
#
# Name | Type | Attributes
# ----------------- | ------------------ | ---------------------------
# **`answer`** | `text(65535)` |
# **`created_at`** | `datetime` |
# **`id`** | `integer` | `not null, primary key`
# **`question`** | `text(65535)` |
# **`updated_at`** | `datetime` |
#

class FaqsController < ApplicationController
load_and_authorize_resource skip_load_resource only: [:create]
before_action :set_faq, only: [:edit, :update, :destroy]
Expand Down
25 changes: 25 additions & 0 deletions app/controllers/memberships_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# ## Schema Information
#
# Table name: `memberships`
#
# ### Columns
#
# Name | Type | Attributes
# ------------------------ | ------------------ | ---------------------------
# **`booth_chair_order`** | `integer` |
# **`created_at`** | `datetime` |
# **`id`** | `integer` | `not null, primary key`
# **`is_booth_chair`** | `boolean` |
# **`organization_id`** | `integer` |
# **`participant_id`** | `integer` |
# **`title`** | `string(255)` |
# **`updated_at`** | `datetime` |
#
# ### Indexes
#
# * `index_memberships_on_organization_id`:
# * **`organization_id`**
# * `index_memberships_on_participant_id`:
# * **`participant_id`**
#

class MembershipsController < ApplicationController
load_and_authorize_resource
skip_load_resource :only => [:create, :update]
Expand Down
22 changes: 22 additions & 0 deletions app/controllers/organization_aliases_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# ## Schema Information
#
# Table name: `organization_aliases`
#
# ### Columns
#
# Name | Type | Attributes
# ---------------------- | ------------------ | ---------------------------
# **`created_at`** | `datetime` |
# **`id`** | `integer` | `not null, primary key`
# **`name`** | `string(255)` |
# **`organization_id`** | `integer` |
# **`updated_at`** | `datetime` |
#
# ### Indexes
#
# * `index_organization_aliases_on_name`:
# * **`name`**
# * `index_organization_aliases_on_organization_id`:
# * **`organization_id`**
#

class OrganizationAliasesController < ApplicationController
# permissions error - when enabled, this tries to find a OrganizationAlias with the current related model id on creation
responders :flash, :http_cache
Expand Down
13 changes: 13 additions & 0 deletions app/controllers/organization_status_types_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# ## Schema Information
#
# Table name: `organization_status_types`
#
# ### Columns
#
# Name | Type | Attributes
# -------------- | ------------------ | ---------------------------
# **`display`** | `boolean` |
# **`id`** | `integer` | `not null, primary key`
# **`name`** | `string(255)` |
#

class OrganizationStatusTypesController < ApplicationController
load_and_authorize_resource

Expand Down
22 changes: 22 additions & 0 deletions app/controllers/organization_statuses_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# ## Schema Information
#
# Table name: `organization_statuses`
#
# ### Columns
#
# Name | Type | Attributes
# ---------------------------------- | ------------------ | ---------------------------
# **`created_at`** | `datetime` |
# **`description`** | `string(255)` |
# **`id`** | `integer` | `not null, primary key`
# **`organization_id`** | `integer` |
# **`organization_status_type_id`** | `integer` |
# **`participant_id`** | `integer` |
# **`updated_at`** | `datetime` |
#
# ### Indexes
#
# * `index_organization_statuses_on_organization_id`:
# * **`organization_id`**
#

class OrganizationStatusesController < ApplicationController
load_and_authorize_resource skip_load_resource only: [:create]
before_action :set_organization_status, only: [:show, :edit, :update, :destroy]
Expand Down
23 changes: 23 additions & 0 deletions app/controllers/organization_timeline_entries_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# ## Schema Information
#
# Table name: `organization_timeline_entries`
#
# ### Columns
#
# Name | Type | Attributes
# ---------------------- | ------------------ | ---------------------------
# **`created_at`** | `datetime` |
# **`description`** | `text(65535)` |
# **`ended_at`** | `datetime` |
# **`entry_type`** | `integer` |
# **`id`** | `integer` | `not null, primary key`
# **`organization_id`** | `integer` |
# **`started_at`** | `datetime` |
# **`updated_at`** | `datetime` |
#
# ### Indexes
#
# * `index_organization_timeline_entries_on_organization_id`:
# * **`organization_id`**
#

class OrganizationTimelineEntriesController < ApplicationController
authorize_resource
before_action :set_organization_timeline_entry, only: [:update, :destroy, :end, :show]
Expand Down
21 changes: 21 additions & 0 deletions app/controllers/organizations_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# ## Schema Information
#
# Table name: `organizations`
#
# ### Columns
#
# Name | Type | Attributes
# ------------------------------- | ------------------ | ---------------------------
# **`created_at`** | `datetime` |
# **`id`** | `integer` | `not null, primary key`
# **`name`** | `string(255)` |
# **`organization_category_id`** | `integer` |
# **`short_name`** | `string(255)` |
# **`updated_at`** | `datetime` |
#
# ### Indexes
#
# * `index_organizations_on_organization_category_id`:
# * **`organization_category_id`**
#

class OrganizationsController < ApplicationController
load_and_authorize_resource

Expand Down
Loading

0 comments on commit d680a3c

Please sign in to comment.