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
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/compiled_json.rb
lib/jsonapi/compiled_json.rb
# frozen_string_literal: true module JSONAPI class CompiledJson def self.compile(h) new(JSON.generate(h), h) end def self.of(obj) # :nocov: case obj when NilClass then nil when CompiledJson then obj when String then CompiledJson.new(obj) when Hash then C...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/resource.rb
lib/jsonapi/resource.rb
# frozen_string_literal: true module JSONAPI class Resource < ActiveRelationResource root_resource end end
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/path.rb
lib/jsonapi/path.rb
# frozen_string_literal: true module JSONAPI class Path attr_reader :segments, :resource_klass def initialize(resource_klass:, path_string:, ensure_default_field: true, parse_fields: true) @resource_klass = resource_klass current_resource_...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/resource_fragment.rb
lib/jsonapi/resource_fragment.rb
# frozen_string_literal: true module JSONAPI # A ResourceFragment holds a ResourceIdentity and associated partial resource data. # # The following partial resource data may be stored # cache - the value of the cache field for the resource instance # related - a hash of arrays of related resource identities,...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/operation_result.rb
lib/jsonapi/operation_result.rb
# frozen_string_literal: true module JSONAPI class OperationResult attr_accessor :code attr_accessor :meta attr_accessor :links attr_accessor :options attr_accessor :warnings def initialize(code, options = {}) @code = Rack::Utils.status_code(code) @options = options @meta =...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/exceptions.rb
lib/jsonapi/exceptions.rb
# frozen_string_literal: true module JSONAPI module Exceptions class Error < RuntimeError attr_reader :error_object_overrides def initialize(error_object_overrides = {}) @error_object_overrides = error_object_overrides end def create_error_object(error_defaults) JSONAPI:...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/cached_response_fragment.rb
lib/jsonapi/cached_response_fragment.rb
# frozen_string_literal: true module JSONAPI class CachedResponseFragment Lookup = Struct.new(:resource_klass, :serializer_config_key, :context, :context_key, :cache_ids) do def type resource_klass._type end def keys cache_ids.map do |(id, cache_key)| [type, id, cac...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/naive_cache.rb
lib/jsonapi/naive_cache.rb
# frozen_string_literal: true module JSONAPI # Cache which memoizes the given block. # # It's "naive" because it clears the least-recently-inserted cache entry # rather than the least-recently-used. This makes lookups faster but cache # misses more frequent after cleanups. Therefore you the best time to use...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/acts_as_resource_controller.rb
lib/jsonapi/acts_as_resource_controller.rb
# frozen_string_literal: true require 'csv' module JSONAPI module ActsAsResourceController MEDIA_TYPE_MATCHER = /.+".+"[^,]*|[^,]+/ ALL_MEDIA_TYPES = '*/*' def self.included(base) base.extend ClassMethods base.include Callbacks base.cattr_reader :server_error_callbacks base.defi...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/response_document.rb
lib/jsonapi/response_document.rb
# frozen_string_literal: true module JSONAPI class ResponseDocument attr_reader :serialized_results def initialize(options = {}) @serialized_results = [] @result_codes = [] @error_results = [] @global_errors = [] @options = options @top_level_meta = @options.fetch(:base...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/relationship.rb
lib/jsonapi/relationship.rb
# frozen_string_literal: true module JSONAPI class Relationship attr_reader :acts_as_set, :foreign_key, :options, :name, :class_name, :polymorphic, :always_include_optional_linkage_data, :parent_resource, :eager_load_on_include, :custom_methods, :inverse_relationsh...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/include_directives.rb
lib/jsonapi/include_directives.rb
# frozen_string_literal: true module JSONAPI class IncludeDirectives # Construct an IncludeDirectives Hash from an array of dot separated include strings. # For example ['posts.comments.tags'] # will transform into => # { # posts: { # include_related: { # comments:{ # ...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/processor.rb
lib/jsonapi/processor.rb
# frozen_string_literal: true module JSONAPI class Processor include Callbacks define_jsonapi_resources_callbacks :find, :show, :show_relationship, :show_related_resource, ...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/resource_serializer.rb
lib/jsonapi/resource_serializer.rb
# frozen_string_literal: true module JSONAPI class ResourceSerializer attr_reader :link_builder, :key_formatter, :serialization_options, :fields, :include_directives, :always_include_to_one_linkage_data, :always_include_to_many_linkage_data, :options # initialize # Optio...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/callbacks.rb
lib/jsonapi/callbacks.rb
# frozen_string_literal: true require 'active_support/callbacks' module JSONAPI module Callbacks def self.included(base) base.class_eval do include ActiveSupport::Callbacks base.extend ClassMethods end end module ClassMethods def define_jsonapi_resources_callbacks(*cal...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/resource_controller_metal.rb
lib/jsonapi/resource_controller_metal.rb
# frozen_string_literal: true module JSONAPI class ResourceControllerMetal < ActionController::Metal MODULES = [ AbstractController::Rendering, ActionController::Rendering, ActionController::Renderers::All, ActionController::StrongParameters, Gem::Requirement.new('< 6.1').satisfied_...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/resource_identity.rb
lib/jsonapi/resource_identity.rb
# frozen_string_literal: true module JSONAPI # ResourceIdentity describes a unique identity of a resource in the system. # This consists of a Resource class and an identifier that is unique within # that Resource class. ResourceIdentities are intended to be used as hash # keys to provide ordered mixing of res...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/basic_resource.rb
lib/jsonapi/basic_resource.rb
# frozen_string_literal: true require 'jsonapi/callbacks' require 'jsonapi/configuration' module JSONAPI class BasicResource include Callbacks @abstract = true @immutable = true @root = true attr_reader :context define_jsonapi_resources_callbacks :create, ...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
true
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/configuration.rb
lib/jsonapi/configuration.rb
# frozen_string_literal: true require 'jsonapi/formatter' require 'jsonapi/processor' require 'concurrent' module JSONAPI class Configuration attr_reader :json_key_format, :resource_key_type, :route_format, :raise_if_parameters_not_allowed, :warn_o...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/resource_controller.rb
lib/jsonapi/resource_controller.rb
# frozen_string_literal: true module JSONAPI class ResourceController < ActionController::Base include JSONAPI::ActsAsResourceController end end
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/link_builder.rb
lib/jsonapi/link_builder.rb
# frozen_string_literal: true module JSONAPI class LinkBuilder attr_reader :base_url, :primary_resource_klass, :route_formatter, :engine, :engine_mount_point, :url_helpers @@url_helper_methods = {} def initialize(config = {...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/paginator.rb
lib/jsonapi/paginator.rb
# frozen_string_literal: true module JSONAPI class Paginator def initialize(_params) end def apply(_relation, _order_options) # relation end def links_page_params(_options = {}) # :nocov: {} # :nocov: end class << self def requires_record_count # :...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/resource_set.rb
lib/jsonapi/resource_set.rb
# frozen_string_literal: true module JSONAPI # Contains a hash of resource types which contain a hash of resources, relationships and primary status keyed by # resource id. class ResourceSet attr_reader :resource_klasses, :populated def initialize(source, include_related = nil, options = nil) @po...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/request.rb
lib/jsonapi/request.rb
# frozen_string_literal: true module JSONAPI class Request attr_accessor :fields, :include, :filters, :sort_criteria, :errors, :controller_module_path, :context, :paginator, :source_klass, :source_id, :include_directives, :params, :warnings, :server_error_callbacks, :operation...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/formatter.rb
lib/jsonapi/formatter.rb
# frozen_string_literal: true module JSONAPI class Formatter class << self def format(arg) arg.to_s end def unformat(arg) arg end def cached return FormatterWrapperCache.new(self) end def uncached return self end def format...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/error_codes.rb
lib/jsonapi/error_codes.rb
# frozen_string_literal: true module JSONAPI VALIDATION_ERROR = '100' INVALID_RESOURCE = '101' FILTER_NOT_ALLOWED = '102' INVALID_FIELD_VALUE = '103' INVALID_FIELD = '104' PARAM_NOT_ALLOWED = '105' PARAM_MISSING = '106' INVALID_FILTER_VALUE = '107' KEY_ORDER_MISMATCH = '109' KEY_NOT_INCLUDED_IN_URL...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/operation.rb
lib/jsonapi/operation.rb
# frozen_string_literal: true module JSONAPI class Operation attr_reader :resource_klass, :operation_type, :options def initialize(operation_type, resource_klass, options) @operation_type = operation_type @resource_klass = resource_klass @options = options end def process pr...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/path_segment.rb
lib/jsonapi/path_segment.rb
# frozen_string_literal: true module JSONAPI class PathSegment def self.parse(source_resource_klass:, segment_string:, parse_fields: true) first_part, last_part = segment_string.split('#', 2) relationship = source_resource_klass._relationship(first_part) if relationship if last_part ...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/resource_tree.rb
lib/jsonapi/resource_tree.rb
# frozen_string_literal: true module JSONAPI # A tree structure representing the resource structure of the requested resource(s). This is an intermediate structure # used to keep track of the resources, by identity, found at different included relationships. It will be flattened and # the resource instances wil...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/active_relation_resource.rb
lib/jsonapi/active_relation_resource.rb
# frozen_string_literal: true module JSONAPI class ActiveRelationResource < BasicResource root_resource def find_related_ids(relationship, options = {}) self.class.find_related_fragments([self], relationship.name, options).keys.collect { |rid| rid.id } end class << self # Finds Resource...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
true
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/error.rb
lib/jsonapi/error.rb
# frozen_string_literal: true module JSONAPI class Error attr_accessor :title, :detail, :id, :href, :code, :source, :links, :status, :meta def initialize(options = {}) @title = options[:title] @detail = options[:detail] @id = options[:id] @href ...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/mime_types.rb
lib/jsonapi/mime_types.rb
# frozen_string_literal: true require 'json' module JSONAPI MEDIA_TYPE = 'application/vnd.api+json' module MimeTypes def self.install Mime::Type.register JSONAPI::MEDIA_TYPE, :api_json parsers = ActionDispatch::Request.parameter_parsers.merge( Mime::Type.lookup(JSONAPI::MEDIA_TYPE).symbo...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/active_relation/join_manager.rb
lib/jsonapi/active_relation/join_manager.rb
module JSONAPI module ActiveRelation # Stores relationship paths starting from the resource_klass, consolidating duplicate paths from # relationships, filters and sorts. When joins are made the table aliases are tracked in join_details class JoinManager attr_reader :resource_klass, :sou...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/active_relation/adapters/join_left_active_record_adapter.rb
lib/jsonapi/active_relation/adapters/join_left_active_record_adapter.rb
module JSONAPI module ActiveRelation module Adapters module JoinLeftActiveRecordAdapter # Extends left_joins functionality to rails 4, and uses the same logic for rails 5.0.x and 5.1.x # The default left_joins logic of rails 5.2.x is used. This results in and extra join in some cases. For ...
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/resources/version.rb
lib/jsonapi/resources/version.rb
module JSONAPI module Resources VERSION = '0.11.0.beta1' end end
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
cerebris/jsonapi-resources
https://github.com/cerebris/jsonapi-resources/blob/e92afc690f5c53da6f4fa5e91ca72a50873390be/lib/jsonapi/resources/railtie.rb
lib/jsonapi/resources/railtie.rb
module JSONAPI module Resources class Railtie < Rails::Railtie rake_tasks do load 'tasks/check_upgrade.rake' end end end end
ruby
MIT
e92afc690f5c53da6f4fa5e91ca72a50873390be
2026-01-04T15:56:22.334252Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/jobs/clean_up_pushes_job.rb
app/jobs/clean_up_pushes_job.rb
class CleanUpPushesJob < ApplicationJob queue_as :default # Delete Anonymous Expired Pushes # # When a push expires, the payload is deleted but the metadata record still exists. This # includes information such as creation date, audit logs, duration etc.. When the record # was created by an anonymous use...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/jobs/purge_unattached_blobs_job.rb
app/jobs/purge_unattached_blobs_job.rb
class PurgeUnattachedBlobsJob < ApplicationJob queue_as :default def perform Rails.logger.info "Starting purge of unattached Active Storage blobs..." system("bin/pwpush active_storage:purge_unattached") Rails.logger.info "Completed purge of unattached Active Storage blobs" end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/jobs/cleanup_cache_job.rb
app/jobs/cleanup_cache_job.rb
class CleanupCacheJob < ApplicationJob queue_as :default def perform logger.info("--> #{self.class.name}: Starting cache cleanup...") # Clean up main Rails cache cleanup_cache_directory(Rails.root.join("tmp", "cache")) # Clean up Rack::Attack cache cleanup_cache_directory(Rails.root.join("tmp...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/jobs/purge_expired_pushes_job.rb
app/jobs/purge_expired_pushes_job.rb
class PurgeExpiredPushesJob < ApplicationJob queue_as :default # Delete Expired Pushes After Duration # # When a push expires, the payload is deleted but the metadata record still exists. This # includes information such as creation date, audit logs, duration etc.. If purge_after setting # is set to a du...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/jobs/application_job.rb
app/jobs/application_job.rb
# frozen_string_literal: true class ApplicationJob < ActiveJob::Base end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/jobs/expire_pushes_job.rb
app/jobs/expire_pushes_job.rb
class ExpirePushesJob < ApplicationJob queue_as :default ## # This job is responsible for scanning all unexpired pushes and # conditionally expiring them. This is a preemptive measure to expire pushes # periodically. It saves some CPU and DB calls on live requests. # def perform(*args) # Log task s...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/helpers/language_helper.rb
app/helpers/language_helper.rb
module LanguageHelper def language_options_for_select I18n.available_locales.map do |locale| [Settings.language_codes[locale], locale] end end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/helpers/application_helper.rb
app/helpers/application_helper.rb
# frozen_string_literal: true module ApplicationHelper # Set the HTML title for the page with a trailing site identifier. def title(content) content_for(:html_title) { "#{content} | #{Settings.brand.title}" } end # Set the HTML title for the page _without_ the trailing site identifier. # Used in Passwor...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/helpers/pushes_helper.rb
app/helpers/pushes_helper.rb
# frozen_string_literal: true module PushesHelper def filesize(size) units = %w[B KiB MiB GiB TiB Pib EiB ZiB] return "0.0 B" if size.zero? exp = (Math.log(size) / Math.log(1024)).to_i exp += 1 if size.to_f / (1024**exp) >= 1024 - 0.05 exp = units.size - 1 if exp > units.size - 1 format("%...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/csp_reports_controller.rb
app/controllers/csp_reports_controller.rb
class CspReportsController < ApplicationController # Skip CSRF protection as browsers won't send it skip_before_action :verify_authenticity_token, only: [:create] def create # Limit request size to prevent DoS attacks if request.body.size > 10.kilobytes head :content_too_large return end ...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/pushes_controller.rb
app/controllers/pushes_controller.rb
# frozen_string_literal: true class PushesController < BaseController include SetPushAttributes include LogEvents before_action :set_push, except: %i[new create index] before_action :check_allowed def show # This push may have expired since the last view. Validate the push # expiration before doin...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/base_controller.rb
app/controllers/base_controller.rb
class BaseController < ApplicationController rescue_from ActionController::ParameterMissing do |exception| respond_to do |format| format.html { render plain: "Missing Parameters", status: :bad_request } format.any { head :bad_request } end end rescue_from ActionController::UnknownFormat do |e...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/pages_controller.rb
app/controllers/pages_controller.rb
# frozen_string_literal: true class PagesController < ApplicationController include HighVoltage::StaticPage # def layout_for_page # case params[:id] # when 'home' # 'home' # else # 'article' # end # end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/admin_controller.rb
app/controllers/admin_controller.rb
class AdminController < ApplicationController layout "admin" before_action :authenticate_user! before_action :require_admin def index end def welcome end private def require_admin unless current_user.admin? head :not_found end end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/application_controller.rb
app/controllers/application_controller.rb
# frozen_string_literal: true class ApplicationController < ActionController::Base protect_from_forgery unless: -> { request.format.json? } add_flash_types :info, :error, :success, :warning before_action :configure_permitted_parameters, if: :devise_controller? include SetLocale private # To add extra fi...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/concerns/set_locale.rb
app/controllers/concerns/set_locale.rb
module SetLocale extend ActiveSupport::Concern included do around_action :set_locale end def set_locale(&action) I18n.with_locale(find_locale, &action) end def default_url_options if params.present? && params.key?(:locale) {locale: params[:locale]} else {} end end pri...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/concerns/log_events.rb
app/controllers/concerns/log_events.rb
module LogEvents ## # log_view # # Record that a view is being made for a push # If the viewer is the owner or an admin, it won't count towards view limits # def log_view(push) if push.expired log_event(push, :failed_view) elsif user_signed_in? && current_user.admin? # Admin views take...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/concerns/set_push_attributes.rb
app/controllers/concerns/set_push_attributes.rb
module SetPushAttributes extend ActiveSupport::Concern # Since determining this value between and HTML forms and JSON API requests can be a bit # tricky, we break this out to it's own function. def create_detect_deletable_by_viewer(push, push_params) if push.url? # URLs cannot be preemptively deleted...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
module Admin class UsersController < ::AdminController def index @admin_users = User.where(admin: true).order(:email) @regular_users = User.where(admin: [false, nil]).order(:email).page(params[:page]).per(25) end def promote @user = User.find(params[:id]) begin ActiveReco...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/api/base_controller.rb
app/controllers/api/base_controller.rb
class Api::BaseController < ApplicationController prepend_before_action :require_api_authentication helper :all private def require_api_authentication return if user_signed_in? if (user = user_from_token) sign_in user, store: false elsif params["controller"] == "api/v1/version" # Ve...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/api/v1/pushes_controller.rb
app/controllers/api/v1/pushes_controller.rb
# frozen_string_literal: true class Api::V1::PushesController < Api::BaseController include SetPushAttributes include LogEvents before_action :set_push, only: %i[show preview audit destroy] resource_description do name "Pushes" short "Interact directly with pushes." end api :GET, "/p/:url_token....
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/api/v1/version_controller.rb
app/controllers/api/v1/version_controller.rb
class Api::V1::VersionController < Api::BaseController api :GET, "/api/v1/version.json", "Get the version details of the application and the API." formats ["JSON"] description <<-EOS == Version Information Retrieves the current application version, API version, edition and other information. === Exa...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/users/omniauth_callbacks_controller.rb
app/controllers/users/omniauth_callbacks_controller.rb
# frozen_string_literal: true class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController # You should configure your model like this: # devise :omniauthable, omniauth_providers: [:twitter] # You should also create an action method in this controller like this: # def twitter # end # Mo...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/users/passwords_controller.rb
app/controllers/users/passwords_controller.rb
# frozen_string_literal: true class Users::PasswordsController < Devise::PasswordsController layout "login" # GET /resource/password/new # def new # super # end # POST /resource/password # def create # super # end # GET /resource/password/edit?reset_password_token=abcdef # def edit # s...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/users/unlocks_controller.rb
app/controllers/users/unlocks_controller.rb
# frozen_string_literal: true class Users::UnlocksController < Devise::UnlocksController layout "login" # GET /resource/unlock/new # def new # super # end # POST /resource/unlock # def create # super # end # GET /resource/unlock?unlock_token=abcdef # def show # super # end # prote...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/users/registrations_controller.rb
app/controllers/users/registrations_controller.rb
# frozen_string_literal: true class Users::RegistrationsController < Devise::RegistrationsController invisible_captcha only: :create layout "application", only: %i[edit update token] layout "login", except: %i[edit update token] # before_action :configure_sign_up_params, only: [:create] # before_action :co...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/users/confirmations_controller.rb
app/controllers/users/confirmations_controller.rb
# frozen_string_literal: true class Users::ConfirmationsController < Devise::ConfirmationsController layout "login" # GET /resource/confirmation/new # def new # super # end # POST /resource/confirmation # def create # super # end # GET /resource/confirmation?confirmation_token=abcdef def s...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/users/sessions_controller.rb
app/controllers/users/sessions_controller.rb
# frozen_string_literal: true class Users::SessionsController < Devise::SessionsController layout "login" # before_action :configure_sign_in_params, only: [:create] # GET /resource/sign_in # def new # super # end # POST /resource/sign_in # def create # super # end # DELETE /resource/sign_...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/data_migration_statuses_controller.rb
app/controllers/madmin/data_migration_statuses_controller.rb
module Madmin class DataMigrationStatusesController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/dashboard_controller.rb
app/controllers/madmin/dashboard_controller.rb
module Madmin class DashboardController < Madmin::ApplicationController def show # Dashboard data can be added here if needed end end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/users_controller.rb
app/controllers/madmin/users_controller.rb
module Madmin class UsersController < Madmin::ResourceController def create @record = resource.model.new(user_params) # Generate a secure random password password = Devise.friendly_token.first(16) @record.password = password @record.password_confirmation = password # Handle a...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/pushes_controller.rb
app/controllers/madmin/pushes_controller.rb
module Madmin class PushesController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/audit_logs_controller.rb
app/controllers/madmin/audit_logs_controller.rb
module Madmin class AuditLogsController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/application_controller.rb
app/controllers/madmin/application_controller.rb
module Madmin class ApplicationController < Madmin::BaseController include SetLocale before_action :authenticate_user! before_action :authenticate_admin_user def authenticate_admin_user unless current_user&.admin? head :not_found end end end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/solid_queue/jobs_controller.rb
app/controllers/madmin/solid_queue/jobs_controller.rb
module Madmin class SolidQueue::JobsController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/solid_queue/recurring_executions_controller.rb
app/controllers/madmin/solid_queue/recurring_executions_controller.rb
module Madmin class SolidQueue::RecurringExecutionsController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/solid_queue/failed_executions_controller.rb
app/controllers/madmin/solid_queue/failed_executions_controller.rb
module Madmin class SolidQueue::FailedExecutionsController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/solid_queue/ready_executions_controller.rb
app/controllers/madmin/solid_queue/ready_executions_controller.rb
module Madmin class SolidQueue::ReadyExecutionsController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/solid_queue/recurring_tasks_controller.rb
app/controllers/madmin/solid_queue/recurring_tasks_controller.rb
module Madmin class SolidQueue::RecurringTasksController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/solid_queue/processes_controller.rb
app/controllers/madmin/solid_queue/processes_controller.rb
module Madmin class SolidQueue::ProcessesController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/solid_queue/scheduled_executions_controller.rb
app/controllers/madmin/solid_queue/scheduled_executions_controller.rb
module Madmin class SolidQueue::ScheduledExecutionsController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/solid_queue/pauses_controller.rb
app/controllers/madmin/solid_queue/pauses_controller.rb
module Madmin class SolidQueue::PausesController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/solid_queue/claimed_executions_controller.rb
app/controllers/madmin/solid_queue/claimed_executions_controller.rb
module Madmin class SolidQueue::ClaimedExecutionsController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/solid_queue/blocked_executions_controller.rb
app/controllers/madmin/solid_queue/blocked_executions_controller.rb
module Madmin class SolidQueue::BlockedExecutionsController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/solid_queue/semaphores_controller.rb
app/controllers/madmin/solid_queue/semaphores_controller.rb
module Madmin class SolidQueue::SemaphoresController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/active_storage/variant_records_controller.rb
app/controllers/madmin/active_storage/variant_records_controller.rb
module Madmin class ActiveStorage::VariantRecordsController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/active_storage/attachments_controller.rb
app/controllers/madmin/active_storage/attachments_controller.rb
module Madmin class ActiveStorage::AttachmentsController < Madmin::ResourceController end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/controllers/madmin/active_storage/blobs_controller.rb
app/controllers/madmin/active_storage/blobs_controller.rb
module Madmin class ActiveStorage::BlobsController < Madmin::ResourceController def new super @record.assign_attributes(filename: "") end end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/models/audit_log.rb
app/models/audit_log.rb
# frozen_string_literal: true class AuditLog < ApplicationRecord enum :kind, [:creation, :view, :failed_view, :expire, :failed_passphrase, :admin_view, :owner_view], validate: true belongs_to :push belongs_to :user, optional: true def subject_name user&.email || "❓" end end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/models/application_record.rb
app/models/application_record.rb
# frozen_string_literal: true class ApplicationRecord < ActiveRecord::Base self.abstract_class = true end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/models/data_migration_status.rb
app/models/data_migration_status.rb
class DataMigrationStatus < ApplicationRecord validates :name, presence: true, uniqueness: true end
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/models/push.rb
app/models/push.rb
# frozen_string_literal: true require "addressable/uri" class Push < ApplicationRecord enum :kind, [:text, :file, :url, :qr], validate: true validate :check_enabled_push_kinds validates :url_token, presence: true, uniqueness: true with_options on: :create do |create| create.before_validation :set_expire...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/models/user.rb
app/models/user.rb
# frozen_string_literal: true class User < ApplicationRecord include Pwpush::TokenAuthentication # Include default devise modules. Others available are: # :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable, :trackable, :confirmable...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/models/concerns/pwpush/token_authentication.rb
app/models/concerns/pwpush/token_authentication.rb
module Pwpush module TokenAuthentication extend ActiveSupport::Concern ## regenerate_authentication_token # # Regenerate the authentication token # # This method regenerates the authentication token for the user. # It generates a new token and saves it to the user record. # def re...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/madmin/resources/data_migration_status_resource.rb
app/madmin/resources/data_migration_status_resource.rb
class DataMigrationStatusResource < Madmin::Resource # Attributes attribute :id, form: false attribute :name attribute :completed attribute :completed_at attribute :created_at, form: false attribute :updated_at, form: false # Associations # Add scopes to easily filter records # scope :published ...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/madmin/resources/audit_log_resource.rb
app/madmin/resources/audit_log_resource.rb
class AuditLogResource < Madmin::Resource # Attributes attribute :id, form: false attribute :created_at, form: false attribute :ip, index: true attribute :user_agent, index: true attribute :referrer, index: true attribute :kind, index: true attribute :updated_at, form: false # Associations attribut...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/madmin/resources/user_resource.rb
app/madmin/resources/user_resource.rb
class UserResource < Madmin::Resource # Attributes attribute :id, form: false attribute :email, index: true attribute :created_at, form: false attribute :confirmed_at, index: true attribute :last_sign_in_at, index: true # attribute :encrypted_password, index: false, form: false attribute :reset_password...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/madmin/resources/push_resource.rb
app/madmin/resources/push_resource.rb
class PushResource < Madmin::Resource # Attributes attribute :id, form: false attribute :url_token, index: true attribute :kind, index: true attribute :expire_after_days attribute :expire_after_views attribute :expired, index: true attribute :deletable_by_viewer attribute :retrieval_step attribute :...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/madmin/resources/solid_queue/process_resource.rb
app/madmin/resources/solid_queue/process_resource.rb
class SolidQueue::ProcessResource < Madmin::Resource # Attributes attribute :id, form: false attribute :kind attribute :last_heartbeat_at attribute :pid attribute :hostname attribute :metadata attribute :created_at, form: false attribute :name # Associations attribute :claimed_executions attrib...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/madmin/resources/solid_queue/recurring_task_resource.rb
app/madmin/resources/solid_queue/recurring_task_resource.rb
class SolidQueue::RecurringTaskResource < Madmin::Resource # Attributes attribute :id, form: false attribute :key attribute :schedule attribute :command attribute :class_name attribute :arguments attribute :queue_name attribute :priority attribute :static attribute :description attribute :create...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/madmin/resources/solid_queue/semaphore_resource.rb
app/madmin/resources/solid_queue/semaphore_resource.rb
class SolidQueue::SemaphoreResource < Madmin::Resource # Attributes attribute :id, form: false attribute :key attribute :value attribute :expires_at attribute :created_at, form: false attribute :updated_at, form: false # Associations # Add scopes to easily filter records # scope :published # Ad...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/madmin/resources/solid_queue/job_resource.rb
app/madmin/resources/solid_queue/job_resource.rb
class SolidQueue::JobResource < Madmin::Resource # Attributes attribute :id, form: false attribute :queue_name attribute :class_name attribute :arguments attribute :priority attribute :active_job_id attribute :scheduled_at attribute :finished_at attribute :concurrency_key attribute :created_at, fo...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/madmin/resources/solid_queue/scheduled_execution_resource.rb
app/madmin/resources/solid_queue/scheduled_execution_resource.rb
class SolidQueue::ScheduledExecutionResource < Madmin::Resource # Attributes attribute :id, form: false attribute :queue_name attribute :priority attribute :scheduled_at attribute :created_at, form: false # Associations attribute :job # Add scopes to easily filter records # scope :published # A...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false
pglombardo/PasswordPusher
https://github.com/pglombardo/PasswordPusher/blob/9869098cf38d89c76abc2d6bfee2438cce61ce1c/app/madmin/resources/solid_queue/recurring_execution_resource.rb
app/madmin/resources/solid_queue/recurring_execution_resource.rb
class SolidQueue::RecurringExecutionResource < Madmin::Resource # Attributes attribute :id, form: false attribute :task_key attribute :run_at attribute :created_at, form: false # Associations attribute :job # Add scopes to easily filter records # scope :published # Add actions to the resource's s...
ruby
Apache-2.0
9869098cf38d89c76abc2d6bfee2438cce61ce1c
2026-01-04T15:53:03.627788Z
false