Skip to content

Commit

Permalink
add safe_yaml to gemfile
Browse files Browse the repository at this point in the history
  • Loading branch information
msimonborg committed Feb 4, 2019
1 parent a094e30 commit 0655744
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 56 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -10,6 +10,7 @@ gem 'pyr', '~> 0.4.0'
gem 'rack-flash3', '~> 1.0.0', '>= 1.0.5'
gem 'rake', '~> 12.0.0'
gem 'require_all', '~> 1.4.0'
gem 'safe_yaml'
gem 'sinatra', '~> 2.0.2'
gem 'sinatra-activerecord',
'~> 2.0.0',
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Expand Up @@ -116,6 +116,7 @@ GEM
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
safe_yaml (1.0.4)
scoped_attr_accessor (1.0.3)
shotgun (0.9.2)
rack (>= 1.0)
Expand Down Expand Up @@ -174,6 +175,7 @@ DEPENDENCIES
require_all (~> 1.4.0)
rspec (~> 3.6.0)
rubocop (~> 0.48.0, >= 0.48.1)
safe_yaml
shotgun (~> 0.9.0, >= 0.9.2)
simplecov (~> 0.14.0)
sinatra (~> 2.0.2)
Expand Down
4 changes: 2 additions & 2 deletions app/models/concerns/api_findable.rb
Expand Up @@ -41,8 +41,8 @@ def parse_vcard_url(rep)
if capitol_office
capitol_office.v_card_link
else
district_office = rep.office_locations.where(office_type: 'district').first
district_office.v_card_link if district_office
dist_office = rep.office_locations.where(office_type: 'district').first
dist_office&.v_card_link
end
end

Expand Down
108 changes: 54 additions & 54 deletions db/schema.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
Expand All @@ -10,65 +12,63 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20170328221922) do

create_table "calls", force: :cascade do |t|
t.string "bioguide_id"
t.string "comments"
t.boolean "got_through", default: false
t.boolean "busy", default: false
t.boolean "voice_mail", default: false
t.boolean "mailbox_full", default: false
t.integer "rating"
t.integer "user_id"
t.integer "office_location_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
ActiveRecord::Schema.define(version: 20_170_328_221_922) do
create_table 'calls', force: :cascade do |t|
t.string 'bioguide_id'
t.string 'comments'
t.boolean 'got_through', default: false
t.boolean 'busy', default: false
t.boolean 'voice_mail', default: false
t.boolean 'mailbox_full', default: false
t.integer 'rating'
t.integer 'user_id'
t.integer 'office_location_id'
t.datetime 'created_at', null: false
t.datetime 'updated_at', null: false
end

create_table "office_locations", force: :cascade do |t|
t.string "bioguide_id"
t.string "locality"
t.string "region"
t.string "postal_code"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "phone"
t.string "office_type"
t.boolean "active", default: true
t.string "office_id"
create_table 'office_locations', force: :cascade do |t|
t.string 'bioguide_id'
t.string 'locality'
t.string 'region'
t.string 'postal_code'
t.datetime 'created_at', null: false
t.datetime 'updated_at', null: false
t.string 'phone'
t.string 'office_type'
t.boolean 'active', default: true
t.string 'office_id'
end

create_table "reps", force: :cascade do |t|
t.string "bioguide_id"
t.string "official_full"
t.string "family_name"
t.string "given_name"
t.string "additional_name"
t.string "honorific_prefix"
t.string "honorific_suffix"
t.string "party_identification"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "state"
t.string "vcard"
t.string "photo"
t.string "district"
t.string "url"
t.string "twitter"
t.string "youtube"
t.string "facebook"
t.string "instagram"
t.boolean "active", default: true
create_table 'reps', force: :cascade do |t|
t.string 'bioguide_id'
t.string 'official_full'
t.string 'family_name'
t.string 'given_name'
t.string 'additional_name'
t.string 'honorific_prefix'
t.string 'honorific_suffix'
t.string 'party_identification'
t.datetime 'created_at', null: false
t.datetime 'updated_at', null: false
t.string 'state'
t.string 'vcard'
t.string 'photo'
t.string 'district'
t.string 'url'
t.string 'twitter'
t.string 'youtube'
t.string 'facebook'
t.string 'instagram'
t.boolean 'active', default: true
end

create_table "users", force: :cascade do |t|
t.string "username"
t.string "email"
t.string "password_digest"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "slug"
create_table 'users', force: :cascade do |t|
t.string 'username'
t.string 'email'
t.string 'password_digest'
t.datetime 'created_at', null: false
t.datetime 'updated_at', null: false
t.string 'slug'
end

end
Binary file modified db/test.sqlite
Binary file not shown.

0 comments on commit 0655744

Please sign in to comment.