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 |
|---|---|---|---|---|---|---|---|---|
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/app/models/notifier.rb | app/models/notifier.rb | class Notifier < ApplicationRecord
belongs_to :provider, class_name: 'NotifierProvider'
belongs_to :user
belongs_to :topic
validates :provider, presence: true
validates :notify_after_sec, numericality: {greater_than_or_equal_to: 5}
serialize :settings, JSON
after_initialize :set_defaults
def set_defa... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/app/models/escalation.rb | app/models/escalation.rb | class Escalation < ApplicationRecord
belongs_to :escalation_series
belongs_to :escalate_to, class_name: 'User'
validates :escalation_series, presence: true
validates :escalate_to, presence: true
validates :escalate_after_sec, numericality: {greater_than_or_equal_to: 5}
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/app/models/escalation_series.rb | app/models/escalation_series.rb | class EscalationSeries < ApplicationRecord
has_many :escalations, dependent: :destroy
has_many :topics, dependent: :destroy
validates :name, presence: true
serialize :settings, JSON
after_initialize :set_defaults
def set_defaults
self.settings ||= {}
end
def update_escalations!
updater_class... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/app/models/incident.rb | app/models/incident.rb | require 'digest/sha1'
class Incident < ApplicationRecord
STATUSES = [:opened, :acknowledged, :resolved]
belongs_to :topic
has_many :events, class_name: 'IncidentEvent', dependent: :destroy
enum status: STATUSES
has_many :comments
validates :topic, presence: true
validates :subject, presence: true
val... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/app/models/user.rb | app/models/user.rb | require 'securerandom'
class User < ApplicationRecord
scope :active, -> { where(active: true) }
has_many :notifiers
serialize :credentials, JSON
validates :name, presence: true
before_save :set_defaults
def self.find_or_create_from_auth_hash(auth_hash)
user = self.find_by(provider: auth_hash[:prov... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/docker/puma.rb | docker/puma.rb | require 'fileutils'
listen_unix = ENV['LISTEN_UNIX']
if listen_unix
bind "unix://#{listen_unix}"
end
environment ENV['RAILS_ENV']
port = ENV['PORT'] || 8080
bind "tcp://0.0.0.0:#{port}"
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/seeds.rb | db/seeds.rb | # This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/schema.rb | db/schema.rb | # encoding: UTF-8
# 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 sou... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150203010417_add_settings_to_escalation_series_again.rb | db/migrate/20150203010417_add_settings_to_escalation_series_again.rb | class AddSettingsToEscalationSeriesAgain < ActiveRecord::Migration
def change
add_column :escalation_series, :settings, :text
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150131121143_set_default_of_enable_of_topic_true.rb | db/migrate/20150131121143_set_default_of_enable_of_topic_true.rb | class SetDefaultOfEnableOfTopicTrue < ActiveRecord::Migration
def change
change_column :topics, :enable, :boolean, default: true
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150120135244_create_escalation_series.rb | db/migrate/20150120135244_create_escalation_series.rb | class CreateEscalationSeries < ActiveRecord::Migration
def change
create_table :escalation_series do |t|
t.string :name
t.timestamps null: false
end
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150125050556_add_provider_to_notifier.rb | db/migrate/20150125050556_add_provider_to_notifier.rb | class AddProviderToNotifier < ActiveRecord::Migration
def change
add_reference :notifiers, :provider, index: true
add_foreign_key :notifiers, :notifier_providers, column: 'provider_id'
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150120134905_create_notifiers.rb | db/migrate/20150120134905_create_notifiers.rb | class CreateNotifiers < ActiveRecord::Migration
def change
create_table :notifiers do |t|
t.integer :type
t.text :settings
t.integer :notify_after_sec
t.timestamps null: false
end
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150123132415_remove_shift.rb | db/migrate/20150123132415_remove_shift.rb | class RemoveShift < ActiveRecord::Migration
def change
drop_table :shifts
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150202152015_add_settings_to_escalation_series.rb | db/migrate/20150202152015_add_settings_to_escalation_series.rb | class AddSettingsToEscalationSeries < ActiveRecord::Migration
def change
add_column :escalation_series, :escalation_series, :text
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20151118061253_add_credentials_to_user.rb | db/migrate/20151118061253_add_credentials_to_user.rb | class AddCredentialsToUser < ActiveRecord::Migration
def change
add_column :users, :credentials, :text
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150201033946_add_login_token_to_user.rb | db/migrate/20150201033946_add_login_token_to_user.rb | class AddLoginTokenToUser < ActiveRecord::Migration
def change
add_column :users, :login_token, :string
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20151117011141_add_active_to_user.rb | db/migrate/20151117011141_add_active_to_user.rb | class AddActiveToUser < ActiveRecord::Migration
def change
add_column :users, :active, :boolean, default: false
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150120141627_rename_type_with_kind_of_topic.rb | db/migrate/20150120141627_rename_type_with_kind_of_topic.rb | class RenameTypeWithKindOfTopic < ActiveRecord::Migration
def change
rename_column :topics, :type, :kind
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150127152127_add_info_to_incident_event.rb | db/migrate/20150127152127_add_info_to_incident_event.rb | class AddInfoToIncidentEvent < ActiveRecord::Migration
def change
add_column :incident_events, :info, :text
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150123150947_create_incident_events.rb | db/migrate/20150123150947_create_incident_events.rb | class CreateIncidentEvents < ActiveRecord::Migration
def change
create_table :incident_events do |t|
t.references :incident, index: true
t.integer :kind
t.text :text
t.references :user_by, index: true
t.timestamps null: false
end
add_foreign_key :incident_events, :incidents
... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20151118061938_delete_token_from_user.rb | db/migrate/20151118061938_delete_token_from_user.rb | class DeleteTokenFromUser < ActiveRecord::Migration
def change
User.all.each do |u|
if u.token
u.update!(credentials: {
token: u.token,
refresh_token: u.refresh_token,
expires_at: u.token_expires_at.to_i,
expires: true,
})
end
end
remove... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150131122151_rename_enable_with_enabled_of_topic.rb | db/migrate/20150131122151_rename_enable_with_enabled_of_topic.rb | class RenameEnableWithEnabledOfTopic < ActiveRecord::Migration
def change
rename_column :topics, :enable, :enabled
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150131120557_add_enable_to_topic.rb | db/migrate/20150131120557_add_enable_to_topic.rb | class AddEnableToTopic < ActiveRecord::Migration
def change
add_column :topics, :enable, :boolean
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150125050529_create_notifier_providers.rb | db/migrate/20150125050529_create_notifier_providers.rb | class CreateNotifierProviders < ActiveRecord::Migration
def change
create_table :notifier_providers do |t|
t.string :name
t.integer :kind
t.text :settings
t.timestamps null: false
end
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150203010332_remove_escalation_series_from_escalation_series.rb | db/migrate/20150203010332_remove_escalation_series_from_escalation_series.rb | class RemoveEscalationSeriesFromEscalationSeries < ActiveRecord::Migration
def change
remove_column :escalation_series, :escalation_series
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150125101901_remove_kind_from_notifier.rb | db/migrate/20150125101901_remove_kind_from_notifier.rb | class RemoveKindFromNotifier < ActiveRecord::Migration
def change
remove_column :notifiers, :kind
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20160210010310_create_maintenances.rb | db/migrate/20160210010310_create_maintenances.rb | class CreateMaintenances < ActiveRecord::Migration
def change
create_table :maintenances do |t|
t.references :topic, index: true
t.datetime :start_time
t.datetime :end_time
t.timestamps null: false
end
add_foreign_key :maintenances, :topics
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150218071007_add_enable_to_notifier.rb | db/migrate/20150218071007_add_enable_to_notifier.rb | class AddEnableToNotifier < ActiveRecord::Migration
def change
add_column :notifiers, :enabled, :boolean, default: true
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150120135123_create_escalations.rb | db/migrate/20150120135123_create_escalations.rb | class CreateEscalations < ActiveRecord::Migration
def change
create_table :escalations do |t|
t.references :escalate_to, index: true
t.integer :escalate_after_sec
t.timestamps null: false
end
add_foreign_key :escalations, :users, column: 'escalate_to_id'
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20161207045554_add_filter_to_maintenance.rb | db/migrate/20161207045554_add_filter_to_maintenance.rb | class AddFilterToMaintenance < ActiveRecord::Migration
def change
add_column :maintenances, :filter, :string
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150120154438_add_name_to_shift.rb | db/migrate/20150120154438_add_name_to_shift.rb | class AddNameToShift < ActiveRecord::Migration
def change
add_column :shifts, :name, :string
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150202155726_add_token_expires_at_to_user.rb | db/migrate/20150202155726_add_token_expires_at_to_user.rb | class AddTokenExpiresAtToUser < ActiveRecord::Migration
def change
add_column :users, :token_expires_at, :datetime
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20160907123728_create_comments.rb | db/migrate/20160907123728_create_comments.rb | class CreateComments < ActiveRecord::Migration
def change
create_table "comments", force: :cascade do |t|
t.integer "incident_id", limit: 4, null: false
t.integer "user_id", limit: 4, null: false
t.text "comment", null: false
t.datetime "created_at", ... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150202151740_add_refresh_token_to_user.rb | db/migrate/20150202151740_add_refresh_token_to_user.rb | class AddRefreshTokenToUser < ActiveRecord::Migration
def change
add_column :users, :refresh_token, :string
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150120151642_add_escalation_series_to_topic.rb | db/migrate/20150120151642_add_escalation_series_to_topic.rb | class AddEscalationSeriesToTopic < ActiveRecord::Migration
def change
add_reference :topics, :escalation_series, index: true
add_foreign_key :topics, :escalation_series
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150120142452_create_incidents.rb | db/migrate/20150120142452_create_incidents.rb | class CreateIncidents < ActiveRecord::Migration
def change
create_table :incidents do |t|
t.string :subject
t.text :description
t.references :topic, index: true
t.datetime :occured_at
t.timestamps null: false
end
add_foreign_key :incidents, :topics
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150128064248_add_email_to_user.rb | db/migrate/20150128064248_add_email_to_user.rb | class AddEmailToUser < ActiveRecord::Migration
def change
add_column :users, :email, :string
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20151117013824_add_provider_and_uid_to_user.rb | db/migrate/20151117013824_add_provider_and_uid_to_user.rb | class AddProviderAndUidToUser < ActiveRecord::Migration
def change
add_column :users, :provider, :string
add_column :users, :uid, :string
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150207164010_add_topic_to_notifier.rb | db/migrate/20150207164010_add_topic_to_notifier.rb | class AddTopicToNotifier < ActiveRecord::Migration
def change
add_reference :notifiers, :topic, index: true
add_foreign_key :notifiers, :topics
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150123150518_add_status_to_incident.rb | db/migrate/20150123150518_add_status_to_incident.rb | class AddStatusToIncident < ActiveRecord::Migration
def change
add_column :incidents, :status, :integer
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150120135351_add_escalation_series_to_escalation.rb | db/migrate/20150120135351_add_escalation_series_to_escalation.rb | class AddEscalationSeriesToEscalation < ActiveRecord::Migration
def change
add_reference :escalations, :escalation_series, index: true
add_foreign_key :escalations, :escalation_series
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20160914063913_add_comment_index.rb | db/migrate/20160914063913_add_comment_index.rb | class AddCommentIndex < ActiveRecord::Migration
def change
add_index :comments, :incident_id
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150121150857_rename_type_with_kind_of_notifier.rb | db/migrate/20150121150857_rename_type_with_kind_of_notifier.rb | class RenameTypeWithKindOfNotifier < ActiveRecord::Migration
def change
rename_column :notifiers, :type, :kind
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150121150043_add_user_to_notifier.rb | db/migrate/20150121150043_add_user_to_notifier.rb | class AddUserToNotifier < ActiveRecord::Migration
def change
add_reference :notifiers, :user, index: true
add_foreign_key :notifiers, :users
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150120134616_create_topics.rb | db/migrate/20150120134616_create_topics.rb | class CreateTopics < ActiveRecord::Migration
def change
create_table :topics do |t|
t.string :name
t.integer :type
t.timestamps null: false
end
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150127142530_remove_user_by_from_incident_event.rb | db/migrate/20150127142530_remove_user_by_from_incident_event.rb | class RemoveUserByFromIncidentEvent < ActiveRecord::Migration
def change
remove_foreign_key :incident_events, column: "user_by_id"
remove_index :incident_events, :user_by_id
remove_column :incident_events, :user_by_id
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150120134747_create_users.rb | db/migrate/20150120134747_create_users.rb | class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :name
t.timestamps null: false
end
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150120135017_create_shifts.rb | db/migrate/20150120135017_create_shifts.rb | class CreateShifts < ActiveRecord::Migration
def change
create_table :shifts do |t|
t.references :user, index: true
t.timestamps null: false
end
add_foreign_key :shifts, :users
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/db/migrate/20150202144538_add_token_to_user.rb | db/migrate/20150202144538_add_token_to_user.rb | class AddTokenToUser < ActiveRecord::Migration
def change
add_column :users, :token, :string
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/rails_helper.rb | spec/rails_helper.rb | # This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require 'spec_helper'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!
# Requires supporting ruby f... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/spec_helper.rb | spec/spec_helper.rb | require 'simplecov'
SimpleCov.start 'rails' do
add_filter '/vendor/'
add_filter '/.bundle/'
end
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/support/sidekiq.rb | spec/support/sidekiq.rb | require 'sidekiq/testing'
RSpec.configure do |config|
config.before(:each) do
Sidekiq::Worker.clear_all
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/support/factory_girl.rb | spec/support/factory_girl.rb | RSpec.configure do |config|
config.include FactoryBot::Syntax::Methods
config.before(:suite) do
begin
FactoryBot.lint
ensure
DatabaseRewinder.clean_all
end
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/requests/topics_spec.rb | spec/requests/topics_spec.rb | require "rails_helper"
RSpec.describe "Topics", type: :request do
describe "POST /topics/1/mailgun" do
let(:subject) { 'New Alert' }
let(:body) { "Your server is on fire" }
it "creates a new incident" do
topic = create(:topic)
post mailgun_topic_path(topic, format: :json), params: {
'... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/requests/maintenances_spec.rb | spec/requests/maintenances_spec.rb | require 'rails_helper'
RSpec.describe "Maintenances", type: :request do
describe "GET /maintenances" do
it "works! (now write some real specs)" do
get maintenances_path
expect(response).to have_http_status(200)
end
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/requests/incident_envets_spec.rb | spec/requests/incident_envets_spec.rb | require 'rails_helper'
RSpec.describe "IncidentEvent", type: :request do
describe "POST /incident_events/:id/twilio" do
let(:incident) { create(:incident) }
let(:event) { create(:incident_event, incident_id: incident.id) }
describe 'without params[:Digits]' do
it "works!" do
post "/inciden... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/helpers/slack_helper_spec.rb | spec/helpers/slack_helper_spec.rb | require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the SlackHelper. For example:
#
# describe SlackHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# ... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/factories/topic.rb | spec/factories/topic.rb | FactoryBot.define do
factory :topic do
name { "Infra" }
kind { "api" }
escalation_series
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/factories/maintenances.rb | spec/factories/maintenances.rb | FactoryBot.define do
factory :maintenance do
topic nil
start_time { "2016-02-10 10:03:10" }
end_time { "2016-02-10 10:03:10" }
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/factories/notifier_provider.rb | spec/factories/notifier_provider.rb | FactoryBot.define do
factory :notifier_provider do
name { "Logger" }
kind { :rails_logger }
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/factories/notifier.rb | spec/factories/notifier.rb | FactoryBot.define do
factory :notifier do
user
association :provider, factory: :notifier_provider
notify_after_sec { 60 }
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/factories/escalation.rb | spec/factories/escalation.rb | FactoryBot.define do
factory :escalation do
association :escalate_to, factory: :user
escalate_after_sec { 60 }
escalation_series
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/factories/escalation_series.rb | spec/factories/escalation_series.rb | FactoryBot.define do
factory :escalation_series do
name { "Infra" }
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/factories/incident_events.rb | spec/factories/incident_events.rb | FactoryBot.define do
factory :incident_event do
incident_id { 1 }
kind { :opened }
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/factories/incident.rb | spec/factories/incident.rb | FactoryBot.define do
factory :incident do
id { 1 }
topic
subject { "mysql-01 is down" }
description { "alert" }
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/factories/user.rb | spec/factories/user.rb | FactoryBot.define do
factory :user do
name { "Ryota Arai" }
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/controllers/slack_controller_spec.rb | spec/controllers/slack_controller_spec.rb | require 'rails_helper'
RSpec.describe SlackController, type: :controller do
describe "GET interactive" do
it "raises token verification failed error" do
expect(get: 'slack/interactive').not_to be_routable
expect{get :interactive}.to raise_error(RuntimeError, /token verification failed/)
end
en... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/models/incident_spec.rb | spec/models/incident_spec.rb | require 'rails_helper'
RSpec.describe Incident, type: :model do
describe "after_create enqueue" do
it "creates escalation jobs" do
series = create(:escalation_series)
escalation = create(:escalation, escalation_series: series)
notifier = create(:notifier, user: escalation.escalate_to)
top... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/models/maintenance_spec.rb | spec/models/maintenance_spec.rb | require 'rails_helper'
RSpec.describe Maintenance, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/models/comment_spec.rb | spec/models/comment_spec.rb | require 'rails_helper'
RSpec.describe Comment, type: :model do
let(:incident) { create(:incident) }
let(:user) { create(:user) }
it 'should be valid' do
comment = Comment.new(
incident: incident,
user: user,
comment: 'Help Me',
)
expect(comment).to be_valid
end
it 'should be i... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/models/escalation_series_spec.rb | spec/models/escalation_series_spec.rb | require 'rails_helper'
require 'ostruct'
require 'google/api_client'
require 'json'
RSpec.describe EscalationSeries, type: :model do
describe "after_create enqueue" do
before do
# I understand that this is not the recommended method, but it is enough.
allow_any_instance_of(Google::APIClient).to recei... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/spec/views/slack/interactive.html.erb_spec.rb | spec/views/slack/interactive.html.erb_spec.rb | require 'rails_helper'
RSpec.describe "slack/interactive.html.erb", type: :view do
pending "add some examples to (or delete) #{__FILE__}"
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/application.rb | config/application.rb | require File.expand_path('../boot', __FILE__)
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "sprockets/railtie"
# require "rails/test_u... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/environment.rb | config/environment.rb | # Load the Rails application.
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
Rails.application.initialize!
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/routes.rb | config/routes.rb | Rails.application.routes.draw do
post 'slack/interactive'
get '/auth/:provider/callback', to: 'sessions#create'
resources :incident_events, only: [] do
member do
post 'twilio'
get 'twilio'
end
end
resources :incidents do
member do
get 'acknowledge'
get 'resolve'
end
... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/boot.rb | config/boot.rb | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/initializers/filter_parameter_logging.rb | config/initializers/filter_parameter_logging.rb | # Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password]
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/initializers/sidekiq.rb | config/initializers/sidekiq.rb | namespace = ENV['REDIS_NAMESPACE'] || "waker-#{Rails.env}"
host = ENV['REDIS_HOST'] || 'localhost'
port = ENV['REDIS_PORT'] || 6379
Sidekiq.configure_server do |config|
config.poll_interval = 5
config.redis = {url: "redis://#{host}:#{port}", namespace: namespace}
end
Sidekiq.configure_client do |config|
config.... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/initializers/session_store.rb | config/initializers/session_store.rb | # Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: '_waker_session'
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/initializers/url_options.rb | config/initializers/url_options.rb | if default_host = ENV['DEFAULT_HOST']
Rails.application.routes.default_url_options[:host] = default_host
end
if default_protocol = ENV['DEFAULT_PROTOCOL']
Rails.application.routes.default_url_options[:protocol] = default_protocol
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/initializers/field_with_errors.rb | config/initializers/field_with_errors.rb | Rails.application.configure do
config.action_view.field_error_proc = lambda do |html_tag, instance|
%Q{<div class="has-error">#{html_tag}</div>}.html_safe
end
end
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/initializers/wrap_parameters.rb | config/initializers/wrap_parameters.rb | # Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters f... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/initializers/omniauth.rb | config/initializers/omniauth.rb | OmniAuth.config.logger = Rails.logger
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/initializers/inflections.rb | config/initializers/inflections.rb | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflec... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/initializers/cookies_serializer.rb | config/initializers/cookies_serializer.rb | # Be sure to restart your server when you modify this file.
Rails.application.config.action_dispatch.cookies_serializer = :json
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/initializers/assets.rb | config/initializers/assets.rb | # Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path
# Precompile additional ... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/initializers/backtrace_silencers.rb | config/initializers/backtrace_silencers.rb | # Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a probl... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/initializers/mime_types.rb | config/initializers/mime_types.rb | # Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
| ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/environments/test.rb | config/environments/test.rb | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suit... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/environments/development.rb | config/environments/development.rb | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web serv... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
ryotarai/waker | https://github.com/ryotarai/waker/blob/24b15020a03659b61257cc33b905e962bcbe4637/config/environments/production.rb | config/environments/production.rb | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web serve... | ruby | MIT | 24b15020a03659b61257cc33b905e962bcbe4637 | 2026-01-04T17:46:55.259411Z | false |
chef/mixlib-shellout | https://github.com/chef/mixlib-shellout/blob/08c2734f5f7861603b7a825f162d10ea1cab2582/spec/spec_helper.rb | spec/spec_helper.rb | require "mixlib/shellout"
require "tmpdir"
require "tempfile"
require "timeout"
# Load everything from spec/support
Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) }
RSpec.configure do |config|
config.mock_with :rspec
config.filter_run focus: true
config.filter_run_excluding external: true
... | ruby | Apache-2.0 | 08c2734f5f7861603b7a825f162d10ea1cab2582 | 2026-01-04T17:46:55.301314Z | false |
chef/mixlib-shellout | https://github.com/chef/mixlib-shellout/blob/08c2734f5f7861603b7a825f162d10ea1cab2582/spec/support/dependency_helper.rb | spec/support/dependency_helper.rb | class DependencyProc < Proc
attr_accessor :present
def self.with(present)
provided = Gem::Version.new(present.dup)
new do |required|
!Gem::Requirement.new(required).satisfied_by?(provided)
end.tap { |l| l.present = present }
end
def inspect
"\"#{present}\""
end
end
| ruby | Apache-2.0 | 08c2734f5f7861603b7a825f162d10ea1cab2582 | 2026-01-04T17:46:55.301314Z | false |
chef/mixlib-shellout | https://github.com/chef/mixlib-shellout/blob/08c2734f5f7861603b7a825f162d10ea1cab2582/spec/support/platform_helpers.rb | spec/support/platform_helpers.rb | def windows?
!!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
end
def unix?
!windows?
end
def linux?
!!(RUBY_PLATFORM =~ /linux/)
end
if windows?
LINE_ENDING = "\r\n".freeze
ECHO_LC_ALL = "echo %LC_ALL%".freeze
else
LINE_ENDING = "\n".freeze
ECHO_LC_ALL = "echo $LC_ALL".freeze
end
def root?
return false i... | ruby | Apache-2.0 | 08c2734f5f7861603b7a825f162d10ea1cab2582 | 2026-01-04T17:46:55.301314Z | false |
chef/mixlib-shellout | https://github.com/chef/mixlib-shellout/blob/08c2734f5f7861603b7a825f162d10ea1cab2582/spec/mixlib/shellout_spec.rb | spec/mixlib/shellout_spec.rb | require "spec_helper"
require "etc"
require "logger"
require "timeout"
describe Mixlib::ShellOut do
let(:shell_cmd) { options ? shell_cmd_with_options : shell_cmd_without_options }
let(:executed_cmd) { shell_cmd.tap(&:run_command) }
let(:stdout) { executed_cmd.stdout }
let(:stderr) { executed_cmd.stderr }
le... | ruby | Apache-2.0 | 08c2734f5f7861603b7a825f162d10ea1cab2582 | 2026-01-04T17:46:55.301314Z | true |
chef/mixlib-shellout | https://github.com/chef/mixlib-shellout/blob/08c2734f5f7861603b7a825f162d10ea1cab2582/spec/mixlib/shellout/helper_spec.rb | spec/mixlib/shellout/helper_spec.rb | require "spec_helper"
require "mixlib/shellout/helper"
require "logger"
# to use this helper you need to either:
# 1. use mixlib-log which has a trace level
# 2. monkeypatch a trace level into ruby's logger like this
# 3. override the __io_for_live_stream method
#
class Logger
module Severity; TRACE = -1; end
d... | ruby | Apache-2.0 | 08c2734f5f7861603b7a825f162d10ea1cab2582 | 2026-01-04T17:46:55.301314Z | false |
chef/mixlib-shellout | https://github.com/chef/mixlib-shellout/blob/08c2734f5f7861603b7a825f162d10ea1cab2582/spec/mixlib/shellout/windows_spec.rb | spec/mixlib/shellout/windows_spec.rb | require "spec_helper"
# FIXME: these are stubby enough unit tests that they almost run under unix, but the
# Mixlib::ShellOut object does not mixin the Windows behaviors when running on unix.
describe "Mixlib::ShellOut::Windows", :windows_only do
describe "Utils" do
describe ".should_run_under_cmd?" do
su... | ruby | Apache-2.0 | 08c2734f5f7861603b7a825f162d10ea1cab2582 | 2026-01-04T17:46:55.301314Z | false |
chef/mixlib-shellout | https://github.com/chef/mixlib-shellout/blob/08c2734f5f7861603b7a825f162d10ea1cab2582/lib/mixlib/shellout.rb | lib/mixlib/shellout.rb | # frozen_string_literal: true
#--
# Author:: Daniel DeLeo (<dan@chef.io>)
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy ... | ruby | Apache-2.0 | 08c2734f5f7861603b7a825f162d10ea1cab2582 | 2026-01-04T17:46:55.301314Z | false |
chef/mixlib-shellout | https://github.com/chef/mixlib-shellout/blob/08c2734f5f7861603b7a825f162d10ea1cab2582/lib/mixlib/shellout/version.rb | lib/mixlib/shellout/version.rb | module Mixlib
class ShellOut
VERSION = "3.4.10".freeze
end
end
| ruby | Apache-2.0 | 08c2734f5f7861603b7a825f162d10ea1cab2582 | 2026-01-04T17:46:55.301314Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.