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
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/functional/retry_spec.rb
spec/functional/retry_spec.rb
require 'functional_spec_helper' describe 'Retries' do let(:app) { Rpush::Fcm::App.new } let(:notification) { Rpush::Fcm::Notification.new } let(:response) { double(Net::HTTPResponse, code: 200) } let(:http) { double(Net::HTTP::Persistent, request: response, shutdown: nil) } let(:fake_device_token) { 'a' * 1...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/functional/adm_spec.rb
spec/functional/adm_spec.rb
require 'functional_spec_helper' describe 'ADM' do let(:app) { Rpush::Adm::App.new } let(:notification) { Rpush::Adm::Notification.new } let(:response) { double(Net::HTTPResponse, code: 200) } let(:http) { double(Net::HTTP::Persistent, request: response, shutdown: nil) } let(:delivered_ids) { [] } let(:fai...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/functional/wpns_spec.rb
spec/functional/wpns_spec.rb
require 'functional_spec_helper' describe 'WPNs' do let(:app) { Rpush::Wpns::App.new } let(:notification_with_data) { Rpush::Wpns::Notification.new } let(:notification_with_alert) { Rpush::Wpns::Notification.new } let(:response) { double(Net::HTTPResponse, code: 200) } let(:http) { double(Net::HTTP::Persiste...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/functional/cli_spec.rb
spec/functional/cli_spec.rb
require 'functional_spec_helper' describe Rpush::CLI do def create_app app = Rpush::Apns2::App.new app.certificate = TEST_CERT app.name = 'test' app.environment = 'development' app.bundle_id = 'com.example.app' app.save! app end let(:fake_client) { double( prepare_request: ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/functional/synchronization_spec.rb
spec/functional/synchronization_spec.rb
require 'functional_spec_helper' describe 'Synchronization' do let(:timeout) { 10 } let(:app) { Rpush::Fcm::App.new } def wait_for_num_dispatchers(num) Timeout.timeout(timeout) do until Rpush::Daemon::AppRunner.num_dispatchers_for_app(app) == num sleep 0.1 end end end before do ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/functional/fcm_priority_spec.rb
spec/functional/fcm_priority_spec.rb
require 'functional_spec_helper' describe 'FCM priority' do let(:app) { Rpush::Fcm::App.new } let(:notification) { Rpush::Fcm::Notification.new } let(:hydrated_notification) { Rpush::Fcm::Notification.find(notification.id) } let(:response) { double(Net::HTTPResponse, code: 200) } let(:http) { double(Net::HTT...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/functional/apns2_spec.rb
spec/functional/apns2_spec.rb
require 'functional_spec_helper' describe 'APNs http2 adapter' do let(:fake_client) { double( prepare_request: fake_http2_request, close: 'ok', call_async: 'ok', join: 'ok', on: 'ok' ) } let(:app) { create_app } let(:fake_device_token...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/functional/pushy_spec.rb
spec/functional/pushy_spec.rb
require 'functional_spec_helper' describe 'Pushy' do let(:external_device_id) { '5a622ae5813e2875bfdbe496' } let(:response) { instance_double('Net::HTTPResponse', code: 200, body: { id: external_device_id }.to_json) } let(:http) { instance_double('Net::HTTP::Persistent', request: response, shutdown: nil) } let...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/functional/webpush_spec.rb
spec/functional/webpush_spec.rb
require 'functional_spec_helper' describe 'Webpush' do let(:code) { 201 } let(:response) { instance_double('Net::HTTPResponse', code: code, body: '') } let(:http) { instance_double('Net::HTTP::Persistent', request: response, shutdown: nil) } let(:app) { Rpush::Webpush::App.create!(name: 'MyApp', vapid_keypair:...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/functional/fcm_spec.rb
spec/functional/fcm_spec.rb
require 'functional_spec_helper' describe 'FCM' do let(:app) { Rpush::Fcm::App.new } let(:notification) { Rpush::Fcm::Notification.new } let(:response) { double(Net::HTTPResponse, code: 200) } let(:http) { double(Net::HTTP::Persistent, request: response, shutdown: nil) } let(:fake_device_token) { 'a' * 108 }...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush.rb
lib/rpush.rb
require 'logger' require 'multi_json' require 'active_support/all' require 'net-http2' require 'jwt' require 'googleauth' require 'rails' require 'rpush/version' require 'rpush/cli' require 'rpush/deprecation' require 'rpush/deprecatable' require 'rpush/logger' require 'rpush/multi_json_helper' require 'rpush/configu...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/rpush_config_generator.rb
lib/generators/rpush_config_generator.rb
class RpushConfigGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) def copy_config copy_file 'rpush.rb', $RPUSH_CONFIG_PATH end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/rpush_migration_generator.rb
lib/generators/rpush_migration_generator.rb
class RpushMigrationGenerator < Rails::Generators::Base include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) class << self attr_accessor :next_template def next_migration_number(path) return new_migration_number unless next_template if existing_migrati...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/add_alert_is_json_to_rapns_notifications.rb
lib/generators/templates/add_alert_is_json_to_rapns_notifications.rb
class AddAlertIsJsonToRapnsNotifications < ActiveRecord::Migration[5.0] def self.up add_column :rapns_notifications, :alert_is_json, :boolean, null: true, default: false end def self.down remove_column :rapns_notifications, :alert_is_json end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_4_1_1_updates.rb
lib/generators/templates/rpush_4_1_1_updates.rb
class Rpush411Updates < ActiveRecord::Migration["#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}"] def self.up add_column :rpush_apps, :feedback_enabled, :boolean, default: true end def self.down remove_column :rpush_apps, :feedback_enabled end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_2_1_0_updates.rb
lib/generators/templates/rpush_2_1_0_updates.rb
class Rpush210Updates < ActiveRecord::Migration[5.0] def self.up add_column :rpush_notifications, :url_args, :text, null: true add_column :rpush_notifications, :category, :string, null: true end def self.down remove_column :rpush_notifications, :url_args remove_column :rpush_notifications, :categ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/create_rapns_notifications.rb
lib/generators/templates/create_rapns_notifications.rb
class CreateRapnsNotifications < ActiveRecord::Migration[5.0] def self.up create_table :rapns_notifications do |t| t.integer :badge, null: true t.string :device_token, null: false, limit: 64 t.string :sound, null: true, default: "1.aiff" t....
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_3_0_1_updates.rb
lib/generators/templates/rpush_3_0_1_updates.rb
class Rpush301Updates < ActiveRecord::Migration[5.0] def self.up change_column_null :rpush_notifications, :mutable_content, false change_column_null :rpush_notifications, :content_available, false change_column_null :rpush_notifications, :alert_is_json, false end def self.down change_column_null ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/add_gcm.rb
lib/generators/templates/add_gcm.rb
class AddGcm < ActiveRecord::Migration[5.0] module Rapns class App < ActiveRecord::Base self.table_name = 'rapns_apps' end class Notification < ActiveRecord::Base belongs_to :app self.table_name = 'rapns_notifications' end end def self.up add_column :rapns_notifications, :t...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_3_3_1_updates.rb
lib/generators/templates/rpush_3_3_1_updates.rb
class Rpush331Updates < ActiveRecord::Migration[5.0] def self.up change_column :rpush_notifications, :device_token, :string, null: true change_column :rpush_feedback, :device_token, :string, null: true end def self.down change_column :rpush_notifications, :device_token, :string, null: true, limit: 64...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_4_1_0_updates.rb
lib/generators/templates/rpush_4_1_0_updates.rb
class Rpush410Updates < ActiveRecord::Migration["#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}"] def self.up add_column :rpush_notifications, :dry_run, :boolean, null: false, default: false end def self.down remove_column :rpush_notifications, :dry_run end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_3_1_0_add_pushy.rb
lib/generators/templates/rpush_3_1_0_add_pushy.rb
class Rpush310AddPushy < ActiveRecord::Migration[5.0] def self.up add_column :rpush_notifications, :external_device_id, :string, null: true end def self.down remove_column :rpush_notifications, :external_device_id end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/create_rapns_feedback.rb
lib/generators/templates/create_rapns_feedback.rb
class CreateRapnsFeedback < ActiveRecord::Migration[5.0] def self.up create_table :rapns_feedback do |t| t.string :device_token, null: false, limit: 64 t.timestamp :failed_at, null: false t.timestamps end add_index :rapns_feedback, :device_token end def self...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/add_fail_after_to_rpush_notifications.rb
lib/generators/templates/add_fail_after_to_rpush_notifications.rb
class AddFailAfterToRpushNotifications < ActiveRecord::Migration[5.0] def self.up add_column :rpush_notifications, :fail_after, :timestamp, null: true end def self.down remove_column :rpush_notifications, :fail_after end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_3_2_0_add_apns_p8.rb
lib/generators/templates/rpush_3_2_0_add_apns_p8.rb
class Rpush320AddApnsP8 < ActiveRecord::Migration[5.0] def self.up add_column :rpush_apps, :apn_key, :string, null: true add_column :rpush_apps, :apn_key_id, :string, null: true add_column :rpush_apps, :team_id, :string, null: true add_column :rpush_apps, :bundle_id, :string, null: true end def s...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/add_adm.rb
lib/generators/templates/add_adm.rb
class AddAdm < ActiveRecord::Migration[5.0] module Rapns class Notification < ActiveRecord::Base self.table_name = 'rapns_notifications' end end def self.up add_column :rapns_apps, :client_id, :string, null: true add_column :rapns_apps, :client_secret, :string, null: true add_column :ra...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_3_1_1_updates.rb
lib/generators/templates/rpush_3_1_1_updates.rb
class Rpush311Updates < ActiveRecord::Migration[5.0] def self.up change_table :rpush_notifications do |t| t.remove_index name: 'index_rpush_notifications_multi' t.index [:delivered, :failed, :processing, :deliver_after, :created_at], name: 'index_rpush_notifications_multi', where: 'NOT delivered AND N...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_3_3_0_updates.rb
lib/generators/templates/rpush_3_3_0_updates.rb
class Rpush330Updates < ActiveRecord::Migration[5.0] def self.up add_column :rpush_notifications, :thread_id, :string, null: true end def self.down remove_column :rpush_notifications, :thread_id end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_2_6_0_updates.rb
lib/generators/templates/rpush_2_6_0_updates.rb
class Rpush260Updates < ActiveRecord::Migration[5.0] def self.up add_column :rpush_notifications, :content_available, :boolean, default: false end def self.down remove_column :rpush_notifications, :content_available end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/add_app_to_rapns.rb
lib/generators/templates/add_app_to_rapns.rb
class AddAppToRapns < ActiveRecord::Migration[5.0] def self.up add_column :rapns_notifications, :app, :string, null: true add_column :rapns_feedback, :app, :string, null: true end def self.down remove_column :rapns_notifications, :app remove_column :rapns_feedback, :app end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_4_2_0_updates.rb
lib/generators/templates/rpush_4_2_0_updates.rb
class Rpush420Updates < ActiveRecord::Migration["#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}"] def self.up add_column :rpush_notifications, :sound_is_json, :boolean, null: true, default: false end def self.down remove_column :rpush_notifications, :sound_is_json end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/add_rpush.rb
lib/generators/templates/add_rpush.rb
# NOTE TO THE CURIOUS. # # Congratulations on being a diligent developer and vetting the migrations # added to your project! # # You're probably thinking "This migration is huge!". It is, but that doesn't # mean it'll take a long time to run, or that the reason for it being # this size is because of lousy developers. #...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_2_0_0_updates.rb
lib/generators/templates/rpush_2_0_0_updates.rb
class Rpush200Updates < ActiveRecord::Migration[5.0] module Rpush class App < ActiveRecord::Base self.table_name = 'rpush_apps' end class Notification < ActiveRecord::Base self.table_name = 'rpush_notifications' end end def self.update_type(model, from, to) model.where(type: from...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/create_rapns_apps.rb
lib/generators/templates/create_rapns_apps.rb
class CreateRapnsApps < ActiveRecord::Migration[5.0] def self.up create_table :rapns_apps do |t| t.string :key, null: false t.string :environment, null: false t.text :certificate, null: false t.string :password, null: true t.integer :connect...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_3_2_4_updates.rb
lib/generators/templates/rpush_3_2_4_updates.rb
class Rpush324Updates < ActiveRecord::Migration[5.0] def self.up change_column :rpush_apps, :apn_key, :text, null: true end def self.down change_column :rpush_apps, :apn_key, :string, null: true end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_2_7_0_updates.rb
lib/generators/templates/rpush_2_7_0_updates.rb
class Rpush270Updates < ActiveRecord::Migration[5.0] def self.up change_column :rpush_notifications, :alert, :text add_column :rpush_notifications, :notification, :text end def self.down change_column :rpush_notifications, :alert, :string remove_column :rpush_notifications, :notification end en...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_3_0_0_updates.rb
lib/generators/templates/rpush_3_0_0_updates.rb
class Rpush300Updates < ActiveRecord::Migration[5.0] def self.up add_column :rpush_notifications, :mutable_content, :boolean, default: false change_column :rpush_notifications, :sound, :string, default: nil end def self.down remove_column :rpush_notifications, :mutable_content change_column :rpus...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rename_rapns_to_rpush.rb
lib/generators/templates/rename_rapns_to_rpush.rb
class RenameRapnsToRpush < ActiveRecord::Migration[5.0] module Rpush class App < ActiveRecord::Base self.table_name = 'rpush_apps' end class Notification < ActiveRecord::Base self.table_name = 'rpush_notifications' end end def self.update_type(model, from, to) model.where(type: f...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush_7_1_0_updates.rb
lib/generators/templates/rpush_7_1_0_updates.rb
class Rpush710Updates < ActiveRecord::Migration["#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}"] def self.up add_column :rpush_apps, :firebase_project_id, :string add_column :rpush_apps, :json_key, :text end def self.down remove_column :rpush_apps, :firebase_project_id remove_co...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/add_wpns.rb
lib/generators/templates/add_wpns.rb
class AddWpns < ActiveRecord::Migration[5.0] module Rapns class Notification < ActiveRecord::Base self.table_name = 'rapns_notifications' end end def self.up add_column :rapns_notifications, :uri, :string, null: true end def self.down AddWpns::Rapns::Notification.where(type: 'Rapns::Wp...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/generators/templates/rpush.rb
lib/generators/templates/rpush.rb
Rpush.configure do |config| # Supported clients are :active_record and :redis config.client = :active_record # Options passed to Redis.new # config.redis_options = {} # Frequency in seconds to check for new notifications. config.push_poll = 2 # The maximum number of notifications to load from the stor...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/multi_json_helper.rb
lib/rpush/multi_json_helper.rb
module Rpush module MultiJsonHelper def multi_json_load(string, options = {}) # Calling load on multi_json less than v1.3.0 attempts to load a file from disk. if Gem.loaded_specs['multi_json'].version >= Gem::Version.create('1.3.0') MultiJson.load(string, options) else MultiJson....
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/deprecation.rb
lib/rpush/deprecation.rb
module Rpush class Deprecation def self.muted orig_val = Thread.current[:rpush_mute_deprecations] Thread.current[:rpush_mute_deprecations] = true yield ensure Thread.current[:rpush_mute_deprecations] = orig_val end def self.muted? Thread.current[:rpush_mute_deprecations]...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/version.rb
lib/rpush/version.rb
module Rpush module VERSION MAJOR = 9 MINOR = 2 TINY = 0 PRE = nil STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".").freeze def self.to_s STRING end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/deprecatable.rb
lib/rpush/deprecatable.rb
module Rpush module Deprecatable def self.included(base) base.extend ClassMethods end module ClassMethods def deprecated(method_name, version, msg = nil) method_name_as_var = method_name.to_s.tr('=', '_setter_') instance_eval do alias_method "#{method_name_as_var}_wi...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/logger.rb
lib/rpush/logger.rb
module Rpush class Logger attr_reader :internal_logger def initialize @internal_logger = Rpush.config.logger || setup_logger(open_logfile) @internal_logger.level = Rpush.config.log_level rescue SystemCallError => e @internal_logger = nil error(e) error('Logging disabled.') ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/daemon.rb
lib/rpush/daemon.rb
# encoding: UTF-8 require 'thread' require 'socket' require 'pathname' require 'openssl' require 'net/http/persistent' require 'rpush/daemon/errors' require 'rpush/daemon/constants' require 'rpush/daemon/loggable' require 'rpush/daemon/string_helpers' require 'rpush/daemon/interruptible_sleep' require 'rpush/daemon/d...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/proxy.rb
lib/rpush/proxy.rb
module Rpush module Proxy def configure_proxy(options) return unless (proxy_uri = Rpush.config.proxy_uri.presence) options.merge!( { proxy_host: proxy_uri.host, proxy_port: proxy_uri.port.presence, proxy_user: proxy_uri.user.presence, proxy_pass: proxy_...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/plugin.rb
lib/rpush/plugin.rb
module Rpush def self.plugin(name) plugins[name] ||= Rpush::Plugin.new(name) plugins[name] end def self.plugins @plugins ||= {} end class Plugin attr_reader :name, :config, :init_block attr_accessor :url, :description def initialize(name) @name = name @url = nil @d...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/reflection_collection.rb
lib/rpush/reflection_collection.rb
module Rpush class ReflectionCollection class NoSuchReflectionError < StandardError; end REFLECTIONS = [ :apns_feedback, :notification_enqueued, :notification_delivered, :notification_failed, :notification_will_retry, :fcm_delivered_to_recipient, :fcm_failed_to_recipient, :fcm_canonical_id,...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/configuration.rb
lib/rpush/configuration.rb
require 'pathname' require 'ostruct' module Rpush class << self attr_writer :config def config @config ||= Rpush::Configuration.new end def configure return unless block_given? yield config config.initialize_client end end CURRENT_ATTRS = [:push_poll, :embedded, :pi...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/reflectable.rb
lib/rpush/reflectable.rb
module Rpush module Reflectable def reflect(name, *args) Rpush.reflection_stack.each do |reflection_collection| begin reflection_collection.__dispatch(name, *args) rescue StandardError => e Rpush.logger.error(e) end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/cli.rb
lib/rpush/cli.rb
# encoding: UTF-8 require 'thor' require 'rainbow' module Rpush class CLI < Thor def self.detect_rails? ['bin/rails', 'script/rails'].any? { |path| File.exist?(path) } end def self.default_config_path detect_rails? ? 'config/initializers/rpush.rb' : 'config/rpush.rb' end class_opti...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/push.rb
lib/rpush/push.rb
module Rpush def self.push require 'rpush/daemon' Rpush.config.push = true Rpush::Daemon.common_init Rpush::Daemon::Synchronizer.sync Rpush::Daemon::Feeder.start(true) # non-blocking Rpush::Daemon::AppRunner.stop end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/reflection_public_methods.rb
lib/rpush/reflection_public_methods.rb
module Rpush @reflection_stack ||= [ReflectionCollection.new] class << self attr_reader :reflection_stack end def self.reflect yield reflection_stack[0] if block_given? end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/embed.rb
lib/rpush/embed.rb
module Rpush def self.embed require 'rpush/daemon' if @embed_thread STDERR.puts 'Rpush.embed can only be run once inside this process.' end Rpush.config.embedded = true Rpush.config.foreground = true Kernel.at_exit { shutdown } @embed_thread = Thread.new { Rpush::Daemon.start } e...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_record.rb
lib/rpush/client/active_record.rb
require 'active_record' require 'rpush/client/active_model' require 'rpush/client/active_record/notification' require 'rpush/client/active_record/app' require 'rpush/client/active_record/apns/active_record_serializable_notification' require 'rpush/client/active_record/apns/notification' require 'rpush/client/active_...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis.rb
lib/rpush/client/redis.rb
# :nocov: begin require 'modis' require 'redis' rescue LoadError puts str = "* Please add 'rpush-redis' to your Gemfile to use the Redis client. *" puts "*" * str.size puts str puts "*" * str.size puts end require 'rpush/client/active_model' require 'rpush/client/redis/app' require 'rpush/client/redi...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model.rb
lib/rpush/client/active_model.rb
require 'active_model' require 'rpush/client/active_model/notification' require 'rpush/client/active_model/payload_data_size_validator' require 'rpush/client/active_model/registration_ids_count_validator' require 'rpush/client/active_model/certificate_private_key_validator' require 'rpush/client/active_model/apns/dev...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/app.rb
lib/rpush/client/redis/app.rb
module Rpush module Client module Redis class App include Modis::Model self.namespace = 'apps' attribute :name, :string attribute :environment, :string attribute :certificate, :string attribute :password, :string attribute :connections, :integer, defa...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/notification.rb
lib/rpush/client/redis/notification.rb
module Rpush module Client module Redis class Notification include Rpush::MultiJsonHelper include Modis::Model include Rpush::Client::ActiveModel::Notification after_create :register_notification self.namespace = 'notifications' def self.absolute_pending_na...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/webpush/app.rb
lib/rpush/client/redis/webpush/app.rb
module Rpush module Client module Redis module Webpush class App < Rpush::Client::Redis::App include Rpush::Client::ActiveModel::Webpush::App def vapid_keypair=(value) self.certificate = value end end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/webpush/notification.rb
lib/rpush/client/redis/webpush/notification.rb
module Rpush module Client module Redis module Webpush class Notification < Rpush::Client::Redis::Notification include Rpush::Client::ActiveModel::Webpush::Notification def time_to_live=(value) self.expiry = value end end end end end end...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/wns/app.rb
lib/rpush/client/redis/wns/app.rb
module Rpush module Client module Redis module Wns class App < Rpush::Client::Redis::App include Rpush::Client::ActiveModel::Wns::App attribute :access_token, :string attribute :access_token_expiration, :timestamp end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/wns/raw_notification.rb
lib/rpush/client/redis/wns/raw_notification.rb
module Rpush module Client module Redis module Wns class RawNotification < Rpush::Client::Redis::Notification include Rpush::Client::ActiveModel::Wns::Notification end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/wns/badge_notification.rb
lib/rpush/client/redis/wns/badge_notification.rb
module Rpush module Client module Redis module Wns class BadgeNotification < Rpush::Client::Redis::Notification include Rpush::Client::ActiveModel::Wns::Notification def skip_data_validation? true end end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/wns/notification.rb
lib/rpush/client/redis/wns/notification.rb
module Rpush module Client module Redis module Wns class Notification < Rpush::Client::Redis::Notification include Rpush::Client::ActiveModel::Wns::Notification end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/apns2/app.rb
lib/rpush/client/redis/apns2/app.rb
module Rpush module Client module Redis module Apns2 class App < Rpush::Client::Redis::App include Rpush::Client::ActiveModel::Apns2::App end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/apns2/notification.rb
lib/rpush/client/redis/apns2/notification.rb
module Rpush module Client module Redis module Apns2 class Notification < Rpush::Client::Redis::Notification include Rpush::Client::ActiveModel::Apns::Notification include Rpush::Client::ActiveModel::Apns2::Notification end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/apns/feedback.rb
lib/rpush/client/redis/apns/feedback.rb
module Rpush module Client module Redis module Apns class Feedback include Modis::Model attribute :app_id, :integer attribute :device_token, :string attribute :failed_at, :timestamp validates :device_token, presence: true validates :faile...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/apns/app.rb
lib/rpush/client/redis/apns/app.rb
module Rpush module Client module Redis module Apns class App < Rpush::Client::Redis::App include Rpush::Client::ActiveModel::Apns::App end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/apns/notification.rb
lib/rpush/client/redis/apns/notification.rb
module Rpush module Client module Redis module Apns class Notification < Rpush::Client::Redis::Notification include Rpush::Client::ActiveModel::Apns::Notification end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/fcm/app.rb
lib/rpush/client/redis/fcm/app.rb
module Rpush module Client module Redis module Fcm class App < Rpush::Client::Redis::App include Rpush::Client::ActiveModel::Fcm::App end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/fcm/notification.rb
lib/rpush/client/redis/fcm/notification.rb
module Rpush module Client module Redis module Fcm class Notification < Rpush::Client::Redis::Notification include Rpush::Client::ActiveModel::Fcm::Notification end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/pushy/app.rb
lib/rpush/client/redis/pushy/app.rb
module Rpush module Client module Redis module Pushy class App < Rpush::Client::Redis::App include Rpush::Client::ActiveModel::Pushy::App def api_key=(value) self.auth_key = value super end end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/pushy/notification.rb
lib/rpush/client/redis/pushy/notification.rb
module Rpush module Client module Redis module Pushy class Notification < Rpush::Client::Redis::Notification include Rpush::Client::ActiveModel::Pushy::Notification attribute :external_device_id, :string def time_to_live=(value) self.expiry = value ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/apnsp8/app.rb
lib/rpush/client/redis/apnsp8/app.rb
module Rpush module Client module Redis module Apnsp8 class App < Rpush::Client::Redis::App include Rpush::Client::ActiveModel::Apnsp8::App end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/apnsp8/notification.rb
lib/rpush/client/redis/apnsp8/notification.rb
module Rpush module Client module Redis module Apnsp8 class Notification < Rpush::Client::Redis::Notification include Rpush::Client::ActiveModel::Apns::Notification include Rpush::Client::ActiveModel::Apns2::Notification include Rpush::Client::ActiveModel::Apnsp8::Notif...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/wpns/app.rb
lib/rpush/client/redis/wpns/app.rb
module Rpush module Client module Redis module Wpns class App < Rpush::Client::Redis::App include Rpush::Client::ActiveModel::Wpns::App end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/wpns/notification.rb
lib/rpush/client/redis/wpns/notification.rb
module Rpush module Client module Redis module Wpns class Notification < Rpush::Client::Redis::Notification include Rpush::Client::ActiveModel::Wpns::Notification end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/adm/app.rb
lib/rpush/client/redis/adm/app.rb
module Rpush module Client module Redis module Adm class App < Rpush::Client::Redis::App include Rpush::Client::ActiveModel::Adm::App attribute :access_token, :string attribute :access_token_expiration, :timestamp end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/redis/adm/notification.rb
lib/rpush/client/redis/adm/notification.rb
module Rpush module Client module Redis module Adm class Notification < Rpush::Client::Redis::Notification include Rpush::Client::ActiveModel::Adm::Notification end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/certificate_private_key_validator.rb
lib/rpush/client/active_model/certificate_private_key_validator.rb
module Rpush module Client module ActiveModel class CertificatePrivateKeyValidator < ::ActiveModel::Validator def validate(record) if record.certificate.present? begin x509 = OpenSSL::X509::Certificate.new(record.certificate) pkey = OpenSSL::PKey::RS...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/payload_data_size_validator.rb
lib/rpush/client/active_model/payload_data_size_validator.rb
module Rpush module Client module ActiveModel class PayloadDataSizeValidator < ::ActiveModel::Validator def validate(record) limit = options[:limit] || 1024 return unless record.data && record.payload_data_size > limit record.errors.add :base, "Notification payload data...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/registration_ids_count_validator.rb
lib/rpush/client/active_model/registration_ids_count_validator.rb
module Rpush module Client module ActiveModel class RegistrationIdsCountValidator < ::ActiveModel::Validator def validate(record) limit = options[:limit] || 100 return unless record.registration_ids && record.registration_ids.size > limit record.errors.add :base, "Numbe...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/notification.rb
lib/rpush/client/active_model/notification.rb
module Rpush module Client module ActiveModel module Notification def self.included(base) base.instance_eval do validates :expiry, numericality: true, allow_nil: true validates :app, presence: true end end def payload multi_json_...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/webpush/app.rb
lib/rpush/client/active_model/webpush/app.rb
module Rpush module Client module ActiveModel module Webpush module App class VapidKeypairValidator < ::ActiveModel::Validator def validate(record) return if record.vapid_keypair.blank? keypair = record.vapid %i[ subject public_key pri...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/webpush/notification.rb
lib/rpush/client/active_model/webpush/notification.rb
module Rpush module Client module ActiveModel module Webpush module Notification class RegistrationValidator < ::ActiveModel::Validator KEYS = %i[ endpoint keys ].freeze def validate(record) return if record.registration_ids.blank? retur...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/wns/app.rb
lib/rpush/client/active_model/wns/app.rb
module Rpush module Client module ActiveModel module Wns module App def self.included(base) base.instance_eval do validates :client_id, :client_secret, presence: true end end def access_token_expired? access_token_expir...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/wns/notification.rb
lib/rpush/client/active_model/wns/notification.rb
module Rpush module Client module ActiveModel module Wns module Notification WNS_PRIORITY_HIGH = 1 WNS_PRIORITY_MEDIUM = 2 WNS_PRIORITY_LOW = 3 WNS_PRIORITY_VERY_LOW = 4 WNS_PRIORITIES = [WNS_PRIORITY_HIGH, WNS_PRIORITY_MEDIUM, WNS_PRIORITY_LOW, WNS...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/apns2/app.rb
lib/rpush/client/active_model/apns2/app.rb
module Rpush module Client module ActiveModel module Apns2 module App def self.included(base) base.instance_eval do validates :environment, presence: true, inclusion: { in: %w(development production sandbox) } validates :certificate, presence: true ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/apns2/notification.rb
lib/rpush/client/active_model/apns2/notification.rb
module Rpush module Client module ActiveModel module Apns2 include Rpush::Client::ActiveModel::Apns module Notification MAX_PAYLOAD_BYTESIZE = 4096 module ClassMethods def max_payload_bytesize MAX_PAYLOAD_BYTESIZE end end ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/apns/device_token_format_validator.rb
lib/rpush/client/active_model/apns/device_token_format_validator.rb
module Rpush module Client module ActiveModel module Apns class DeviceTokenFormatValidator < ::ActiveModel::Validator def validate(record) return if record.device_token =~ /\A[a-z0-9]\w+\z/i record.errors.add :device_token, "is invalid" end end ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/apns/app.rb
lib/rpush/client/active_model/apns/app.rb
module Rpush module Client module ActiveModel module Apns module App def self.included(base) base.instance_eval do validates :environment, presence: true, inclusion: { in: %w(development production sandbox) } validates :certificate, presence: true ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/apns/notification_payload_size_validator.rb
lib/rpush/client/active_model/apns/notification_payload_size_validator.rb
module Rpush module Client module ActiveModel module Apns class NotificationPayloadSizeValidator < ::ActiveModel::Validator def validate(record) limit = record.class.max_payload_bytesize return unless record.payload.bytesize > limit record.errors.add :ba...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/apns/notification.rb
lib/rpush/client/active_model/apns/notification.rb
module Rpush module Client module ActiveModel module Apns module Notification APNS_DEFAULT_EXPIRY = 1.day.to_i APNS_PRIORITY_IMMEDIATE = 10 APNS_PRIORITY_CONSERVE_POWER = 5 APNS_PRIORITIES = [APNS_PRIORITY_IMMEDIATE, APNS_PRIORITY_CONSERVE_POWER] MAX...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/fcm/expiry_collapse_key_mutual_inclusion_validator.rb
lib/rpush/client/active_model/fcm/expiry_collapse_key_mutual_inclusion_validator.rb
module Rpush module Client module ActiveModel module Fcm class ExpiryCollapseKeyMutualInclusionValidator < ::ActiveModel::Validator def validate(record) return unless record.collapse_key && !record.expiry record.errors.add :expiry, 'must be set when using a collapse...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/fcm/app.rb
lib/rpush/client/active_model/fcm/app.rb
module Rpush module Client module ActiveModel module Fcm module App def self.included(base) base.instance_eval do # TODO: Add whatever validation is needed here # validates :auth_key, presence: true end end def servic...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/fcm/notification.rb
lib/rpush/client/active_model/fcm/notification.rb
module Rpush module Client module ActiveModel module Fcm module Notification FCM_PRIORITY_HIGH = Rpush::Client::ActiveModel::Apns::Notification::APNS_PRIORITY_IMMEDIATE FCM_PRIORITY_NORMAL = Rpush::Client::ActiveModel::Apns::Notification::APNS_PRIORITY_CONSERVE_POWER FC...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/lib/rpush/client/active_model/fcm/notification_keys_in_allowed_list_validator.rb
lib/rpush/client/active_model/fcm/notification_keys_in_allowed_list_validator.rb
module Rpush module Client module ActiveModel module Fcm class NotificationKeysInAllowedListValidator < ::ActiveModel::Validator def validate(record) return unless record.notification allowed_keys = Notification::ROOT_NOTIFICATION_KEYS + Notification::ANDROID_NOTIF...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false