Skip to content

Commit

Permalink
master <- develop (2.1.3) (#489)
Browse files Browse the repository at this point in the history
* fix(questionnaire): missing information now in correct place (#443)

* fix(questionnair): missing information now in correct place

it now displays the correct message "Please read & accept" instead of
missing information and the notification is now in the correct place

* Update app/assets/javascripts/validate.js

* Revert "Update app/assets/javascripts/validate.js"

This reverts commit bc54783.

Signed-off-by: Peter Kos <pkos91@icloud.com>

Co-authored-by: Peter Kos <pkos91@icloud.com>

* fix: Fixes mobile agreements layout bug

Signed-off-by: Peter Kos <pkos91@icloud.com>

* feat: Removes semantic-release (#446)

* refactor: Moves CI to develop branch (#449)

Co-authored-by: Peter Kos <pkos91@icloud.com>

* build: Merges 2.1.2 into develop

* fix(hakiri): corrected unescaped model attribute

* fix(hakiri): added html_safe to show proper output

Co-authored-by: Jeremy Rudman <jeremyrudman@gmail.com>
Co-authored-by: JeremyRudman <38338616+JeremyRudman@users.noreply.github.com>

* fix: Shows questionnaires_closed_message on registration

* feat: Allows agreements to be fully customizable (#465)

* feat: Allows agreements to be fully customizable

* fix: Fixes broken migrations

* fix: Migrations misname issue

* feat: Forces agreement links to open in new tab

* Agreement validation detection fixed

Signed-off-by: Peter Kos <pkos91@icloud.com>

* refactor: Removes old input hint

Co-authored-by: Peter Kos <pkos91@icloud.com>

* fix(hakiri): fixed un-escaped regex for vcs link (#467)

* fix(hakiri): corrected unescaped model attribute

* fix(hakiri): added html_safe to show proper output

* fix(hakiri): added \A \z to regex

* fix(questionnaire): fixed hakiri error with vcs link regex

* fix(questionnaire): fixed houndci commplaint

Co-authored-by: Chris Baudouin, Jr <cjb5326@rit.edu>

* fix(hakiri): fix hakiri error with user input in html_safe (#475)

Co-authored-by: Peter Kos <pkos91@icloud.com>

* fix: Uninstalls deprecated chromedriver (#484)

* fix: VCS regex matches all valid usernames for each provider; URLs are now case-insensitive, dokku check extended (#485)

* fixed vcs regex to allow upper case

added a extra test to vcs links to test upper case links. also made it
so portfolio links ands vcs links are stored in lower case

* fixed houndci complaints

* lossened username regex and add another test

* made regex more pleasing to read

* made regex method more readable

* checks now does 300 attempts

Co-authored-by: JeremyRudman <38338616+JeremyRudman@users.noreply.github.com>
Co-authored-by: Chris Baudouin, Jr <cjb5326@rit.edu>
Co-authored-by: Jeremy Rudman <jeremyrudman@gmail.com>
  • Loading branch information
4 people authored Dec 25, 2020
1 parent 4923231 commit 2b14f72
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHECKS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
WAIT=10
ATTEMPTS=20
ATTEMPTS=300

/users/sign_in Sign in to
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
Expand Down
7 changes: 0 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ GEM
railties (>= 5.0)
zeitwerk
ansi (1.5.0)
archive-zip (0.12.0)
io-like (~> 0.3.0)
arel (9.0.0)
audited (4.9.0)
activerecord (>= 4.2, < 6.1)
Expand Down Expand Up @@ -102,9 +100,6 @@ GEM
xpath (~> 3.2)
chartkick (3.4.0)
childprocess (3.0.0)
chromedriver-helper (2.1.1)
archive-zip (~> 0.10)
nokogiri (~> 1.8)
codeclimate-test-reporter (0.6.0)
simplecov (>= 0.7.1, < 1.0.0)
coderay (1.1.3)
Expand Down Expand Up @@ -197,7 +192,6 @@ GEM
multi_xml (>= 0.5.2)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
io-like (0.3.1)
jmespath (1.4.0)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
Expand Down Expand Up @@ -449,7 +443,6 @@ DEPENDENCIES
byebug
capybara (>= 2.15)
chartkick (~> 3.4)
chromedriver-helper
codeclimate-test-reporter (~> 0.6.0)
devise (~> 4.7)
devise-doorkeeper
Expand Down
7 changes: 6 additions & 1 deletion app/models/questionnaire.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ class Questionnaire < ApplicationRecord

validates :portfolio_url, url: { allow_blank: true }
validates :vcs_url, url: { allow_blank: true }
validates_format_of :vcs_url, with: %r{\A(((https?:\/\/)?(www\.)?github\.com\/\w+\/?)|((https?:\/\/)?(www\.)?gitlab\.com\/\w+\/?)|((https?:\/\/)?(www\.)?bitbucket\.org\/\w+\/?))\z}, allow_blank: true, message: "Must be a GitHub, GitLab or Bitbucket url"
validates_format_of :vcs_url,
with: %r{\A((https?:\/\/)?(www\.)?((github\.com)|(gitlab\.com)|(bitbucket\.org))\/(.*){0,62})\z}i,
allow_blank: true,
message: "Must be a GitHub, GitLab or Bitbucket url"
strip_attributes

POSSIBLE_EXPERIENCES = {
Expand Down Expand Up @@ -129,11 +132,13 @@ def email
end

def portfolio_url=(value)
value = value.downcase unless value.blank?
value = "http://" + value if !value.blank? && !value.include?("http://") && !value.include?("https://")
super value
end

def vcs_url=(value)
value = value.downcase unless value.blank?
value = "https://" + value if !value.blank? && !value.include?("http://") && !value.include?("https://")
super value
end
Expand Down
2 changes: 2 additions & 0 deletions test/models/questionnaire_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ class QuestionnaireTest < ActiveSupport::TestCase
should allow_value('foo.com').for(:portfolio_url)
should allow_value('github.com/foo', 'gitlab.com/bar', 'bitbucket.org/baz').for(:vcs_url)
should allow_value('https://github.com/foo', 'https://gitlab.com/bar', 'https://bitbucket.org/baz').for(:vcs_url)
should allow_value('HttPs://gITHub.CoM/foo', 'hTTp://gitLAB.coM/bar').for(:vcs_url)
should allow_value('wWw.gITHub.CoM/fOo', 'hTTp://wWw.gitLAB.coM/f-fc-vx').for(:vcs_url)
should_not allow_value('http://foo.com', 'https://bar.com').for(:vcs_url)

context "#school" do
Expand Down
Binary file removed vendor/cache/archive-zip-0.12.0.gem
Binary file not shown.
Binary file removed vendor/cache/chromedriver-helper-2.1.1.gem
Binary file not shown.
Binary file removed vendor/cache/io-like-0.3.1.gem
Binary file not shown.

0 comments on commit 2b14f72

Please sign in to comment.