From 9bc2fd9db960b8dfc81a0392bde957cc2f74c37a Mon Sep 17 00:00:00 2001 From: Alexis Moody Date: Wed, 25 Oct 2017 20:07:29 -0400 Subject: [PATCH] Fixes some file names, adds more data attributes --- .../{commite_es.coffee => commitees.coffee} | 0 ...entativ_es.coffee => representatives.coffee} | 0 .../{commite_es.scss => commitees.scss} | 0 ...presentativ_es.scss => representatives.scss} | 0 ...es_controller.rb => commitees_controller.rb} | 2 +- ...troller.rb => representatives_controller.rb} | 0 app/helpers/commite_es_helper.rb | 2 -- app/helpers/commitees_helper.rb | 2 ++ ...v_es_helper.rb => representatives_helper.rb} | 0 app/services/client.rb | 9 --------- db/migrate/20171021162119_create_votes.rb | 2 -- db/migrate/20171021163620_create_bills.rb | 17 ++++++++--------- .../20171021163843_create_subcommitees.rb | 11 ++++++++++- 13 files changed, 21 insertions(+), 24 deletions(-) rename app/assets/javascripts/{commite_es.coffee => commitees.coffee} (100%) rename app/assets/javascripts/{representativ_es.coffee => representatives.coffee} (100%) rename app/assets/stylesheets/{commite_es.scss => commitees.scss} (100%) rename app/assets/stylesheets/{representativ_es.scss => representatives.scss} (100%) rename app/controllers/{commite_es_controller.rb => commitees_controller.rb} (97%) rename app/controllers/{representativ_es_controller.rb => representatives_controller.rb} (100%) delete mode 100644 app/helpers/commite_es_helper.rb create mode 100644 app/helpers/commitees_helper.rb rename app/helpers/{representativ_es_helper.rb => representatives_helper.rb} (100%) delete mode 100644 app/services/client.rb diff --git a/app/assets/javascripts/commite_es.coffee b/app/assets/javascripts/commitees.coffee similarity index 100% rename from app/assets/javascripts/commite_es.coffee rename to app/assets/javascripts/commitees.coffee diff --git a/app/assets/javascripts/representativ_es.coffee b/app/assets/javascripts/representatives.coffee similarity index 100% rename from app/assets/javascripts/representativ_es.coffee rename to app/assets/javascripts/representatives.coffee diff --git a/app/assets/stylesheets/commite_es.scss b/app/assets/stylesheets/commitees.scss similarity index 100% rename from app/assets/stylesheets/commite_es.scss rename to app/assets/stylesheets/commitees.scss diff --git a/app/assets/stylesheets/representativ_es.scss b/app/assets/stylesheets/representatives.scss similarity index 100% rename from app/assets/stylesheets/representativ_es.scss rename to app/assets/stylesheets/representatives.scss diff --git a/app/controllers/commite_es_controller.rb b/app/controllers/commitees_controller.rb similarity index 97% rename from app/controllers/commite_es_controller.rb rename to app/controllers/commitees_controller.rb index e67b6b8..864d713 100644 --- a/app/controllers/commite_es_controller.rb +++ b/app/controllers/commitees_controller.rb @@ -1,4 +1,4 @@ -class CommiteEsController < ApplicationController +class CommiteesController < ApplicationController before_action :set_commitee, only: [:show, :edit, :update, :destroy] # GET /commitees diff --git a/app/controllers/representativ_es_controller.rb b/app/controllers/representatives_controller.rb similarity index 100% rename from app/controllers/representativ_es_controller.rb rename to app/controllers/representatives_controller.rb diff --git a/app/helpers/commite_es_helper.rb b/app/helpers/commite_es_helper.rb deleted file mode 100644 index cd3104e..0000000 --- a/app/helpers/commite_es_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module CommiteEsHelper -end diff --git a/app/helpers/commitees_helper.rb b/app/helpers/commitees_helper.rb new file mode 100644 index 0000000..212384a --- /dev/null +++ b/app/helpers/commitees_helper.rb @@ -0,0 +1,2 @@ +module CommiteesHelper +end diff --git a/app/helpers/representativ_es_helper.rb b/app/helpers/representatives_helper.rb similarity index 100% rename from app/helpers/representativ_es_helper.rb rename to app/helpers/representatives_helper.rb diff --git a/app/services/client.rb b/app/services/client.rb deleted file mode 100644 index 829feec..0000000 --- a/app/services/client.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'net/http' - -module Services - module Client - def initialize - - end - end -end diff --git a/db/migrate/20171021162119_create_votes.rb b/db/migrate/20171021162119_create_votes.rb index 0c3992a..8d018fb 100644 --- a/db/migrate/20171021162119_create_votes.rb +++ b/db/migrate/20171021162119_create_votes.rb @@ -15,8 +15,6 @@ def change t.string :url t.string :vote_uri - - t.timestamps end end diff --git a/db/migrate/20171021163620_create_bills.rb b/db/migrate/20171021163620_create_bills.rb index 1390d36..c9ef5df 100644 --- a/db/migrate/20171021163620_create_bills.rb +++ b/db/migrate/20171021163620_create_bills.rb @@ -1,7 +1,7 @@ class CreateBills < ActiveRecord::Migration[5.1] def change create_table :bills do |t| - t.string :propublica_id #bill_id from propublica API + t.string :propublica_id t.string :bill_type t.string :number t.string :api_url @@ -18,21 +18,20 @@ def change t.string :govtrack_url t.string :introduced_date t.string :active - t.string :house_passage #Date as string YYYY-MM-DD - t.string :senate_passage #Date as string - t.string :enacted #Date as string + t.string :house_passage + t.string :senate_passage + t.string :enacted t.string :vetoed t.string :committees - t.string :committee_codes, array: true #ARRAY - t.string :subcommittee_codes, array: true #ARRAY - t.string :primary_subject - #Primary Subject Ex. "Public Lands and Natural Resources", "Science, Technology, Communications" - #Will definitely need to write some specific methods to ID keywords + t.string :committee_codes, array: true + t.string :subcommittee_codes, array: true + t.string :primary_subject t.string :summary t.string :summary_short t.string :latest_major_action_date t.string :latest_major_action t.string :latest_action + t.string :status t.timestamps end diff --git a/db/migrate/20171021163843_create_subcommitees.rb b/db/migrate/20171021163843_create_subcommitees.rb index f38d7a9..b2efede 100644 --- a/db/migrate/20171021163843_create_subcommitees.rb +++ b/db/migrate/20171021163843_create_subcommitees.rb @@ -1,6 +1,15 @@ -class CreateSubcommitees < ActiveRecord::Migration[5.1] + class CreateSubcommitees < ActiveRecord::Migration[5.1] def change create_table :subcommitees do |t| + t.string :propublica_id + t.string :name + t.string :propublica_uri + t.string :congress + t.string :chamber + t.string :chair_id + t.string :chair_party + t.string :chair_state + t.string :ranking_member_id t.timestamps end