+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+.
\ No newline at end of file
diff --git a/README.md b/README.md
index 5e4da9a..8a7960a 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-Questionr
-=========
-A simple tool to empower citizens to ask candidates one question: “What specific reforms will you advance to end the corrupting influence of money in politics?”
+Fix Democracy First
+===================
+This web site and platform supports uploading, approval and redistribution of videos answering the question: "Tell us your story of why we need to #FixDemocracyFirst." http://fixdemocracyfirst.us
3rd-Party Depedencies
---------------------
@@ -15,16 +15,16 @@ Local Environment Setup
-----------------------
1. Clone the git repo
1. Install Ruby 2.2.1 on RVM: `rvm install 2.2.1`
-1. Select the global gemset under ruby 2.2.1: `rvm use 2.2.1@global`
+1. Select the global gemset under ruby 2.2.1: `rvm use 2.2.1@fixdemocracyfirst`
1. Install Bundler in the global gemset: `gem install bundler`
-1. Create a custom gemset for questionr: `rvm gemset create questionr`
-1. Select the gemset and ruby version: `rvm use 2.2.1@questionr`
+1. Create a custom gemset for fixdemocracy: `rvm gemset create fixdemocracyfirst`
+1. Select the gemset and ruby version: `rvm use 2.2.1@fixdemocracyfirst`
1. `cd` into your local git repo's directory
1. Run bundler: `bundle install`
1. Set environment variables for foreman by creating a `.env` file in your project directory with these variables (and ask one of us for the missing values so we can get them to you securely):
```
- S3_BUCKET=questionr-stage
+ S3_BUCKET=fixdemocracyfirst-stage
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=us-west-1
@@ -41,7 +41,7 @@ Local Environment Setup
1. Create an account for yourself by visiting [http://localhost:3000/admin](http://localhost:3000/admin) and logging in with Facebook
1. Launch a rails console `foreman run bundle exec rails c` and execute this command to admin-ize your user account: `User.last.update_attribute(:admin, true)`
-Note: When viewing the [Resque Web Console](http://localhost:3000/resque_web) for the first time, you'll receive a basic auth challenge. Respond with username `questionr` and the password you set for `RESQUE_ADMIN_PASSWORD` in your .env file and ask the browser to remember your credentials.
+Note: When viewing the [Resque Web Console](http://localhost:3000/resque_web) for the first time, you'll receive a basic auth challenge. Respond with username `fixdemocracyfirst` and the password you set for `RESQUE_ADMIN_PASSWORD` in your .env file and ask the browser to remember your credentials (if you want).
Contributing (using the [fork-and-pull](https://help.github.com/articles/using-pull-requests) model)
----------------------------------------------------------------------------------------------------
@@ -52,3 +52,41 @@ Contributing (using the [fork-and-pull](https://help.github.com/articles/using-p
1. Commit your changes `git commit -am 'Added some feature and some tests'`
1. Push to the branch `git push origin my-new-feature`
1. Create a pull request
+
+## Code of Conduct
+
+The Lessig Equal Citizens Exploratory Committee is committed to fostering an open and inclusive community where engaged, dedicated volunteers can build the strategy and tools necessary to fix our country's democracy. All members of the community are expected to behave with civility, speak honestly and treat one another respectfully.
+
+This project adheres to the [Open Code of Conduct][http://todogroup.org/opencodeofconduct/#Lessig2016/conduct@lessigforpresident.com].
+By participating, you are expected to honor this code.
+
+This reference as well as the included copy of the [Code of Conduct](https://github.com/Lessig2016/fixdemocracyfirst/blob/master/CONDUCT.md)
+shall be included in all forks and distributions of this repository.
+
+## Legal
+
+The Lessig campaign is not responsible for the content posted to this repository, or for actions taken or liabilities incurred by one or more group members.
+
+You may not post content to the repository that you do not own, and by posting content you consent to its use by others, including the campaign.
+
+You are responsible for your compliance with federal campaign finance laws. You may not, for example, volunteer for the campaign if you are being paid by someone else to do so, or volunteer while at work unless it is limited to a few hours per month and your volunteering doesn’t create additional costs for your employer.
+
+The campaign may remove any offensive, abusive, attacking, or discriminatory content, as well as any content that may otherwise violate our [Terms of Service](https://lessig2016.us/terms-of-service/).
+
+## Copyright and License
+
+Copyright 2015 Lessig Equal Citizens Exploratory Committee. This
+project is released under [GNU Affero General Public License, version 3](https://github.com/Lessig2016/fixdemocracyfirst/blob/master/LICENSE).
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see .
diff --git a/app/controllers/statements_controller.rb b/app/controllers/statements_controller.rb
index 47f297a..50aeea2 100644
--- a/app/controllers/statements_controller.rb
+++ b/app/controllers/statements_controller.rb
@@ -1,5 +1,5 @@
class StatementsController < ApplicationController
- before_filter :require_admin, except: [:new, :create, :browse]
+ before_filter :require_admin, except: [:new, :create, :browse, :show]
before_action :set_statement, only: [:show, :edit, :update, :destroy]
# GET /statements
@@ -36,7 +36,7 @@ def create
@current_user.update(statement_params['user_attributes'])
respond_to do |format|
if @statement.save!
- format.html { redirect_to '/', notice: 'Thank you for contributing to Questionr!' }
+ format.html { redirect_to '/', notice: 'Thank you for contributing to Fix Democracy First!' }
format.json { render :show, status: :created, location: @statement }
else
format.html { redirect_to '/', alert: 'Sorry, your contribution cannot be processed at this time. Please try again later.' }
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 9f18021..32128df 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -19,7 +19,7 @@ def social_auth
logger.fatal ap(resp)
raise "social auth failed"
end
- redirect_to '/', alert: @current_user.admin? ? nil : 'Please contact info@questionr.org to request administrative access.'
+ redirect_to '/', alert: @current_user.admin? ? nil : 'Please contact info@fixdemocracyfirst.us to request administrative access.'
end
# GET /users
diff --git a/app/models/attendee.rb b/app/models/attendee.rb
index ec4b8ce..a07f5ed 100644
--- a/app/models/attendee.rb
+++ b/app/models/attendee.rb
@@ -10,11 +10,7 @@ class Attendee < ActiveRecord::Base
after_create :notify_nhr
def notify_nhr
- Emailer.email("ellen@nhrebellion.org",
- "Ellen",
- "New Event RSVP from Questionr",
- "rsvp_details",
- attendee: self)
+ #no-op
end
def user_name
diff --git a/app/models/concerns/emailer.rb b/app/models/concerns/emailer.rb
index 07cc3e3..e10809a 100644
--- a/app/models/concerns/emailer.rb
+++ b/app/models/concerns/emailer.rb
@@ -7,8 +7,8 @@ def self.email(to_email, to_name, subject, template, options = {})
"html" => ERB.new(IO.read("#{Rails.root}/app/views/email_templates/#{template}.html.erb"))
.result(OpenStruct.new(options).instance_eval { binding }),
"subject" => subject,
- "from_email" => "questionr@nhrebellion.org",
- "from_name" => "The Questionr Team",
+ "from_email" => "info@fixdemocracyfirst.us",
+ "from_name" => "Fix Democract First",
"to" => [{ 'email' => to_email, 'name' => to_name }],
"headers"=> {},
"track_opens" => true,
@@ -21,12 +21,11 @@ def self.email(to_email, to_name, subject, template, options = {})
"global_merge_vars" => [],
"merge_vars" => [],
"tags" => [],
- "google_analytics_domains" => [ "questionr.us", "questionr.org" ],
+ "google_analytics_domains" => [ "fixdemocracyfirst.us" ],
"google_analytics_campaign" => "",
"metadata" => { 'env' => Rails.env, 'template' => template },
"recipient_metadata" => [],
"attachments" => [] },
true)
end
-end
-
+end
\ No newline at end of file
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 26b2d91..ae8e376 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -2,7 +2,7 @@
- Questionr
+ Fix Democracy First
<%= favicon_link_tag 'favicon.ico' %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
@@ -74,10 +74,11 @@
e.type = 'text/javascript';
e.id = 'janrainAuthWidget';
+ //TODO CAB fix auth
if (document.location.protocol === 'https:') {
- e.src = 'https://rpxnow.com/js/lib/questionr/engage.js';
+ e.src = 'https://rpxnow.com/js/lib/fixdemocracyfirst/engage.js';
} else {
- e.src = 'http://widget-cdn.rpxnow.com/js/lib/questionr/engage.js';
+ e.src = 'http://widget-cdn.rpxnow.com/js/lib/fixdemocracyfirst/engage.js';
}
var s = document.getElementsByTagName('script')[0];
@@ -116,24 +117,8 @@
Admin
@@ -162,8 +147,8 @@
We're going to make systemic political corruption the
central issue of the 2016 presidential primary by asking every candidate, “What specific
reforms will you advance to end the corrupting influence of money in politics?”
- ©2015 <%=link_to 'NH Rebellion',
- 'http://nhrebellion.org', target: '_blank' %>. Some rights reserved.
+ ©2015 <%=link_to 'Lessig2016.us',
+ 'http://Lessig2016.us', target: '_blank' %>. Some rights reserved.
<%= link_to image_tag("https://i.creativecommons.org/l/by/3.0/80x15.png"),
"http://creativecommons.org/licenses/by-sa/4.0/", target: '_blank' %>
diff --git a/app/views/static_pages/admin.html.erb b/app/views/static_pages/admin.html.erb
index 6640f01..c7d5466 100644
--- a/app/views/static_pages/admin.html.erb
+++ b/app/views/static_pages/admin.html.erb
@@ -1 +1,2 @@
-Log In
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/views/static_pages/attributions.html.erb b/app/views/static_pages/attributions.html.erb
index 83aa152..d74ea05 100644
--- a/app/views/static_pages/attributions.html.erb
+++ b/app/views/static_pages/attributions.html.erb
@@ -1,6 +1,6 @@
Attribution
-Our thanks to everyone who has helped Questionr with Creative Commons licensed content and shared technologies.
+Our thanks to everyone who has helped Fix Democracy First with Creative Commons licensed content and shared technologies.
Website
diff --git a/app/views/static_pages/home.html.erb b/app/views/static_pages/home.html.erb
new file mode 100644
index 0000000..0a73a62
--- /dev/null
+++ b/app/views/static_pages/home.html.erb
@@ -0,0 +1 @@
+temporary home page
\ No newline at end of file
diff --git a/config/application.rb b/config/application.rb
index cdf47de..c4c4540 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -42,9 +42,9 @@ class Application < Rails::Application
config.assets.precompile << %r(.*.(?:eot|svg|ttf|woff)$)
# authenticate against these hardcoded values for resque web access
config.middleware.use ResqueAuth do |username, password|
- username == "questionr" and password == ENV['RESQUE_ADMIN_PASSWORD']
+ username == "fixdemocracyfirst" and password == ENV['RESQUE_ADMIN_PASSWORD']
end
- config.janrain_api_url = URI.parse "https://questionr.rpxnow.com/api/v2/auth_info"
+ config.janrain_api_url = URI.parse "https://fixdemocracyfirst.rpxnow.com/api/v2/auth_info"
config.janrain_api_key = ENV['JANRAIN_API_KEY']
config.janrain_token_url = "#{ENV['URL']}/user/social_auth"
diff --git a/config/database.yml b/config/database.yml
index cee2ce0..3371994 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -23,7 +23,7 @@ default: &default
development:
<<: *default
- database: questionr_development
+ database: fixdemocracyfirst_development
# The specified database role being used to connect to postgres.
# To create additional roles in postgres see `$ createuser --help`.
@@ -54,14 +54,14 @@ development:
stage:
<<: *default
- database: questionr_stage
+ database: fixdemocracyfirst_stage
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
- database: questionr_test
+ database: fixdemocracyfirst_test
# As with config/secrets.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
@@ -84,6 +84,6 @@ test:
#
production:
<<: *default
- database: questionr_production
- username: questionr
- password: <%= ENV['QUESTIONR_DATABASE_PASSWORD'] %>
\ No newline at end of file
+ database: fixdemocracyfirst_test
+ username: fixdemocracyfirst
+ password: <%= ENV['FIXDEMOCRACYFIRST_DATABASE_PASSWORD'] %>
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index eccda1d..f795c36 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -3,7 +3,7 @@
ResqueWeb::Engine.eager_load!
Rails.application.routes.draw do
- root 'statements#new'
+ root 'static_pages#home'
get 'search' => 'search#search'
post 'user/social_auth' => 'users#social_auth'
resources :users
diff --git a/db/seeds.rb b/db/seeds.rb
index 16b35c2..d28df8f 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -9,7 +9,7 @@
# admin user
User.create first_name: 'Questionr',
last_name: 'Admin',
- email: 'admin@questionr.org',
+ email: 'admin@fixdemocracyfirst.us',
location: 'San Francisco, CA',
fb_uid: nil,
fb_token: nil,