orthoses-rails 0.4.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -39
- data/examples/rails/Gemfile +16 -0
- data/examples/rails/Gemfile.lock +178 -0
- data/examples/rails/Rakefile +149 -193
- data/examples/rails/config/database.yml +8 -0
- data/examples/rails/config/storage.yml +3 -0
- data/examples/rails/known_sig/actionpack/7.0/action_controller/metal.rbs +4 -0
- data/{lib/orthoses/active_model/known_sig/7.0 → examples/rails/known_sig/activemodel/7.0/active_model}/serialization.rbs +0 -0
- data/{lib/orthoses/active_model/known_sig/7.0 → examples/rails/known_sig/activemodel/7.0/active_model}/validations.rbs +0 -0
- data/examples/rails/known_sig/activerecord/6.0/_active_record_relation.rbs +49 -0
- data/examples/rails/known_sig/activerecord/6.0/_active_record_relation_class_methods.rbs +45 -0
- data/{lib/orthoses/active_record/known_sig/6.0 → examples/rails/known_sig/activerecord/6.0/active_record}/result.rbs +0 -0
- data/examples/rails/known_sig/activerecord/6.1/_active_record_relation.rbs +49 -0
- data/examples/rails/known_sig/activerecord/6.1/_active_record_relation_class_methods.rbs +45 -0
- data/{lib/orthoses/active_record/known_sig/6.1 → examples/rails/known_sig/activerecord/6.1/active_record}/result.rbs +0 -0
- data/examples/rails/known_sig/activerecord/7.0/_active_record_relation.rbs +49 -0
- data/examples/rails/known_sig/activerecord/7.0/_active_record_relation_class_methods.rbs +45 -0
- data/{lib/orthoses/active_record/known_sig/7.0 → examples/rails/known_sig/activerecord/7.0/active_record}/encryption/context.rbs +0 -0
- data/{lib/orthoses/active_record/known_sig/7.0 → examples/rails/known_sig/activerecord/7.0/active_record}/result.rbs +0 -0
- data/{lib/orthoses/active_support/known_sig → examples/rails/known_sig/activesupport}/7.0/active_support/callbacks/callback_chain.rbs +0 -0
- data/examples/rails/known_sig/activesupport/7.0/active_support/duration.rbs +4 -0
- data/{lib/orthoses/active_support/known_sig → examples/rails/known_sig/activesupport}/7.0/active_support/hash_with_indifferent_access.rbs +0 -0
- data/{lib/orthoses/active_support/known_sig → examples/rails/known_sig/activesupport}/7.0/active_support/multibyte/chars.rbs +0 -0
- data/examples/rails/known_sig/activesupport/7.0/active_support/time_with_zone.rbs +5 -0
- data/examples/rails/known_sig/activesupport/7.0/active_support/time_zone.rbs +3 -0
- data/examples/rails/known_sig/activesupport/7.0/date.rbs +6 -0
- data/examples/rails/known_sig/activesupport/7.0/date_and_time/zones.rbs +4 -0
- data/{lib/orthoses/active_support/known_sig → examples/rails/known_sig/activesupport}/7.0/hash_with_indifferent_access.rbs +0 -0
- data/examples/rails/known_sig/activesupport/7.0/integer.rbs +9 -0
- data/examples/rails/known_sig/activesupport/7.0/numeric.rbs +15 -0
- data/examples/rails/known_sig/activesupport/7.0/string.rbs +4 -0
- data/{lib/orthoses/active_support/known_sig → examples/rails/known_sig/activesupport}/7.0/time.rbs +8 -0
- data/examples/rails/tasks/action_pack.rake +141 -0
- data/examples/rails/tasks/action_view.rake +77 -0
- data/examples/rails/tasks/active_job.rake +99 -0
- data/examples/rails/tasks/active_model.rake +46 -0
- data/examples/rails/tasks/active_record.rake +88 -0
- data/examples/rails/tasks/active_storage.rake +94 -0
- data/examples/rails/tasks/active_support.rake +99 -0
- data/examples/rails/tasks/railties.rake +37 -0
- data/lib/orthoses/active_model/has_secure_password.rb +2 -10
- data/lib/orthoses/active_model.rb +0 -1
- data/lib/orthoses/active_record/delegated_type.rb +44 -0
- data/lib/orthoses/active_record/enum.rb +77 -0
- data/lib/orthoses/active_record/generated_attribute_methods.rb +1 -0
- data/lib/orthoses/active_record/scope.rb +63 -0
- data/lib/orthoses/active_record.rb +3 -1
- data/lib/orthoses/active_support/class_attribute.rb +3 -10
- data/lib/orthoses/active_support/configurable.rb +3 -2
- data/lib/orthoses/active_support/delegation.rb +11 -19
- data/lib/orthoses/active_support/mattr_accessor.rb +4 -12
- data/lib/orthoses/active_support/time_with_zone.rb +21 -3
- data/lib/orthoses/active_support.rb +0 -17
- data/lib/orthoses/rails/version.rb +1 -1
- data/lib/orthoses/rails.rb +1 -1
- data/lib/orthoses/railties/mixin.rb +107 -0
- data/lib/orthoses/railties.rb +3 -0
- data/orthoses-rails.gemspec +1 -1
- metadata +48 -89
- data/examples/rails/known_sig/action_cable/connection/test_cookie_jar.rbs +0 -2
- data/examples/rails/known_sig/action_controller/metal.rbs +0 -4
- data/examples/rails/known_sig/action_dispatch/cookies/cookie_jar.rbs +0 -3
- data/examples/rails/known_sig/action_dispatch/response.rbs +0 -4
- data/examples/rails/patch/drb/drb_undumped.rbs +0 -2
- data/examples/rails/patch/drb.rbs +0 -2
- data/examples/rails/patch/erubi/engine.rbs +0 -4
- data/examples/rails/patch/erubi.rbs +0 -2
- data/examples/rails/patch/minitest/kernel.rbs +0 -44
- data/examples/rails/patch/minitest/minitest/abstract_reporter.rbs +0 -49
- data/examples/rails/patch/minitest/minitest/assertion.rbs +0 -16
- data/examples/rails/patch/minitest/minitest/assertions.rbs +0 -545
- data/examples/rails/patch/minitest/minitest/backtrace_filter.rbs +0 -16
- data/examples/rails/patch/minitest/minitest/bench_spec.rbs +0 -101
- data/examples/rails/patch/minitest/minitest/benchmark.rbs +0 -258
- data/examples/rails/patch/minitest/minitest/composite_reporter.rbs +0 -25
- data/examples/rails/patch/minitest/minitest/expectations.rbs +0 -21
- data/examples/rails/patch/minitest/minitest/guard.rbs +0 -64
- data/examples/rails/patch/minitest/minitest/mock.rbs +0 -60
- data/examples/rails/patch/minitest/minitest/parallel/executor.rbs +0 -42
- data/examples/rails/patch/minitest/minitest/parallel/test/class_methods.rbs +0 -6
- data/examples/rails/patch/minitest/minitest/parallel/test.rbs +0 -3
- data/examples/rails/patch/minitest/minitest/parallel.rbs +0 -2
- data/examples/rails/patch/minitest/minitest/pride_io.rbs +0 -54
- data/examples/rails/patch/minitest/minitest/pride_lol.rbs +0 -17
- data/examples/rails/patch/minitest/minitest/progress_reporter.rbs +0 -11
- data/examples/rails/patch/minitest/minitest/reportable.rbs +0 -51
- data/examples/rails/patch/minitest/minitest/reporter.rbs +0 -5
- data/examples/rails/patch/minitest/minitest/result.rbs +0 -28
- data/examples/rails/patch/minitest/minitest/runnable.rbs +0 -131
- data/examples/rails/patch/minitest/minitest/skip.rbs +0 -6
- data/examples/rails/patch/minitest/minitest/spec/dsl/instance_methods.rbs +0 -48
- data/examples/rails/patch/minitest/minitest/spec/dsl.rbs +0 -125
- data/examples/rails/patch/minitest/minitest/spec.rbs +0 -10
- data/examples/rails/patch/minitest/minitest/statistics_reporter.rbs +0 -76
- data/examples/rails/patch/minitest/minitest/summary_reporter.rbs +0 -26
- data/examples/rails/patch/minitest/minitest/test/lifecycle_hooks.rbs +0 -92
- data/examples/rails/patch/minitest/minitest/test.rbs +0 -76
- data/examples/rails/patch/minitest/minitest/unexpected_error.rbs +0 -10
- data/examples/rails/patch/minitest/minitest/unit/test_case.rbs +0 -3
- data/examples/rails/patch/minitest/minitest/unit.rbs +0 -5
- data/examples/rails/patch/minitest/minitest.rbs +0 -966
- data/examples/rails/patch/pg/simple_decoder.rbs +0 -4
- data/examples/rails/patch/pg.rbs +0 -2
- data/examples/rails/patch/qc/queue.rbs +0 -2
- data/examples/rails/patch/qc.rbs +0 -2
- data/examples/rails/patch/que/job.rbs +0 -2
- data/examples/rails/patch/que.rbs +0 -2
- data/examples/rails/patch/rack/cache/entity_store.rbs +0 -2
- data/examples/rails/patch/rack/cache/meta_store.rbs +0 -2
- data/examples/rails/patch/rack/cache.rbs +0 -2
- data/examples/rails/patch/rack/session/dalli.rbs +0 -2
- data/examples/rails/patch/rack/session.rbs +0 -2
- data/examples/rails/patch/rboc.rbs +0 -2
- data/examples/rails/patch/rdoc/generator/sdoc.rbs +0 -3
- data/examples/rails/patch/rdoc/generator.rbs +0 -2
- data/examples/rails/patch/rdoc/task.rbs +0 -2
- data/examples/rails/patch/ripper.rbs +0 -2
- data/examples/rails/patch/sidekiq/worker.rbs +0 -2
- data/examples/rails/patch/sidekiq.rbs +0 -2
- data/examples/rails/patch/sneakers/worker.rbs +0 -2
- data/examples/rails/patch/sneakers.rbs +0 -2
- data/examples/rails/patch/sucker_punch/job.rbs +0 -2
- data/examples/rails/patch/sucker_punch.rbs +0 -2
- data/examples/rails/patch/thor/actions/create_file.rbs +0 -2
- data/examples/rails/patch/thor/actions.rbs +0 -2
- data/examples/rails/patch/thor/error.rbs +0 -2
- data/examples/rails/patch/thor/group.rbs +0 -2
- data/examples/rails/patch/thor.rbs +0 -2
- data/lib/orthoses/active_model/known_sig.rb +0 -21
- data/lib/orthoses/active_record/known_sig.rb +0 -21
- data/lib/orthoses/active_support/known_sig.rb +0 -21
- data/lib/orthoses/rails/known_sig_helper.rb +0 -22
data/examples/rails/patch/pg.rbs
DELETED
data/examples/rails/patch/qc.rbs
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Orthoses
|
4
|
-
module ActiveModel
|
5
|
-
class KnownSig
|
6
|
-
include Orthoses::Rails::KnownSigHelper
|
7
|
-
|
8
|
-
def initialize(loader)
|
9
|
-
@loader = loader
|
10
|
-
end
|
11
|
-
|
12
|
-
def call
|
13
|
-
@loader.call.tap do |store|
|
14
|
-
paths = best_version_paths(::ActiveModel::VERSION::STRING, __dir__)
|
15
|
-
env = Content::Environment.load_from_paths(paths)
|
16
|
-
env.write_to(store: store)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Orthoses
|
4
|
-
module ActiveRecord
|
5
|
-
class KnownSig
|
6
|
-
include Orthoses::Rails::KnownSigHelper
|
7
|
-
|
8
|
-
def initialize(loader)
|
9
|
-
@loader = loader
|
10
|
-
end
|
11
|
-
|
12
|
-
def call
|
13
|
-
@loader.call.tap do |store|
|
14
|
-
paths = best_version_paths(::ActiveRecord::VERSION::STRING, __dir__)
|
15
|
-
env = Content::Environment.load_from_paths(paths)
|
16
|
-
env.write_to(store: store)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Orthoses
|
4
|
-
module ActiveSupport
|
5
|
-
class KnownSig
|
6
|
-
include Orthoses::Rails::KnownSigHelper
|
7
|
-
|
8
|
-
def initialize(loader)
|
9
|
-
@loader = loader
|
10
|
-
end
|
11
|
-
|
12
|
-
def call
|
13
|
-
@loader.call.tap do |store|
|
14
|
-
paths = best_version_paths(::ActiveSupport::VERSION::STRING, __dir__)
|
15
|
-
env = Content::Environment.load_from_paths(paths)
|
16
|
-
env.write_to(store: store)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Orthoses
|
4
|
-
module Rails
|
5
|
-
module KnownSigHelper
|
6
|
-
def best_version_paths(current, base_dir)
|
7
|
-
best_version = find_best_version(current, base_dir)
|
8
|
-
Dir.glob("#{File.expand_path("known_sig", base_dir)}/#{best_version}/**/*.rbs")
|
9
|
-
end
|
10
|
-
|
11
|
-
def find_best_version(current, base_dir)
|
12
|
-
current_v = Gem::Version.new(current)
|
13
|
-
versions = version_dir(base_dir)
|
14
|
-
versions.reverse.bsearch { |v| v <= current_v } || versions.first
|
15
|
-
end
|
16
|
-
|
17
|
-
def version_dir(base_dir)
|
18
|
-
Dir.glob("#{File.expand_path("known_sig", base_dir)}/*").map(&File.method(:basename)).sort
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|