Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ group :test do
gem 'poltergeist'
gem 'timecop'
gem 'vcr'
gem 'webmock'
gem 'webmock', '1.24.6'
end
62 changes: 31 additions & 31 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ GEM
ansi (1.5.0)
arel (6.0.3)
ast (2.2.0)
aws-sdk (2.2.28)
aws-sdk-resources (= 2.2.28)
aws-sdk-core (2.2.28)
aws-sdk (2.2.37)
aws-sdk-resources (= 2.2.37)
aws-sdk-core (2.2.37)
jmespath (~> 1.0)
aws-sdk-resources (2.2.28)
aws-sdk-core (= 2.2.28)
aws-sdk-resources (2.2.37)
aws-sdk-core (= 2.2.37)
bcrypt (3.1.11)
builder (3.2.2)
byebug (8.2.2)
byebug (8.2.5)
cancancan (1.13.1)
capybara (2.6.2)
capybara (2.7.0)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
Expand All @@ -78,19 +78,18 @@ GEM
tins (~> 1.6.0)
crack (0.4.3)
safe_yaml (~> 1.0.0)
database_cleaner (1.5.1)
database_cleaner (1.5.3)
debug_inspector (0.0.2)
delayed_job (4.1.1)
activesupport (>= 3.0, < 5.0)
delayed_job_active_record (4.1.0)
activerecord (>= 3.0, < 5)
delayed_job (>= 3.0, < 5)
devise (3.5.6)
devise (4.0.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
railties (>= 4.1.0, < 5.1)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
docile (1.1.5)
domain_name (0.5.20160310)
Expand All @@ -110,7 +109,8 @@ GEM
domain_name (~> 0.5)
http_logger (0.5.1)
i18n (0.7.0)
jmespath (1.1.3)
jmespath (1.2.4)
json_pure (>= 1.8.1)
jquery-fileupload-rails (0.4.6)
actionpack (>= 3.1)
railties (>= 3.1)
Expand All @@ -120,6 +120,7 @@ GEM
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
json_pure (1.8.3)
jwt (1.5.1)
less (2.6.0)
commonjs (~> 0.2.7)
Expand All @@ -131,8 +132,8 @@ GEM
libv8 (3.16.14.13)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mime-types (2.99.1)
mini_portile2 (2.0.0)
minitest (5.8.4)
Expand All @@ -155,7 +156,7 @@ GEM
builder
minitest (>= 5.0)
ruby-progressbar
multi_json (1.11.2)
multi_json (1.11.3)
multi_xml (0.5.5)
multipart-post (2.0.0)
netrc (0.11.0)
Expand All @@ -176,7 +177,7 @@ GEM
oauth2 (~> 1.0)
omniauth (~> 1.2)
orm_adapter (0.5.0)
parser (2.3.0.6)
parser (2.3.1.0)
ast (~> 2.2)
pg (0.18.4)
poltergeist (1.9.0)
Expand All @@ -185,7 +186,7 @@ GEM
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
powerpack (0.1.1)
puma (3.2.0)
puma (3.4.0)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
Expand All @@ -212,7 +213,7 @@ GEM
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.4)
rails_stdout_logging (0.0.5)
railties (4.2.6)
actionpack (= 4.2.6)
activesupport (= 4.2.6)
Expand All @@ -227,26 +228,26 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rollbar (2.9.1)
rollbar (2.10.0)
multi_json
rubocop (0.38.0)
parser (>= 2.3.0.6, < 3.0)
rubocop (0.39.0)
parser (>= 2.3.0.7, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.7.5)
ruby-progressbar (1.8.0)
rubyzip (1.2.0)
safe_yaml (1.0.4)
sass (3.4.21)
sass (3.4.22)
simplecov (0.11.2)
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
skylight (0.10.3)
activesupport (>= 3.0.0)
sprockets (3.5.2)
sprockets (3.6.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.0.4)
Expand All @@ -262,7 +263,7 @@ GEM
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.2)
timecop (0.8.0)
timecop (0.8.1)
tins (1.6.0)
twitter-bootstrap-rails (3.2.2)
actionpack (>= 3.1)
Expand All @@ -271,21 +272,20 @@ GEM
railties (>= 3.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
uglifier (3.0.0)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
unicode-display_width (1.0.2)
unicode-display_width (1.0.3)
vcr (3.0.1)
warden (1.2.6)
rack (>= 1.0)
web-console (3.1.1)
activemodel (>= 4.2)
debug_inspector
railties (>= 4.2)
webmock (1.24.2)
webmock (1.24.6)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
Expand Down Expand Up @@ -337,7 +337,7 @@ DEPENDENCIES
uglifier (>= 1.3.0)
vcr
web-console
webmock
webmock (= 1.24.6)
yard

BUNDLED WITH
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/submissions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def show
def require_user
return if current_user
if ENV['FAKE_AUTH_ENABLED'] == 'true'
redirect_to user_omniauth_authorize_path(:developer)
redirect_to user_developer_omniauth_authorize_path
else
redirect_to user_omniauth_authorize_path(:mit_oauth2)
redirect_to user_mit_oauth2_omniauth_authorize_path
end
end

Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
<li><%= link_to("Sign out", destroy_user_session_path, method: :delete, id: "sign_in") %></li>
<% else %>
<% if ENV['FAKE_AUTH_ENABLED'] == 'true' %>
<li><%= link_to("Sign in", user_omniauth_authorize_path(:developer), id: "sign_in") %></li>
<li><%= link_to("Sign in", user_developer_omniauth_authorize_path, id: "sign_in") %></li>
<% else %>
<li><%= link_to("Sign in", user_omniauth_authorize_path(:mit_oauth2), id: "sign_in") %></li>
<li><%= link_to("Sign in", user_mit_oauth2_omniauth_authorize_path, id: "sign_in") %></li>
<% end %>
<% end %>
</ul>
Expand Down
6 changes: 3 additions & 3 deletions test/controllers/submissions_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class SubmissionsControllerTest < ActionController::TestCase

test 'non-authenticated users cannot download package' do
get :package, id: submissions(:sub_one)
assert_redirected_to user_omniauth_authorize_path(:mit_oauth2)
assert_redirected_to user_mit_oauth2_omniauth_authorize_path
end

test 'non-admin user cannot download package' do
Expand All @@ -94,7 +94,7 @@ class SubmissionsControllerTest < ActionController::TestCase

test 'non-authenticated users cannot resubmit package' do
post :resubmit, id: submissions(:sub_one)
assert_redirected_to user_omniauth_authorize_path(:mit_oauth2)
assert_redirected_to user_mit_oauth2_omniauth_authorize_path
end

test 'non-admin user cannot resubmit package' do
Expand All @@ -111,7 +111,7 @@ class SubmissionsControllerTest < ActionController::TestCase

test 'non-authenticated users cannot show submission' do
get :show, id: submissions(:sub_one)
assert_redirected_to user_omniauth_authorize_path(:mit_oauth2)
assert_redirected_to user_mit_oauth2_omniauth_authorize_path
end

test 'non-admin users can view own submission' do
Expand Down