• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LTe / acts-as-messageable / #13845

21 Aug 2024 07:23AM UTC coverage: 91.904% (-0.4%) from 92.341%
#13845

push

web-flow
Bump tapioca from `df6e272` to `f2010b5` (#821)

* Bump tapioca from `df6e272` to `f2010b5`

Bumps [tapioca](https://github.com/Shopify/tapioca) from `df6e272` to `f2010b5`.
- [Release notes](https://github.com/Shopify/tapioca/releases)
- [Commits](https://github.com/Shopify/tapioca/compare/df6e272f4...f2010b52a)

---
updated-dependencies:
- dependency-name: tapioca
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update RBIs [dependabot skip]

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

420 of 457 relevant lines covered (91.9%)

10.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

68.0
/lib/acts_as_messageable/rails6.rb
1
# typed: strict
2
# frozen_string_literal: true
3

4
module ActsAsMessageable
1✔
5
  class Rails6
1✔
6
    extend T::Sig
1✔
7

8
    # @return [ActsAsMessageable::Rails4] api wrapper object
9
    # @param [ActiveRecord::Base] subject
10
    sig { params(subject: T.untyped).void }
1✔
11
    def initialize(subject)
1✔
12
      @subject = subject
×
13
    end
14

15
    # Empty method from Rails 3.x
16
    # @return [NilClass]
17
    # @param [Array] _args
18
    sig { params(_args: T.any(String, Symbol)).void }
1✔
19
    def attr_accessible(*_args); end
1✔
20

21
    # Default scope for Rails 6.x with block support
22
    # @return [Object]
23
    # @param [String, Symbol] order_by
24
    sig { params(order_by: T.any(String, Symbol)).returns(Object) }
1✔
25
    def default_scope(order_by)
1✔
26
      @subject.send(:default_scope) do
×
27
        T.bind(self, ActiveRecord::Relation)
×
28
        order(order_by)
×
29
      end
30
    end
31

32
    # Rename of the method
33
    # @return [Object]
34
    sig { returns(Object) }
1✔
35
    def scoped
1✔
36
      @subject.scope
×
37
    end
38

39
    # Use new method #update! in Rails 6.x
40
    # @return [Object]
41
    # @param [Array] args
42
    sig { params(args: T::Hash[String, String]).returns(T::Boolean) }
1✔
43
    def update_attributes!(*args)
1✔
44
      @subject.update!(*args)
×
45
    end
46

47
    # @return [Object]
48
    # @param [Symbol] name
49
    # @param [Array] args
50
    sig { params(name: Symbol, args: T.untyped).returns(T.untyped) }
1✔
51
    def method_missing(name, *args)
1✔
52
      @subject.send(name, *args) || super
×
53
    end
54

55
    # @return [Boolean]
56
    # @param [String] method_name
57
    # @param [Boolean] include_private
58
    sig { params(method_name: Symbol, include_private: T::Boolean).returns(T::Boolean) }
1✔
59
    def respond_to_missing?(method_name, include_private = false)
1✔
60
      %w[attr_accessible default_scope scoped update_attributes!].include?(method_name) || super
×
61
    end
62
  end
63
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc