1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

2 Commits

Author SHA1 Message Date
0df1706b2c Updated to ruby 4.0.1 2026-02-09 18:36:56 -05:00
b51866e9d8 Added tests for hiding ads on lineup submission. 2026-02-09 18:36:56 -05:00
9 changed files with 39 additions and 9 deletions

View File

@@ -1 +1 @@
ruby-3.2.0
ruby-4.0.1

View File

@@ -1,6 +1,6 @@
source 'https://rubygems.org'
ruby '3.2.0'
ruby '4.0.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '8.1.2'

View File

@@ -117,8 +117,9 @@ GEM
influxdb (~> 0.6, >= 0.6.4)
railties (>= 5.0)
io-console (0.8.2)
irb (1.16.0)
irb (1.17.0)
pp (>= 0.6.0)
prism (>= 1.3.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jbuilder (2.14.1)
@@ -377,7 +378,7 @@ DEPENDENCIES
tzinfo-data
RUBY VERSION
ruby 3.2.0p0
ruby 4.0.1p0
BUNDLED WITH
2.6.9

View File

@@ -7,7 +7,7 @@ This application is being created to run a wrestling tournament.
**Public Production Url:** [https://wrestlingdev.com](https://wrestlingdev.com)
**App Info**
* Ruby 3.2.0
* Ruby 4.0.1
* Rails 8.1.2
* DB MySQL/MariaDB
* Solid Cache -> MySQL/MariaDB for html partial caching

View File

@@ -57,6 +57,5 @@ module Wrestling
config.active_support.cache_format_version = 7.1
config.load_defaults 8.1
config.active_support.to_time_preserves_timezone = :zone
end
end

View File

@@ -1,4 +1,4 @@
FROM ruby:3.2.0
FROM ruby:4.0.1
# Accept build arguments for user/group IDs
ARG USER_ID=1000

View File

@@ -1,4 +1,4 @@
FROM ruby:3.2.0-slim
FROM ruby:4.0.1-slim
#HEALTHCHECK --start-period=60s CMD curl http://127.0.0.1/

View File

@@ -60,6 +60,15 @@ class SchoolsControllerTest < ActionController::TestCase
assert_redirected_to '/static_pages/not_allowed'
end
def assert_ads_hidden
assert_no_match(/blocked_message/, response.body)
assert_no_match(/adsbygoogle/, response.body)
end
def assert_ads_visible
assert_match(/blocked_message/, response.body)
end
def baums_import
baums_text = "***** 2019-01-09 13:36:50 *****
Some School
@@ -399,6 +408,27 @@ Some Guy
success
end
test "ads are hidden for logged in user on school show" do
sign_in_owner
get_show
success
assert_ads_hidden
end
test "ads are hidden for school permission key on edit" do
@tournament.update(is_public: false)
get_edit(school_permission_key: @school_permission_key)
success
assert_ads_hidden
end
test "ads are visible for anonymous user without school permission key on show" do
@tournament.update(is_public: true)
get_show
success
assert_ads_visible
end
test "non logged in user cannot edit school with invalid school_permission_key" do
@tournament.update(is_public: false)
get_edit(school_permission_key: "invalid-key")