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
jondot/sneakers
https://github.com/jondot/sneakers/blob/9780692624c666b6db8266d2d5710f709cb0f2e2/lib/sneakers/content_encoding.rb
lib/sneakers/content_encoding.rb
module Sneakers class ContentEncoding def self.register(content_encoding: nil, encoder: nil, decoder: nil) # This can be removed when support is dropped for ruby 2.0 and replaced # by a keyword arg with no default value fail ArgumentError, 'missing keyword: content_encoding' if content_encoding....
ruby
MIT
9780692624c666b6db8266d2d5710f709cb0f2e2
2026-01-04T15:56:53.982751Z
false
jondot/sneakers
https://github.com/jondot/sneakers/blob/9780692624c666b6db8266d2d5710f709cb0f2e2/lib/sneakers/support/production_formatter.rb
lib/sneakers/support/production_formatter.rb
require 'time' module Sneakers module Support class ProductionFormatter < Logger::Formatter def self.call(severity, time, program_name, message) "#{time.utc.iso8601} p-#{Process.pid} t-#{Thread.current.object_id.to_s(36)} #{severity}: #{message}\n" end end end end
ruby
MIT
9780692624c666b6db8266d2d5710f709cb0f2e2
2026-01-04T15:56:53.982751Z
false
jondot/sneakers
https://github.com/jondot/sneakers/blob/9780692624c666b6db8266d2d5710f709cb0f2e2/lib/sneakers/support/utils.rb
lib/sneakers/support/utils.rb
class Sneakers::Utils def self.make_worker_id(namespace) "worker-#{namespace}:#{'1'}:#{rand(36**6).floor.to_s(36)}" # jid, worker id. include date. end def self.parse_workers(workerstring) missing_workers = [] workers = (workerstring || '').split(',').map do |k| begin w = Kernel.const_g...
ruby
MIT
9780692624c666b6db8266d2d5710f709cb0f2e2
2026-01-04T15:56:53.982751Z
false
jondot/sneakers
https://github.com/jondot/sneakers/blob/9780692624c666b6db8266d2d5710f709cb0f2e2/lib/sneakers/concerns/logging.rb
lib/sneakers/concerns/logging.rb
module Sneakers module Concerns module Logging def self.included(base) base.extend ClassMethods base.send :define_method, :logger do base.logger end end module ClassMethods def logger @logger end def logger=(logger) ...
ruby
MIT
9780692624c666b6db8266d2d5710f709cb0f2e2
2026-01-04T15:56:53.982751Z
false
jondot/sneakers
https://github.com/jondot/sneakers/blob/9780692624c666b6db8266d2d5710f709cb0f2e2/lib/sneakers/concerns/metrics.rb
lib/sneakers/concerns/metrics.rb
require 'sneakers/metrics/null_metrics' module Sneakers module Concerns module Metrics def self.included(base) base.extend ClassMethods base.send :define_method, :metrics do base.metrics end end module ClassMethods def metrics @metrics ...
ruby
MIT
9780692624c666b6db8266d2d5710f709cb0f2e2
2026-01-04T15:56:53.982751Z
false
jondot/sneakers
https://github.com/jondot/sneakers/blob/9780692624c666b6db8266d2d5710f709cb0f2e2/lib/sneakers/middleware/config.rb
lib/sneakers/middleware/config.rb
module Sneakers module Middleware class Config def self.use(klass, args) middlewares << { class: klass, args: args } end def self.delete(klass) middlewares.reject! { |el| el[:class] == klass } end def self.to_a middlewares end def self.middlewar...
ruby
MIT
9780692624c666b6db8266d2d5710f709cb0f2e2
2026-01-04T15:56:53.982751Z
false
jondot/sneakers
https://github.com/jondot/sneakers/blob/9780692624c666b6db8266d2d5710f709cb0f2e2/lib/sneakers/metrics/null_metrics.rb
lib/sneakers/metrics/null_metrics.rb
module Sneakers module Metrics class NullMetrics def increment(metric) end def timing(metric, &block) block.call end end end end
ruby
MIT
9780692624c666b6db8266d2d5710f709cb0f2e2
2026-01-04T15:56:53.982751Z
false
jondot/sneakers
https://github.com/jondot/sneakers/blob/9780692624c666b6db8266d2d5710f709cb0f2e2/lib/sneakers/metrics/statsd_metrics.rb
lib/sneakers/metrics/statsd_metrics.rb
module Sneakers module Metrics class StatsdMetrics def initialize(conn) @connection = conn end def increment(metric) @connection.increment(metric) end def timing(metric, &block) start = Time.now block.call @connection.timing(metric, ((Time.no...
ruby
MIT
9780692624c666b6db8266d2d5710f709cb0f2e2
2026-01-04T15:56:53.982751Z
false
jondot/sneakers
https://github.com/jondot/sneakers/blob/9780692624c666b6db8266d2d5710f709cb0f2e2/lib/sneakers/metrics/logging_metrics.rb
lib/sneakers/metrics/logging_metrics.rb
module Sneakers module Metrics class LoggingMetrics def increment(metric) Sneakers.logger.info("INC: #{metric}") end def timing(metric, &block) start = Time.now block.call Sneakers.logger.info("TIME: #{metric} #{Time.now - start}") end end end end
ruby
MIT
9780692624c666b6db8266d2d5710f709cb0f2e2
2026-01-04T15:56:53.982751Z
false
jondot/sneakers
https://github.com/jondot/sneakers/blob/9780692624c666b6db8266d2d5710f709cb0f2e2/lib/sneakers/metrics/newrelic_metrics.rb
lib/sneakers/metrics/newrelic_metrics.rb
module Sneakers module Metrics class NewrelicMetrics def self.eagent(eagent = nil) @eagent = eagent || @eagent end def initialize() #@connection = conn end def increment(metric) record_stat metric, 1 end def record_stat(metric, num) met...
ruby
MIT
9780692624c666b6db8266d2d5710f709cb0f2e2
2026-01-04T15:56:53.982751Z
false
jondot/sneakers
https://github.com/jondot/sneakers/blob/9780692624c666b6db8266d2d5710f709cb0f2e2/lib/sneakers/handlers/maxretry.rb
lib/sneakers/handlers/maxretry.rb
require 'base64' require 'json' module Sneakers module Handlers # # Maxretry uses dead letter policies on Rabbitmq to requeue and retry # messages after failure (rejections and errors). When the maximum # number of retries is reached it will put the message on an error queue. # This handler will ...
ruby
MIT
9780692624c666b6db8266d2d5710f709cb0f2e2
2026-01-04T15:56:53.982751Z
false
jondot/sneakers
https://github.com/jondot/sneakers/blob/9780692624c666b6db8266d2d5710f709cb0f2e2/lib/sneakers/handlers/oneshot.rb
lib/sneakers/handlers/oneshot.rb
module Sneakers module Handlers class Oneshot def initialize(channel, queue, opts) @channel = channel @opts = opts end def acknowledge(hdr, props, msg) @channel.acknowledge(hdr.delivery_tag, false) end def reject(hdr, props, msg, requeue=false) @chan...
ruby
MIT
9780692624c666b6db8266d2d5710f709cb0f2e2
2026-01-04T15:56:53.982751Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/helpers/application_helper.rb
app/helpers/application_helper.rb
module ApplicationHelper def distance_of_time_in_words_to_now_with_direction(time) string = distance_of_time_in_words_to_now(time) time > Time.now ? "in #{string}" : "#{string} ago" end def maintenance_status_tag(status) content_tag :span, t("maintenance_statuses.#{status}"), :class => "maintenanceS...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/setup_controller.rb
app/controllers/setup_controller.rb
class SetupController < ApplicationController skip_before_action :ensure_site layout 'admin' before_action do if has_site? redirect_to admin_root_path, :alert => "You already have configured this installation." end end def step2 if User.first redirect_to setup_path(:step3) end ...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/pages_controller.rb
app/controllers/pages_controller.rb
class PagesController < ApplicationController before_action { prepend_view_path(File.join(Staytus::Config.theme_root, 'views')) } layout Staytus::Config.theme_name def index @services = Service.ordered.includes(:group, :status, {:active_maintenances => :service_status}) @services_with_group = @services....
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/application_controller.rb
app/controllers/application_controller.rb
class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception around_action :set_time_zone before_action :ensure_site rescue_from Authie::Session::ValidityError, :with => :aut...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/settings_controller.rb
app/controllers/admin/settings_controller.rb
class Admin::SettingsController < Admin::BaseController def edit @site = Site.find(site.id) end def design @site = Site.find(site.id) end def update @site = Site.find(site.id) if @site.update_attributes(params.require(:site).permit(:title, :domain, :description, :support_email, :website_url...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/issues_controller.rb
app/controllers/admin/issues_controller.rb
class Admin::IssuesController < Admin::BaseController before_action { params[:id] && @issue = Issue.find(params[:id]) } def index @ongoing_issues = Issue.ongoing.ordered.includes(:latest_update, :service_status, :user) end def resolved @issues = Issue.resolved.ordered.includes(:latest_update, :servic...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/maintenance_updates_controller.rb
app/controllers/admin/maintenance_updates_controller.rb
class Admin::MaintenanceUpdatesController < Admin::BaseController before_action { @maintenance = Maintenance.find(params[:maintenance_id]) } before_action { params[:id] && @maintenance_update = @maintenance.updates.find(params[:id]) } def create @update = @maintenance.updates.build(safe_params) @update....
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/dashboard_controller.rb
app/controllers/admin/dashboard_controller.rb
class Admin::DashboardController < Admin::BaseController def index @services = Service.ordered.includes(:status, {:active_maintenances => :service_status}) end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
class Admin::UsersController < Admin::BaseController before_action { params[:id] && @user = User.find(params[:id]) } def index @users = User.ordered end def new @user = User.new end def create @user = User.new(safe_params) if @user.save redirect_to admin_users_path, :notice => "#{@...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/service_statuses_controller.rb
app/controllers/admin/service_statuses_controller.rb
class Admin::ServiceStatusesController < Admin::BaseController before_action { params[:id] && @service_status = ServiceStatus.find(params[:id]) } def index @service_statuses = ServiceStatus.ordered.sort_by_type end def new @service_status = ServiceStatus.new end def create @service_status = ...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/api_tokens_controller.rb
app/controllers/admin/api_tokens_controller.rb
class Admin::ApiTokensController < Admin::BaseController before_action { params[:id] && @api_token = ApiToken.find(params[:id]) } def index @api_tokens = ApiToken.ordered end def new @api_token = ApiToken.new end def create @api_token = ApiToken.new(safe_params) if @api_token.save ...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/subscribers_controller.rb
app/controllers/admin/subscribers_controller.rb
class Admin::SubscribersController < Admin::BaseController before_action { params[:id] && @subscriber = Subscriber.find(params[:id]) } def new @subscriber = Subscriber.new end def create @subscriber = Subscriber.new(safe_params) @subscriber.verified_at = Time.now if @subscriber.save red...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/maintenances_controller.rb
app/controllers/admin/maintenances_controller.rb
class Admin::MaintenancesController < Admin::BaseController before_action { params[:id] && @maintenance = Maintenance.find(params[:id]) } def index @maintenances = Maintenance.open.ordered end def completed @maintenances = Maintenance.closed end def show @update = @maintenance.updates.build(...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/base_controller.rb
app/controllers/admin/base_controller.rb
class Admin::BaseController < ApplicationController layout 'admin' before_action :login_required private def login_required unless logged_in? redirect_to admin_login_path end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/helpers_controller.rb
app/controllers/admin/helpers_controller.rb
class Admin::HelpersController < ApplicationController def chronic date = Chronic.parse(params[:string]) render :json => { :raw => date, :formatted => date ? date.to_s(:long) :nil, :nice => date ? Datey::Formatter.new(date).date_and_time : nil } end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/issue_updates_controller.rb
app/controllers/admin/issue_updates_controller.rb
class Admin::IssueUpdatesController < Admin::BaseController before_action { @issue = Issue.find(params[:issue_id]) } before_action { params[:id] && @issue_update = @issue.updates.find(params[:id]) } def create @update = @issue.updates.build(safe_params) @update.user = current_user if @update.save ...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/services_controller.rb
app/controllers/admin/services_controller.rb
class Admin::ServicesController < Admin::BaseController before_action { params[:id] && @service = Service.find(params[:id]) } def index @services = Service.ordered.includes(:status, {:active_maintenances => :service_status}) end def new @service = Service.new end def create @service = Servic...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/sessions_controller.rb
app/controllers/admin/sessions_controller.rb
class Admin::SessionsController < Admin::BaseController layout 'login' skip_before_action :login_required, :only => [:new, :create] def new if Staytus::Config.demo? params[:email] = 'admin@example.com' params[:password] = 'password' end end def create if Staytus::Config.demo? ...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/service_groups_controller.rb
app/controllers/admin/service_groups_controller.rb
class Admin::ServiceGroupsController < Admin::BaseController before_action { params[:id] && @service_group = ServiceGroup.find(params[:id]) } def index @service_groups = ServiceGroup.ordered end def new @service_group = ServiceGroup.new end def create @service_group = ServiceGroup.new(safe_p...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/controllers/admin/email_templates_controller.rb
app/controllers/admin/email_templates_controller.rb
class Admin::EmailTemplatesController < Admin::BaseController def index @templates = EmailTemplate.pluck(:name) end def edit @default = I18n.translate("email_templates")[params[:id].to_sym] raise Status::Error, "Invalid template name" unless @default.is_a?(Hash) @default_content = File.read(Rail...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/maintenance.rb
app/models/maintenance.rb
# == Schema Information # # Table name: maintenances # # id :integer not null, primary key # title :string(255) # description :text(65535) # start_at :datetime # finish_at :datetime # length_in_minutes :integer # user_id :integer # service_sta...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/issue_service_join.rb
app/models/issue_service_join.rb
# == Schema Information # # Table name: issue_service_joins # # id :integer not null, primary key # issue_id :integer # service_id :integer # created_at :datetime not null # updated_at :datetime not null # class IssueServiceJoin < ActiveRecord::Base belongs_to :issue belongs...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/maintenance_update.rb
app/models/maintenance_update.rb
# == Schema Information # # Table name: maintenance_updates # # id :integer not null, primary key # maintenance_id :integer # user_id :integer # text :text(65535) # created_at :datetime not null # updated_at :datetime not null # identifier :string...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/api_token.rb
app/models/api_token.rb
# == Schema Information # # Table name: api_tokens # # id :integer not null, primary key # name :string(255) # token :string(255) # secret :string(255) # created_at :datetime not null # updated_at :datetime not null # class ApiToken < ActiveRecord::Base validate...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/issue.rb
app/models/issue.rb
# == Schema Information # # Table name: issues # # id :integer not null, primary key # title :string(255) # state :string(255) # service_status_id :integer # all_services :boolean default(TRUE) # created_at :datetime not null # updated_...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/service_group.rb
app/models/service_group.rb
# == Schema Information # # Table name: service_groups # # id :integer not null, primary key # name :string(255) # created_at :datetime not null # updated_at :datetime not null # class ServiceGroup < ActiveRecord::Base validates :name, :presence => true scope :ordered, -...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/subscriber.rb
app/models/subscriber.rb
# == Schema Information # # Table name: subscribers # # id :integer not null, primary key # email_address :string(255) # verification_token :string(255) # verified_at :datetime # created_at :datetime not null # updated_at :datetime not null # c...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/email_template.rb
app/models/email_template.rb
# == Schema Information # # Table name: email_templates # # id :integer not null, primary key # name :string(255) # subject :string(255) # content :text(65535) # created_at :datetime not null # updated_at :datetime not null # class EmailTemplate < ActiveRecord::Base ...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/maintenance_service_join.rb
app/models/maintenance_service_join.rb
# == Schema Information # # Table name: maintenance_service_joins # # id :integer not null, primary key # maintenance_id :integer # service_id :integer # created_at :datetime not null # updated_at :datetime not null # class MaintenanceServiceJoin < ActiveRecord::Ba...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/service_status.rb
app/models/service_status.rb
# == Schema Information # # Table name: service_statuses # # id :integer not null, primary key # name :string(255) # permalink :string(255) # color :string(255) # status_type :string(255) # created_at :datetime not null # updated_at :datetime not null # class S...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/history_item.rb
app/models/history_item.rb
# == Schema Information # # Table name: history_items # # id :integer not null, primary key # item_type :string(255) # item_id :integer # date :datetime # class HistoryItem < ActiveRecord::Base belongs_to :item, :polymorphic => true scope :ordered, -> { order(:date => :desc) } def m...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/service.rb
app/models/service.rb
# == Schema Information # # Table name: services # # id :integer not null, primary key # name :string(255) # permalink :string(255) # position :integer # created_at :datetime not null # updated_at :datetime not null # status_id :integer # description :text(65535...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/subscriber_service_join.rb
app/models/subscriber_service_join.rb
# == Schema Information # # Table name: subscriber_service_joins # # id :integer not null, primary key # subscriber_id :integer # service_id :integer # created_at :datetime not null # updated_at :datetime not null # class SubscriberServiceJoin < ActiveRecord::Base b...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/issue_update.rb
app/models/issue_update.rb
# == Schema Information # # Table name: issue_updates # # id :integer not null, primary key # issue_id :integer # user_id :integer # service_status_id :integer # state :string(255) # text :text(65535) # created_at :datetime not nu...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/site.rb
app/models/site.rb
# == Schema Information # # Table name: sites # # id :integer not null, primary key # title :string(255) # description :string(255) # domain :string(255) # support_email :string(255) # website_url :string(255) # time_zone :strin...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/app/models/user.rb
app/models/user.rb
# == Schema Information # # Table name: users # # id :integer not null, primary key # email_address :string(255) # name :string(255) # password_digest :string(255) # created_at :datetime not null # updated_at :datetime not null # class User < ActiveR...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/seeds.rb
db/seeds.rb
# # Create an initial user # User.create!(:email_address => 'admin@example.com', :password => 'password', :name => 'Admin User') # # Create a development API token # ApiToken.create!(:name => "Demo Token", :token => 'demo', :secret => 'demo') # # Create a default site # Site.create!(:title => 'The Widgets Status Site...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/schema.rb
db/schema.rb
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # dat...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20170608083959_create_authie_sessions.authie.rb
db/migrate/20170608083959_create_authie_sessions.authie.rb
# This migration comes from authie (originally 20141012174250) class CreateAuthieSessions < ActiveRecord::Migration[4.2] def change #create_table :authie_sessions do |t| # t.string :token, :browser_id # t.integer :user_id # t.boolean :active, :default => true # t.text :data # t.datetime :...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150219213950_create_service_locations.rb
db/migrate/20150219213950_create_service_locations.rb
class CreateServiceLocations < ActiveRecord::Migration[4.2] def change create_table :service_locations do |t| t.integer :service_id, :location_id t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150222183637_add_time_zone_to_sites.rb
db/migrate/20150222183637_add_time_zone_to_sites.rb
class AddTimeZoneToSites < ActiveRecord::Migration[4.2] def change add_column :sites, :time_zone, :string end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150219203925_create_users.rb
db/migrate/20150219203925_create_users.rb
class CreateUsers < ActiveRecord::Migration[4.2] def change create_table :users do |t| t.string :email_address, :name, :password_digest t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20180425131827_add_privacy_policy_url_to_sites.rb
db/migrate/20180425131827_add_privacy_policy_url_to_sites.rb
class AddPrivacyPolicyUrlToSites < ActiveRecord::Migration[5.1] def change add_column :sites, :privacy_policy_url, :string end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150220140723_create_service_statuses.rb
db/migrate/20150220140723_create_service_statuses.rb
class CreateServiceStatuses < ActiveRecord::Migration[4.2] def change create_table :service_statuses do |t| t.string :name, :permalink, :color, :status_type t.timestamps null: false end add_column :services, :status_id, :integer end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150227191659_create_subscribers.rb
db/migrate/20150227191659_create_subscribers.rb
class CreateSubscribers < ActiveRecord::Migration[4.2] def change create_table :subscribers do |t| t.string :email_address, :verification_token t.datetime :verified_at t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20160524191816_add_service_groups.rb
db/migrate/20160524191816_add_service_groups.rb
class AddServiceGroups < ActiveRecord::Migration[4.2] def change create_table :service_groups do |t| t.string :name t.timestamps null: false end add_column :services, :group_id, :integer end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150225175902_add_description_to_services.rb
db/migrate/20150225175902_add_description_to_services.rb
class AddDescriptionToServices < ActiveRecord::Migration[4.2] def change add_column :services, :description, :text end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150228154218_add_subscription_options.rb
db/migrate/20150228154218_add_subscription_options.rb
class AddSubscriptionOptions < ActiveRecord::Migration[4.2] def change add_column :issues, :notify, :boolean, :default => false add_column :issue_updates, :notify, :boolean, :default => false add_column :maintenances, :notify, :boolean, :default => false add_column :maintenance_updates, :notify, :bool...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20170608083962_add_two_factor_auth_fields_to_authie.authie.rb
db/migrate/20170608083962_add_two_factor_auth_fields_to_authie.authie.rb
# This migration comes from authie (originally 20150305135400) class AddTwoFactorAuthFieldsToAuthie < ActiveRecord::Migration[4.2] def change add_column :authie_sessions, :two_factored_at, :datetime add_column :authie_sessions, :two_factored_ip, :string add_column :authie_sessions, :requests, :integer, :d...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20170608083961_add_parent_id_to_authie_sessions.authie.rb
db/migrate/20170608083961_add_parent_id_to_authie_sessions.authie.rb
# This migration comes from authie (originally 20150109144120) class AddParentIdToAuthieSessions < ActiveRecord::Migration[4.2] def change #add_column :authie_sessions, :parent_id, :integer end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150220155052_create_issue_service_joins.rb
db/migrate/20150220155052_create_issue_service_joins.rb
class CreateIssueServiceJoins < ActiveRecord::Migration[4.2] def change create_table :issue_service_joins do |t| t.integer :issue_id, :service_id t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150219213513_create_services.rb
db/migrate/20150219213513_create_services.rb
class CreateServices < ActiveRecord::Migration[4.2] def change create_table :services do |t| t.string :name, :permalink t.integer :position t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20180307163706_add_additional_indexes.log_logins.rb
db/migrate/20180307163706_add_additional_indexes.log_logins.rb
# This migration comes from log_logins (originally 20180307161400) class AddAdditionalIndexes < ActiveRecord::Migration[4.2] def change add_index :login_events, [:user_id, :id] add_index :login_events, [:ip, :id], :length => {:ip => 50} end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150222153603_create_maintenance_updates.rb
db/migrate/20150222153603_create_maintenance_updates.rb
class CreateMaintenanceUpdates < ActiveRecord::Migration[4.2] def change create_table :maintenance_updates do |t| t.integer :maintenance_id, :user_id t.text :text t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150301145259_create_email_templates.rb
db/migrate/20150301145259_create_email_templates.rb
class CreateEmailTemplates < ActiveRecord::Migration[4.2] def change create_table :email_templates do |t| t.string :name, :subject t.text :content t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150222230215_create_nifty_attachments_table.rb
db/migrate/20150222230215_create_nifty_attachments_table.rb
class CreateNiftyAttachmentsTable < ActiveRecord::Migration[4.2] def up create_table :nifty_attachments do |t| t.integer :parent_id t.string :parent_type, :token, :digest, :role, :file_name, :file_type t.binary :data, :limit => 10.megabytes t.timestamps end end def down drop...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150223165753_add_crawling_to_sites.rb
db/migrate/20150223165753_add_crawling_to_sites.rb
class AddCrawlingToSites < ActiveRecord::Migration[4.2] def change add_column :sites, :crawling_permitted, :boolean, :default => false end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150223001813_add_identifiers_to_issues_and_maintenances.rb
db/migrate/20150223001813_add_identifiers_to_issues_and_maintenances.rb
class AddIdentifiersToIssuesAndMaintenances < ActiveRecord::Migration[4.2] def change add_column :issues, :identifier, :string add_column :issue_updates, :identifier, :string add_column :maintenances, :identifier, :string add_column :maintenance_updates, :identifier, :string end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20201130164954_create_subscriber_service_joins.rb
db/migrate/20201130164954_create_subscriber_service_joins.rb
class CreateSubscriberServiceJoins < ActiveRecord::Migration[5.1] def change create_table :subscriber_service_joins do |t| t.integer :subscriber_id, :service_id t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150228151632_create_delayed_jobs.rb
db/migrate/20150228151632_create_delayed_jobs.rb
class CreateDelayedJobs < ActiveRecord::Migration[4.2] def self.up create_table :delayed_jobs, force: true do |table| table.integer :priority, default: 0, null: false # Allows some jobs to jump to the front of the queue table.integer :attempts, default: 0, null: false # Provides for retries, but still...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150225211649_create_api_tokens.rb
db/migrate/20150225211649_create_api_tokens.rb
class CreateApiTokens < ActiveRecord::Migration[4.2] def change create_table :api_tokens do |t| t.string :name, :token, :secret t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20170608083964_add_index_to_token_hashes_on_authie_sessions.authie.rb
db/migrate/20170608083964_add_index_to_token_hashes_on_authie_sessions.authie.rb
# This migration comes from authie (originally 20170421174100) class AddIndexToTokenHashesOnAuthieSessions < ActiveRecord::Migration[4.2] def change add_index :authie_sessions, :token_hash end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150222141009_create_maintenance_service_joins.rb
db/migrate/20150222141009_create_maintenance_service_joins.rb
class CreateMaintenanceServiceJoins < ActiveRecord::Migration[4.2] def change create_table :maintenance_service_joins do |t| t.integer :maintenance_id, :service_id t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150222140153_drop_locations.rb
db/migrate/20150222140153_drop_locations.rb
class DropLocations < ActiveRecord::Migration[4.2] def change drop_table :locations drop_table :service_locations end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150222140714_create_maintenances.rb
db/migrate/20150222140714_create_maintenances.rb
class CreateMaintenances < ActiveRecord::Migration[4.2] def change create_table :maintenances do |t| t.string :title t.text :description t.datetime :start_at, :finish_at t.integer :length_in_minutes t.boolean :closed, :default => false t.integer :user_id, :service_status_id ...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150223150712_create_history_items.rb
db/migrate/20150223150712_create_history_items.rb
class CreateHistoryItems < ActiveRecord::Migration[4.2] def change create_table :history_items do |t| t.string :item_type t.integer :item_id t.datetime :date end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20180307130608_add_host_to_authie_sessions.authie.rb
db/migrate/20180307130608_add_host_to_authie_sessions.authie.rb
# This migration comes from authie (originally 20180215152200) class AddHostToAuthieSessions < ActiveRecord::Migration[4.2] def change add_column :authie_sessions, :host, :string end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150219213646_create_locations.rb
db/migrate/20150219213646_create_locations.rb
class CreateLocations < ActiveRecord::Migration[4.2] def change create_table :locations do |t| t.string :name, :permalink t.boolean :has_physical_presence, :default => false t.string :physical_address t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150219215308_create_sites.rb
db/migrate/20150219215308_create_sites.rb
class CreateSites < ActiveRecord::Migration[4.2] def change create_table :sites do |t| t.string :title, :description, :domain, :support_email, :website_url end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150220163824_add_user_id_to_issues.rb
db/migrate/20150220163824_add_user_id_to_issues.rb
class AddUserIdToIssues < ActiveRecord::Migration[4.2] def change add_column :issues, :user_id, :integer end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20170608083963_add_token_hashes_to_authie_sessions.authie.rb
db/migrate/20170608083963_add_token_hashes_to_authie_sessions.authie.rb
# This migration comes from authie (originally 20170417170000) class AddTokenHashesToAuthieSessions < ActiveRecord::Migration[4.2] def change add_column :authie_sessions, :token_hash, :string end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150222174621_store_actual_close_time_on_maintenance.rb
db/migrate/20150222174621_store_actual_close_time_on_maintenance.rb
class StoreActualCloseTimeOnMaintenance < ActiveRecord::Migration[4.2] def change remove_column :maintenances, :closed add_column :maintenances, :closed_at, :datetime end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20160121114712_add_http_protocol_to_sites.rb
db/migrate/20160121114712_add_http_protocol_to_sites.rb
class AddHttpProtocolToSites < ActiveRecord::Migration[4.2] def change add_column :sites, :http_protocol, :string Site.where(:http_protocol => nil).update_all(:http_protocol => 'http') end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150228132133_add_email_settings_to_sites.rb
db/migrate/20150228132133_add_email_settings_to_sites.rb
class AddEmailSettingsToSites < ActiveRecord::Migration[4.2] def change add_column :sites, :email_from_name, :string add_column :sites, :email_from_address, :string end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20180307131640_create_log_logins_events_table.log_logins.rb
db/migrate/20180307131640_create_log_logins_events_table.log_logins.rb
# This migration comes from log_logins (originally 20180307100300) class CreateLogLoginsEventsTable < ActiveRecord::Migration[4.2] def change create_table :login_events do |t| t.string :user_type # User, APIToken t.integer :user_id # 141 t.string :username t.string :action # S...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150220145222_create_issues.rb
db/migrate/20150220145222_create_issues.rb
class CreateIssues < ActiveRecord::Migration[4.2] def change create_table :issues do |t| t.string :title, :state t.integer :service_status_id t.boolean :all_services, :default => true t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20150220163013_create_issue_updates.rb
db/migrate/20150220163013_create_issue_updates.rb
class CreateIssueUpdates < ActiveRecord::Migration[4.2] def change create_table :issue_updates do |t| t.integer :issue_id, :user_id, :service_status_id t.string :state t.text :text t.timestamps null: false end end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/db/migrate/20170608083960_add_indexes_to_authie_sessions.authie.rb
db/migrate/20170608083960_add_indexes_to_authie_sessions.authie.rb
# This migration comes from authie (originally 20141013115205) class AddIndexesToAuthieSessions < ActiveRecord::Migration[4.2] def change #add_column :authie_sessions, :user_type, :string #add_index :authie_sessions, :token #add_index :authie_sessions, :browser_id #add_index :authie_sessions, :user_id...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/api/authenticator.rb
api/authenticator.rb
authenticator :default do lookup do token = ApiToken.where(:token => request.headers['X-Auth-Token'], :secret => request.headers['X-Auth-Secret']).first if token.is_a?(ApiToken) token else error :access_denied, "Invalid API credentials provided" end end rule :default, "AccessDenied", ...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/api/structures/service_api_structure.rb
api/structures/service_api_structure.rb
structure :service do basic :id basic :name basic :permalink full :position full :description full :created_at full :updated_at expansion :status end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/api/structures/user_api_structure.rb
api/structures/user_api_structure.rb
structure :user do basic :id basic :email_address basic :name full :created_at full :updated_at end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/api/structures/issue_update_api_structure.rb
api/structures/issue_update_api_structure.rb
structure :issue_update do basic :id basic :state basic :text basic :identifier full :created_at full :updated_at full :notify expansion :user do structure(o.user) end expansion :service_status do structure(o.service_status) end end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/api/structures/subscriber_structure.rb
api/structures/subscriber_structure.rb
structure :subscriber do basic :id basic :email_address full :verification_token full :verified_at full :created_at full :updated_at end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/api/structures/service_status_api_structure.rb
api/structures/service_status_api_structure.rb
structure :service_status do basic :id basic :name basic :permalink basic :color full :created_at full :updated_at end
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/api/structures/issue_api_structure.rb
api/structures/issue_api_structure.rb
structure :issue do basic :id basic :title basic :state basic :identifier full :created_at full :updated_at full :notify expansion :user do structure(o.user) end expansion :service_status do structure(o.service_status) end expansion :updates do o.updates.includes(:service_status,...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/api/controllers/services_api_controller.rb
api/controllers/services_api_controller.rb
controller :services do action :all do action do Service.ordered.includes(:status).map do |s| structure(s, :full => true, :expansions => [:status]) end end end action :info do param :service, :required => true, :type => String action do service = Service.find_by_permali...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/api/controllers/issues_api_controller.rb
api/controllers/issues_api_controller.rb
controller :issues do action :all do action do issues = Issue.ordered.includes(:service_status, :user) issues.map { |i| structure(i, :full => true, :expansions => [:user, :service_status]) } end end action :create do param :title, :required => true, :type => String param :initial_upd...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false
adamcooke/staytus
https://github.com/adamcooke/staytus/blob/3e204359b91109a6dbddf5e6ea22c34051d8db48/api/controllers/subscribers_api_controller.rb
api/controllers/subscribers_api_controller.rb
controller :subscribers do action :info do param :email_address param :verification_token action do if params.email_address subscriber = Subscriber.find_by_email_address!(params.email_address) elsif params.verification_token subscriber = Subscriber.find_by_verification_token!(...
ruby
MIT
3e204359b91109a6dbddf5e6ea22c34051d8db48
2026-01-04T15:57:17.185640Z
false