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

ruby-smart / support / #8

03 Jul 2024 08:24PM UTC coverage: 99.083%. Remained the same
#8

push

gonzo4711
## [1.5.0] - 2024-07-03
* **[add]** `RubySmart::Support::ThreadInfo.debugger?`-detection to determinate if a **Debugger** gem is active
* **[fix]** `String#to_boolean`-method to detect false-values (which makes all other values become true - similar to `::ActiveRecord::Type::Boolean`)

3 of 3 new or added lines in 2 files covered. (100.0%)

216 of 218 relevant lines covered (99.08%)

71.17 hits per line

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

100.0
/lib/ruby_smart/support/core_ext/ruby/string.rb
1
# frozen_string_literal: true
2

3
require 'digest'
1✔
4

5
unless String.method_defined? "to_boolean"
1✔
6
  class String
1✔
7
    # converts a string to 'boolean'
8
    # @return [Boolean] bool
9
    def to_boolean
1✔
10
      !["0", "f", "false", "off",''].include?(self.downcase)
13✔
11
    end
12
  end
13
end
14

15
unless String.method_defined? "to_md5"
1✔
16
  class String
1✔
17
    # returns the md5 of this string
18
    # @return [String] md5
19
    def to_md5
1✔
20
      ::Digest::MD5.hexdigest(self)
1✔
21
    end
22
  end
23
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