Skip to content

Commit

Permalink
add rubocop changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennifer Konikowski committed Jun 29, 2019
1 parent abb1f58 commit 7ffee80
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 23 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
class ApplicationController < ActionController::Base
def home; end

def privacy;end
def privacy; end
end
2 changes: 1 addition & 1 deletion app/views/application/home.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
<div class="container-fluid">
<h4>Need to report an issue or an enhancement request?</h4>
<p>Please submit an issue on <a href="https://github.com/jmkoni/course_review/issues">GitHub</a>.
</div>
</div>
14 changes: 2 additions & 12 deletions app/views/application/privacy.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<h1>Privacy Policy</h1>


<p>Effective date: June 29, 2019</p>


<p>Course Review ("us", "we", or "our") operates the https://course-review-app.herokuapp.com website (hereinafter referred to as the "Service").</p>

<p>This page informs you of our policies regarding the collection, use and disclosure of personal data when you use our Service and the choices you have associated with that data.</p>
Expand Down Expand Up @@ -44,8 +42,7 @@
</li>
</ul>


<h2>Information Collection and Use</h2>
<h2>Information Collection and Use</h2>
<p>We collect several different types of information for various purposes to provide and improve our Service to you.</p>

<h3>Types of Data Collected</h3>
Expand All @@ -58,12 +55,10 @@
<li>Cookies and Usage Data</li>
</ul>


<h4>Usage Data</h4>

<p>We may also collect information on how the Service is accessed and used ("Usage Data"). This Usage Data may include information such as your computer's Internet Protocol address (e.g. IP address), browser type, browser version, the pages of our Service that you visit, the time and date of your visit, the time spent on those pages, unique device identifiers and other diagnostic data.</p>


<h4>Tracking & Cookies Data</h4>
<p>We use cookies and similar tracking technologies to track the activity on our Service and we hold certain information.</p>
<p>Cookies are files with a small amount of data which may include an anonymous unique identifier. Cookies are sent to your browser from a website and stored on your device. Other tracking technologies are also used such as beacons, tags and scripts to collect and track information and to improve and analyse our Service.</p>
Expand All @@ -87,8 +82,7 @@
<li>To detect, prevent and address technical issues</li>
</ul>


<h2>Legal Basis for Processing Personal Data under the General Data Protection Regulation (GDPR)</h2>
<h2>Legal Basis for Processing Personal Data under the General Data Protection Regulation (GDPR)</h2>
<p>If you are from the European Economic Area (EEA), Course Review legal basis for collecting and using the personal information described in this Privacy Policy depends on the Personal Data we collect and the specific context in which we collect it.</p>
<p>Course Review may process your Personal Data because:</p>
<ul>
Expand All @@ -98,7 +92,6 @@
<li>To comply with the law</li>
</ul>


<h2>Retention of Data</h2>
<p>Course Review will retain your Personal Data only for as long as is necessary for the purposes set out in this Privacy Policy. We will retain and use your Personal Data to the extent necessary to comply with our legal obligations (for example, if we are required to retain your data to comply with applicable laws), resolve disputes and enforce our legal agreements and policies.</p>
<p>Course Review will also retain Usage Data for internal analysis purposes. Usage Data is generally retained for a shorter period of time, except when this data is used to strengthen the security or to improve the functionality of our Service, or we are legally obligated to retain this data for longer periods.</p>
Expand Down Expand Up @@ -167,18 +160,15 @@
<p>Our Service may contain links to other sites that are not operated by us. If you click a third party link, you will be directed to that third party's site. We strongly advise you to review the Privacy Policy of every site you visit.</p>
<p>We have no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services.</p>


<h2>Children's Privacy</h2>
<p>Our Service does not address anyone under the age of 18 ("Children").</p>
<p>We do not knowingly collect personally identifiable information from anyone under the age of 18. If you are a parent or guardian and you are aware that your Child has provided us with Personal Data, please contact us. If we become aware that we have collected Personal Data from children without verification of parental consent, we take steps to remove that information from our servers.</p>


<h2>Changes to This Privacy Policy</h2>
<p>We may update our Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page.</p>
<p>We will let you know via email and/or a prominent notice on our Service, prior to the change becoming effective and update the "effective date" at the top of this Privacy Policy.</p>
<p>You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page.</p>


<h2>Contact Us</h2>
<p>If you have any questions about this Privacy Policy, please contact us:</p>
<ul>
Expand Down
17 changes: 8 additions & 9 deletions lib/tasks/scrape_classes.rake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

namespace :scrape_classes do
desc "scrape classes from the penn state website"
desc 'scrape classes from the penn state website'
task :penn_state, [:level] do |_task, args|
level = args.fetch(:level) || 'graduate'
url = 'https://bulletins.psu.edu/university-course-descriptions/' + level + '/'
Expand Down Expand Up @@ -29,7 +30,7 @@ namespace :scrape_classes do
end
end

desc "scrape classes from the UOP website"
desc 'scrape classes from the UOP website'
task :uop do
urls = [
['FILL THIS OUT LATER', 'https://www.uopeople.edu/programs/general-education-requirements-course-catalog/'],
Expand Down Expand Up @@ -65,18 +66,16 @@ namespace :scrape_classes do
end

desc 'parse scraped files and add to the system'
task :parse_json_courses, [:file_name, :school_short_name] => :environment do |_task, args|
task :parse_json_courses, %i[file_name school_short_name] => :environment do |_task, args|
file_name = args.fetch(:file_name)
school_short_name = args.fetch(:school_short_name)
school = School.find_by_short_name(school_short_name)
departments = JSON.parse(File.read("#{Rails.root}/lib/" + file_name))
school = School.find_by(short_name: school_short_name)
departments = JSON.parse(File.read(Rails.root.join('lib', file_name)))
departments.each do |k, v|
department = Department.find_or_create_by(short_name: k, name: v["name"], school: school)
v["courses"].each do |course_num, course_name|
department = Department.find_or_create_by(short_name: k, name: v['name'], school: school)
v['courses'].each do |course_num, course_name|
Course.find_or_create_by(department: department, number: course_num, name: course_name)
end
end
end
end

# be rails "scrape_classes:parse_json_courses[json/uop-courses.json, UOP]"

0 comments on commit 7ffee80

Please sign in to comment.