repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_json_preview_test.rb | test/integration/qr/qr_json_preview_test.rb | # frozen_string_literal: true
require "test_helper"
require "uri"
class QrJsonPreviewTest < ActionDispatch::IntegrationTest
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
end
def test_preview_anonymous_response
post json_pushes_path(format: :json), params: {password: {kind:... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_requested_locale_test.rb | test/integration/qr/qr_requested_locale_test.rb | # frozen_string_literal: true
require "test_helper"
class QrRequestedLocaleTest < ActionDispatch::IntegrationTest
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
@luca = users(:luca)
@luca.confirm
sign_in @luca
end
def test_requested_locale
get new_push_path(tab... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_creation_test.rb | test/integration/qr/qr_creation_test.rb | # frozen_string_literal: true
require "test_helper"
class QrCreationTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confirm
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_json_retrieval_test.rb | test/integration/qr/qr_json_retrieval_test.rb | # frozen_string_literal: true
require "test_helper"
class QrJsonRetrievalTest < ActionDispatch::IntegrationTest
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
end
def test_view_with_passphrase
post json_pushes_path(format: :json), params: {password: {kind: "qr", payload: "t... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_deletion_test.rb | test/integration/qr/qr_deletion_test.rb | # frozen_string_literal: true
require "test_helper"
class QrDeletionTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
@luca = users(:luca)
@luca.confirm
sign_in @luca
end
def test_anony... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_authenticated_test.rb | test/integration/qr/qr_authenticated_test.rb | # frozen_string_literal: true
require "test_helper"
class QrAuthenticatedTest < ActionDispatch::IntegrationTest
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
end
def test_authenticated_json_creation
post json_pushes_path(format: :json),
params: {password: {kind: "qr"... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_audit_test.rb | test/integration/qr/qr_audit_test.rb | # frozen_string_literal: true
require "test_helper"
class QrAuditTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
# Create a user
@luca = users(:luca)
@paul = users(:one)
sign_in @luca
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_anonymous_access_test.rb | test/integration/qr/qr_anonymous_access_test.rb | # frozen_string_literal: true
require "test_helper"
class QrAnonymousAccessTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
Rails.application.reload_routes!
end
teardown do
Settings.disabl... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_json_creation_test.rb | test/integration/qr/qr_json_creation_test.rb | # frozen_string_literal: true
require "test_helper"
class QrJsonCreationTest < ActionDispatch::IntegrationTest
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
end
def test_basic_json_creation
post json_pushes_path(format: :json), params: {password: {kind: "qr", payload: "tes... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_json_passphrase_test.rb | test/integration/qr/qr_json_passphrase_test.rb | # frozen_string_literal: true
require "test_helper"
class QrJsonPassphraseTest < ActionDispatch::IntegrationTest
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
end
def test_basic_json_passphrase
post json_pushes_path(format: :json), params: {password: {kind: "qr", payload: ... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_index_test.rb | test/integration/qr/qr_index_test.rb | # frozen_string_literal: true
require "test_helper"
class QrIndexTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
@luca = users(:luca)
@luca.confirm
sign_in @luca
end
teardown do
s... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_passphrase_test.rb | test/integration/qr/qr_passphrase_test.rb | # frozen_string_literal: true
require "test_helper"
class QrPassphraseTest < ActionDispatch::IntegrationTest
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
@luca = users(:luca)
@luca.confirm
sign_in @luca
end
teardown do
sign_out :user
end
def test_passwor... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_json_deletion_test.rb | test/integration/qr/qr_json_deletion_test.rb | # frozen_string_literal: true
require "test_helper"
class QrJsonDeletionTest < ActionDispatch::IntegrationTest
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
end
def test_deletion
# Create password
post json_pushes_path(format: :json), params: {password: {kind: "qr", pa... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_json_audit_test.rb | test/integration/qr/qr_json_audit_test.rb | # frozen_string_literal: true
require "test_helper"
class QrJsonAuditTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
end
def test_audit_response_for_authenticated
Settings.enable_logins = true... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/qr/qr_notfound_test.rb | test/integration/qr/qr_notfound_test.rb | # frozen_string_literal: true
require "test_helper"
class QrNotfoundTest < ActionDispatch::IntegrationTest
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
end
def test_password_not_found
# Non existant push should return the expired page
get "/p/doesnotexist"
assert_... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/pages/generate_key_test.rb | test/integration/pages/generate_key_test.rb | # frozen_string_literal: true
require "test_helper"
class GenerateKeyTest < ActionDispatch::IntegrationTest
def test_generate_key_page_renders_ok
get page_path("generate_key")
assert_response :success
end
end
| ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/pages/about_page_test.rb | test/integration/pages/about_page_test.rb | # frozen_string_literal: true
require "test_helper"
class AboutPageTest < ActionDispatch::IntegrationTest
def test_about_page_renders_ok
get page_path("about")
assert_response :success
end
end
| ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_json_passphrase_test.rb | test/integration/url/url_json_passphrase_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlJsonPassphraseTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.conf... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_json_audit_test.rb | test/integration/url/url_json_audit_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlJsonAuditTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
end
def test_audit_response_for_authenti... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_notfound_test.rb | test/integration/url/url_notfound_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlNotfoundTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confirm
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_passphrase_test.rb | test/integration/url/url_passphrase_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlPassphraseTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confirm
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_requested_locale_test.rb | test/integration/url/url_requested_locale_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlRequestedLocaleTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.con... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_creation_test.rb | test/integration/url/url_creation_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlCreationTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confirm
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_json_retrieval_test.rb | test/integration/url/url_json_retrieval_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlJsonRetrievalTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confi... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_anonymous_access_test.rb | test/integration/url/url_anonymous_access_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlAnonymousAccessTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
end
teardown do
Settings.disa... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_deletion_test.rb | test/integration/url/url_deletion_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlDeletionTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confirm
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_json_deletion_test.rb | test/integration/url/url_json_deletion_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlJsonDeletionTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confir... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_json_preview_test.rb | test/integration/url/url_json_preview_test.rb | # frozen_string_literal: true
require "test_helper"
require "uri"
class UrlJsonPreviewTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_index_test.rb | test/integration/url/url_index_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlIndexTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confirm
si... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/url/url_json_creation_test.rb | test/integration/url/url_json_creation_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlJsonCreationTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confir... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/api/api_version_test.rb | test/integration/api/api_version_test.rb | # frozen_string_literal: true
require "test_helper"
class ApiVersionTest < ActionDispatch::IntegrationTest
def test_anonymous_version_endpoint
get "/api/v1/version.json"
assert_response :success
assert_equal Version.current.to_s, JSON.parse(@response.body)["application_version"]
assert_equal Apipie.... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/locales/locales_test.rb | test/integration/locales/locales_test.rb | # frozen_string_literal: true
require "test_helper"
class LocalesTest < ActionDispatch::IntegrationTest
def test_locales_exist
I18n.available_locales.each do |locale|
get root_path, params: {locale:}
assert_response :success
end
end
def test_settings_exist
I18n.available_locales.each do... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_json_active_test.rb | test/integration/file_push/file_push_json_active_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushJsonActiveTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.co... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_json_deletion_test.rb | test/integration/file_push/file_push_json_deletion_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushJsonDeletionTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.c... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_index_test.rb | test/integration/file_push/file_push_index_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushIndexTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confirm
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_requested_locale_test.rb | test/integration/file_push/file_push_requested_locale_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushRequestedLocaleTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luc... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_retrieval_test.rb | test/integration/file_push/file_push_retrieval_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushRetrievalTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.conf... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_json_retrieval_test.rb | test/integration/file_push/file_push_json_retrieval_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushJsonRetrievalTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_json_preview_test.rb | test/integration/file_push/file_push_json_preview_test.rb | # frozen_string_literal: true
require "test_helper"
require "uri"
class FilePushJsonPreviewTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_anonymous_access_test.rb | test/integration/file_push/file_push_anonymous_access_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushAnonymousAccessTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
end
teardown do
Setting... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_creation_test.rb | test/integration/file_push/file_push_creation_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushCreationTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confi... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_passphrase_test.rb | test/integration/file_push/file_push_passphrase_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushPassphraseTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.con... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_notfound_test.rb | test/integration/file_push/file_push_notfound_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushNotfoundTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
end
def test_password_not_found
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_deletion_test.rb | test/integration/file_push/file_push_deletion_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushDeletionTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confi... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_blur_test.rb | test/integration/file_push/file_push_blur_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushBlurTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.confirm
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_json_passphrase_test.rb | test/integration/file_push/file_push_json_passphrase_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushJsonPassphraseTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_json_expired_test.rb | test/integration/file_push/file_push_json_expired_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushJsonExpiredTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.c... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_json_creation_test.rb | test/integration/file_push/file_push_json_creation_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushJsonCreationTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.c... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/integration/file_push/file_push_json_audit_test.rb | test/integration/file_push/file_push_json_audit_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushJsonAuditTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
@luca = users(:luca)
@luca.conf... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/helpers/application_helper_test.rb | test/helpers/application_helper_test.rb | # frozen_string_literal: true
require "test_helper"
class ApplicationHelperTest < ActionView::TestCase
include ApplicationHelper
setup do
@push = pushes(:test_push)
# Ensure Settings are available
@original_title = Settings.brand.title
@original_enabled_language_codes = Settings.enabled_language_... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/helpers/pushes_helper_test.rb | test/helpers/pushes_helper_test.rb | # frozen_string_literal: true
require "test_helper"
class PushesHelperTest < ActionView::TestCase
include PushesHelper
test "filesize returns 0.0 B for zero size" do
assert_equal "0.0 B", filesize(0)
end
test "filesize formats bytes correctly" do
assert_equal "1.0 B", filesize(1)
assert_equal "1... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/helpers/language_helper_test.rb | test/helpers/language_helper_test.rb | # frozen_string_literal: true
require "test_helper"
class LanguageHelperTest < ActionView::TestCase
include LanguageHelper
setup do
@original_available_locales = I18n.available_locales.dup
@original_language_codes = Settings.language_codes.dup
end
teardown do
I18n.available_locales = @original_a... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/controllers/qr_push_controller_test.rb | test/controllers/qr_push_controller_test.rb | # frozen_string_literal: true
require "test_helper"
class QrPushControllerTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_qr_pushes = true
end
teardown do
@luca = users(:luca)
sign_out @luca
end
test ... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/controllers/password_controller_test.rb | test/controllers/password_controller_test.rb | # frozen_string_literal: true
require "test_helper"
class PasswordControllerTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = false
Settings.enable_url_pushes = false
@luca = users(:luca)
end
t... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/controllers/csp_reports_controller_test.rb | test/controllers/csp_reports_controller_test.rb | # frozen_string_literal: true
require "test_helper"
class CspReportsControllerTest < ActionDispatch::IntegrationTest
setup do
@valid_csp_report = {
"csp-report" => {
"document-uri" => "https://example.com/page",
"violated-directive" => "script-src",
"blocked-uri" => "https://evil.c... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/controllers/pages_controller_test.rb | test/controllers/pages_controller_test.rb | # frozen_string_literal: true
require "test_helper"
class PagesControllerTest < ActionDispatch::IntegrationTest
end
| ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/controllers/file_push_controller_test.rb | test/controllers/file_push_controller_test.rb | # frozen_string_literal: true
require "test_helper"
class FilePushControllerTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_file_pushes = true
Rails.application.reload_routes!
end
teardown do
@luca = users... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/controllers/urls_controller_test.rb | test/controllers/urls_controller_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlsControllerTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
Settings.enable_url_pushes = true
Rails.application.reload_routes!
end
teardown do
@luca = users(:luc... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/controllers/concerns/log_events_test.rb | test/controllers/concerns/log_events_test.rb | # frozen_string_literal: true
require "test_helper"
# Create a test controller that includes LogEvents
class LogEventsTestController < ApplicationController
include LogEvents
end
class LogEventsTest < ActionController::TestCase
tests LogEventsTestController
include Devise::Test::ControllerHelpers
setup do
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/controllers/api/base_controller_test.rb | test/controllers/api/base_controller_test.rb | # frozen_string_literal: true
require "test_helper"
class Api::BaseControllerTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
@user = users(:luca)
@user.confirm
@user.update(authentication_token: "valid_token_123")
@other_user = users(:one)
@other_user.... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/controllers/users/registrations_controller_test.rb | test/controllers/users/registrations_controller_test.rb | # frozen_string_literal: true
require "test_helper"
class Users::RegistrationsControllerTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
Settings.enable_logins = true
@user = users(:luca)
@other_user = users(:one)
end
teardown do
Settings.enable_logins... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/models/user_test.rb | test/models/user_test.rb | # frozen_string_literal: true
require "test_helper"
class UserTest < ActiveSupport::TestCase
include Devise::Test::IntegrationHelpers
setup do
@luca = users(:luca)
end
test "should have pushes" do
Push.create(
kind: "text",
user: @luca,
payload: "testpw"
)
assert_equal 1, ... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/models/file_push_test.rb | test/models/file_push_test.rb | # frozen_string_literal: true
require "test_helper"
require "active_storage/engine"
class FilePushTest < ActiveSupport::TestCase
include ActionDispatch::TestProcess
setup do
@default_enable_logins = Settings.enable_logins
@default_enable_file_pushes = Settings.enable_file_pushes
Settings.enable_logi... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/models/qr_test.rb | test/models/qr_test.rb | # frozen_string_literal: true
require "test_helper"
class QrTest < ActiveSupport::TestCase
setup do
@default_enable_qr_pushes = Settings.enable_qr_pushes
@default_enable_logins = Settings.enable_logins
Settings.enable_qr_pushes = true
Settings.enable_logins = true
end
teardown do
Settings.... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/models/audit_log_test.rb | test/models/audit_log_test.rb | # frozen_string_literal: true
require "test_helper"
class AuditLogTest < ActiveSupport::TestCase
include Devise::Test::IntegrationHelpers
def setup
# Create a push without using fixtures
@push = Push.create!(
kind: "text",
payload: "test_payload",
url_token: "testtoken123",
expire... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/models/url_test.rb | test/models/url_test.rb | # frozen_string_literal: true
require "test_helper"
class UrlTest < ActiveSupport::TestCase
setup do
@default_enable_url_pushes = Settings.enable_url_pushes
@default_enable_logins = Settings.enable_logins
Settings.enable_url_pushes = true
Settings.enable_logins = true
end
teardown do
Setti... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/models/password_test.rb | test/models/password_test.rb | # frozen_string_literal: true
require "test_helper"
class PasswordTest < ActiveSupport::TestCase
test "should create password with name" do
password = Push.new(
kind: "text",
payload: "test_payload",
name: "Test Password"
)
assert password.save
assert_equal "Test Password", passwor... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/unit/purge_expired_pushes_job_test.rb | test/unit/purge_expired_pushes_job_test.rb | # frozen_string_literal: true
require "test_helper"
class PurgeExpiredPushesJobTest < ActiveSupport::TestCase
setup do
@previous_purge_after = Settings.purge_after
Settings.purge_after = "3 months"
# Clear all pushes before running tests
AuditLog.delete_all
Push.delete_all
end
teardown do
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/unit/clean_up_pushes_job_test.rb | test/unit/clean_up_pushes_job_test.rb | # frozen_string_literal: true
require "test_helper"
class CleanUpPushesJobTest < ActiveSupport::TestCase
setup do
# Clear all pushes before running tests
AuditLog.delete_all
Push.delete_all
User.delete_all
# Set default URL options for test environment to avoid missing host errors
Rails.app... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/unit/password_unit_test.rb | test/unit/password_unit_test.rb | # frozen_string_literal: true
require "test_helper"
class PasswordUnitTest < Minitest::Test
def test_save
password = Push.create(kind: "text", payload: "asdf")
password.check_limits
assert password.save
end
def test_kind_validation
password = Push.create(kind: "text", payload: "asdf")
passw... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/unit/expire_pushes_job_test.rb | test/unit/expire_pushes_job_test.rb | # frozen_string_literal: true
require "test_helper"
class ExpirePushesJobTest < ActiveSupport::TestCase
setup do
# Clear all pushes before running tests
AuditLog.delete_all
Push.delete_all
User.delete_all
# Set default URL options for test environment to avoid missing host errors
Rails.appl... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/unit/settings_test.rb | test/unit/settings_test.rb | # frozen_string_literal: true
require "test_helper"
class SettingsTest < Minitest::Test
def teardown
Settings.reload!
end
def test_defaults_same_as_settings
# Make sure these two files are always the same.
# If a user overlays config/settings.yml with an older version of the settings file
# the... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/mailers/test_mailer_test.rb | test/mailers/test_mailer_test.rb | require "test_helper"
class TestMailerTest < ActionMailer::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/test/mailers/previews/test_mailer_preview.rb | test/mailers/previews/test_mailer_preview.rb | # Preview all emails at http://localhost:3000/rails/mailers/test_mailer
class TestMailerPreview < ActionMailer::Preview
end
| ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/application.rb | config/application.rb | # rubocop:disable Rails/Output
# frozen_string_literal: true
require_relative "boot"
require "rails/all"
require "version"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module PasswordPusher
class Application < Rail... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/environment.rb | config/environment.rb | # frozen_string_literal: true
# Load the Rails application.
require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!
| ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/puma.rb | config/puma.rb | # frozen_string_literal: true
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
threads min_threads_count, max_threads_count
rails_env = ENV.fetch("RAILS_ENV", "development")
environment rails_env
case rails_env
when "production"
worke... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/routes.rb | config/routes.rb | # frozen_string_literal: true
Rails.application.routes.draw do
if ENV.key?("PWP_PUBLIC_GATEWAY")
draw :public_users
draw :public_pushes
# Add a route that handles the root path and returns a 404 error
root to: proc { |env| [404, {"Content-Type" => "text/html"}, ["<h1>Not Found</h1>"]] }
else
d... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/importmap.rb | config/importmap.rb | # frozen_string_literal: true
# Pin npm packages by running ./bin/importmap
pin "application"
pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
pin "@rails/activestora... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/boot.rb | config/boot.rb | # frozen_string_literal: true
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
require "bundler/setup" # Set up gems listed in the Gemfile.
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
| ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/cloudflare_proxy.rb | config/initializers/cloudflare_proxy.rb | require "net/http"
if Settings.cloudflare_proxy
def fetch_with_timeout(url, timeout: 15)
uri = URI(url)
Net::HTTP.start(uri.host, uri.port, use_ssl: true, open_timeout: timeout, read_timeout: timeout) do |http|
request = Net::HTTP::Get.new(uri)
http.request(request).body
end
rescue => e
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/content_security_policy.rb | config/initializers/content_security_policy.rb | # frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Define an application-wide content security policy.
# See the Securing Rails Applications Guide for more information:
# https://guides.rubyonrails.org/security.html#content-security-policy-header
Rails.application.configure d... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/filter_parameter_logging.rb | config/initializers/filter_parameter_logging.rb | # frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for ... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/application_controller_renderer.rb | config/initializers/application_controller_renderer.rb | # frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# ActiveSupport::Reloader.to_prepare do
# ApplicationController.renderer.defaults.merge!(
# http_host: 'example.org',
# https: false
# )
# end
| ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/lograge.rb | config/initializers/lograge.rb | # frozen_string_literal: true
if !Rails.env.development? && !Rails.env.test?
Rails.application.configure do
config.lograge.enabled = true
config.lograge.custom_payload do |controller|
options = {}
options[:user_id] = controller.current_user.try(:id)
options[:ip] = controller.request.ip
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/apipie.rb | config/initializers/apipie.rb | # frozen_string_literal: true
Apipie.configure do |config|
config.app_name = "Password Pusher"
config.copyright = "© 2011-Present Peter Giacomo Lombardo"
config.api_base_url = ""
config.api_base_url["1.5"] = ""
config.doc_base_url = "/api"
config.api_controllers_matcher = Rails.root.join("app/controll... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/session_store.rb | config/initializers/session_store.rb | # frozen_string_literal: true
# Be sure to restart your server when you modify this file.
if Settings.secure_cookies
PasswordPusher::Application.config.session_store :cookie_store,
key: "_PasswordPusher_session",
secure: true, # Only send the cookie over HTTPS
httponly: true, ... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/mission_control_jobs.rb | config/initializers/mission_control_jobs.rb | # MissionControl::Jobs configuration
if defined?(MissionControl::Jobs)
# Ensure Solid Queue is properly integrated
if defined?(SolidQueue)
# Solid Queue is available and should work with MissionControl::Jobs
Rails.logger.info "MissionControl::Jobs configured with Solid Queue"
end
end
| ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/devise.rb | config/initializers/devise.rb | # frozen_string_literal: true
# Assuming you have not yet modified this file, each configuration option below
# is set to its default value. Note that some are commented out while others
# are not: uncommented lines are intended to protect your configuration from
# breaking changes in upgrades (i.e., in the event that... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/translation.rb | config/initializers/translation.rb | # frozen_string_literal: true
# If PWP__ENABLED_LANGUAGE_CODES was used, convert the string to an array
if Settings.enabled_language_codes.is_a?(String)
Settings.enabled_language_codes = Settings.enabled_language_codes.split(",")
end
# Permitted locales available for the application
I18n.available_locales = Setting... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/high_voltage.rb | config/initializers/high_voltage.rb | # frozen_string_literal: true
HighVoltage.configure do |config|
config.routes = false
end
| ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/wrap_parameters.rb | config/initializers/wrap_parameters.rb | # frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_con... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/lockbox.rb | config/initializers/lockbox.rb | # frozen_string_literal: true
# Application Encryption Key
#
# Set the environment variable PWPUSH_MASTER_KEY to set your encryption key.
#
# Example:
# export PWPUSH_MASTER_KEY=749b1022e1cb83fb04f3022eacaf3bfef60c6d47f83e6fb41f534a05fc69929f
#
# If this environment variable is not set, a default encryption key will... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/inflections.rb | config/initializers/inflections.rb | # frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflec... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/rollbar.rb | config/initializers/rollbar.rb | # frozen_string_literal: true
if defined?(Rollbar)
Rollbar.configure do |config|
# Without configuration, Rollbar is enabled in all environments.
# To disable in specific environments, set config.enabled=false.
config.access_token = ENV.fetch("ROLLBAR_ACCESS_TOKEN", nil)
# Here we'll disable in 'te... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/oj.rb | config/initializers/oj.rb | # frozen_string_literal: true
Oj.default_options = {mode: :rails}
Oj.optimize_rails
| ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/validate_settings.rb | config/initializers/validate_settings.rb | # frozen_string_literal: true
# Validate Settings initializer
# This file validates application settings
module SettingsValidator
class << self
def validate_purge_after_setting
return if Settings.purge_after == "disabled"
begin
duration = to_duration(Settings.purge_after)
unless dur... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/cookies_serializer.rb | config/initializers/cookies_serializer.rb | # frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
#
# Marshal has a potential RCE vulnerability.
# If we switch directly to :json, app can 500 on cookie deserializ... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/action_view_fields_with_errors.rb | config/initializers/action_view_fields_with_errors.rb | ActionView::Base.field_error_proc = proc do |html_tag, instance|
# Parse the tag safely
fragment = Nokogiri::HTML::DocumentFragment.parse(html_tag)
element = fragment.children.first
# Only add class if it's a form field
if element && %w[input].include?(element.name)
element["class"] += " is-invalid"
... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
pglombardo/PasswordPusher | https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/config/initializers/permissions_policy.rb | config/initializers/permissions_policy.rb | # frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Define an application-wide HTTP permissions policy. For further
# information see: https://developers.google.com/web/updates/2018/06/feature-policy
# Rails.application.config.permissions_policy do |policy|
# policy.camera ... | ruby | Apache-2.0 | 9869098cf38d89c76abc2d6bfee2438cce61ce1c | 2026-01-04T15:53:03.627788Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.