Skip to content

Commit

Permalink
switch to openstates subjects, remove unusual "unless"
Browse files Browse the repository at this point in the history
  • Loading branch information
James McKinney committed May 20, 2013
1 parent ca17910 commit 3132ec1
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 37 deletions.
2 changes: 1 addition & 1 deletion app/controllers/questions_controller.rb
Expand Up @@ -14,7 +14,7 @@ def index
end

def show
@user = user_signed_in? ? current_user : User.new unless
@user = user_signed_in? ? current_user : User.new
show!
end

Expand Down
77 changes: 44 additions & 33 deletions app/helpers/questions_helper.rb
Expand Up @@ -4,52 +4,63 @@ def step_class_for(step, relevant_steps)
raw('class="not-first-step"') if relevant_steps.first.to_s != step
end

# @return [Array<String>] the list of Project Vote Smart subjects
# @return [Array<String>] the list of OpenStates subjects
# @see https://github.com/sunlightlabs/openstates/wiki/Categorization#subjects
def subjects
[
'Abortion',
'Abortion and Reproductive',
[ # In both OpenStates and VoteSmart: # Additional VoteSmart subjects:
'Agriculture and Food',
'Animals and Wildlife',
'Arts and Entertainment',
'Budget, Spending and Taxes',
'Business and Consumers',
'Campaign Finance and Elections',
'Civil Liberties and Civil Rights',
'Conservative',
'Civil Liberties and Civil Rights', # Women
'Crime',
'Defense',
'Drugs',
'Education',
'Employment and Affirmative Action',
'Energy',
'Environment',
'Executive Branch',
'Federal, State and Local Relations',
'Foreign Affairs',
'Executive Branch', # Foreign Affairs
'Gambling and Gaming',
'Government Operations',
'Guns',
'Health and Health Care',
'Housing and Property',
'Immigration',
'Judicial Branch',
'Labor Unions',
'Legislative Branch',
'Liberal',
'Marriage, Family, and Children',
'Military Personnel',
'National Security',
'Science',
'Senior Citizens',
'Sexual Orientation and Gender Identity',
'Social',
'Technology and Communication',
'Trade',
'Transportation',
'Unemployed and Low-Income',
'Veterans',
'Women',
]

# Differences: # Corresponding VoteSmart subjects:
'Animal Rights and Wildlife Issues', # Animals and Wildlife
'Arts and Humanities', # Arts and Entertainment
'Budget, Spending, and Taxes', # Budget, Spending and Taxes
'Campaign Finance and Election Issues', # Campaign Finance and Elections
'Environmental', # Environment
'Family and Children Issues', # Marriage, Family, and Children
'Federal, State, and Local Relations', # Federal, State and Local Relations
'Government Reform', # Government Operations
'Health', # Health and Health Care
'Labor and Employment', # Employment and Affirmative Action | Labor Unions
'Judiciary', # Judicial Branch
'Legislative Affairs', # Legislative Branch
'Military', # Defense | Military Personnel | National Security | Veterans
'Reproductive Issues', # Abortion | Abortion and Reproductive
'Science and Medical Research', # Science
'Senior Issues', # Senior Citizens
'Sexual Orientation and Gender Issues', # Sexual Orientation and Gender Identity
'Social Issues', # Social
'Welfare and Poverty', # Unemployed and Low-Income

# In OpenStates only:
'Commerce',
'Indigenous Peoples',
'Insurance',
'Legal Issues',
'Municipal and County Issues',
'Nominations',
'Other',
'Public Services',
'Recreation',
'Resolutions',
'State Agencies',

# In VoteSmart only:
# Conservative
# Liberal
].sort
end
end
6 changes: 3 additions & 3 deletions script/sanity/denormalization.js
Expand Up @@ -369,7 +369,7 @@ if (verbose) {
}, "bills with an action whose related entity's name is not that entity's name");
}

// It's common for names to differ, e.g. "Joint Appropriations Interim
// It's common for names to differ, e.g. "Joint Appropriations Interim
// Committee" versus "Appropriations" or "DAVIS" versus "Bettye Davis".
if (verbose) {
// bills#sponsors.name and legislators#full_name or committees#committee or
Expand Down Expand Up @@ -453,7 +453,7 @@ if (verbose) {
}
}
}
}, "events with a participant whose name is not that of the participant's name");
}, "events with a participant whose name is not that of the participant's name");
}

// It's common for names to differ, e.g. "Sales, Scott" versus "Scott Sales".
Expand Down Expand Up @@ -533,7 +533,7 @@ if (verbose) {
}, "votes whose bill ID is not the bill's ID");
}

// It's common for names to differ, e.g. "Joint Appropriations Interim
// It's common for names to differ, e.g. "Joint Appropriations Interim
// Committee" versus "Appropriations".
if (verbose) {
// votes#committee and committees#committee or committees#subcommittee
Expand Down

0 comments on commit 3132ec1

Please sign in to comment.