lazy_migrate 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +4 -0
- data/Appraisals +9 -0
- data/Gemfile.lock +133 -4
- data/Guardfile +39 -0
- data/README.md +56 -6
- data/Rakefile +1 -3
- data/bin/exe/lazy_migrate +14 -1
- data/gemfiles/.bundle/config +2 -0
- data/gemfiles/rails_5_1_5.gemfile +8 -0
- data/gemfiles/rails_5_1_5.gemfile.lock +170 -0
- data/gemfiles/rails_5_2_4_3.gemfile +8 -0
- data/gemfiles/rails_5_2_4_3.gemfile.lock +178 -0
- data/github/demo.gif +0 -0
- data/lazy_migrate.gemspec +9 -3
- data/lib/lazy_migrate.rb +6 -2
- data/lib/lazy_migrate/client.rb +123 -0
- data/lib/lazy_migrate/migration.rb +14 -0
- data/lib/lazy_migrate/migrator_adapter.rb +144 -0
- data/lib/lazy_migrate/migrator_adapter_factory.rb +24 -0
- data/lib/lazy_migrate/new_migrator_adapter.rb +85 -0
- data/lib/lazy_migrate/old_migrator_adapter.rb +97 -0
- data/lib/lazy_migrate/version.rb +2 -1
- data/lib/tasks/lazy_migrate.rake +10 -0
- data/sorbet/config +2 -0
- data/sorbet/rbi/gems/actioncable.rbi +393 -0
- data/sorbet/rbi/gems/actionmailer.rbi +425 -0
- data/sorbet/rbi/gems/actionpack.rbi +3230 -0
- data/sorbet/rbi/gems/actionview.rbi +1153 -0
- data/sorbet/rbi/gems/activejob.rbi +282 -0
- data/sorbet/rbi/gems/activemodel.rbi +742 -0
- data/sorbet/rbi/gems/activerecord.rbi +4004 -0
- data/sorbet/rbi/gems/activestorage.rbi +174 -0
- data/sorbet/rbi/gems/activesupport.rbi +2300 -0
- data/sorbet/rbi/gems/appraisal.rbi +151 -0
- data/sorbet/rbi/gems/arel.rbi +1253 -0
- data/sorbet/rbi/gems/byebug.rbi +1041 -0
- data/sorbet/rbi/gems/coderay.rbi +92 -0
- data/sorbet/rbi/gems/concurrent-ruby.rbi +1586 -0
- data/sorbet/rbi/gems/crass.rbi +93 -0
- data/sorbet/rbi/gems/erubi.rbi +27 -0
- data/sorbet/rbi/gems/globalid.rbi +99 -0
- data/sorbet/rbi/gems/i18n.rbi +192 -0
- data/sorbet/rbi/gems/loofah.rbi +131 -0
- data/sorbet/rbi/gems/mail.rbi +1092 -0
- data/sorbet/rbi/gems/marcel.rbi +13 -0
- data/sorbet/rbi/gems/method_source.rbi +64 -0
- data/sorbet/rbi/gems/mini_mime.rbi +52 -0
- data/sorbet/rbi/gems/minitest.rbi +282 -0
- data/sorbet/rbi/gems/nio4r.rbi +68 -0
- data/sorbet/rbi/gems/nokogiri.rbi +1011 -0
- data/sorbet/rbi/gems/pastel.rbi +119 -0
- data/sorbet/rbi/gems/pry-byebug.rbi +155 -0
- data/sorbet/rbi/gems/pry.rbi +1949 -0
- data/sorbet/rbi/gems/rack-test.rbi +162 -0
- data/sorbet/rbi/gems/rack.rbi +525 -0
- data/sorbet/rbi/gems/rails-dom-testing.rbi +68 -0
- data/sorbet/rbi/gems/rails-html-sanitizer.rbi +92 -0
- data/sorbet/rbi/gems/railties.rbi +724 -0
- data/sorbet/rbi/gems/rake.rbi +666 -0
- data/sorbet/rbi/gems/rspec-core.rbi +1939 -0
- data/sorbet/rbi/gems/rspec-expectations.rbi +1123 -0
- data/sorbet/rbi/gems/rspec-mocks.rbi +1090 -0
- data/sorbet/rbi/gems/rspec-support.rbi +280 -0
- data/sorbet/rbi/gems/rspec.rbi +15 -0
- data/sorbet/rbi/gems/sprockets-rails.rbi +106 -0
- data/sorbet/rbi/gems/sprockets.rbi +755 -0
- data/sorbet/rbi/gems/sqlite3.rbi +354 -0
- data/sorbet/rbi/gems/thor.rbi +580 -0
- data/sorbet/rbi/gems/thread_safe.rbi +82 -0
- data/sorbet/rbi/gems/tty-color.rbi +44 -0
- data/sorbet/rbi/gems/tty-cursor.rbi +72 -0
- data/sorbet/rbi/gems/tty-prompt.rbi +531 -0
- data/sorbet/rbi/gems/tty-reader.rbi +176 -0
- data/sorbet/rbi/gems/tty-screen.rbi +66 -0
- data/sorbet/rbi/gems/tzinfo.rbi +406 -0
- data/sorbet/rbi/gems/websocket-driver.rbi +103 -0
- data/sorbet/rbi/gems/websocket-extensions.rbi +29 -0
- data/sorbet/rbi/gems/wisper.rbi +130 -0
- data/sorbet/rbi/hidden-definitions/errors.txt +7584 -0
- data/sorbet/rbi/hidden-definitions/hidden.rbi +13328 -0
- data/sorbet/rbi/sorbet-typed/lib/actionmailer/all/actionmailer.rbi +13 -0
- data/sorbet/rbi/sorbet-typed/lib/actionpack/all/actionpack.rbi +954 -0
- data/sorbet/rbi/sorbet-typed/lib/actionview/all/actionview.rbi +321 -0
- data/sorbet/rbi/sorbet-typed/lib/activemodel/all/activemodel.rbi +597 -0
- data/sorbet/rbi/sorbet-typed/lib/activerecord/<6/activerecord.rbi +13 -0
- data/sorbet/rbi/sorbet-typed/lib/activerecord/>=5.2/activerecord.rbi +16 -0
- data/sorbet/rbi/sorbet-typed/lib/activerecord/>=5/activerecord.rbi +53 -0
- data/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1454 -0
- data/sorbet/rbi/sorbet-typed/lib/activerecord/all/model_schema.rbi +79 -0
- data/sorbet/rbi/sorbet-typed/lib/activerecord/all/sanitization.rbi +36 -0
- data/sorbet/rbi/sorbet-typed/lib/activerecord/~>5.2.0/activerecord.rbi +447 -0
- data/sorbet/rbi/sorbet-typed/lib/activestorage/<=6.1/activestorage.rbi +82 -0
- data/sorbet/rbi/sorbet-typed/lib/activestorage/all/activestorage.rbi +177 -0
- data/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +1431 -0
- data/sorbet/rbi/sorbet-typed/lib/minitest/all/minitest.rbi +108 -0
- data/sorbet/rbi/sorbet-typed/lib/railties/all/railties.rbi +25 -0
- data/sorbet/rbi/todo.rbi +18 -0
- data/sorbet/rbi/user-defined/activerecord.rbi +56 -0
- metadata +181 -7
- data/lib/lazy_migrate/migrator.rb +0 -186
@@ -0,0 +1,24 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "lazy_migrate/old_migrator_adapter"
|
5
|
+
require "lazy_migrate/new_migrator_adapter"
|
6
|
+
|
7
|
+
module LazyMigrate
|
8
|
+
class MigratorAdapterFactory
|
9
|
+
class << self
|
10
|
+
# unfortunately the code is a little different from 5.2 onwards compared to previous
|
11
|
+
# versions, and we want to do more than just invoke the db:migrate rake
|
12
|
+
# commands so we're returning a different adapter depending on the rails
|
13
|
+
# version
|
14
|
+
def create_migrator_adapter
|
15
|
+
if Rails.version > '5.2.0'
|
16
|
+
LazyMigrate::NewMigratorAdapter.new
|
17
|
+
else
|
18
|
+
LazyMigrate::OldMigratorAdapter.new
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'lazy_migrate/migrator_adapter'
|
5
|
+
require 'lazy_migrate/migration'
|
6
|
+
|
7
|
+
module LazyMigrate
|
8
|
+
class NewMigratorAdapter < MigratorAdapter
|
9
|
+
extend T::Sig
|
10
|
+
|
11
|
+
sig { returns(ActiveRecord::MigrationContext) }
|
12
|
+
attr_accessor :context
|
13
|
+
|
14
|
+
sig { void }
|
15
|
+
def initialize
|
16
|
+
# TODO: consider making this a method rather than an instance variable
|
17
|
+
# considering how cheap it is to obtain
|
18
|
+
@context = T.let(ActiveRecord::MigrationContext.new(Rails.root.join('db', 'migrate')), ActiveRecord::MigrationContext)
|
19
|
+
end
|
20
|
+
|
21
|
+
sig { override.params(version: Integer).void }
|
22
|
+
def up(version)
|
23
|
+
context.run(:up, version)
|
24
|
+
end
|
25
|
+
|
26
|
+
sig { override.params(version: Integer).void }
|
27
|
+
def down(version)
|
28
|
+
context.run(:down, version)
|
29
|
+
end
|
30
|
+
|
31
|
+
sig { override.params(version: Integer).void }
|
32
|
+
def redo(version)
|
33
|
+
down(version)
|
34
|
+
up(version)
|
35
|
+
end
|
36
|
+
|
37
|
+
sig { override.params(version: Integer).void }
|
38
|
+
def migrate(version)
|
39
|
+
context.up(version)
|
40
|
+
end
|
41
|
+
|
42
|
+
sig { override.params(version: Integer).void }
|
43
|
+
def rollback(version)
|
44
|
+
# for some reason in https://github.com/rails/rails/blob/5-2-stable/activerecord/lib/active_record/migration.rb#L1221
|
45
|
+
# we stop before the selected version. I have no idea why.
|
46
|
+
|
47
|
+
previous_version = find_previous_version(version)
|
48
|
+
|
49
|
+
if previous_version.nil?
|
50
|
+
# rails excludes the given version when calling .down so we need to
|
51
|
+
# just down this instead
|
52
|
+
down(version)
|
53
|
+
else
|
54
|
+
context.down(previous_version)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
protected
|
59
|
+
|
60
|
+
# example: [['up', '20200715030339', 'Add unique index to table']]
|
61
|
+
sig { override.returns(T::Array[[String, String, String]]) }
|
62
|
+
def find_migration_tuples
|
63
|
+
context.migrations_status
|
64
|
+
end
|
65
|
+
|
66
|
+
sig { override.params(version: Integer).returns(T.nilable(Integer)) }
|
67
|
+
def find_previous_version(version)
|
68
|
+
versions = context.migrations.map(&:version)
|
69
|
+
|
70
|
+
return nil if version == versions.first
|
71
|
+
|
72
|
+
previous_value(versions, version)
|
73
|
+
end
|
74
|
+
|
75
|
+
sig { override.params(migration: LazyMigrate::Migration).returns(T.nilable(String)) }
|
76
|
+
def find_filename_for_migration(migration)
|
77
|
+
context.migrations.find { |m| m.version == migration.version }&.filename
|
78
|
+
end
|
79
|
+
|
80
|
+
sig { override.returns(T.nilable(Integer)) }
|
81
|
+
def last_version
|
82
|
+
context.migrations.last&.version
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'lazy_migrate/migrator_adapter'
|
5
|
+
|
6
|
+
module ActiveRecord
|
7
|
+
class Migrator
|
8
|
+
module Compatibility
|
9
|
+
class V5_1 < ActiveRecord::Migrator
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
module LazyMigrate
|
16
|
+
class OldMigratorAdapter < MigratorAdapter
|
17
|
+
extend T::Sig
|
18
|
+
|
19
|
+
sig { override.params(version: Integer).void }
|
20
|
+
def up(version)
|
21
|
+
ActiveRecord::Migrator::Compatibility::V5_1.run(:up, ActiveRecord::Tasks::DatabaseTasks.migrations_paths, version)
|
22
|
+
end
|
23
|
+
|
24
|
+
sig { override.params(version: Integer).void }
|
25
|
+
def down(version)
|
26
|
+
ActiveRecord::Migrator::Compatibility::V5_1.run(:down, ActiveRecord::Tasks::DatabaseTasks.migrations_paths, version)
|
27
|
+
end
|
28
|
+
|
29
|
+
sig { override.params(version: Integer).void }
|
30
|
+
def redo(version)
|
31
|
+
down(version)
|
32
|
+
up(version)
|
33
|
+
end
|
34
|
+
|
35
|
+
sig { override.params(version: Integer).void }
|
36
|
+
def migrate(version)
|
37
|
+
ActiveRecord::Migrator::Compatibility::V5_1.migrate(base_paths, version)
|
38
|
+
end
|
39
|
+
|
40
|
+
sig { override.params(version: Integer).void }
|
41
|
+
def rollback(version)
|
42
|
+
previous_version = find_previous_version(version)
|
43
|
+
|
44
|
+
if previous_version.nil?
|
45
|
+
# rails excludes the given version when calling .migrate so we need to
|
46
|
+
# just down this instead
|
47
|
+
down(version)
|
48
|
+
else
|
49
|
+
ActiveRecord::Migrator::Compatibility::V5_1.migrate(base_paths, previous_version)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
protected
|
54
|
+
|
55
|
+
# example: [['up', '20200715030339', 'Add unique index to table']]
|
56
|
+
sig { override.returns(T::Array[[String, String, String]]) }
|
57
|
+
def find_migration_tuples
|
58
|
+
ActiveRecord::Migrator::Compatibility::V5_1.migrations_status(base_paths)
|
59
|
+
end
|
60
|
+
|
61
|
+
sig { override.params(version: Integer).returns(T.nilable(Integer)) }
|
62
|
+
def find_previous_version(version)
|
63
|
+
versions = ActiveRecord::Migrator::Compatibility::V5_1.get_all_versions
|
64
|
+
|
65
|
+
return nil if version == versions.first
|
66
|
+
|
67
|
+
previous_value(versions, version)
|
68
|
+
end
|
69
|
+
|
70
|
+
sig { override.params(migration: LazyMigrate::Migration).returns(T.nilable(String)) }
|
71
|
+
def find_filename_for_migration(migration)
|
72
|
+
migrations.find { |m| m.version == migration.version }&.filename
|
73
|
+
end
|
74
|
+
|
75
|
+
sig { override.returns(T.nilable(Integer)) }
|
76
|
+
def last_version
|
77
|
+
ActiveRecord::Migrator::Compatibility::V5_1.get_all_versions.last
|
78
|
+
end
|
79
|
+
|
80
|
+
private
|
81
|
+
|
82
|
+
sig { returns(T::Array[String]) }
|
83
|
+
def base_paths
|
84
|
+
ActiveRecord::Tasks::DatabaseTasks.migrations_paths
|
85
|
+
end
|
86
|
+
|
87
|
+
sig { returns(T::Array[String]) }
|
88
|
+
def migration_files
|
89
|
+
ActiveRecord::Migrator::Compatibility::V5_1.migration_files(base_paths)
|
90
|
+
end
|
91
|
+
|
92
|
+
sig { returns(T::Array[ActiveRecord::MigrationProxy]) }
|
93
|
+
def migrations
|
94
|
+
ActiveRecord::Migrator::Compatibility::V5_1.migrations(base_paths)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
data/lib/lazy_migrate/version.rb
CHANGED
data/sorbet/config
ADDED
@@ -0,0 +1,393 @@
|
|
1
|
+
# This file is autogenerated. Do not edit it by hand. Regenerate it with:
|
2
|
+
# srb rbi gems
|
3
|
+
|
4
|
+
# typed: strict
|
5
|
+
#
|
6
|
+
# If you would like to make changes to this file, great! Please create the gem's shim here:
|
7
|
+
#
|
8
|
+
# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/actioncable/all/actioncable.rbi
|
9
|
+
#
|
10
|
+
# actioncable-5.2.4.3
|
11
|
+
|
12
|
+
module ActionCable
|
13
|
+
def self.gem_version; end
|
14
|
+
def self.server; end
|
15
|
+
def self.version; end
|
16
|
+
def server; end
|
17
|
+
extend ActiveSupport::Autoload
|
18
|
+
end
|
19
|
+
module ActionCable::VERSION
|
20
|
+
end
|
21
|
+
module ActionCable::Helpers
|
22
|
+
end
|
23
|
+
module ActionCable::Helpers::ActionCableHelper
|
24
|
+
def action_cable_meta_tag; end
|
25
|
+
end
|
26
|
+
class ActionCable::Engine < Rails::Engine
|
27
|
+
end
|
28
|
+
module ActionCable::Server
|
29
|
+
extend ActiveSupport::Autoload
|
30
|
+
end
|
31
|
+
module ActionCable::Server::Broadcasting
|
32
|
+
def broadcast(broadcasting, message, coder: nil); end
|
33
|
+
def broadcaster_for(broadcasting, coder: nil); end
|
34
|
+
end
|
35
|
+
class ActionCable::Server::Broadcasting::Broadcaster
|
36
|
+
def broadcast(message); end
|
37
|
+
def broadcasting; end
|
38
|
+
def coder; end
|
39
|
+
def initialize(server, broadcasting, coder:); end
|
40
|
+
def server; end
|
41
|
+
end
|
42
|
+
module ActionCable::Server::Connections
|
43
|
+
def add_connection(connection); end
|
44
|
+
def connections; end
|
45
|
+
def open_connections_statistics; end
|
46
|
+
def remove_connection(connection); end
|
47
|
+
def setup_heartbeat_timer; end
|
48
|
+
end
|
49
|
+
class ActionCable::Server::Configuration
|
50
|
+
def allow_same_origin_as_host; end
|
51
|
+
def allow_same_origin_as_host=(arg0); end
|
52
|
+
def allowed_request_origins; end
|
53
|
+
def allowed_request_origins=(arg0); end
|
54
|
+
def cable; end
|
55
|
+
def cable=(arg0); end
|
56
|
+
def connection_class; end
|
57
|
+
def connection_class=(arg0); end
|
58
|
+
def disable_request_forgery_protection; end
|
59
|
+
def disable_request_forgery_protection=(arg0); end
|
60
|
+
def initialize; end
|
61
|
+
def log_tags; end
|
62
|
+
def log_tags=(arg0); end
|
63
|
+
def logger; end
|
64
|
+
def logger=(arg0); end
|
65
|
+
def mount_path; end
|
66
|
+
def mount_path=(arg0); end
|
67
|
+
def pubsub_adapter; end
|
68
|
+
def url; end
|
69
|
+
def url=(arg0); end
|
70
|
+
def worker_pool_size; end
|
71
|
+
def worker_pool_size=(arg0); end
|
72
|
+
end
|
73
|
+
class ActionCable::Server::Base
|
74
|
+
def call(env); end
|
75
|
+
def config; end
|
76
|
+
def config=(obj); end
|
77
|
+
def connection_identifiers; end
|
78
|
+
def disconnect(identifiers); end
|
79
|
+
def event_loop; end
|
80
|
+
def initialize; end
|
81
|
+
def logger(*args, &block); end
|
82
|
+
def mutex; end
|
83
|
+
def pubsub; end
|
84
|
+
def remote_connections; end
|
85
|
+
def restart; end
|
86
|
+
def self.config; end
|
87
|
+
def self.config=(obj); end
|
88
|
+
def self.logger; end
|
89
|
+
def worker_pool; end
|
90
|
+
include ActionCable::Server::Broadcasting
|
91
|
+
include ActionCable::Server::Connections
|
92
|
+
end
|
93
|
+
class ActionCable::Server::Worker
|
94
|
+
def __callbacks; end
|
95
|
+
def __callbacks?; end
|
96
|
+
def _run_work_callbacks(&block); end
|
97
|
+
def _work_callbacks; end
|
98
|
+
def async_exec(receiver, *args, connection:, &block); end
|
99
|
+
def async_invoke(receiver, method, *args, connection: nil, &block); end
|
100
|
+
def connection; end
|
101
|
+
def connection=(obj); end
|
102
|
+
def executor; end
|
103
|
+
def halt; end
|
104
|
+
def initialize(max_size: nil); end
|
105
|
+
def invoke(receiver, method, *args, connection:, &block); end
|
106
|
+
def logger; end
|
107
|
+
def self.__callbacks; end
|
108
|
+
def self.__callbacks=(val); end
|
109
|
+
def self.__callbacks?; end
|
110
|
+
def self._work_callbacks; end
|
111
|
+
def self._work_callbacks=(value); end
|
112
|
+
def self.connection; end
|
113
|
+
def self.connection=(obj); end
|
114
|
+
def stopping?; end
|
115
|
+
def work(connection); end
|
116
|
+
extend ActiveSupport::Callbacks::ClassMethods
|
117
|
+
extend ActiveSupport::DescendantsTracker
|
118
|
+
include ActionCable::Server::Worker::ActiveRecordConnectionManagement
|
119
|
+
include ActiveSupport::Callbacks
|
120
|
+
end
|
121
|
+
module ActionCable::Server::Worker::ActiveRecordConnectionManagement
|
122
|
+
def with_database_connections; end
|
123
|
+
extend ActiveSupport::Concern
|
124
|
+
end
|
125
|
+
module ActionCable::Connection
|
126
|
+
extend ActiveSupport::Autoload
|
127
|
+
end
|
128
|
+
module ActionCable::Connection::Authorization
|
129
|
+
def reject_unauthorized_connection; end
|
130
|
+
end
|
131
|
+
class ActionCable::Connection::Authorization::UnauthorizedError < StandardError
|
132
|
+
end
|
133
|
+
module ActionCable::Connection::Identification
|
134
|
+
def connection_gid(ids); end
|
135
|
+
def connection_identifier; end
|
136
|
+
extend ActiveSupport::Concern
|
137
|
+
end
|
138
|
+
module ActionCable::Connection::Identification::ClassMethods
|
139
|
+
def identified_by(*identifiers); end
|
140
|
+
end
|
141
|
+
module ActionCable::Connection::InternalChannel
|
142
|
+
def internal_channel; end
|
143
|
+
def process_internal_message(message); end
|
144
|
+
def subscribe_to_internal_channel; end
|
145
|
+
def unsubscribe_from_internal_channel; end
|
146
|
+
extend ActiveSupport::Concern
|
147
|
+
end
|
148
|
+
class ActionCable::Connection::Base
|
149
|
+
def allow_request_origin?; end
|
150
|
+
def beat; end
|
151
|
+
def close; end
|
152
|
+
def cookies; end
|
153
|
+
def decode(websocket_message); end
|
154
|
+
def dispatch_websocket_message(websocket_message); end
|
155
|
+
def encode(cable_message); end
|
156
|
+
def env; end
|
157
|
+
def event_loop(*args, &block); end
|
158
|
+
def finished_request_message; end
|
159
|
+
def handle_close; end
|
160
|
+
def handle_open; end
|
161
|
+
def identifiers; end
|
162
|
+
def identifiers=(val); end
|
163
|
+
def identifiers?; end
|
164
|
+
def initialize(server, env, coder: nil); end
|
165
|
+
def invalid_request_message; end
|
166
|
+
def logger; end
|
167
|
+
def message_buffer; end
|
168
|
+
def new_tagged_logger; end
|
169
|
+
def on_close(reason, code); end
|
170
|
+
def on_error(message); end
|
171
|
+
def on_message(message); end
|
172
|
+
def on_open; end
|
173
|
+
def process; end
|
174
|
+
def protocol; end
|
175
|
+
def pubsub(*args, &block); end
|
176
|
+
def receive(websocket_message); end
|
177
|
+
def request; end
|
178
|
+
def respond_to_invalid_request; end
|
179
|
+
def respond_to_successful_request; end
|
180
|
+
def self.identifiers; end
|
181
|
+
def self.identifiers=(val); end
|
182
|
+
def self.identifiers?; end
|
183
|
+
def send_async(method, *arguments); end
|
184
|
+
def send_welcome_message; end
|
185
|
+
def server; end
|
186
|
+
def started_request_message; end
|
187
|
+
def statistics; end
|
188
|
+
def subscriptions; end
|
189
|
+
def successful_request_message; end
|
190
|
+
def transmit(cable_message); end
|
191
|
+
def websocket; end
|
192
|
+
def worker_pool; end
|
193
|
+
extend ActionCable::Connection::Identification::ClassMethods
|
194
|
+
include ActionCable::Connection::Authorization
|
195
|
+
include ActionCable::Connection::Identification
|
196
|
+
include ActionCable::Connection::InternalChannel
|
197
|
+
end
|
198
|
+
class ActionCable::Connection::ClientSocket
|
199
|
+
def alive?; end
|
200
|
+
def begin_close(reason, code); end
|
201
|
+
def client_gone; end
|
202
|
+
def close(code = nil, reason = nil); end
|
203
|
+
def emit_error(message); end
|
204
|
+
def env; end
|
205
|
+
def finalize_close; end
|
206
|
+
def initialize(env, event_target, event_loop, protocols); end
|
207
|
+
def open; end
|
208
|
+
def parse(data); end
|
209
|
+
def protocol; end
|
210
|
+
def rack_response; end
|
211
|
+
def receive_message(data); end
|
212
|
+
def self.determine_url(env); end
|
213
|
+
def self.secure_request?(env); end
|
214
|
+
def start_driver; end
|
215
|
+
def transmit(message); end
|
216
|
+
def url; end
|
217
|
+
def write(data); end
|
218
|
+
end
|
219
|
+
class ActionCable::Connection::MessageBuffer
|
220
|
+
def append(message); end
|
221
|
+
def buffer(message); end
|
222
|
+
def buffered_messages; end
|
223
|
+
def connection; end
|
224
|
+
def initialize(connection); end
|
225
|
+
def process!; end
|
226
|
+
def processing?; end
|
227
|
+
def receive(message); end
|
228
|
+
def receive_buffered_messages; end
|
229
|
+
def valid?(message); end
|
230
|
+
end
|
231
|
+
class ActionCable::Connection::Stream
|
232
|
+
def clean_rack_hijack; end
|
233
|
+
def close; end
|
234
|
+
def each(&callback); end
|
235
|
+
def flush_write_buffer; end
|
236
|
+
def hijack_rack_socket; end
|
237
|
+
def initialize(event_loop, socket); end
|
238
|
+
def receive(data); end
|
239
|
+
def shutdown; end
|
240
|
+
def write(data); end
|
241
|
+
end
|
242
|
+
class ActionCable::Connection::StreamEventLoop
|
243
|
+
def attach(io, stream); end
|
244
|
+
def detach(io, stream); end
|
245
|
+
def initialize; end
|
246
|
+
def post(task = nil, &block); end
|
247
|
+
def run; end
|
248
|
+
def spawn; end
|
249
|
+
def stop; end
|
250
|
+
def timer(interval, &block); end
|
251
|
+
def wakeup; end
|
252
|
+
def writes_pending(io); end
|
253
|
+
end
|
254
|
+
class ActionCable::Connection::Subscriptions
|
255
|
+
def add(data); end
|
256
|
+
def connection; end
|
257
|
+
def execute_command(data); end
|
258
|
+
def find(data); end
|
259
|
+
def identifiers; end
|
260
|
+
def initialize(connection); end
|
261
|
+
def logger(*args, &block); end
|
262
|
+
def perform_action(data); end
|
263
|
+
def remove(data); end
|
264
|
+
def remove_subscription(subscription); end
|
265
|
+
def subscriptions; end
|
266
|
+
def unsubscribe_from_all; end
|
267
|
+
end
|
268
|
+
class ActionCable::Connection::TaggedLoggerProxy
|
269
|
+
def add_tags(*tags); end
|
270
|
+
def debug(message); end
|
271
|
+
def error(message); end
|
272
|
+
def fatal(message); end
|
273
|
+
def info(message); end
|
274
|
+
def initialize(logger, tags:); end
|
275
|
+
def log(type, message); end
|
276
|
+
def tag(logger); end
|
277
|
+
def tags; end
|
278
|
+
def unknown(message); end
|
279
|
+
def warn(message); end
|
280
|
+
end
|
281
|
+
module ActionCable::Channel
|
282
|
+
extend ActiveSupport::Autoload
|
283
|
+
end
|
284
|
+
module ActionCable::Channel::Callbacks
|
285
|
+
extend ActiveSupport::Concern
|
286
|
+
include ActiveSupport::Callbacks
|
287
|
+
end
|
288
|
+
module ActionCable::Channel::Callbacks::ClassMethods
|
289
|
+
def after_subscribe(*methods, &block); end
|
290
|
+
def after_unsubscribe(*methods, &block); end
|
291
|
+
def before_subscribe(*methods, &block); end
|
292
|
+
def before_unsubscribe(*methods, &block); end
|
293
|
+
def on_subscribe(*methods, &block); end
|
294
|
+
def on_unsubscribe(*methods, &block); end
|
295
|
+
end
|
296
|
+
module ActionCable::Channel::PeriodicTimers
|
297
|
+
def active_periodic_timers; end
|
298
|
+
def start_periodic_timer(callback, every:); end
|
299
|
+
def start_periodic_timers; end
|
300
|
+
def stop_periodic_timers; end
|
301
|
+
extend ActiveSupport::Concern
|
302
|
+
end
|
303
|
+
module ActionCable::Channel::PeriodicTimers::ClassMethods
|
304
|
+
def periodically(callback_or_method_name = nil, every:, &block); end
|
305
|
+
end
|
306
|
+
module ActionCable::Channel::Streams
|
307
|
+
def default_stream_handler(broadcasting, coder:); end
|
308
|
+
def identity_handler; end
|
309
|
+
def pubsub(*args, &block); end
|
310
|
+
def stop_all_streams; end
|
311
|
+
def stream_decoder(handler = nil, coder:); end
|
312
|
+
def stream_for(model, callback = nil, coder: nil, &block); end
|
313
|
+
def stream_from(broadcasting, callback = nil, coder: nil, &block); end
|
314
|
+
def stream_handler(broadcasting, user_handler, coder: nil); end
|
315
|
+
def stream_transmitter(handler = nil, broadcasting:); end
|
316
|
+
def streams; end
|
317
|
+
def worker_pool_stream_handler(broadcasting, user_handler, coder: nil); end
|
318
|
+
extend ActiveSupport::Concern
|
319
|
+
end
|
320
|
+
module ActionCable::Channel::Naming
|
321
|
+
def channel_name(*args, &block); end
|
322
|
+
extend ActiveSupport::Concern
|
323
|
+
end
|
324
|
+
module ActionCable::Channel::Naming::ClassMethods
|
325
|
+
def channel_name; end
|
326
|
+
end
|
327
|
+
module ActionCable::Channel::Broadcasting
|
328
|
+
def broadcasting_for(*args, &block); end
|
329
|
+
extend ActiveSupport::Concern
|
330
|
+
end
|
331
|
+
module ActionCable::Channel::Broadcasting::ClassMethods
|
332
|
+
def broadcast_to(model, message); end
|
333
|
+
def broadcasting_for(model); end
|
334
|
+
end
|
335
|
+
class ActionCable::Channel::Base
|
336
|
+
def __callbacks; end
|
337
|
+
def __callbacks?; end
|
338
|
+
def _run_subscribe_callbacks(&block); end
|
339
|
+
def _run_unsubscribe_callbacks(&block); end
|
340
|
+
def _subscribe_callbacks; end
|
341
|
+
def _unsubscribe_callbacks; end
|
342
|
+
def action_signature(action, data); end
|
343
|
+
def connection; end
|
344
|
+
def defer_subscription_confirmation!; end
|
345
|
+
def defer_subscription_confirmation?; end
|
346
|
+
def delegate_connection_identifiers; end
|
347
|
+
def dispatch_action(action, data); end
|
348
|
+
def ensure_confirmation_sent; end
|
349
|
+
def extract_action(data); end
|
350
|
+
def identifier; end
|
351
|
+
def initialize(connection, identifier, params = nil); end
|
352
|
+
def logger(*args, &block); end
|
353
|
+
def params; end
|
354
|
+
def perform_action(data); end
|
355
|
+
def periodic_timers=(val); end
|
356
|
+
def processable_action?(action); end
|
357
|
+
def reject; end
|
358
|
+
def reject_subscription; end
|
359
|
+
def self.__callbacks; end
|
360
|
+
def self.__callbacks=(val); end
|
361
|
+
def self.__callbacks?; end
|
362
|
+
def self._subscribe_callbacks; end
|
363
|
+
def self._subscribe_callbacks=(value); end
|
364
|
+
def self._unsubscribe_callbacks; end
|
365
|
+
def self._unsubscribe_callbacks=(value); end
|
366
|
+
def self.action_methods; end
|
367
|
+
def self.clear_action_methods!; end
|
368
|
+
def self.method_added(name); end
|
369
|
+
def self.periodic_timers; end
|
370
|
+
def self.periodic_timers=(val); end
|
371
|
+
def self.periodic_timers?; end
|
372
|
+
def subscribe_to_channel; end
|
373
|
+
def subscribed; end
|
374
|
+
def subscription_confirmation_sent?; end
|
375
|
+
def subscription_rejected?; end
|
376
|
+
def transmit(data, via: nil); end
|
377
|
+
def transmit_subscription_confirmation; end
|
378
|
+
def transmit_subscription_rejection; end
|
379
|
+
def unsubscribe_from_channel; end
|
380
|
+
def unsubscribed; end
|
381
|
+
extend ActionCable::Channel::Broadcasting::ClassMethods
|
382
|
+
extend ActionCable::Channel::Callbacks::ClassMethods
|
383
|
+
extend ActionCable::Channel::Naming::ClassMethods
|
384
|
+
extend ActionCable::Channel::PeriodicTimers::ClassMethods
|
385
|
+
extend ActiveSupport::Callbacks::ClassMethods
|
386
|
+
extend ActiveSupport::DescendantsTracker
|
387
|
+
include ActionCable::Channel::Broadcasting
|
388
|
+
include ActionCable::Channel::Callbacks
|
389
|
+
include ActionCable::Channel::Naming
|
390
|
+
include ActionCable::Channel::PeriodicTimers
|
391
|
+
include ActionCable::Channel::Streams
|
392
|
+
include ActiveSupport::Callbacks
|
393
|
+
end
|